2006 => 2007 Happy New Year\!
[platal.git] / include / validations / aliases.inc.php
index 34d0133..7ad6d0c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2006 Polytechnique.org                              *
+ *  Copyright (C) 2003-2007 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -60,7 +60,7 @@ class AliasReq extends Validate
     // }}}
     // {{{ function get_request()
 
-    function get_request($uid)
+    static function get_request($uid)
     {
         return parent::get_typed_request($uid,'alias');
     }
@@ -120,7 +120,7 @@ class AliasReq extends Validate
                                 $this->alias, $this->old);
         } else {
             XDB::execute('INSERT INTO virtual SET alias={?},type="user"', $this->alias);
-            $vid = mysql_insert_id();
+            $vid = XDB::insertId();
             $dom = $this->shorter_domain();
             return XDB::query('INSERT INTO virtual_redirect (vid,redirect) VALUES ({?}, {?})',
                               $vid, $this->forlife.'@'.$dom);