Ignore:
Timestamp:
Nov 16, 2009, 11:06:18 PM (15 years ago)
Author:
LucMorizur
Message:

[Event Cats] Duplication management : found last problem :-) !

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/event_cats/maintain.inc.php

    r4276 r4282  
    4141
    4242        pwg_query("DELETE FROM `".CONFIG_TABLE."` WHERE `param` = 'event_cats' LIMIT 1;");
    43         pwg_query('DROP TABLE IF EXISTS `'.$prefixeTable.'event_cats_duplic`;');
    44         return pwg_query('DROP TABLE IF EXISTS `'.$prefixeTable.'event_cats_autolog`;');
     43        return pwg_query('DROP TABLE IF EXISTS `'.$prefixeTable.'event_cats`;');
    4544}
    4645
     
    5352  // create table for plugin, if it doesn't exist yet
    5453  $r = (pwg_query("
    55     CREATE TABLE `".$prefixeTable."event_cats_autolog` (
     54    CREATE TABLE `".$prefixeTable."event_cats` (
    5655      `id`      SMALLINT(5)             UNSIGNED NOT NULL     AUTO_INCREMENT ,
    5756      `code`    VARCHAR(32)                               DEFAULT NULL ,
     
    136135 
    137136  if ($r) $r = (pwg_query("
    138     CREATE TABLE `".$prefixeTable."event_cats_duplic` (
    139       `item`  VARCHAR(5) NOT NULL ,
    140       `val` VARCHAR(32) NOT NULL ,
    141       KEY `item` (`item`),
    142       KEY `val` (`val`)
    143     )
    144     DEFAULT CHARACTER SET utf8;
    145   ") !== false);
    146 
    147 /*
    148 Explanations on table structure :
    149 
    150 item  : the code used as "autolog" argument. If thie code provided by the
    151           visitor does not exist in the table, the administrator can choose
    152           whether the visitor is redirected to the home page (nothing
    153           happens) or to the "access denied" page ;
    154 value : the account concerned in following values ;
    155 
    156 */
    157  
    158   if ($r) $r = (pwg_query("
    159137    INSERT INTO `".CONFIG_TABLE."` (`param`,`value`,`comment`)
    160138    VALUES ('event_cats','0','Paramètres du plugin Event Cats');
Note: See TracChangeset for help on using the changeset viewer.