diff options
author | kevinjardine <kevinjardine@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-23 21:29:14 +0000 |
---|---|---|
committer | kevinjardine <kevinjardine@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-23 21:29:14 +0000 |
commit | 0139841a1c0836f738fe0917ad09d84e356b68ea (patch) | |
tree | aa9d7bb53e90b9e5a80cfaa4d96f83a556268557 /actions | |
parent | 592d51e94bd7071e9b75c069ff91da311ec001ff (diff) | |
download | elgg-0139841a1c0836f738fe0917ad09d84e356b68ea.tar.gz elgg-0139841a1c0836f738fe0917ad09d84e356b68ea.tar.bz2 |
Added the ability to turn simplecache on and off.
git-svn-id: https://code.elgg.org/elgg/trunk@2908 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions')
-rw-r--r-- | actions/admin/site/update_basic.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/actions/admin/site/update_basic.php b/actions/admin/site/update_basic.php index f5582fb2e..46ac133cc 100644 --- a/actions/admin/site/update_basic.php +++ b/actions/admin/site/update_basic.php @@ -34,6 +34,22 @@ datalist_set('path',sanitise_filepath(get_input('path')));
datalist_set('dataroot',sanitise_filepath(get_input('dataroot')));
+ if (get_input('simplecache_enabled')) {
+ datalist_set('simplecache_enabled',1);
+ elgg_view_regenerate_simplecache();
+ } else {
+ datalist_set('simplecache_enabled',0);
+
+ // purge simple cache
+ if ($handle = opendir($CONFIG->dataroot.'views_simplecache')) {
+ while (false !== ($file = readdir($handle))) {
+ if ($file != "." && $file != "..") {
+ unlink($CONFIG->dataroot.'views_simplecache/'.$file);
+ }
+ }
+ closedir($handle);
+ }
+ }
set_config('language', get_input('language'), $site->getGUID());
|