public function clean() { global $gantry; if (array_key_exists('cookie_time', $gantry->_working_params)) { $cookie_time = time() + (int) $gantry->_working_params['cookie_time']['value']; } foreach ($this->_setincookie as $cookie_var) { if (array_key_exists($gantry->template_prefix . $gantry->_base_params_checksum . "-" . $cookie_var, $_COOKIE)) { setcookie($gantry->template_prefix . $gantry->_base_params_checksum . "-" . $cookie_var, "", $cookie_time, $gantry->getCookiePath(), false); } } GantryCookieParamOverride::_flushOldCookies(); }
/** * @return void */ protected function populateParams() { gantry_import('core.params.overrides.gantryurlparamoverride'); gantry_import('core.params.overrides.gantrysessionparamoverride'); gantry_import('core.params.overrides.gantrycookieparamoverride'); gantry_import('core.params.overrides.gantrymenuitemparamoverride'); // get a copy of the params for working with on this call $this->_working_params = $this->_template->getParams(); if (!isset($_REQUEST['reset-settings'])) { GantrySessionParamOverride::populate(); GantryCookieParamOverride::populate(); } GantryMenuItemParamOverride::populate(); if (!isset($_REQUEST['reset-settings'])) { GantryUrlParamOverride::populate(); } $this->_params_hash = md5(serialize($this->_working_params)); }