<?php
/***************************************************************************
- * Copyright (C) 2003-2010 Polytechnique.org *
+ * Copyright (C) 2003-2013 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
// }}}
// {{{ constructor
- public function __construct(User &$_user, Profile &$_profile, PlUpload &$upload, $_stamp = 0)
+ public function __construct(User $_user, Profile $_profile, PlUpload $upload, $_stamp = 0)
{
parent::__construct($_user, $_profile, true, 'photo', $_stamp);
$this->read($upload);
// }}}
// {{{ function read
- private function read(PlUpload &$upload)
+ private function read(PlUpload $upload)
{
$this->valid = $upload->resizeImage(240, 300, 160, 0, SIZE_MAX);
if (!$this->valid) {
{
XDB::execute('INSERT INTO profile_photos (pid, attachmime, attach, x, y)
VALUES ({?}, {?}, {?}, {?}, {?})
- ON DUPLICATE KEY UPDATE attachmime = VALUES(attachmime), attach = VALUES(attach)
+ 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);