public function add($autodate = true, $null_values = false) { if (!($result = parent::add($autodate, $null_values))) { return false; } Referrer::refreshCache(array(array('id_referrer' => $this->id))); Referrer::refreshIndex(array(array('id_referrer' => $this->id))); return $result; }
public function postProcess() { global $currentIndex; if ($this->enableCalendar()) { $calendarTab = new AdminStats(); $calendarTab->postProcess(); } if (Tools::isSubmit('submitSettings')) { if ($this->tabAccess['edit'] === '1') { if (Configuration::updateValue('TRACKING_DIRECT_TRAFFIC', (int) Tools::getValue('tracking_dt'))) { Tools::redirectAdmin($currentIndex . '&conf=4&token=' . Tools::getValue('token')); } } } if (ModuleGraph::getDateBetween() != Configuration::get('PS_REFERRERS_CACHE_LIKE') or Tools::isSubmit('submitRefreshCache')) { Referrer::refreshCache(); } if (Tools::isSubmit('submitRefreshIndex')) { Referrer::refreshIndex(); } return parent::postProcess(); }
public function postProcess() { if ($this->enableCalendar()) { // Warning, instantiating a controller here changes the controller in the Context... $calendar_tab = new AdminStatsController(); $calendar_tab->postProcess(); // ...so we set it back to the correct one here $this->context->controller = $this; } if (Tools::isSubmit('submitSettings')) { if ($this->tabAccess['edit'] === '1') { if (Configuration::updateValue('TRACKING_DIRECT_TRAFFIC', (int) Tools::getValue('tracking_dt'))) { Tools::redirectAdmin(self::$currentIndex . '&conf=4&token=' . Tools::getValue('token')); } } } if (ModuleGraph::getDateBetween() != Configuration::get('PS_REFERRERS_CACHE_LIKE') || Tools::isSubmit('submitRefreshCache')) { Referrer::refreshCache(); } if (Tools::isSubmit('submitRefreshIndex')) { Referrer::refreshIndex(); } return parent::postProcess(); }