X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fvalidations%2Fphotos.inc.php;h=1aac21673606df9ca6bad31532761d8b63671bad;hb=5c4ea53f1c66590a34fc10ae5767469c58b90a24;hp=0f2d109e929433075a35a0886c7a48ba4eb304dd;hpb=d0edeb70f254ed642b59c7c3636b7802266bcfe4;p=platal.git diff --git a/include/validations/photos.inc.php b/include/validations/photos.inc.php index 0f2d109..1aac216 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; @@ -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) + //require_once 'notifs.inc.php'; + XDB::execute('REPLACE INTO profile_photos (pid, 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->profile()->id(), $this->mimetype, $this->data, $this->x, $this->y); + //register_watch_op($this->user->id(), WATCH_FICHE, '', 'photo'); return true; }