/** * Sets default values for a new album * * @return bool */ protected function setDefaults() { global $_zp_gallery; parent::setDefaults(); return true; }
/** * Sets default values for a new album * * @return bool */ protected function setDefaults() { global $_zp_gallery; // Set default data for a new Album (title and parent_id) parent::setDefaults(); $parentalbum = $this->getParent(); $this->set('mtime', filemtime($this->localpath)); if (!$_zp_gallery->getAlbumUseImagedate()) { $this->setDateTime(strftime('%Y-%m-%d %H:%M:%S', $this->get('mtime'))); } $title = trim($this->name); if (!is_null($parentalbum)) { $this->set('parentid', $parentalbum->getID()); $title = substr($title, strrpos($title, '/') + 1); } $this->set('title', sanitize($title, 2)); return true; }
/** * Sets default values for a new album * * @return bool */ protected function setDefaults() { global $_zp_gallery; // Set default data for a new Album (title and parent_id) parent::setDefaults(); $this->set('mtime', filemtime($this->localpath)); if (!$_zp_gallery->getAlbumUseImagedate()) { $this->setDateTime(strftime('%Y-%m-%d %H:%M:%S', $this->get('mtime'))); } return true; }