Was this an error ???
[platal.git] / include / validations / homonymes.inc.php
index 56860bb..742ff5d 100644 (file)
@@ -118,7 +118,7 @@ est ambigu pour des raisons d'homonymie et signalera ton email exact.";
 
         $body = $this->prenom.",\n\n"
               . $this->_mail_body($isok)
-              . (Env::has('comm') ? "\n\n".Env::get('comm') : '')
+              . (Env::has('comm') ? "\n\n".Env::v('comm') : '')
               . "\n\nCordialement,\nL'équipe Polytechnique.org\n";
 
         $mailer->setTxtBody(wordwrap($body));
@@ -129,13 +129,12 @@ est ambigu pour des raisons d'homonymie et signalera ton email exact.";
     
     function commit()
     {
-        global $globals;
         require_once('homonymes.inc.php');
 
         switch_bestalias($this->uid, $this->loginbis);
         if (!$this->warning) {
-            $globals->xdb->execute("UPDATE aliases SET type='homonyme',expire=NOW() WHERE alias={?}", $this->loginbis);
-            $globals->xdb->execute("REPLACE INTO homonymes (homonyme_id,user_id) VALUES({?},{?})", $this->uid, $this->uid);
+            XDB::execute("UPDATE aliases SET type='homonyme',expire=NOW() WHERE alias={?}", $this->loginbis);
+            XDB::execute("REPLACE INTO homonymes (homonyme_id,user_id) VALUES({?},{?})", $this->uid, $this->uid);
         }
         
         return true;