redirect('stFastCache/config', 301); } public function validateConfig() { if ($this->getRequest()->getMethod() == sfRequest::POST) { $i18n = $this->getContext()->getI18N(); if (!$this->testRequirements()) { $this->getRequest()->setError('config{fast_cache_enabled}', $i18n->__('Brak obsługi PDO lub brak sterownika sqlite dla PDO. W celu rozwiązania problemu proszę skontaktować się z administratorem serwera.')); } } return !$this->getRequest()->hasErrors(); } protected function saveConfig() { $ret = parent::saveConfig(); stFastCacheManager::clearCache(); return $ret; } public function executeClear() { stFastCacheManager::clearCache(); $this->setFlash('notice', $this->getContext()->getI18N()->__('Fast Cache został wyczyszczony')); return $this->redirect($this->getRequest()->getReferer()); } protected function testRequirements() { if (class_exists('PDO')) { if (array_search('sqlite',PDO::getAvailableDrivers()) === false) return false; return true; } return false; } }