/** * Function to allow the creation of search defaults in code * * @see getSearchFilter() * * @return array */ public function getSearchDefaults() { if (!$this->defaultSearchData) { $from = new \MUtil_Date(); $from->subWeek(2); $until = new \MUtil_Date(); $until->addDay(1); $this->defaultSearchData = array(\Gems_Snippets_AutosearchFormSnippet::PERIOD_DATE_USED => 'grco_created', 'grco_organization' => $this->loader->getOrganization()->getId(), 'datefrom' => $from, 'dateuntil' => $until); } return parent::getSearchDefaults(); }
/** * Function to allow the creation of search defaults in code * * @see getSearchFilter() * * @return array */ public function getSearchDefaults() { if (!$this->defaultSearchData) { $from = new \MUtil_Date(); $from->subWeek(2); $until = new \MUtil_Date(); $until->addDay(1); $this->defaultSearchData = array('datefrom' => $from, 'dateuntil' => $until); } return parent::getSearchDefaults(); }
protected function _checkLogOverwrite() { switch ($this->_logRotate) { case self::ROTATE_PER_MONTH: $now = new \MUtil_Date(); $now->subMonth(10); break; case self::ROTATE_PER_MONTH: $now = new \MUtil_Date(); $now->subWeek(50)->subDay(1); break; default: return; } $fileTime = new \MUtil_Date(filectime($this->_logFileName)); if ($fileTime) { } }