Renames user_id to uid accordingly to our naming convention.
authorStéphane Jacob <sj@m4x.org>
Tue, 2 Mar 2010 18:19:30 +0000 (19:19 +0100)
committerStéphane Jacob <sj@m4x.org>
Tue, 2 Mar 2010 18:19:57 +0000 (19:19 +0100)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
23 files changed:
bin/cron/google_apps.php
classes/user.php
classes/xnetsession.php
classes/xorgsession.php
core
include/googleapps.inc.php
include/massmailer.inc.php
include/reminder.inc.php
include/validations.inc.php
modules/admin.php
modules/axletter.php
modules/email.php
modules/events/feed.inc.php
modules/gadgets.php
modules/survey/survey.inc.php
modules/xnetgrp.php
templates/admin/user.tpl
templates/gadgets/ig-events.tpl
templates/gadgets/ig-minifiche.tpl
templates/include/plview.trombi.tpl
templates/include/trombi.tpl
templates/lists/admin.tpl
templates/xnetgrp/form.announce.tpl

index 60b8311..307fb7a 100755 (executable)
@@ -23,9 +23,9 @@
 // Updates the gapps_accounts table with Plat/al information.
 // Cleans-up the job queue, and execute post-queue hooks.
 
-require_once('connect.db.inc.php');
-require_once('plmailer.php');
-require_once('googleapps.inc.php');
+require_once 'connect.db.inc.php';
+require_once 'plmailer.php';
+require_once 'googleapps.inc.php';
 if (!$globals->mailstorage->googleapps_domain) {
   exit;
 }
@@ -44,7 +44,7 @@ while ($account = $res->next()) {
         $account['id'], $account['g_account_name']);
 }
 
-/* Emits a warning for GApps accounts without local user_id. */
+/* Emits a warning for GApps accounts without local uid. */
 $res = XDB::iterator(
     "SELECT  g.g_account_name
        FROM  gapps_accounts AS g
@@ -52,7 +52,7 @@ $res = XDB::iterator(
       WHERE  (g.l_userid IS NULL OR g.l_userid <= 0) AND a.uid IS NULL");
 while ($account = $res->next()) {
     if (!preg_match("/^admin-/", $account['g_account_name'])) {
-        printf("Warning: GApps account '%s' has no local user_id.\n", $account['g_account_name']);
+        printf("Warning: GApps account '%s' has no local uid.\n", $account['g_account_name']);
     }
 }
 
@@ -71,7 +71,7 @@ while ($nickname = $res->next()) {
         $nickname['id'], $nickname['g_account_name']);
 }
 
-/* Emits a warning for nicknames without local user_id. */
+/* Emits a warning for nicknames without local uid. */
 $res = XDB::iterator(
     "SELECT  g.g_account_name
        FROM  gapps_nicknames AS g
@@ -79,7 +79,7 @@ $res = XDB::iterator(
       WHERE  (g.l_userid IS NULL OR g.l_userid <= 0) AND a.uid IS NULL");
 while ($nickname = $res->next()) {
     if (!preg_match("/^admin-/", $nickname['g_account_name'])) {
-        printf("Warning: Nickname '%s' has no local user_id.\n", $nickname['g_account_name']);
+        printf("Warning: Nickname '%s' has no local uid.\n", $nickname['g_account_name']);
     }
 }
 
index 7db7df4..956f188 100644 (file)
@@ -205,7 +205,7 @@ class User extends PlUser
             && $this->gender !== null && $this->email_format !== null) {
             return;
         }
-        $this->fillFromArray(self::loadMainFieldsFromUIDs(array($this->user_id))->next());
+        $this->fillFromArray(self::loadMainFieldsFromUIDs(array($this->uid))->next());
     }
 
     // Specialization of the fillFromArray method, to implement hacks to enable
@@ -214,13 +214,6 @@ class User extends PlUser
     // stop being used actively.
     protected function fillFromArray(array $values)
     {
-        // It might happen that the 'user_id' field is called uid in some places
-        // (eg. in sessions), so we hard link uid to user_id to prevent useless
-        // SQL requests.
-        if (!isset($values['user_id']) && isset($values['uid'])) {
-            $values['user_id'] = $values['uid'];
-        }
-
         // Also, if display_name and full_name are not known, but the user's
         // surname and last name are, we can construct the former two.
         if (isset($values['prenom']) && isset($values['nom'])) {
index bf87156..15dda7b 100644 (file)
@@ -76,7 +76,7 @@ class XnetSession extends XorgSession
     protected function doAuth($level)
     {
         if (S::identified()) { // ok, c'est bon, on n'a rien à faire
-            return User::getSilentWithValues(null, array('user_id' => S::i('uid')));
+            return User::getSilentWithValues(null, array('uid' => S::i('uid')));
         }
         if (!Get::has('auth')) {
             return null;
@@ -87,7 +87,7 @@ class XnetSession extends XorgSession
         }
         Get::kill('auth');
         S::set('auth', AUTH_MDP);
-        return User::getSilentWithValues(null, array('user_id' => Get::i('uid')));
+        return User::getSilentWithValues(null, array('uid' => Get::i('uid')));
     }
 
     protected function startSessionAs($user, $level)
index b1241b8..011b6b5 100644 (file)
@@ -52,7 +52,7 @@ class XorgSession extends PlSession
         return true;
     }
 
-    /** Check the cookie and set the associated user_id in the auth_by_cookie session variable.
+    /** Check the cookie and set the associated uid in the auth_by_cookie session variable.
      */
     private function tryCookie()
     {
@@ -270,7 +270,7 @@ class XorgSession extends PlSession
 
     public function tokenAuth($login, $token)
     {
-        $res = XDB::query('SELECT  a.uid AS user_id, a.hruid
+        $res = XDB::query('SELECT  a.uid, a.hruid
                              FROM  aliases  AS l
                        INNER JOIN  accounts AS a ON (l.uid = a.uid AND a.state = \'active\')
                             WHERE  a.token = {?} AND l.alias = {?} AND l.type != \'homonyme\'',
diff --git a/core b/core
index 701c0b6..643ae90 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit 701c0b6f4dd6c32acb0508e6d59dce034bdc6a4f
+Subproject commit 643ae90bb09f55e0b0853bf5a554829a3042495e
index bb78823..f551380 100644 (file)
@@ -23,7 +23,7 @@
 function post_queue_u_create($job) {
     global $globals;
 
-    // Retrieves the user parameters (GoogleApps username and user_id).
+    // Retrieves the user parameters (GoogleApps username and uid).
     $parameters = json_decode($job['j_parameters'], true);
     $username = isset($parameters['username']) ? $parameters['username'] : null;
     if (!($user = User::getSilent($username))) {
index a9269bd..f9cc381 100644 (file)
@@ -165,7 +165,7 @@ abstract class MassMailer
         if (is_null($hash)) {
             $hash = XDB::fetchOneCell("SELECT  hash
                                          FROM  {$this->_subscriptionTable}
-                                        WHERE  user_id = {?}", $user->id());
+                                        WHERE  uid = {?}", $user->id());
         }
         if (is_null($hash)) {
             $hash = $this->createHash(array($user->displayName(), $user->fullName(),
@@ -173,7 +173,7 @@ abstract class MassMailer
                                        rand(), "X.org rulez"));
             XDB::execute("UPDATE  {$this->_subscriptionTable} as ni
                              SET  ni.hash = {?}
-                           WHERE  ni.user_id != {?}",
+                           WHERE  ni.uid != {?}",
                          $hash, $user->id());
         }
 
@@ -192,7 +192,7 @@ abstract class MassMailer
         global $globals;
         return  "SELECT  a.uid
                    FROM  {$this->_subscriptionTable}  AS ni
-             INNER JOIN  accounts AS a ON (ni.user_id = a.uid)
+             INNER JOIN  accounts AS a ON (ni.uid = a.uid)
               LEFT JOIN  email_options AS eo ON (eo.uid = a.uid)
               LEFT JOIN  emails   AS e ON (e.uid = a.uid AND e.flags='active')
                   WHERE  ni.last < {?} AND ({$this->subscriptionWhere()}) AND
@@ -210,7 +210,7 @@ abstract class MassMailer
                 return;
             }
             foreach ($users as $user) {
-                $sent[] = XDB::format('user_id = {?}', $user->id());
+                $sent[] = XDB::format('uid = {?}', $user->id());
                 $this->sendTo($user, $hash);
             }
             XDB::execute("UPDATE  {$this->_subscriptionTable}
index 346d97e..715d2d5 100644 (file)
@@ -69,12 +69,12 @@ abstract class Reminder
     // Updates (or creates) the reminder line for the pair (|user|, |reminder_id|)
     // using the |status| as status, and the |next_ask| as the delay between now
     // and the next ask (if any).
-    private static function UpdateStatus($user_id, $type_id, $status, $next_ask)
+    private static function UpdateStatus($uid, $type_id, $status, $next_ask)
     {
         XDB::execute('REPLACE INTO  reminder
                                SET  uid = {?}, type_id = {?}, status = {?},
                                     remind_last = NOW(), remind_next = FROM_UNIXTIME({?})',
-                     $user_id, $type_id, $status,
+                     $uid, $type_id, $status,
                      ($next_ask > 0 ? time() + $next_ask * 24 * 60 * 60 : null));
     }
 
@@ -153,12 +153,12 @@ abstract class Reminder
 
     // Static status update methods -------------------------------------------
 
-    // Marks the candidate reminder as having been accepted for user |user_id|.
+    // Marks the candidate reminder as having been accepted for user |uid|.
     // It is intended to be used when a reminder box has been bypassed, and when
     // it should behave as if the user had clicked on 'yes'.
-    protected static function MarkCandidateAsAccepted($user_id, $candidate)
+    protected static function MarkCandidateAsAccepted($uid, $candidate)
     {
-        Reminder::UpdateStatus($user_id, $candidate['type_id'],
+        Reminder::UpdateStatus($uid, $candidate['type_id'],
                                'yes', $candidate['remind_delay_yes']);
     }
 
index 050318c..9deb2f7 100644 (file)
@@ -97,11 +97,14 @@ abstract class Validate
     public function submit()
     {
         if ($this->unique) {
-            XDB::execute('DELETE FROM requests WHERE user_id={?} AND type={?}', $this->user->id(), $this->type);
+            XDB::execute('DELETE FROM  requests
+                                WHERE  uid = {?} AND type = {?}',
+                         $this->user->id(), $this->type);
         }
 
         $this->stamp = date('YmdHis');
-        XDB::execute('INSERT INTO requests (user_id, type, data, stamp) VALUES ({?}, {?}, {?}, {?})',
+        XDB::execute('INSERT INTO  requests (uid, type, data, stamp)
+                           VALUES  ({?}, {?}, {?}, {?})',
                 $this->user->id(), $this->type, $this, $this->stamp);
 
         global $globals;
@@ -114,8 +117,9 @@ abstract class Validate
 
     protected function update()
     {
-        XDB::execute('UPDATE requests SET data={?}, stamp=stamp
-                       WHERE user_id={?} AND type={?} AND stamp={?}',
+        XDB::execute('UPDATE  requests
+                         SET  data = {?}, stamp = stamp
+                       WHERE  uid = {?} AND type = {?} AND stamp = {?}',
                      $this, $this->user->id(), $this->type, $this->stamp);
         return true;
     }
@@ -131,10 +135,12 @@ abstract class Validate
         global $globals;
 
         if ($this->unique) {
-            $success = XDB::execute('DELETE FROM requests WHERE user_id={?} AND type={?}',
+            $success = XDB::execute('DELETE FROM  requests
+                                           WHERE  uid = {?} AND type = {?}',
                                     $this->user->id(), $this->type);
         } else {
-            $success =  XDB::execute('DELETE FROM requests WHERE user_id={?} AND type={?} AND stamp={?}',
+            $success =  XDB::execute('DELETE FROM  requests
+                                            WHERE  uid = {?} AND type = {?} AND stamp = {?}',
                                       $this->user->id(), $this->type, $this->stamp);
         }
         $globals->updateNbValid();
@@ -277,9 +283,15 @@ abstract class Validate
     static public function get_typed_request($uid, $type, $stamp = -1)
     {
         if ($stamp == -1) {
-            $res = XDB::query('SELECT data FROM requests WHERE user_id={?} and type={?}', $uid, $type);
+            $res = XDB::query('SELECT  data
+                                 FROM  requests
+                                WHERE  uid = {?} and type = {?}',
+                              $uid, $type);
         } else {
-            $res = XDB::query('SELECT data, DATE_FORMAT(stamp, "%Y%m%d%H%i%s") FROM requests WHERE user_id={?} AND type={?} and stamp={?}', $uid, $type, $stamp);
+            $res = XDB::query('SELECT  data, DATE_FORMAT(stamp, "%Y%m%d%H%i%s")
+                                 FROM  requests
+                                WHERE  uid = {?} AND type = {?} and stamp = {?}',
+                              $uid, $type, $stamp);
         }
         if ($result = $res->fetchOneCell()) {
             $result = Validate::unserialize($result);
@@ -305,7 +317,10 @@ abstract class Validate
      */
     static public function get_typed_requests($uid, $type)
     {
-        $res = XDB::iterRow('SELECT data FROM requests WHERE user_id={?} and type={?}', $uid, $type);
+        $res = XDB::iterRow('SELECT  data
+                               FROM  requests
+                              WHERE  uid = {?} and type = {?}',
+                            $uid, $type);
         $array = array();
         while (list($data) = $res->next()) {
             $array[] = Validate::unserialize($data);
@@ -320,7 +335,10 @@ abstract class Validate
      */
     static public function get_typed_requests_count($uid, $type)
     {
-        $res = XDB::query('SELECT COUNT(data) FROM requests WHERE user_id={?} and type={?}', $uid, $type);
+        $res = XDB::query('SELECT  COUNT(data)
+                             FROM  requests
+                            WHERE  uid = {?} and type = {?}',
+                          $uid, $type);
         return $res->fetchOneCell();
     }
 
index 6ce598e..5eb630a 100644 (file)
@@ -855,11 +855,10 @@ class AdminModule extends PLModule
             $res = XDB::iterator(
                     "SELECT  a.alias AS homonyme, s.alias AS forlife,
                              IF(h.homonyme_id = s.id, a.expire, NULL) AS expire,
-                             IF(h.homonyme_id = s.id, a.type, NULL) AS type,
-                             ac.uid AS user_id
+                             IF(h.homonyme_id = s.id, a.type, NULL) AS type, ac.uid
                        FROM  aliases       AS a
-                  LEFT JOIN  homonyms      AS h ON (h.homonyme_id = a.uid)
-                 INNER JOIN  aliases       AS s ON (s.uid = h.uid AND s.type='a_vie')
+                  LEFT JOIN  homonyms      AS h  ON (h.homonyme_id = a.uid)
+                 INNER JOIN  aliases       AS s  ON (s.uid = h.uid AND s.type = 'a_vie')
                  INNER JOIN  accounts      AS ac ON (ac.uid = a.uid)
                       WHERE  a.type = 'homonyme' OR a.expire != ''
                    ORDER BY  a.alias, forlife");
@@ -867,7 +866,7 @@ class AdminModule extends PLModule
             while ($tab = $res->next()) {
                 $hnymes[$tab['homonyme']][] = $tab;
             }
-            $page->assign_by_ref('hnymes',$hnymes);
+            $page->assign_by_ref('hnymes', $hnymes);
         }
     }
 
index 206fe62..a664705 100644 (file)
@@ -180,7 +180,7 @@ class AXLetterModule extends PLModule
                                       . "https://www.polytechnique.org/ax/edit\n"
                                       . "-- \n"
                                       . "Association Polytechnique.org\n");
-                    $users = User::getBulkUsersWithUIDs(XDB::fetchColumn('SELECT  user_id
+                    $users = User::getBulkUsersWithUIDs(XDB::fetchColumn('SELECT  uid
                                                                             FROM  axletter_rights'));
                     foreach ($users as $user) {
                         $mailer->addTo($user);
@@ -315,13 +315,13 @@ class AXLetterModule extends PLModule
         }
 
         $page->changeTpl('axletter/admin.tpl');
-        $page->assign('admins', User::getBulkUsersWithUIDs(XDB::fetchColumn('SELECT  user_id
+        $page->assign('admins', User::getBulkUsersWithUIDs(XDB::fetchColumn('SELECT  uid
                                                                                FROM  axletter_rights')));
 
         $importer = new CSVImporter('axletter_ins');
-        $importer->registerFunction('user_id', 'email vers Id X.org', array($this, 'idFromMail'));
+        $importer->registerFunction('uid', 'email vers Id X.org', array($this, 'idFromMail'));
         $importer->forceValue('hash', array($this, 'createHash'));
-        $importer->apply($page, "admin/axletter", array('user_id', 'email', 'prenom', 'nom', 'promo', 'flag', 'hash'));
+        $importer->apply($page, "admin/axletter", array('uid', 'email', 'prenom', 'nom', 'promo', 'flag', 'hash'));
     }
 
     function idFromMail($line, $key, $relation = null)
index 9a77979..0b46793 100644 (file)
@@ -592,7 +592,10 @@ class EmailModule extends PLModule
         if (!empty($hash) || !empty($login)) {
             $user = User::getSilent($login);
             if ($user) {
-                $req = XDB::query("SELECT 1 FROM newsletter_ins WHERE user_id = {?} AND hash = {?}", $user->id(), $hash);
+                $req = XDB::query('SELECT  1
+                                     FROM  newsletter_ins
+                                    WHERE  uid = {?} AND hash = {?}',
+                                  $user->id(), $hash);
                 if ($req->numRows() == 0) {
                     $user = null;
                 }
@@ -922,7 +925,7 @@ class EmailModule extends PLModule
 
                     if ($x = $sel->fetchOneAssoc()) {
                         if ($x['nb_mails'] == 0) {
-                            register_profile_update($x['user_id'], 'broken');
+                            register_profile_update($x['uid'], 'broken');
                         }
                         fputcsv($csv, array($x['fullname'], $x['promo'], $alias,
                                             join(',', $mails), $x['nb_mails'],
index afa6396..9e1298c 100644 (file)
@@ -53,7 +53,7 @@ class EventFeed extends PlFeed
                                   WHERE  FIND_IN_SET("valide", e.flags) AND expiration >= NOW()');
         $data = array();
         while ($e = self::nextEvent($events, $user)) {
-            $author = User::getWithUID($e['user_id']);
+            $author = User::getWithUID($e['uid']);
             $promo  = $author->promo();
             $e['author'] = $author->fullName() . ($promo ? ' (' . $promo . ')' : '');
             $e['link'] = $globals->baseurl . '/events#newsid' . $e['id'];
index 188dc57..c7eb989 100644 (file)
@@ -42,14 +42,14 @@ class GadgetsModule extends PLModule
         require_once 'gadgets/gadgets.inc.php';
         init_igoogle_html('gadgets/ig-events.tpl', AUTH_COOKIE);
 
-        $events = XDB::iterator('SELECT  SQL_CALC_FOUND_ROWS
+        $events = XDB::iterator("SELECT  SQL_CALC_FOUND_ROWS
                                          e.id, e.titre, UNIX_TIMESTAMP(e.creation_date) AS creation_date,
-                                         IF(u.nom_usage = "", u.nom, u.nom_usage) AS nom, u.prenom, u.promo,
-                                         ev.user_id IS NULL AS nonlu, e.uid
-                                   FROM  announces AS e
+                                         IF(u.nom_usage = '', u.nom, u.nom_usage) AS nom, u.prenom, u.promo,
+                                         ev.uid IS NULL AS nonlu, e.uid
+                                   FROM  announces     AS e
                               LEFT JOIN  announce_read AS ev ON (e.id = ev.evt_id AND ev.uid = {?})
-                                  WHERE  FIND_IN_SET("valide", e.flags) AND expiration >= NOW()
-                               ORDER BY  e.creation_date DESC', S::i('uid'));
+                                  WHERE  FIND_IN_SET('valide', e.flags) AND expiration >= NOW()
+                               ORDER BY  e.creation_date DESC", S::i('uid'));
         $page->assign('event_count', XDB::query("SELECT FOUND_ROWS()")->fetchOneCell());
 
         Platal::load('events', 'feed.inc.php');
index 5c6a109..6d8a410 100644 (file)
@@ -190,7 +190,7 @@ class Survey
         $nbf = count($line);
         $users = array();
         if ($this->isMode(self::MODE_XIDENT)) { // if the mode is non anonymous
-            $users = User::getBulkUsersWithUIDs(XDB::fetchAllAssoc('vid', 'SELECT  v.id AS vid, v.user_id
+            $users = User::getBulkUsersWithUIDs(XDB::fetchAllAssoc('vid', 'SELECT  v.id AS vid, v.uid
                                                                              FROM  survey_votes AS v
                                                                             WHERE  v.survey_id = {?}
                                                                          ORDER BY  vid ASC',
@@ -433,8 +433,8 @@ class Survey
     // {{{ functions vote() and hasVoted() : handles vote to a survey
     public function vote($uid, $args)
     {
-        XDB::execute('INSERT INTO survey_votes
-                              SET survey_id={?}, user_id={?};', $this->id, $uid); // notes the user as having voted
+        XDB::execute('INSERT INTO  survey_votes
+                              SET  survey_id = {?}, uid = {?};', $this->id, $uid); // notes the user as having voted
         $vid = XDB::insertId();
         for ($i = 0; $i < count($this->questions); $i++) {
             $ans = $this->questions[$i]->checkAnswer($args[$i]);
@@ -451,9 +451,9 @@ class Survey
 
     public function hasVoted($uid)
     {
-        $res = XDB::query('SELECT id
-                             FROM survey_votes
-                            WHERE survey_id={?} AND user_id={?};', $this->id, $uid); // checks whether the user has already voted
+        $res = XDB::query('SELECT  id
+                             FROM  survey_votes
+                            WHERE  survey_id = {?} AND uid = {?};', $this->id, $uid); // checks whether the user has already voted
         return ($res->numRows() != 0);
     }
     // }}}
index 9b1fa04..b3da3d3 100644 (file)
@@ -91,7 +91,7 @@ class XnetGrpModule extends PLModule
                                            AND r.announce_id IS NULL
                                  ORDER BY  a.expiration",
                                    S::i('uid'), $globals->asso('id'), S::i('promo'), S::i('promo'));
-            $index = XDB::iterator("SELECT  a.id, a.titre, r.user_id IS NULL AS nonlu
+            $index = XDB::iterator("SELECT  a.id, a.titre, r.uid IS NULL AS nonlu
                                       FROM  group_announces      AS a
                                  LEFT JOIN  group_announces_read AS r ON (a.id = r.announce_id AND r.uid = {?})
                                      WHERE  asso_id = {?} AND expiration >= CURRENT_DATE()
@@ -810,7 +810,7 @@ class XnetGrpModule extends PLModule
                 $page->trigError("Le login $login correspond a plusieurs camarades.");
                 return false;
             }
-            $uid = $x[0]['user_id'];
+            $uid = $x[0]['uid'];
             $sub = false;
         } else {
             list($uid, $login) = $res->fetchOneRow();
index 6218663..fb7b8ad 100644 (file)
@@ -25,8 +25,8 @@
 <form method="post" action="admin/user">
   {xsrf_token_field}
   <div class="center">
-    <input type="hidden" name="user_id" value="{$smarty.request.user_id}" />
-    Confirmer la suppression de l'utilisateur {$smarty.request.user_id} ({$mr.prenom} {$mr.nom} - X{$mr.promo})&nbsp;&nbsp;
+    <input type="hidden" name="uid" value="{$smarty.request.uid}" />
+    Confirmer la suppression de l'utilisateur {$smarty.request.uid} ({$mr.prenom} {$mr.nom} - X{$mr.promo})&nbsp;&nbsp;
     <input type="submit" name="u_kill" value="continuer" />
   </div>
 </form>
@@ -309,7 +309,7 @@ $(document).ready(function() {
         <input type="text" name="email" size="29" maxlength="60" value="" />
       </td>
       <td class="action">
-        <input type="hidden" name="user_id" value="{$mr.user_id}" />
+        <input type="hidden" name="uid" value="{$mr.uid}" />
         <input type="hidden" name="del_alias" value="" />
         <input type="submit" name="add_alias" value="Ajouter" />
       </td>
@@ -389,7 +389,7 @@ $(document).ready(function() {
         <input type="text" name="email" size="29" maxlength="60" value="" />
       </td>
       <td class="action">
-        <input type="hidden" name="user_id" value="{$mr.user_id}" />
+        <input type="hidden" name="uid" value="{$mr.uid}" />
         <input type="hidden" name="del_fwd" value="" />
         <input type="hidden" name="clean_fwd" value="" />
         <input type="hidden" name="activate_fwd" value="" />
@@ -488,7 +488,7 @@ $(document).ready(function() {
     </tr>
     <tr class="center">
       <td colspan="3">
-        <input type="hidden" name="user_id" value="{$mr.user_id}" />
+        <input type="hidden" name="uid" value="{$mr.uid}" />
         <input type="submit" name="b_edit" value="Modifier" />
       </td>
     </tr>
index 6437cf2..783e251 100644 (file)
@@ -31,7 +31,7 @@
       </div>
       {/if}
       <a href="events{if !$ev.nonlu}/unread/{$ev.id}{else}#newsid{$ev.id}{/if}" target="_blank" id="link-{$ev.id}"
-         title="Ajouté le {$ev.creation_date|date_format} par {profile user=$ev.user_id link=false sex=false promo=true}">
+         title="Ajouté le {$ev.creation_date|date_format} par {profile user=$ev.uid link=false sex=false promo=true}">
         {tidy}
           {$ev.titre|nl2br}
         {/tidy}
index 6f2cabd..0ce6087 100644 (file)
     {if $smarty.session.auth ge AUTH_COOKIE}
     {if !$c.wasinscrit && !$c.dcd}
       {if $show_action eq ajouter}
-        <a href="carnet/notifs/add_nonins/{$c.user_id}?token={xsrf_token}" target="_top">{*
+        <a href="carnet/notifs/add_nonins/{$c.uid}?token={xsrf_token}" target="_top">{*
         *}{icon name=add title="Ajouter à la liste de mes surveillances"}</a>
       {else}
-        <a href="carnet/notifs/del_nonins/{$c.user_id}?token={xsrf_token}" target="_top">{*
+        <a href="carnet/notifs/del_nonins/{$c.uid}?token={xsrf_token}" target="_top">{*
         *}{icon name=cross title="Retirer de la liste de mes surveillances"}</a>
       {/if}
     {elseif $c.wasinscrit && !$c.dcd}
index f4127d3..24c524c 100644 (file)
@@ -34,7 +34,7 @@
         <img src="photo/{$set[trombi.index_prev].hruid}" width="110" alt=" [ PHOTO ] " />
       </a>
       {if $trombi_with_admin && hasPerm('admin')}
-      <a href="{$mainsiteurl}admin/trombino/{$set[trombi.index_prev].user_id}">{icon name=wrench title="[admin]"}</a>
+      <a href="{$mainsiteurl}admin/trombino/{$set[trombi.index_prev].uid}">{icon name=wrench title="[admin]"}</a>
       {/if}
     </td>
     <td class="center" style="vertical-align: middle">
@@ -42,7 +42,7 @@
         <img src="photo/{$set[trombi].hruid}" width="110" alt=" [ PHOTO ] " />
       </a>
       {if $trombi_with_admin && hasPerm('admin')}
-      <a href="{$mainsiteurl}admin/trombino/{$set[trombi].user_id}">{icon name=wrench title="[admin]"}</a>
+      <a href="{$mainsiteurl}admin/trombino/{$set[trombi].uid}">{icon name=wrench title="[admin]"}</a>
       {/if}
     </td>
     <td class="center" style="vertical-align: middle">
@@ -51,7 +51,7 @@
         <img src="photo/{$set[trombi.index_next].hruid}" width="110" alt=" [ PHOTO ] " />
       </a>
       {if $trombi_with_admin && hasPerm('admin')}
-      <a href="{$mainsiteurl}admin/trombino/{$set[trombi.index_next].user_id}">{icon name=wrench title="[admin]"}</a>
+      <a href="{$mainsiteurl}admin/trombino/{$set[trombi.index_next].uid}">{icon name=wrench title="[admin]"}</a>
       {/if}
     {/if}
     </td>
@@ -83,7 +83,7 @@
         <img src="photo/{$set[trombi].hruid}" width="110" alt=" [ PHOTO ] " />
       </a>
       {if $trombi_with_admin && hasPerm('admin')}
-      <a href="{$mainsiteurl}admin/trombino/{$set[trombi].user_id}">{icon name=wrench title="[admin]"}</a>
+      <a href="{$mainsiteurl}admin/trombino/{$set[trombi].uid}">{icon name=wrench title="[admin]"}</a>
       {/if}
     </td>
     <td></td><td></td>
index e73d6e0..e389a9d 100644 (file)
@@ -32,7 +32,7 @@
         <img src="{$globals->baseurl}/photo/{$p.forlife}" width="110" alt=" [ PHOTO ] " />
       </a>
       {if $trombi_admin && hasPerm('admin') && !$urlmainsite}
-      <a href="admin/trombino/{$p.user_id}">
+      <a href="admin/trombino/{$p.uid}">
         {icon name=wrench title="[admin]"}</a>
       {/if}
       <br />
index cdf6326..df30d58 100644 (file)
@@ -69,7 +69,7 @@ emails de marketing. Une fois inscrits à Polytechnique.org, l'inscription à la
         Camarade&nbsp;:
         <select name="mk_uid[{$login}]">
         {iterate from=$it item=user}
-          <option value="{$user.user_id}">{$user.prenom} {$user.nom} (X{$user.promo})</option>
+          <option value="{$user.uid}">{$user.prenom} {$user.nom} (X{$user.promo})</option>
         {/iterate}
         </select><br />
         Action*&nbsp;:
index ec87c99..1a5eccc 100644 (file)
@@ -66,7 +66,7 @@
     <td {if $art.photo}colspan="2"{/if}>
       <div style="float: right">
       <small>
-        Annonce proposée par {profile user=$art.user_id sex=false promo=true groupperms=false}
+        Annonce proposée par {profile user=$art.uid sex=false promo=true groupperms=false}
       </small>
       </div>
       <small>