protected function _postSave($is_new)
 {
     TBGCache::delete(TBGCache::KEY_TEXTPARSER_ISSUE_REGEX);
 }
예제 #2
0
 public function runSaveMenuOrder(TBGRequest $request)
 {
     $target_type = $request['target_type'];
     $target_id = $request['target_id'];
     TBGLinksTable::getTable()->saveLinkOrder($request[$target_type . '_' . $target_id . '_links']);
     if ($target_type == 'main_menu') {
         TBGCache::delete(TBGCache::KEY_MAIN_MENU_LINKS);
         TBGCache::fileDelete(TBGCache::KEY_MAIN_MENU_LINKS);
     }
     return $this->renderJSON('ok');
 }
 public static function saveSetting($name, $value, $module = 'core', $scope = 0, $uid = 0)
 {
     if ($scope == 0 && $name != 'defaultscope' && $module == 'core') {
         if (($scope = TBGContext::getScope()) instanceof TBGScope) {
             $scope = $scope->getID();
         } else {
             throw new Exception('No scope loaded, cannot autoload it');
         }
     }
     B2DB::getTable('TBGSettingsTable')->saveSetting($name, $module, $value, $uid, $scope);
     if ($scope != 0 && (!TBGContext::getScope() instanceof TBGScope || $scope == TBGContext::getScope()->getID())) {
         self::$_settings[$module][$name][$uid] = $value;
     }
     TBGCache::delete('settings');
 }
예제 #4
0
 public static function clearPermissionsCache()
 {
     TBGCache::delete(TBGCache::KEY_PERMISSIONS_CACHE, true, true);
     TBGCache::fileDelete(TBGCache::KEY_PERMISSIONS_CACHE, true, true);
 }