本文整理汇总了PHP中Feed::clear_cache方法的典型用法代码示例。如果您正苦于以下问题:PHP Feed::clear_cache方法的具体用法?PHP Feed::clear_cache怎么用?PHP Feed::clear_cache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Feed
的用法示例。
在下文中一共展示了Feed::clear_cache方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete_question
private function delete_question(FaqQuestion $question)
{
FaqService::delete('WHERE id=:id', array('id' => $question->get_id()));
PersistenceContext::get_querier()->delete(DB_TABLE_EVENTS, 'WHERE module=:module AND id_in_module=:id', array('module' => 'faq', 'id' => $question->get_id()));
Feed::clear_cache('faq');
FaqCache::invalidate();
}
示例2: delete_question
private function delete_question()
{
AppContext::get_session()->csrf_post_protect();
FaqService::delete('WHERE id=:id', array('id' => $this->faq_question->get_id()));
PersistenceContext::get_querier()->delete(DB_TABLE_EVENTS, 'WHERE module=:module AND id_in_module=:id', array('module' => 'faq', 'id' => $this->faq_question->get_id()));
Feed::clear_cache('faq');
FaqCache::invalidate();
}
示例3: execute
public function execute(HTTPRequestCustom $request)
{
AppContext::get_session()->csrf_get_protect();
$this->get_downloadfile($request);
$this->check_authorizations();
DownloadService::delete('WHERE id=:id', array('id' => $this->downloadfile->get_id()));
DownloadService::get_keywords_manager()->delete_relations($this->downloadfile->get_id());
PersistenceContext::get_querier()->delete(DB_TABLE_EVENTS, 'WHERE module=:module AND id_in_module=:id', array('module' => 'download', 'id' => $this->downloadfile->get_id()));
CommentsService::delete_comments_topic_module('download', $this->downloadfile->get_id());
NotationService::delete_notes_id_in_module('download', $this->downloadfile->get_id());
Feed::clear_cache('download');
DownloadCache::invalidate();
AppContext::get_response()->redirect($request->get_url_referrer() ? $request->get_url_referrer() : DownloadUrlBuilder::home(), StringVars::replace_vars(LangLoader::get_message('download.message.success.delete', 'common', 'download'), array('name' => $this->downloadfile->get_name())));
}
示例4: execute
public function execute(HTTPRequestCustom $request)
{
AppContext::get_session()->csrf_get_protect();
$news = $this->get_news($request);
if (!$news->is_authorized_to_delete()) {
$error_controller = PHPBoostErrors::user_not_authorized();
DispatchManager::redirect($error_controller);
}
if (AppContext::get_current_user()->is_readonly()) {
$controller = PHPBoostErrors::user_in_read_only();
DispatchManager::redirect($controller);
}
NewsService::delete('WHERE id=:id', array('id' => $news->get_id()));
NewsService::get_keywords_manager()->delete_relations($news->get_id());
PersistenceContext::get_querier()->delete(DB_TABLE_EVENTS, 'WHERE module=:module AND id_in_module=:id', array('module' => 'news', 'id' => $news->get_id()));
CommentsService::delete_comments_topic_module('news', $news->get_id());
Feed::clear_cache('news');
AppContext::get_response()->redirect($request->get_url_referrer() ? $request->get_url_referrer() : NewsUrlBuilder::home(), StringVars::replace_vars(LangLoader::get_message('news.message.success.delete', 'common', 'news'), array('name' => $news->get_name())));
}
示例5: save
private function save()
{
$news = $this->get_news();
$news->set_name($this->form->get_value('name'));
$news->set_id_cat($this->form->get_value('id_cat')->get_raw_value());
$news->set_contents($this->form->get_value('contents'));
$news->set_short_contents($this->form->get_value('enable_short_contents') ? $this->form->get_value('short_contents') : '');
$news->set_picture(new Url($this->form->get_value('picture')));
$news->set_sources($this->form->get_value('sources'));
if ($this->is_contributor_member()) {
if ($news->get_id() === null) {
$news->set_creation_date(new Date());
}
$news->set_rewrited_name(Url::encode_rewrite($news->get_name()));
$news->set_approbation_type(News::NOT_APPROVAL);
$news->clean_start_and_end_date();
} else {
$news->set_creation_date($this->form->get_value('creation_date'));
$rewrited_name = $this->form->get_value('rewrited_name', '');
$rewrited_name = $this->form->get_value('personalize_rewrited_name') && !empty($rewrited_name) ? $rewrited_name : Url::encode_rewrite($news->get_name());
$news->set_rewrited_name($rewrited_name);
$news->set_top_list_enabled($this->form->get_value('top_list'));
$news->set_approbation_type($this->form->get_value('approbation_type')->get_raw_value());
if ($news->get_approbation_type() == News::APPROVAL_DATE) {
$news->set_start_date($this->form->get_value('start_date'));
if ($this->form->get_value('end_date_enable')) {
$news->set_end_date($this->form->get_value('end_date'));
} else {
$news->clean_end_date();
}
} else {
$news->clean_start_and_end_date();
}
}
if ($news->get_id() === null) {
$news->set_author_user(AppContext::get_current_user());
$id_news = NewsService::add($news);
} else {
$id_news = $news->get_id();
NewsService::update($news);
}
$this->contribution_actions($news, $id_news);
NewsService::get_keywords_manager()->put_relations($id_news, $this->form->get_value('keywords'));
Feed::clear_cache('news');
}
示例6: save
private function save()
{
$weblink = $this->get_weblink();
$weblink->set_name($this->form->get_value('name'));
$weblink->set_rewrited_name(Url::encode_rewrite($weblink->get_name()));
$weblink->set_id_category($this->form->get_value('id_category')->get_raw_value());
$weblink->set_url(new Url($this->form->get_value('url')));
$weblink->set_contents($this->form->get_value('contents'));
$weblink->set_short_contents($this->form->get_value('short_contents_enabled') ? $this->form->get_value('short_contents') : '');
$weblink->set_partner($this->form->get_value('partner'));
$weblink->set_partner_picture(new Url($this->form->get_value('partner_picture')));
$weblink->set_privileged_partner($this->form->get_value('privileged_partner'));
if ($this->is_contributor_member()) {
if ($weblink->get_id() === null) {
$weblink->set_creation_date(new Date());
}
$weblink->set_approbation_type(WebLink::NOT_APPROVAL);
$weblink->clean_start_and_end_date();
} else {
$weblink->set_creation_date($this->form->get_value('creation_date'));
$weblink->set_approbation_type($this->form->get_value('approbation_type')->get_raw_value());
if ($weblink->get_approbation_type() == WebLink::APPROVAL_DATE) {
$weblink->set_start_date($this->form->get_value('start_date'));
if ($this->form->get_value('end_date_enable')) {
$weblink->set_end_date($this->form->get_value('end_date'));
} else {
$weblink->clean_end_date();
}
} else {
$weblink->clean_start_and_end_date();
}
}
if ($weblink->get_id() === null) {
$id = WebService::add($weblink);
} else {
$id = $weblink->get_id();
WebService::update($weblink);
}
$this->contribution_actions($weblink, $id);
WebService::get_keywords_manager()->put_relations($id, $this->form->get_value('keywords'));
Feed::clear_cache('web');
WebCache::invalidate();
}
示例7: update_module
public static function update_module($module_id, $activated)
{
$error = '';
if (!$activated) {
MenuService::delete_mini_module($module_id);
MenuService::delete_module_feeds_menus($module_id);
$general_config = GeneralConfig::load();
$module_home_page_selected = $general_config->get_module_home_page();
if ($module_home_page_selected == $module_id) {
$general_config->set_module_home_page('');
$general_config->set_other_home_page('index.php');
}
$editors = AppContext::get_content_formatting_service()->get_available_editors();
if (in_array($module_id, $editors)) {
if (count($editors) > 1) {
$default_editor = ContentFormattingConfig::load()->get_default_editor();
if ($default_editor !== $module_id) {
PersistenceContext::get_querier()->update(DB_TABLE_MEMBER, array('editor' => $default_editor), 'WHERE editor=:old_editor', array('old_editor' => 'bbcode'));
} else {
$error = LangLoader::get_message('is_default_editor', 'editor-common');
}
} else {
$error = LangLoader::get_message('last_editor_installed', 'editor-common');
}
}
} else {
$module = self::get_module($module_id);
if ($module->get_configuration()->get_compatibility() != GeneralConfig::load()->get_phpboost_major_version()) {
$error = LangLoader::get_message('modules.not_compatible', 'admin-modules-common');
}
}
if (empty($error)) {
$module = self::get_module($module_id);
$module->set_activated($activated);
ModulesConfig::load()->update($module);
ModulesConfig::save();
MenuService::generate_cache();
Feed::clear_cache($module_id);
if (ServerEnvironmentConfig::load()->is_url_rewriting_enabled()) {
HtaccessFileCache::regenerate();
}
}
return $error;
}
示例8: list
$visible = 0;
}
break;
case 1:
list($start_timestamp, $end_timestamp) = array(0, 0);
break;
default:
list($visible, $start_timestamp, $end_timestamp) = array(0, 0, 0);
}
$Sql->query_inject("INSERT INTO " . PREFIX . "news (title, idcat, url, size, count, contents, short_contents, image, timestamp, release_timestamp, start, end, visible) VALUES ('" . $news_title . "', '" . $news_cat_id . "', '" . $news_url . "', '" . $news_size . "', '" . $news_hits . "', '" . strparse($news_contents) . "', '" . strparse($news_short_contents) . "', '" . $news_image . "', '" . $news_creation_date->get_timestamp() . "', '" . ($ignore_release_date ? 0 : $news_release_date->get_timestamp()) . "', '" . $start_timestamp . "', '" . $end_timestamp . "', '" . $visible . "')", __LINE__, __FILE__);
$new_id_news = $Sql->insert_id("SELECT MAX(id) FROM " . PREFIX . "news");
if ($news_cat_id != $news_infos['idcat']) {
$news_categories->Recount_sub_newss();
}
import('content/syndication/feed');
Feed::clear_cache('news');
redirect(HOST . DIR . '/news/' . url('news.php?id=' . $new_id_news, 'news-' . $new_id_news . '+' . url_encode_rewrite($news_title) . '.php'));
} else {
redirect(HOST . DIR . '/news/' . url('news.php'));
}
} elseif ($preview) {
$begining_calendar = new MiniCalendar('begining_date');
$begining_calendar->set_date($begining_date);
$end_calendar = new MiniCalendar('end_date');
$end_calendar->set_date($end_date);
$end_calendar->set_style('margin-left:150px;');
$Template->set_filenames(array('news' => 'news/news.tpl'));
if ($news_size > 1) {
$size_tpl = $news_size . ' ' . $LANG['unit_megabytes'];
} elseif ($news_size > 0) {
$size_tpl = $news_size * 1024 . ' ' . $LANG['unit_kilobytes'];
示例9: save
private function save()
{
$now = new Date();
$pm_recipients_list = array();
$send_pm = true;
$versions = array_reverse($this->config->get_versions_fix(), true);
$status = $this->form->get_value('status')->get_raw_value();
if (count($versions)) {
if (!$this->form->field_is_disabled('fixed_in')) {
$fixed_in = $this->form->get_value('fixed_in')->get_raw_value() ? $this->form->get_value('fixed_in')->get_raw_value() : 0;
if ($fixed_in != $this->bug->get_fixed_in()) {
//Bug history update
BugtrackerService::add_history(array('bug_id' => $this->bug->get_id(), 'updater_id' => $this->current_user->get_id(), 'update_date' => $now->get_timestamp(), 'updated_field' => 'fixed_in', 'old_value' => $this->bug->get_fixed_in(), 'new_value' => $fixed_in));
$this->bug->set_fixed_in($fixed_in);
}
} else {
if (in_array($status, array(Bug::NEW_BUG, Bug::REJECTED))) {
$this->bug->set_fixed_in(0);
}
}
}
if (!$this->form->field_is_disabled('assigned_to')) {
$assigned_to = $this->form->get_value('assigned_to');
$assigned_to_id = UserService::user_exists("WHERE display_name = :display_name", array('display_name' => $assigned_to));
if ($this->bug->get_assigned_to_id()) {
$old_user_assigned_id = UserService::user_exists("WHERE user_id = :user_id", array('user_id' => $this->bug->get_assigned_to_id()));
$old_user_assigned = !empty($old_user_assigned_id) ? UserService::get_user($old_user_assigned_id) : 0;
} else {
$old_user_assigned = 0;
}
$new_user_assigned = !empty($assigned_to) && !empty($assigned_to_id) ? UserService::get_user($assigned_to_id) : 0;
$new_assigned_to_id = !empty($new_user_assigned) ? $new_user_assigned->get_id() : 0;
if ($new_assigned_to_id != $this->bug->get_assigned_to_id()) {
//Bug history update
BugtrackerService::add_history(array('bug_id' => $this->bug->get_id(), 'updater_id' => $this->current_user->get_id(), 'update_date' => $now->get_timestamp(), 'updated_field' => 'assigned_to_id', 'old_value' => $old_user_assigned ? $old_user_assigned->get_display_name() : $this->lang['notice.no_one'], 'new_value' => $new_user_assigned ? $new_user_assigned->get_display_name() : $this->lang['notice.no_one']));
//Bug update
$this->bug->set_assigned_to_id($new_assigned_to_id);
//The PM will only be sent to the assigned user
if ($new_assigned_to_id != $this->current_user->get_id()) {
$pm_recipients_list[] = $new_assigned_to_id;
} else {
$send_pm = false;
}
}
}
if ($status != $this->bug->get_status()) {
//Bug history update
BugtrackerService::add_history(array('bug_id' => $this->bug->get_id(), 'updater_id' => $this->current_user->get_id(), 'update_date' => $now->get_timestamp(), 'updated_field' => 'status', 'old_value' => $this->bug->get_status(), 'new_value' => $status));
//Bug update
$this->bug->set_status($status);
if ($this->bug->is_fixed() || $this->bug->is_rejected()) {
$this->bug->set_fix_date($now);
} else {
$this->bug->set_fix_date(0);
}
}
BugtrackerService::update($this->bug);
Feed::clear_cache('bugtracker');
switch ($status) {
case Bug::IN_PROGRESS:
$is_pm_enabled = $this->config->are_pm_in_progress_enabled();
break;
case Bug::PENDING:
$is_pm_enabled = $this->config->are_pm_pending_enabled();
break;
case Bug::ASSIGNED:
$is_pm_enabled = $this->config->are_pm_assign_enabled();
break;
case Bug::FIXED:
$is_pm_enabled = $this->config->are_pm_fix_enabled();
break;
case Bug::REOPEN:
$is_pm_enabled = $this->config->are_pm_reopen_enabled();
break;
case Bug::REJECTED:
$is_pm_enabled = $this->config->are_pm_reject_enabled();
break;
default:
$is_pm_enabled = false;
break;
}
//Add comment if needed
$comment = $this->form->get_value('comments_message', '');
if (!empty($comment)) {
$comments_topic = new BugtrackerCommentsTopic();
$comments_topic->set_id_in_module($this->bug->get_id());
$comments_topic->set_url(BugtrackerUrlBuilder::detail($this->bug->get_id() . '-' . $this->bug->get_rewrited_title()));
CommentsManager::add_comment($comments_topic->get_module_id(), $comments_topic->get_id_in_module(), $comments_topic->get_topic_identifier(), $comments_topic->get_path(), $comment);
//New line in the bug history
BugtrackerService::add_history(array('bug_id' => $this->bug->get_id(), 'updater_id' => $this->current_user->get_id(), 'update_date' => $now->get_timestamp(), 'change_comment' => $this->lang['notice.new_comment']));
}
//Send PM with comment to updaters if the option is enabled
if (!$this->bug->is_new() && $this->config->are_pm_enabled() && $is_pm_enabled && $send_pm) {
BugtrackerPMService::send_PM_to_updaters($status, $this->bug->get_id(), $comment, $pm_recipients_list);
}
if (in_array($status, array(Bug::NEW_BUG, Bug::REOPEN, Bug::REJECTED, Bug::FIXED)) && $this->config->are_admin_alerts_enabled() && in_array($this->bug->get_severity(), $this->config->get_admin_alerts_levels())) {
$alerts = AdministratorAlertService::find_by_criteria($this->bug->get_id(), 'bugtracker');
if (!empty($alerts)) {
$alert = $alerts[0];
if ($this->bug->is_new() || $this->bug->is_reopen()) {
//.........这里部分代码省略.........
示例10: delete_event
private function delete_event($delete_all_serie_events = false)
{
$events_list = CalendarService::get_serie_events($this->event->get_content()->get_id());
if ($delete_all_serie_events) {
foreach ($events_list as $event) {
//Delete event comments
CommentsService::delete_comments_topic_module('calendar', $event->get_id());
//Delete participants
CalendarService::delete_all_participants($event->get_id());
}
CalendarService::delete_all_serie_events($this->event->get_content()->get_id());
PersistenceContext::get_querier()->delete(DB_TABLE_EVENTS, 'WHERE module = :module AND id_in_module = :id', array('module' => 'calendar', 'id' => !$this->event->get_parent_id() ? $this->event->get_id() : $this->event->get_parent_id()));
} else {
if (!$this->event->belongs_to_a_serie() || count($events_list) == 1) {
CalendarService::delete_event_content('WHERE id = :id', array('id' => $this->event->get_parent_id()));
}
//Delete event
CalendarService::delete_event('WHERE id_event = :id', array('id' => $this->event->get_id()));
if (!$this->event->get_parent_id()) {
PersistenceContext::get_querier()->delete(DB_TABLE_EVENTS, 'WHERE module=:module AND id_in_module=:id', array('module' => 'calendar', 'id' => $this->event->get_id()));
}
//Delete event comments
CommentsService::delete_comments_topic_module('calendar', $this->event->get_id());
//Delete participants
CalendarService::delete_all_participants($this->event->get_id());
}
Feed::clear_cache('calendar');
CalendarCurrentMonthEventsCache::invalidate();
}
示例11: save
private function save()
{
$article = $this->get_article();
$article->set_title($this->form->get_value('title'));
$article->set_id_category($this->form->get_value('id_category')->get_raw_value());
$article->set_description($this->form->get_value('enable_description') ? $this->form->get_value('description') : '');
$article->set_contents($this->form->get_value('contents'));
$author_name_displayed = $this->form->get_value('author_name_displayed') ? $this->form->get_value('author_name_displayed') : Article::AUTHOR_NAME_NOTDISPLAYED;
$article->set_author_name_displayed($author_name_displayed);
$notation_enabled = $this->form->get_value('notation_enabled') ? $this->form->get_value('notation_enabled') : Article::NOTATION_DISABLED;
$article->set_notation_enabled($notation_enabled);
$article->set_picture(new Url($this->form->get_value('picture')));
$article->set_sources($this->form->get_value('sources'));
if ($this->is_contributor_member()) {
if ($article->get_id() === null) {
$article->set_date_created(new Date());
}
$article->set_rewrited_title(Url::encode_rewrite($article->get_title()));
$article->set_publishing_state(Article::NOT_PUBLISHED);
$article->clean_publishing_start_and_end_date();
} else {
$article->set_date_created($this->form->get_value('date_created'));
$rewrited_title = $this->form->get_value('rewrited_title', '');
$rewrited_title = $this->form->get_value('personalize_rewrited_title') && !empty($rewrited_title) ? $rewrited_title : Url::encode_rewrite($article->get_title());
$article->set_rewrited_title($rewrited_title);
$article->set_publishing_state($this->form->get_value('publishing_state')->get_raw_value());
if ($article->get_publishing_state() == Article::PUBLISHED_DATE) {
$article->set_publishing_start_date($this->form->get_value('publishing_start_date'));
if ($this->form->get_value('end_date_enable')) {
$article->set_publishing_end_date($this->form->get_value('publishing_end_date'));
} else {
$article->clean_publishing_end_date();
}
} else {
$article->clean_publishing_start_and_end_date();
}
}
if ($article->get_id() === null) {
$article->set_author_user(AppContext::get_current_user());
$id_article = ArticlesService::add($article);
} else {
$now = new Date();
$article->set_date_updated($now);
$id_article = $article->get_id();
ArticlesService::update($article);
}
$this->contribution_actions($article, $id_article);
ArticlesService::get_keywords_manager()->put_relations($id_article, $this->form->get_value('keywords'));
Feed::clear_cache('articles');
}
示例12: save
private function save()
{
$now = new Date();
$current_user = AppContext::get_current_user();
if ($this->config->are_pm_enabled() && $this->config->are_pm_delete_enabled()) {
//Add comment if needed
$comment = !$this->form->field_is_disabled('comments_message') ? $this->form->get_value('comments_message', '') : '';
//Send PM with comment to updaters if the option is enabled
BugtrackerPMService::send_PM_to_updaters('delete', $this->bug->get_id(), $comment);
}
//Delete bug
BugtrackerService::delete("WHERE id=:id", array('id' => $this->bug->get_id()));
//Delete bug history
BugtrackerService::delete_history("WHERE bug_id=:id", array('id' => $this->bug->get_id()));
//Delete comments
CommentsService::delete_comments_topic_module('bugtracker', $this->bug->get_id());
//Delete admin alert
if ($this->config->are_admin_alerts_enabled()) {
$alerts = AdministratorAlertService::find_by_criteria($this->bug->get_id(), 'bugtracker');
if (!empty($alerts)) {
AdministratorAlertService::delete_alert($alerts[0]);
}
}
BugtrackerStatsCache::invalidate();
Feed::clear_cache('bugtracker');
}
示例13: clear_feed_cache
private static function clear_feed_cache()
{
Feed::clear_cache();
}
示例14: VALUES
$errstr = $LANG['wiki_title_already_exists'];
} else {
$Sql->query_inject("INSERT INTO " . PREFIX . "wiki_articles (title, encoded_title, id_cat, is_cat, undefined_status, auth) VALUES ('" . $title . "', '" . url_encode_rewrite($title) . "', '" . $new_id_cat . "', '" . $is_cat . "', '', '')", __LINE__, __FILE__);
$id_article = $Sql->insert_id("SELECT MAX(id) FROM " . PREFIX . "wiki_articles");
$Sql->query_inject("INSERT INTO " . PREFIX . "wiki_contents (id_article, menu, content, activ, user_id, user_ip, timestamp) VALUES ('" . $id_article . "', '" . addslashes($menu) . "', '" . $contents . "', 1, " . $User->get_attribute('user_id') . ", '" . USER_IP . "', " . time() . ")", __LINE__, __FILE__);
$id_contents = $Sql->insert_id("SELECT MAX(id_contents) FROM " . PREFIX . "wiki_contents");
$cat_update = '';
if ($is_cat == 1) {
$Sql->query_inject("INSERT INTO " . PREFIX . "wiki_cats (id_parent, article_id) VALUES (" . $new_id_cat . ", '" . $id_article . "')", __LINE__, __FILE__);
$id_created_cat = $Sql->insert_id("SELECT MAX(id) FROM " . PREFIX . "wiki_articles");
$cat_update = ", id_cat = '" . $id_created_cat . "'";
$Cache->Generate_module_file('wiki');
}
$Sql->query_inject("UPDATE " . PREFIX . "wiki_articles SET id_contents = '" . $id_contents . "'" . $cat_update . " WHERE id = " . $id_article, __LINE__, __FILE__);
import('content/syndication/feed');
Feed::clear_cache('wiki');
$redirect = $Sql->query("SELECT encoded_title FROM " . PREFIX . "wiki_articles WHERE id = '" . $id_article . "'", __LINE__, __FILE__);
redirect(url('wiki.php?title=' . $redirect, $redirect, '', '&'));
}
}
}
}
$Template->set_filenames(array('wiki_edit' => 'wiki/post.tpl'));
$Template->assign_vars(array('WIKI_PATH' => $Template->get_module_data_path('wiki')));
if ($id_edit > 0) {
$article_infos = $Sql->query_array(PREFIX . 'wiki_articles', '*', "WHERE id = '" . $id_edit . "'", __LINE__, __FILE__);
$general_auth = empty($article_infos['auth']) ? true : false;
$article_auth = !empty($article_infos['auth']) ? unserialize($article_infos['auth']) : array();
if (!((!$general_auth || $User->check_auth($_WIKI_CONFIG['auth'], WIKI_EDIT)) && ($general_auth || $User->check_auth($article_auth, WIKI_EDIT)))) {
$Errorh->handler('e_auth', E_USER_REDIRECT);
}
示例15: retrieve
require_once '../admin/admin_header.php';
$cache_mode = retrieve(GET, 'cache', '');
if (empty($cache_mode)) {
if (!empty($_POST['cache'])) {
$Cache->Generate_all_files();
redirect(HOST . DIR . '/admin/admin_cache.php?s=1');
} else {
$Template->set_filenames(array('admin_cache' => 'admin/admin_cache.tpl'));
$get_error = retrieve(GET, 's', 0);
if ($get_error == 1) {
$Errorh->handler($LANG['cache_success'], E_USER_SUCCESS);
}
$Template->assign_vars(array('L_CACHE' => $LANG['cache'], 'L_SYNDICATION' => $LANG['syndication'], 'L_EXPLAIN_SITE_CACHE' => $LANG['explain_site_cache'], 'L_GENERATE' => $LANG['generate']));
$Template->pparse('admin_cache');
}
} else {
if (!empty($_POST['cache'])) {
import('content/syndication/feed');
Feed::clear_cache();
redirect(HOST . DIR . '/admin/admin_cache.php?cache=syndication&s=1');
} else {
$Template->set_filenames(array('admin_cache_syndication' => 'admin/admin_cache_syndication.tpl'));
$get_error = retrieve(GET, 's', 0);
if ($get_error == 1) {
$Errorh->handler($LANG['cache_success'], E_USER_SUCCESS);
}
$Template->assign_vars(array('L_CACHE' => $LANG['cache'], 'L_SYNDICATION' => $LANG['syndication'], 'L_EXPLAIN_SITE_CACHE' => $LANG['explain_site_cache_syndication'], 'L_GENERATE' => $LANG['generate']));
$Template->pparse('admin_cache_syndication');
}
}
require_once '../admin/admin_footer.php';