Merge branch 'platal-0.9.15'
[platal.git] / include / validations / photos.inc.php
index c62cff7..26f45f8 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -137,11 +137,11 @@ class PhotoReq extends Validate
 
     public function commit()
     {
+        require_once 'notifs.inc.php';
         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');
-        register_watch_op($this->uid, WATCH_FICHE);
+        register_watch_op($this->uid, WATCH_FICHE, 'photo');
         return true;
     }