X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fvalidations%2Fphotos.inc.php;h=cc1631a64e4c30d311d337cd3cd510fd8822235e;hb=b6ba1a0417b6fc73f3d1701146373b4bec0d1428;hp=b2fc0a10e77c7284d47fbe37eb48bb6a287b0ec9;hpb=a7d35093a40837b3a17d7fbac0259995f084812c;p=platal.git diff --git a/include/validations/photos.inc.php b/include/validations/photos.inc.php index b2fc0a1..cc1631a 100644 --- a/include/validations/photos.inc.php +++ b/include/validations/photos.inc.php @@ -1,6 +1,6 @@ read($upload); } @@ -76,7 +76,7 @@ class PhotoReq extends Validate static public function get_request($uid) { - return parent::get_typed_request($uid,'photo'); + return parent::get_typed_request($uid, 'photo'); } // }}} @@ -101,7 +101,7 @@ class PhotoReq extends Validate protected function handle_editor() { if (isset($_FILES['userfile'])) { - $upload =& PlUpload::get($_FILES['userfile'], S::v('forlife'), 'photo'); + $upload =& PlUpload::get($_FILES['userfile'], S::user()->login(), 'photo'); if (!$upload) { $this->trigError('Une erreur est survenue lors du téléchargement du fichier'); return false; @@ -140,8 +140,8 @@ class PhotoReq extends Validate 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); - register_watch_op($this->uid, WATCH_FICHE, 'photo'); + $this->user->id(), $this->mimetype, $this->data, $this->x, $this->y); + register_watch_op($this->user->id(), WATCH_FICHE, '', 'photo'); return true; }