fix path to image
[platal.git] / include / validations / homonymes.inc.php
index 56860bb..9a628da 100644 (file)
@@ -61,14 +61,6 @@ class HomonymeReq extends Validate
     }
 
     // }}}
-    // {{{ function get_request()
-
-    function get_request($uid)
-    {
-        return parent::get_request($uid,$this->title);
-    }
-
-    // }}}
     // {{{ function formu()
 
     function formu()
@@ -118,7 +110,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 +121,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;