X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fvalidations%2Fphotos.inc.php;h=0f2d109e929433075a35a0886c7a48ba4eb304dd;hb=d508daebb9e5ef00235efaf5ab1fdd8ce5b622dc;hp=40f2cc13fd917a5f3ad4948004b4fcc3a37cefff;hpb=a2a1c2f29234ccc08ec5bce5987c521354a0da7a;p=platal.git diff --git a/include/validations/photos.inc.php b/include/validations/photos.inc.php index 40f2cc1..0f2d109 100644 --- a/include/validations/photos.inc.php +++ b/include/validations/photos.inc.php @@ -1,6 +1,6 @@ valid = $upload->resizeImage(240, 300, 160, 0, SIZE_MAX); if (!$this->valid) { - $this->trig('Le fichier que tu as transmis n\'est pas une image valide, ou est trop gros pour être traité'); + $this->trigError('Le fichier que tu as transmis n\'est pas une image valide, ou est trop gros pour être traité'); } $this->data = $upload->getContents(); list($this->x, $this->y, $this->mimetype) = $upload->imageInfo(); @@ -103,7 +103,7 @@ class PhotoReq extends Validate if (isset($_FILES['userfile'])) { $upload =& PlUpload::get($_FILES['userfile'], S::v('forlife'), 'photo'); if (!$upload) { - $this->trig('Une erreur est survenue lors du téléchargement du fichier'); + $this->trigError('Une erreur est survenue lors du téléchargement du fichier'); return false; } $this->read($upload); @@ -141,7 +141,7 @@ class PhotoReq extends Validate 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'); + register_watch_op($this->uid, WATCH_FICHE, '', 'photo'); return true; }