remove smarty {version} function, we have {#globals.version#} for it !!!
[platal.git] / include / validations / photos.inc.php
index 0f8e75e..4becd18 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   *
@@ -44,7 +44,7 @@ class PhotoReq extends Validate
    
     function PhotoReq($_uid, $_data, $_stamp=0)
     {
-        global $globals, $page;
+        global $page;
 
         $this->Validate($_uid, true, 'photo', $_stamp);
         
@@ -140,9 +140,7 @@ class PhotoReq extends Validate
     
     function commit()
     {
-        global $globals;
-        
-        $globals->xdb->execute('REPLACE INTO  photo (uid, attachmime, attach, x, y)
+        XDB::execute('REPLACE INTO  photo (uid, attachmime, attach, x, y)
                                       VALUES  ({?},{?},{?},{?},{?})',
                                       $this->uid, $this->mimetype, $this->data, $this->x, $this->y);
        require_once('notifs.inc.php');