- 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');
+ XDB::execute('INSERT INTO profile_photos (pid, attachmime, attach, x, y)
+ VALUES ({?}, {?}, {?}, {?}, {?})
+ ON DUPLICATE KEY UPDATE attachmime = VALUES(attachmime), attach = VALUES(attach),
+ x = VALUES(x), y = VALUES(y)',
+ $this->profile->id(), $this->mimetype, $this->data, $this->x, $this->y);
+