summaryrefslogtreecommitdiff
path: root/mod.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-10-07 16:51:19 +1100
committerSavetheinternet <savetheinternet@tinyboard.org>2011-10-07 16:51:19 +1100
commit555688e880b1bb50c13286b7d373ffd683847234 (patch)
tree2d6180a889b654a4c775a1879a43de0323dda7a1 /mod.php
parent160647d196481e41ed2e2558221ff0a068a1f71e (diff)
memcached, APC, xcache
Diffstat (limited to 'mod.php')
-rw-r--r--mod.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/mod.php b/mod.php
index 792efbb0..4dee0a23 100644
--- a/mod.php
+++ b/mod.php
@@ -151,7 +151,7 @@
if(hasPermission($config['mod']['rebuild'])) {
$fieldset['Administration'] .= '<li><a href="?/rebuild">Rebuild static files</a></li>';
}
- if(hasPermission($config['mod']['rebuild']) && $config['memcached']['enabled']) {
+ if(hasPermission($config['mod']['rebuild']) && $config['cache']['enabled']) {
$fieldset['Administration'] .= '<li><a href="?/flush">Clear cache</a></li>';
}
if(hasPermission($config['mod']['show_config'])) {
@@ -1588,13 +1588,13 @@
);
} elseif(preg_match('/^\/flush$/', $query)) {
if(!hasPermission($config['mod']['rebuild'])) error($config['error']['noaccess']);
- if(!$config['memcached']['enabled']) error('Memcached is not enabled.');
+ if(!$config['cache']['enabled']) error('Cache is not enabled.');
- if($memcached->flush()) {
+ if(cache::flush()) {
$body = 'Successfully invalidated all items in the cache.';
modLog('Cleared cache');
} else {
- $body = $memcached->getResultMessage();
+ $body = 'An error occured while trying to flush cache.';
}
echo Element('page.html', Array(