Was this an error ???
[platal.git] / include / validations / nomusage.inc.php
index 11d6b21..e0ca232 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   *
@@ -46,14 +46,13 @@ class UsageReq extends Validate
 
     function UsageReq($_uid, $_usage, $_reason)
     {
-        global $globals;
         $this->Validate($_uid, true, 'usage');
         $this->nom_usage  = $_usage;
         $this->reason = $_reason;
         $this->alias   = make_username($this->prenom, $this->nom_usage);
         if (!$this->nom_usage) $this->alias = "";
 
-        $res = $globals->xdb->query("
+        $res = XDB::query("
                 SELECT  e.alias, u.nom_usage, a.id
                   FROM  auth_user_md5 as u
              LEFT JOIN  aliases       as e ON(e.type='alias' AND FIND_IN_SET('usage',e.flags) AND e.id = u.user_id)