public function execute() { try { $errors = installerHelper::flushCache(); $this->response['message'] = _w('Cache cleared'); if ($errors) { $this->response['message'] .= "<br>" . _w('But with errors:') . "<br>" . implode("<br>", $errors); } } catch (Exception $ex) { $this->setError($ex->getMessage()); } }
private function cleanup() { $apps = array(); foreach ($this->urls as $url) { if (!isset($url['skipped']) || !$url['skipped']) { if (preg_match('@^wa-apps/[^/]+$@', $url['target'])) { $apps[] = array('installed' => true, 'slug' => $url['target']); } } } installerHelper::flushCache($apps); $this->model->ping(); }