Skip to content
Browse files

clear content caches when saving global html

  • Loading branch information...
1 parent c5d48b4 commit 55eb3289c618bbdf86d8cbf6ae126baf6f0d3a9f @lmajano lmajano committed Mar 9, 2012
Showing with 8 additions and 12 deletions.
  1. +8 −12 modules/contentbox-admin/handlers/globalHTML.cfc
View
20 modules/contentbox-admin/handlers/globalHTML.cfc
@@ -5,39 +5,35 @@ component extends="baseHandler"{
// Dependencies
property name="settingsService" inject="id:settingService@cb";
-
+ property name="contentService" inject="id:contentService@cb";
+
// index
function index(event,rc,prc){
event.paramValue("search","");
event.paramValue("page",1);
-
// Exit Handler
prc.xehSaveHTML = "#prc.cbAdminEntryPoint#.globalHTML.save";
-
// tab
prc.tabLookAndFeel = true;
- prc.tabLookAndFeel_globalHTML = true;
-
+ prc.tabLookAndFeel_globalHTML = true;
// view
event.setView("globalHTML/index");
}
-
+
// save html
function save(event,rc,prc){
-
// announce event
announceInterception("cbadmin_preGlobalHTMLSave",{oldSettings=prc.cbSettings,newSettings=rc});
-
// bulk save the options
settingsService.bulkSave(rc);
-
+ // clear caches
+ contentService.clearAllCaches();
// announce event
announceInterception("cbadmin_postGlobalHTMLSave");
-
// relocate back to editor
getPlugin("MessageBox").info("All Global HTML updated! Yeeehaww!");
-
+ // relocate
setNextEvent(prc.xehGlobalHTML);
}
-
+
}

0 comments on commit 55eb328

Please sign in to comment.
Something went wrong with that request. Please try again.