/** * Saving this * * @return boolean True is satisfactory */ function store($updateNulls = false) { /* if ($img = BRequest::getVar('img', false, 'files')) { //delete the old if (!is_null($this->img)) @unlink($this->img); //save the new $this->img = save_file($img, 'image', 'product'); } */ return parent::store($updateNulls); }
/** * Saving this * * @return boolean True is satisfactory */ function store($updateNulls = false) { if ($banner = BRequest::getVar('img', false, 'files')) { //delete the old if (!is_null($this->banner)) { @unlink($this->banner); } //save the new $this->banner = save_file($banner, 'image', 'banner'); } return parent::store($updateNulls); }
/** * Function is responsible for making sure that the avatar is saved * * (non-PHPdoc) * @see FTP2.FTPTOYOURSITE.COM/shop.saturdaymarket.org/web/content/five-includes/database/FiveTable#store() */ function store($updateNulls = false) { if ($avatar = BRequest::getVar('avatar', false, 'files')) { //delete the old if (!is_null($this->avatar)) { @unlink($this->avatar); } //save the new $this->avatar = save_file($avatar, 'image', 'avatar'); } if (parent::store($updateNulls)) { $this->loadGroup(); $this->_groups->store(); } }