pending commit, finished during MQ/S download ...
[platal.git] / include / profil / update_general.inc.php
index 8921abc..374fc01 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2004 Polytechnique.org                              *
+ *  Copyright (C) 2003-2006 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
  ***************************************************************************/
 
 if ($appli_id1>0)
-     $globals->xdb->execute("REPLACE INTO applis_ins SET uid= {?}, aid = {?}, type = {?}, ordre = 0", Session::getInt('uid', -1), $appli_id1, $appli_type1);
+     XDB::execute("REPLACE INTO applis_ins SET uid= {?}, aid = {?}, type = {?}, ordre = 0", S::v('uid', -1), $appli_id1, $appli_type1);
 else
-     $globals->xdb->execute("DELETE FROM applis_ins WHERE uid= {?} AND ordre=0", Session::getInt('uid', -1));
+     XDB::execute("DELETE FROM applis_ins WHERE uid= {?} AND ordre=0", S::v('uid', -1));
 
 if ($appli_id2>0)
-     $globals->xdb->execute("REPLACE INTO applis_ins SET uid= {?}, aid = {?}, type = {?}, ordre = 1", Session::getInt('uid', -1), $appli_id2, $appli_type2);
+     XDB::execute("REPLACE INTO applis_ins SET uid= {?}, aid = {?}, type = {?}, ordre = 1", S::v('uid', -1), $appli_id2, $appli_type2);
 else
-     $globals->xdb->execute("DELETE FROM applis_ins WHERE uid= {?} AND ordre=1", Session::getInt('uid', -1));
+     XDB::execute("DELETE FROM applis_ins WHERE uid= {?} AND ordre=1", S::v('uid', -1));
 
 if ($nationalite != $nationalite_anc || $nom != $nom_anc || $prenom != $prenom_anc) {
     $sql = "UPDATE auth_user_md5
                SET nationalite= {?},
                    nom = {?},
                    prenom = {?} WHERE user_id= {?}";
-    $globals->xdb->execute($sql, $nationalite, $nom, $prenom, Session::getInt('uid', -1));
+    XDB::execute($sql, $nationalite, $nom, $prenom, S::v('uid', -1));
 }
-$globals->xdb->execute(
+XDB::execute(
         "UPDATE auth_user_quick SET
             profile_nick={?},
             profile_mobile={?}, profile_mobile_pub={?},
@@ -49,12 +49,12 @@ $globals->xdb->execute(
             $web, $web_pub,
             $freetext, $freetext_pub,
             $synchro_ax,
-            Session::getInt('uid', -1));
+            S::v('uid', -1));
 
 if ($nickname != $nickname_anc) {
     require_once('user.func.inc.php');
-    user_reindex(Session::getInt('uid', -1));
+    user_reindex(S::v('uid', -1));
 }
-$globals->xdb->execute("UPDATE photo SET pub = {?} WHERE uid = {?}", $photo_pub, Session::getInt('uid', -1));
+XDB::execute("UPDATE photo SET pub = {?} WHERE uid = {?}", $photo_pub, S::v('uid', -1));
 // vim:set et sws=4 sts=4 sw=4:
 ?>