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(); }