public static function ajax_addCacheExclusion_callback() { $ex = wfConfig::get('cacheExclusions', false); if ($ex) { $ex = unserialize($ex); } else { $ex = array(); } $ex[] = array('pt' => $_POST['patternType'], 'p' => $_POST['pattern'], 'id' => microtime(true)); wfConfig::set('cacheExclusions', serialize($ex)); wfCache::scheduleCacheClear(); if (wfConfig::get('cacheType', false) == 'falcon' && preg_match('/^(?:uac|uaeq|cc)$/', $_POST['patternType'])) { if (wfCache::addHtaccessCode('add')) { //rewrites htaccess rules return array('errorMsg' => "We added the rule you requested but could not modify your .htaccess file. Please delete this rule, check the permissions on your .htaccess file and then try again."); } } return array('ok' => 1); }
public static function ajax_addCacheExclusion_callback() { $ex = wfConfig::get('cacheExclusions', false); if ($ex) { $ex = unserialize($ex); } else { $ex = array(); } $ex[] = array('pt' => $_POST['patternType'], 'p' => $_POST['pattern'], 'id' => microtime(true)); wfConfig::set('cacheExclusions', serialize($ex)); wfCache::scheduleCacheClear(); return array('ok' => 1); }