Index: /extensions/event_cats/admin/template/autolog_new.js
===================================================================
--- /extensions/event_cats/admin/template/autolog_new.js	(revision 4178)
+++ /extensions/event_cats/admin/template/autolog_new.js	(revision 4179)
@@ -436,5 +436,5 @@
            ].label
           )[0];
-          ec_new_user_text = ec_new_user_text.substr(0, 32);
+          ec_new_user_text = ec_new_user_text.substr(0, 50);
           t2 = ec_new_user_text;
         break;
@@ -449,5 +449,5 @@
           else */ ec_new_user_text = ec_reg_cat3.exec(ec_cat_sel)[1];
           ec_new_user_text = ec_new_user_text.replace(/\s/g, '_');
-          ec_new_user_text = ec_new_user_text.substr(0, 32);
+          ec_new_user_text = ec_new_user_text.substr(0, 50);
           t2 = ec_new_user_text;
         if (ec_selected_action == 'ec_input_action_img') {
Index: /extensions/event_cats/admin/template/autolog_new.tpl
===================================================================
--- /extensions/event_cats/admin/template/autolog_new.tpl	(revision 4178)
+++ /extensions/event_cats/admin/template/autolog_new.tpl	(revision 4179)
@@ -153,10 +153,10 @@
           <ul><li>
             <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'ec_new_user_name'|@translate}<br>
-              <input type = "text" name = "ec_in_up_usr_txt" id = "ec_in_up_usr_txt_id" maxlength = "32"
+              <input type = "text" name = "login" id = "ec_in_up_usr_txt_id" maxlength = "50"
                size = "20" onblur = "ec_new_user_text = this.value; ec_check_user_text();"
               />
             </label>
             <label class = "ec_block" onclick = "return ec_mark_user('ec_sel_user_new');">{'ec_new_user_pswd'|@translate}<br>
-              <input type = "text" name = "ec_in_up_psd_txt" id = "ec_in_up_psd_txt_id" maxlength = "32"
+              <input type = "text" name = "password" id = "ec_in_up_psd_txt_id" maxlength = "32"
                size = "20" onblur = "ec_new_psd_text = this.value; ec_check_pwd_text();"
               />
Index: /extensions/event_cats/include/evntcats_admin_funcs.inc.php
===================================================================
--- /extensions/event_cats/include/evntcats_admin_funcs.inc.php	(revision 4178)
+++ /extensions/event_cats/include/evntcats_admin_funcs.inc.php	(revision 4179)
@@ -134,41 +134,6 @@
   global $page, $ec_lists;
   
-/*
-
-(
-    [ec_act1] => create
-    [ec_entry_sel] => -1
-    [ec_sel_code] => new
-    [ec_in_up_auto_code_length] => 10
-    [ec_in_up_code] => 94q0V1067D
-    [ec_sel_user] => new
-    [ec_in_up_usr_txt] => san_gimi
-    [ec_in_up_psd_txt] => 7Mv8QxZV
-    [ec_in_up_newgroup] => on
-    [ec_in_up_grp_txt] => EC_san_gimi
-    [ec_input_action] => cat
-    [ec_in_up_cat] => 6
-    [ec_in_up_img] => 
-)
-
-(
-    [ec_act1] => create
-    [ec_entry_sel] => -1
-    [ec_sel_code] => new
-    [ec_in_up_auto_code_length] => 10
-    [ec_in_up_code] => NU1pah0qVJ
-    [ec_in_up_usr_txt] => 
-    [ec_in_up_psd_txt] => 
-    [ec_in_up_grp_txt] => 
-    [ec_sel_user] => old
-    [ec_in_up_usr_list] => 9
-    [ec_input_action] => cat
-    [ec_in_up_cat] => 6
-    [ec_in_up_img] => 
-)
-
-*/
   // $_POST validity checks : creation prevented in case of bad arguments
-  /* if (
+  if (
     !isset($_POST['ec_in_up_code']) or
     !ereg('^[a-zA-Z0-9_-]{4,32}$', $_POST['ec_in_up_code'])
@@ -188,16 +153,16 @@
   if ($_POST['ec_sel_user'] == 'new') {
     if (
-      !isset($_POST['ec_in_up_usr_txt']) or
-      $_POST['ec_in_up_usr_txt'] == ''
-    ) return ec_end1('ec_in_up_usr_txt', 'ec_bad_argument1');
-    $t1 = (in_array($_POST['ec_in_up_usr_txt'], $ec_lists['user_ids']));
-    if ($t1) return ec_end1('ec_in_up_usr_txt', 'ec_bad_argument3');
+      !isset($_POST['login']) or
+      $_POST['login'] == ''
+    ) return ec_end1('login', 'ec_bad_argument1');
+    if (in_array($_POST['login'], $ec_lists['user_ids']))
+     return ec_end1('login', 'ec_bad_argument3');
   }
   else {
     if (!isset($_POST['ec_in_up_usr_list']))
-     return ec_end1('ec_in_up_usr_txt', 'ec_bad_argument1');
+     return ec_end1('login', 'ec_bad_argument1');
     $ec_user_id = $_POST['ec_in_up_usr_list'];
-    $t1 = (array_key_exists($ec_user_id, $ec_lists['user_ids']));
-    if (!$t1) return ec_end1('ec_in_up_usr_list', 'ec_bad_argument6');
+    if (!array_key_exists($ec_user_id, $ec_lists['user_ids']))
+     return ec_end1('ec_in_up_usr_list', 'ec_bad_argument6');
   }
   
@@ -207,9 +172,9 @@
     // User creation, as generic
     $page['errors'] = register_user(
-     $_POST['ec_in_up_usr_txt'], $_POST['ec_in_up_psd_txt'], '', false
+     $_POST['login'], $_POST['password'], '', false
     );
     if (
       count($page['errors']) != 0 or
-      !($ec_user_id = get_userid($_POST['ec_in_up_usr_txt']))
+      !($ec_user_id = get_userid($_POST['login']))
     ) {
       array_unshift($page['errors'], l10n('ec_user_create_pb'));
@@ -217,5 +182,5 @@
     }
     else
-     $page['infos'][] = l10n('ec_user_create_OK').$_POST['ec_in_up_usr_txt'];
+     $page['infos'][] = l10n('ec_user_create_OK').$_POST['login'];
     if (
       pwg_query("
@@ -225,7 +190,7 @@
       ") !== false
     )
-     $page['infos'][] = l10n('ec_user_generic_OK').$_POST['ec_in_up_usr_txt'];
+     $page['infos'][] = l10n('ec_user_generic_OK').$_POST['login'];
     else
-     $page['errors'][] =l10n('ec_user_generic_pb').$_POST['ec_in_up_usr_txt'];
+     $page['errors'][] =l10n('ec_user_generic_pb').$_POST['login'];
     
     // New group creation if required,
@@ -256,13 +221,13 @@
       if (
         pwg_query("
-          INSERT INTO `".USER_GROUP_TABLE."` (`user_id `, `group_id`)
-          VALUES ('".$ec_user_id."', '".$t3['id']."');
+          INSERT INTO `".USER_GROUP_TABLE."` (`user_id`, `group_id`)
+          VALUES ('".$ec_user_id."', '".$t3[0]."');
         ") === false
-      ) $page['errors'][] = ;
+      ) $page['errors'][] =
        l10n('ec_group_create_pb').' (2) ; '.
        'MySQL error '.mysql_errno().', "'.mysql_error().'"';
       else
        $page['infos'][] =
-        $_POST['ec_in_up_usr_txt'].
+        $_POST['login'].
         l10n('ec_group_create_OK2').
         $_POST['ec_in_up_grp_txt']
@@ -271,5 +236,5 @@
   }
   
-  // Creation of new line in DB event_cats table with all arguments
+  // Preparation of $arg1, $arg2 and $forced
   $arg1 = ''; $arg2 = '';
   if (isset($_POST['ec_input_action'])) switch ($_POST['ec_input_action']) {
@@ -282,5 +247,5 @@
     case 'img':   // Image
       if (isset($_POST['ec_in_up_cat'])) {
-        $arg2 = $_POST['ec_in_up_cat'];
+        $arg1 = $_POST['ec_in_up_cat'];
         if ($_POST['ec_input_action'] == 'img') {
           if (isset($_POST['ec_in_up_img'])) $arg2 = $_POST['ec_in_up_img'];
@@ -290,14 +255,47 @@
       else ec_end1('ec_in_up_cat', 'ec_bad_argument1');
     break;
-    default : ec_end1('ec_input_action', 'ec_bad_argument1');
+    default: ec_end1('ec_input_action', 'ec_bad_argument1');
   }
   else ec_end1('ec_input_action', 'ec_bad_argument1');
-  
-  $forced = (isset($_POST['[ec_in_up_forced]'])) ? 'true' : 'false';
+  $forced = (isset($_POST['ec_in_up_forced'])) ? 'true' : 'false';
   
   // Now we have the code, the user_id, arg1, arg2, and forced arguments
-  */
+  if (
+    pwg_query("
+      INSERT INTO `".EVNTCATS_TABLE."` (
+        `code`,
+        `user_id`,
+        `action`,
+        `arg1`, `arg2`, `forced`
+      )
+      VALUES (
+        '".$_POST['ec_in_up_code']."',
+        '".$ec_user_id."',
+        'ec_ok',
+        '".$arg1."', '".$arg2."', '".$forced."'
+      );
+    ") === false
+  ) {
+    $page['errors'][] =
+     l10n('ec_entry_create_pb').
+     'MySQL error '.mysql_errno().', "'.mysql_error().'"'
+    ;
+    return false;
+  }
+  else {
+    build_ec_lists();
+    $forced = ($forced == 'false') ? '' : l10n('ec_cnfrm_forced');
+    $page['infos'][] =
+     l10n('ec_entry_create_OK').mysql_insert_id().' : '.
+     $_POST['ec_in_up_code'].' => '.
+     $ec_lists['user_ids'][$ec_user_id].$forced
+    ;
+    return true;
+  }
+  /*
   
   $page['errors'][] = 'Y\'a p\'têt\' ben eu une erreur...';
+  
+   */
 }
 
@@ -342,15 +340,26 @@
       default: return ec_end1('ec_input_action', 'ec_bad_argument1');
     }
-    if (pwg_query("
-      INSERT INTO `".EVNTCATS_TABLE."`
-       (`code`, `user_id`, `action`, `arg1`, `arg2`)
-      VALUES (
-        '".$ec_lists['ec_table'][$_POST['ec_entry_sel']]['code']."',
-        '".$ec_lists['ec_table'][$_POST['ec_entry_sel']]['user_id']."',
-        'ec_ok',
-        '".$arg1."',
-        '".$arg2."'
-      );
-    ")) {
+    if (
+      pwg_query("
+        INSERT INTO `".EVNTCATS_TABLE."`
+         (`code`, `user_id`, `action`, `arg1`, `arg2`)
+        VALUES (
+          '".$ec_lists['ec_table'][$_POST['ec_entry_sel']]['code']."',
+          '".$ec_lists['ec_table'][$_POST['ec_entry_sel']]['user_id']."',
+          'ec_ok',
+          '".$arg1."',
+          '".$arg2."'
+        );
+      ") === false
+    ) {
+      $page['errors'][] =
+       l10n('ec_entry_dup_nok_pre1').
+       $_POST['ec_entry_sel'].
+       l10n('ec_entry_dup_nok_end1').
+       'MySQL error '.mysql_errno().', "'.mysql_error().'"'
+      ;
+      return false;
+    }
+    else {
       $page['infos'][] =
        l10n('ec_entry_dup_ok_pre').
@@ -361,13 +370,4 @@
       build_ec_table();
       return true;
-    }
-    else {
-      $page['errors'][] =
-       l10n('ec_entry_dup_nok_pre1').
-       $_POST['ec_entry_sel'].
-       l10n('ec_entry_dup_nok_end1').
-       'MySQL error '.mysql_errno().', "'.mysql_error().'"'
-      ;
-      return false;
     }
   }
Index: /extensions/event_cats/include/evntcats_main_funcs.inc.php
===================================================================
--- /extensions/event_cats/include/evntcats_main_funcs.inc.php	(revision 4178)
+++ /extensions/event_cats/include/evntcats_main_funcs.inc.php	(revision 4179)
@@ -211,49 +211,44 @@
       )) - 1;
       $ec_lists['ec_table'][$ec_current_entry]['id'] = $ec_current_entry;
-      if (isset($conf['prior_page'])) {
-        if (array_key_exists($ec_current_code, $conf['prior_page'])) {
-          $ec_lists['ec_table'][$ec_current_entry]['arg2'] =
-           $conf['prior_page'][$ec_current_code];
-          $ec_lists['ec_table'][$ec_current_entry]['forced'] = 'true';
-        }
+      if (isset($conf['prior_page']))
+       if (array_key_exists($ec_current_code, $conf['prior_page'])) {
+         $ec_lists['ec_table'][$ec_current_entry]['arg2'] =
+          $conf['prior_page'][$ec_current_code];
+         $ec_lists['ec_table'][$ec_current_entry]['forced'] = 'true';
+       }
+      if (isset($conf['outdated_page']))
+       if (array_key_exists($ec_current_code, $conf['outdated_page'])) {
+         $ec_lists['ec_table'][$ec_current_entry]['action'] = 'ec_nok';
+         $ec_lists['ec_table'][$ec_current_entry]['arg2'] =
+          $conf['outdated_page'][$ec_current_code];
+         $ec_lists['ec_table'][$ec_current_entry]['forced'] = 'true';
+       }
+    }
+    
+    // Inspection of $conf['outdated_page']
+    if (isset($conf['outdated_page']))
+     foreach ($conf['outdated_page'] as $ec_current_code => $ec_current_AP)
+      if (!array_key_exists($ec_current_code, $conf['auto_log'])) {
+        $ec_current_entry = array_push($ec_lists['ec_table'], array(
+         'code'    => $ec_current_code,
+         'user_id' => '',
+         'action'  => 'ec_nok',
+         'arg1'    => NULL,
+         'arg2'    => $ec_current_AP,
+         'forced'  => 'true',
+        )) - 1;
+        $ec_lists['ec_table'][$ec_current_entry]['id'] = $ec_current_entry;
       }
-      if (isset($conf['outdated_page'])) {
-        if (array_key_exists($ec_current_code, $conf['outdated_page'])) {
-          $ec_lists['ec_table'][$ec_current_entry]['action'] = 'ec_nok';
-          $ec_lists['ec_table'][$ec_current_entry]['arg2'] =
-           $conf['outdated_page'][$ec_current_code];
-          $ec_lists['ec_table'][$ec_current_entry]['forced'] = 'true';
-        }
-      }
-    }
-    
-    // Inspection of $conf['outdated_page']
-    if (isset($conf['outdated_page'])) {
-      foreach ($conf['outdated_page'] as $ec_current_code => $ec_current_AP) {
-        if (!array_key_exists($ec_current_code, $conf['auto_log'])) {
-          $ec_current_entry = array_push($ec_lists['ec_table'], array(
-           'code'    => $ec_current_code,
-           'user_id' => '',
-           'action'  => 'ec_nok',
-           'arg1'    => NULL,
-           'arg2'    => $ec_current_AP,
-           'forced'  => 'true',
-          )) - 1;
-          $ec_lists['ec_table'][$ec_current_entry]['id'] = $ec_current_entry;
-        }
-      }
-    }
     
   }
   else { // in "normal" use ($conf['auto_log'] NOT set), $ec_lists['ec_table']
          // is built thanks to below code only. A little bit more simple...
-    $q = pwg_query('
-     SELECT * FROM `'.EVNTCATS_TABLE.'`
+    $q = pwg_query("
+     SELECT * FROM `".EVNTCATS_TABLE."`
      WHERE `code` IS NOT NULL
      ORDER BY `id`
-    ');
-    while ($r = mysql_fetch_assoc($q)) {
-      $ec_lists['ec_table'][intval($r['id'])] = $r;
-    }
+    ");
+    while ($r = mysql_fetch_assoc($q))
+     $ec_lists['ec_table'][intval($r['id'])] = $r;
   }
   
@@ -294,7 +289,5 @@
           ) and
           !array_key_exists($ec_entry['arg2'], $ec_lists['add_pages'])
-        ) {
-          $ec_entry['action'].= '_ap_pb';
-        }
+        ) $ec_entry['action'].= '_ap_pb';
       break;
       
@@ -309,7 +302,5 @@
             }
           }
-          else {
-            $ec_entry['action'].= '_cat_pb';
-          }
+          else $ec_entry['action'].= '_cat_pb';
         }
       break;
Index: /extensions/event_cats/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/event_cats/language/fr_FR/plugin.lang.php	(revision 4178)
+++ /extensions/event_cats/language/fr_FR/plugin.lang.php	(revision 4179)
@@ -119,4 +119,7 @@
 $lang['ec_group_create_OK2']      = ' associé à ';
 $lang['ec_group_create_pb']       = 'Création nouveau groupe impossible : ';
+$lang['ec_entry_create_OK']       = 'Création entrée ';
+$lang['ec_entry_create_pb']       = 'Création nouvelle entrée impossible : ';
+$lang['ec_cnfrm_forced']          = ' (affichage forcé)';
 $lang['ec_bad_argument1']         = 'Mauvais argument : ';
 $lang['ec_bad_argument2']         = 'Code déjà existant : ';
