Index: /extensions/event_cats/admin/evntcats_admin.php
===================================================================
--- /extensions/event_cats/admin/evntcats_admin.php	(revision 4281)
+++ /extensions/event_cats/admin/evntcats_admin.php	(revision 4282)
@@ -90,10 +90,13 @@
 // If no entry exist, default page is 'autolog_new'.
 $page['tab'] = (!($ec_exist_entries = (mysql_num_rows(pwg_query("
-  SELECT * FROM `".EVNTCATS_AUTOLOG_TABLE."`
+  SELECT * FROM `".EVNTCATS_TABLE."`
   WHERE `code` IS NOT NULL ;
 ")) != 0))) ? 'autolog_new' : 'autolog_entries';
 
 $ec_exist_duplic = ((mysql_num_rows(pwg_query("
-    SELECT * FROM `".EVNTCATS_DUPLIC_TABLE."` ;
+  SELECT * FROM `".EVNTCATS_TABLE."`
+  WHERE `code` IS NULL
+  AND `arg1` IS NOT NULL
+  AND `arg2` IS NOT NULL ;
   ")) != 0) or
   (read_ec_conf('duplic_gen') != 0) or
@@ -204,10 +207,13 @@
 
 $ec_exist_entries = (mysql_num_rows(pwg_query("
-  SELECT * FROM `".EVNTCATS_AUTOLOG_TABLE."`
+  SELECT * FROM `".EVNTCATS_TABLE."`
   WHERE `code` IS NOT NULL
 ")) != 0);
 
 $ec_exist_duplic = ((mysql_num_rows(pwg_query("
-    SELECT * FROM `".EVNTCATS_DUPLIC_TABLE."` ;
+  SELECT * FROM `".EVNTCATS_TABLE."`
+  WHERE `code` IS NULL
+  AND `arg1` IS NOT NULL
+  AND `arg2` IS NOT NULL ;
   ")) != 0) or
   (read_ec_conf('duplic_gen') != 0) or
Index: /extensions/event_cats/include/evntcats_admin_funcs.inc.php
===================================================================
--- /extensions/event_cats/include/evntcats_admin_funcs.inc.php	(revision 4281)
+++ /extensions/event_cats/include/evntcats_admin_funcs.inc.php	(revision 4282)
@@ -376,5 +376,5 @@
   "
     SELECT `id`
-    FROM `".EVNTCATS_AUTOLOG_TABLE."`
+    FROM `".EVNTCATS_TABLE."`
     WHERE `code`    = '".$ec_code."'
       AND `user_id`    ".$ec_user_idp."
@@ -393,5 +393,5 @@
       $t1 = mysql_fetch_row(pwg_query("
         SELECT `code`
-        FROM `".EVNTCATS_AUTOLOG_TABLE."`
+        FROM `".EVNTCATS_TABLE."`
         WHERE `id` = ".$_POST['ec_entry_sel']
       ))) === false
@@ -399,5 +399,5 @@
     $r = pwg_query("
       SELECT `id`
-      FROM `".EVNTCATS_AUTOLOG_TABLE."`
+      FROM `".EVNTCATS_TABLE."`
       WHERE `code` = '".$t1[0]."'
        AND `id` <> ".$_POST['ec_entry_sel']
@@ -425,5 +425,5 @@
     if (
       pwg_query("
-        INSERT INTO `".EVNTCATS_AUTOLOG_TABLE."` (
+        INSERT INTO `".EVNTCATS_TABLE."` (
           `code`,
           `user_id`,
@@ -459,5 +459,5 @@
     if (
       pwg_query("
-        UPDATE `".EVNTCATS_AUTOLOG_TABLE."`
+        UPDATE `".EVNTCATS_TABLE."`
         SET
           `user_id` =  ".$ec_user_id.",
@@ -493,5 +493,5 @@
   global $page;
   if (!pwg_query("
-    DELETE FROM `".EVNTCATS_AUTOLOG_TABLE."`
+    DELETE FROM `".EVNTCATS_TABLE."`
     WHERE `id` = ".$ec_id
   )) {
Index: /extensions/event_cats/include/evntcats_main_funcs.inc.php
===================================================================
--- /extensions/event_cats/include/evntcats_main_funcs.inc.php	(revision 4281)
+++ /extensions/event_cats/include/evntcats_main_funcs.inc.php	(revision 4282)
@@ -155,5 +155,5 @@
       if ($new_action == '') {
         if (!pwg_query("
-          UPDATE `".EVNTCATS_AUTOLOG_TABLE."`
+          UPDATE `".EVNTCATS_TABLE."`
           SET `forced` = 'false'
           WHERE `id` = ".$ec_entry['id']
@@ -247,5 +247,5 @@
   
   $q = pwg_query("
-    SELECT * FROM `".EVNTCATS_AUTOLOG_TABLE."`
+    SELECT * FROM `".EVNTCATS_TABLE."`
     WHERE `code` IS NOT NULL
     ORDER BY `id`
@@ -370,9 +370,11 @@
   $groups_granted_ids = order_by_name(
     array_from_query("
-      SELECT `val`
-        FROM ".EVNTCATS_DUPLIC_TABLE."
-        WHERE `item` = 'grp'
+      SELECT `arg2`
+        FROM ".EVNTCATS_TABLE."
+        WHERE `code` IS NULL
+          AND `arg1` = '1'
+          AND `arg2` IS NOT NULL
       ;",
-      'val'
+      'arg2'
     ),
     $groups
@@ -382,9 +384,11 @@
   $users_granted_direct_ids = order_by_name(
     array_from_query("
-      SELECT `val`
-        FROM ".EVNTCATS_DUPLIC_TABLE."
-        WHERE `item` = 'usr'
+      SELECT `arg2`
+        FROM ".EVNTCATS_TABLE."
+        WHERE `code` IS NULL
+          AND `arg1` = '2'
+          AND `arg2` IS NOT NULL
       ;",
-      'val'
+      'arg2'
     ),
     $ec_lists['user_ids']
Index: /extensions/event_cats/language/fr_FR/duplic.lang.php
===================================================================
--- /extensions/event_cats/language/fr_FR/duplic.lang.php	(revision 4282)
+++ /extensions/event_cats/language/fr_FR/duplic.lang.php	(revision 4282)
@@ -0,0 +1,12 @@
+<?php
+
+/*
+For plugin Event Cats, translation of "duplication" link
+French (Français)
+LucMorizur June - ... 2009
+*/
+
+$lang['Duplicate']         = 'Dupliquer';
+$lang['Duplicate account'] = 'Créer un compte avec les mêmes propriétés';
+
+?>
Index: /extensions/event_cats/main.inc.php
===================================================================
--- /extensions/event_cats/main.inc.php	(revision 4281)
+++ /extensions/event_cats/main.inc.php	(revision 4282)
@@ -43,6 +43,5 @@
 define('EVNTCATS_INFO_VERSION','1.0.0');
 define('EVNTCATS_PATH',PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)). '/');
-define('EVNTCATS_AUTOLOG_TABLE', $prefixeTable.'event_cats_autolog');
-define('EVNTCATS_DUPLIC_TABLE', $prefixeTable.'event_cats_duplic');
+define('EVNTCATS_TABLE', $prefixeTable.'event_cats');
 define('ROOT_URL',get_absolute_root_url());
 
@@ -67,4 +66,11 @@
 $obj = new event_cats();
 
+// Adds the translation of "duplicate" link
+add_event_handler('loading_lang', 'ec_load_duplic_lang' );
+
+function ec_load_duplic_lang() {
+  load_language('duplic.lang', EVNTCATS_PATH);
+}
+
 // Admin help management
 add_event_handler('get_popup_help_content', 'ec_popup_help_content',
@@ -268,5 +274,5 @@
     if (isset($lang['Duplicate account']))
      $lang['Create a new account'] = l10n('Duplicate account');
-    if (isset($lang['Register']))
+    if (isset($lang['Duplicate']))
      $lang['Register'] = l10n('Duplicate');
   }
Index: /extensions/event_cats/maintain.inc.php
===================================================================
--- /extensions/event_cats/maintain.inc.php	(revision 4281)
+++ /extensions/event_cats/maintain.inc.php	(revision 4282)
@@ -41,6 +41,5 @@
 
 	pwg_query("DELETE FROM `".CONFIG_TABLE."` WHERE `param` = 'event_cats' LIMIT 1;");
-	pwg_query('DROP TABLE IF EXISTS `'.$prefixeTable.'event_cats_duplic`;');
-	return pwg_query('DROP TABLE IF EXISTS `'.$prefixeTable.'event_cats_autolog`;');
+	return pwg_query('DROP TABLE IF EXISTS `'.$prefixeTable.'event_cats`;');
 }
 
@@ -53,5 +52,5 @@
   // create table for plugin, if it doesn't exist yet
   $r = (pwg_query("
-    CREATE TABLE `".$prefixeTable."event_cats_autolog` (
+    CREATE TABLE `".$prefixeTable."event_cats` (
       `id`      SMALLINT(5)             UNSIGNED NOT NULL     AUTO_INCREMENT ,
       `code`    VARCHAR(32)                               DEFAULT NULL ,
@@ -136,25 +135,4 @@
   
   if ($r) $r = (pwg_query("
-    CREATE TABLE `".$prefixeTable."event_cats_duplic` (
-      `item`  VARCHAR(5) NOT NULL ,
-      `val` VARCHAR(32) NOT NULL ,
-      KEY `item` (`item`),
-      KEY `val` (`val`)
-    )
-    DEFAULT CHARACTER SET utf8;
-  ") !== false);
-
-/*
-Explanations on table structure :
-
-item  : the code used as "autolog" argument. If thie code provided by the
-          visitor does not exist in the table, the administrator can choose
-          whether the visitor is redirected to the home page (nothing
-          happens) or to the "access denied" page ;
-value : the account concerned in following values ;
-
-*/
-  
-  if ($r) $r = (pwg_query("
     INSERT INTO `".CONFIG_TABLE."` (`param`,`value`,`comment`)
     VALUES ('event_cats','0','Paramètres du plugin Event Cats');
