<?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 *
private function read(PlUpload &$upload)
{
- $this->valid = $upload->resizeImage(240, 300, 160, 0, SIZE_MAX);
+ $this->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é');
}
list($this->x, $this->y, $this->mimetype) = $upload->imageInfo();
$upload->rm();
}
-
+
// }}}
// {{{ function isValid()
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;
}