From 3874c13a404dafd526d7e34ca660239dc34dd300 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 21 Jan 2012 12:16:53 -0500 Subject: switched the function names to system cache --- mod/developers/actions/developers/settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mod') diff --git a/mod/developers/actions/developers/settings.php b/mod/developers/actions/developers/settings.php index 811fd22c0..6249821a2 100644 --- a/mod/developers/actions/developers/settings.php +++ b/mod/developers/actions/developers/settings.php @@ -12,9 +12,9 @@ if (get_input('simple_cache')) { } if (get_input('view_path_cache')) { - elgg_enable_filepath_cache(); + elgg_enable_system_cache(); } else { - elgg_disable_filepath_cache(); + elgg_disable_system_cache(); } $debug = get_input('debug_level'); -- cgit v1.2.3 From 8e4d4c50df3f19be4ad9c204797e57ecd9ba02b3 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 21 Jan 2012 12:31:25 -0500 Subject: updated the display to show system cache language --- actions/admin/site/update_advanced.php | 2 +- languages/en.php | 4 ++-- mod/developers/actions/developers/settings.php | 2 +- mod/developers/languages/en.php | 6 +++--- mod/developers/views/default/admin/developers/settings.php | 2 +- views/default/forms/admin/site/update_advanced.php | 8 ++++---- 6 files changed, 12 insertions(+), 12 deletions(-) (limited to 'mod') diff --git a/actions/admin/site/update_advanced.php b/actions/admin/site/update_advanced.php index d4796ea7d..23d622a62 100644 --- a/actions/admin/site/update_advanced.php +++ b/actions/admin/site/update_advanced.php @@ -25,7 +25,7 @@ if ($site = elgg_get_site_entity()) { elgg_disable_simplecache(); } - if (get_input('viewpath_cache_enabled')) { + if (get_input('system_cache_enabled')) { elgg_enable_system_cache(); } else { elgg_disable_system_cache(); diff --git a/languages/en.php b/languages/en.php index 97867f922..76ef07b4d 100644 --- a/languages/en.php +++ b/languages/en.php @@ -1032,8 +1032,8 @@ Once you have logged in, we highly recommend that you change your password. 'installation:simplecache:description' => "The simple cache increases performance by caching static content including some CSS and JavaScript files. Normally you will want this on.", 'installation:simplecache:label' => "Use simple cache (recommended)", - 'installation:viewpathcache:description' => "The view filepath cache decreases the loading times of plugins by caching the location of their views.", - 'installation:viewpathcache:label' => "Use view filepath cache (recommended)", + 'installation:systemcache:description' => "The system cache decreases the loading time of the Elgg engine by caching data to files.", + 'installation:systemcache:label' => "Use system cache (recommended)", 'upgrading' => 'Upgrading...', 'upgrade:db' => 'Your database was upgraded.', diff --git a/mod/developers/actions/developers/settings.php b/mod/developers/actions/developers/settings.php index 6249821a2..7c91e2f5f 100644 --- a/mod/developers/actions/developers/settings.php +++ b/mod/developers/actions/developers/settings.php @@ -11,7 +11,7 @@ if (get_input('simple_cache')) { elgg_disable_simplecache(); } -if (get_input('view_path_cache')) { +if (get_input('system_cache')) { elgg_enable_system_cache(); } else { elgg_disable_system_cache(); diff --git a/mod/developers/languages/en.php b/mod/developers/languages/en.php index 812f779fa..262759e23 100644 --- a/mod/developers/languages/en.php +++ b/mod/developers/languages/en.php @@ -16,9 +16,9 @@ $english = array( // settings 'elgg_dev_tools:settings:explanation' => 'Control your development and debugging settings below. Some of these settings are also available on other admin pages.', 'developers:label:simple_cache' => 'Use simple cache', - 'developers:help:simple_cache' => 'Turn off the file cache when developing. Otherwise, changes to your views (including css) will be ignored.', - 'developers:label:view_path_cache' => 'Use view path cache', - 'developers:help:view_path_cache' => 'Turn this off when developing. Otherwise, new views in your plugins will not be registered.', + 'developers:help:simple_cache' => 'Turn off this cache when developing. Otherwise, changes to your CSS and JavaScript will be ignored.', + 'developers:label:system_cache' => 'Use system cache', + 'developers:help:system_cache' => 'Turn this off when developing. Otherwise, changes in your plugins will not be registered.', 'developers:label:debug_level' => "Trace level", 'developers:help:debug_level' => "This controls the amount of information logged. See elgg_log() for more information.", 'developers:label:display_errors' => 'Display fatal PHP errors', diff --git a/mod/developers/views/default/admin/developers/settings.php b/mod/developers/views/default/admin/developers/settings.php index dcc0a3e4f..519364fe1 100644 --- a/mod/developers/views/default/admin/developers/settings.php +++ b/mod/developers/views/default/admin/developers/settings.php @@ -10,7 +10,7 @@ $data = array( 'checked' => elgg_get_config('simplecache_enabled') == 1, ), - 'view_path_cache' => array( + 'system_cache' => array( 'type' => 'checkbox', 'value' => 1, 'checked' => elgg_get_config('viewpath_cache_enabled') == 1, diff --git a/views/default/forms/admin/site/update_advanced.php b/views/default/forms/admin/site/update_advanced.php index f79a235b5..786feb101 100644 --- a/views/default/forms/admin/site/update_advanced.php +++ b/views/default/forms/admin/site/update_advanced.php @@ -40,11 +40,11 @@ $form_body .= elgg_view("input/checkboxes", array( 'name' => 'simplecache_enabled', 'value' => (elgg_get_config('simplecache_enabled') ? elgg_echo('installation:simplecache:label') : ""), )) . ""; -$form_body .= "
" . elgg_echo('installation:viewpathcache:description') . "
"; +$form_body .= "
" . elgg_echo('installation:systemcache:description') . "
"; $form_body .= elgg_view("input/checkboxes", array( - 'options' => array(elgg_echo('installation:viewpathcache:label') => elgg_echo('installation:viewpathcache:label')), - 'name' => 'viewpath_cache_enabled', - 'value' => (elgg_get_config('viewpath_cache_enabled') ? elgg_echo('installation:viewpathcache:label') : ""), + 'options' => array(elgg_echo('installation:systemcache:label') => elgg_echo('installation:systemcache:label')), + 'name' => 'system_cache_enabled', + 'value' => (elgg_get_config('viewpath_cache_enabled') ? elgg_echo('installation:systemcache:label') : ""), )) . "
"; $debug_options = array('0' => elgg_echo('installation:debug:none'), 'ERROR' => elgg_echo('installation:debug:error'), 'WARNING' => elgg_echo('installation:debug:warning'), 'NOTICE' => elgg_echo('installation:debug:notice')); -- cgit v1.2.3 From 19a6962c819dc33a0967dcef56154f6930b52287 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 21 Jan 2012 12:44:55 -0500 Subject: Fixes #4180 finished conversion to system cache by converting datalist/CONFIG var name --- documentation/info/config.php | 6 +++--- engine/lib/cache.php | 16 ++++++++-------- engine/lib/configuration.php | 8 ++++---- .../2012012100-1.8.3-system_cache-93100e7d55a24a11.php | 13 +++++++++++++ install/ElggInstaller.php | 2 +- .../views/default/admin/developers/settings.php | 2 +- version.php | 2 +- views/default/forms/admin/site/update_advanced.php | 2 +- 8 files changed, 32 insertions(+), 19 deletions(-) create mode 100644 engine/lib/upgrades/2012012100-1.8.3-system_cache-93100e7d55a24a11.php (limited to 'mod') diff --git a/documentation/info/config.php b/documentation/info/config.php index 19e76c8ae..b45428477 100644 --- a/documentation/info/config.php +++ b/documentation/info/config.php @@ -218,11 +218,11 @@ $CONFIG->dataroot; $CONFIG->simplecache_enabled; /** - * Is view paths cache enabled + * Is the system cache enabled * - * @global string $CONFIG->viewpath_cache_enabled + * @global string $CONFIG->system_cache_enabled */ -$CONFIG->viewpath_cache_enabled; +$CONFIG->system_cache_enabled; /** * The site description from the current site object. diff --git a/engine/lib/cache.php b/engine/lib/cache.php index b563f5ab0..75183d23a 100644 --- a/engine/lib/cache.php +++ b/engine/lib/cache.php @@ -54,7 +54,7 @@ function elgg_reset_system_cache() { function elgg_save_system_cache($type, $data) { global $CONFIG; - if ($CONFIG->viewpath_cache_enabled) { + if ($CONFIG->system_cache_enabled) { $cache = elgg_get_system_cache(); return $cache->save($type, $data); } @@ -71,7 +71,7 @@ function elgg_save_system_cache($type, $data) { function elgg_load_system_cache($type) { global $CONFIG; - if ($CONFIG->viewpath_cache_enabled) { + if ($CONFIG->system_cache_enabled) { $cache = elgg_get_system_cache(); $cached_data = $cache->load($type); @@ -86,7 +86,7 @@ function elgg_load_system_cache($type) { /** * Enables the system disk cache. * - * Uses the 'viewpath_cache_enabled' datalist with a boolean value. + * Uses the 'system_cache_enabled' datalist with a boolean value. * Resets the system cache. * * @return void @@ -94,15 +94,15 @@ function elgg_load_system_cache($type) { function elgg_enable_system_cache() { global $CONFIG; - datalist_set('viewpath_cache_enabled', 1); - $CONFIG->viewpath_cache_enabled = 1; + datalist_set('system_cache_enabled', 1); + $CONFIG->system_cache_enabled = 1; elgg_reset_system_cache(); } /** * Disables the system disk cache. * - * Uses the 'viewpath_cache_enabled' datalist with a boolean value. + * Uses the 'system_cache_enabled' datalist with a boolean value. * Resets the system cache. * * @return void @@ -110,8 +110,8 @@ function elgg_enable_system_cache() { function elgg_disable_system_cache() { global $CONFIG; - datalist_set('viewpath_cache_enabled', 0); - $CONFIG->viewpath_cache_enabled = 0; + datalist_set('system_cache_enabled', 0); + $CONFIG->system_cache_enabled = 0; elgg_reset_system_cache(); } diff --git a/engine/lib/configuration.php b/engine/lib/configuration.php index cccd69105..772c24930 100644 --- a/engine/lib/configuration.php +++ b/engine/lib/configuration.php @@ -599,11 +599,11 @@ function _elgg_load_application_config() { } else { $CONFIG->simplecache_enabled = 1; } - $viewpath_cache_enabled = datalist_get('viewpath_cache_enabled'); - if ($viewpath_cache_enabled !== false) { - $CONFIG->viewpath_cache_enabled = $viewpath_cache_enabled; + $system_cache_enabled = datalist_get('system_cache_enabled'); + if ($system_cache_enabled !== false) { + $CONFIG->system_cache_enabled = $system_cache_enabled; } else { - $CONFIG->viewpath_cache_enabled = 1; + $CONFIG->system_cache_enabled = 1; } // initialize context here so it is set before the get_input call diff --git a/engine/lib/upgrades/2012012100-1.8.3-system_cache-93100e7d55a24a11.php b/engine/lib/upgrades/2012012100-1.8.3-system_cache-93100e7d55a24a11.php new file mode 100644 index 000000000..3a9aae2a1 --- /dev/null +++ b/engine/lib/upgrades/2012012100-1.8.3-system_cache-93100e7d55a24a11.php @@ -0,0 +1,13 @@ +dbprefix}datalists WHERE name='viewpath_cache_enabled'"; +delete_data($query); diff --git a/install/ElggInstaller.php b/install/ElggInstaller.php index d556ba744..0e75ed008 100644 --- a/install/ElggInstaller.php +++ b/install/ElggInstaller.php @@ -1401,7 +1401,7 @@ class ElggInstaller { datalist_set('default_site', $site->getGUID()); datalist_set('version', get_version()); datalist_set('simplecache_enabled', 1); - datalist_set('viewpath_cache_enabled', 1); + datalist_set('system_cache_enabled', 1); // new installations have run all the upgrades $upgrades = elgg_get_upgrade_files($submissionVars['path'] . 'engine/lib/upgrades/'); diff --git a/mod/developers/views/default/admin/developers/settings.php b/mod/developers/views/default/admin/developers/settings.php index 519364fe1..459cbabad 100644 --- a/mod/developers/views/default/admin/developers/settings.php +++ b/mod/developers/views/default/admin/developers/settings.php @@ -13,7 +13,7 @@ $data = array( 'system_cache' => array( 'type' => 'checkbox', 'value' => 1, - 'checked' => elgg_get_config('viewpath_cache_enabled') == 1, + 'checked' => elgg_get_config('system_cache_enabled') == 1, ), 'display_errors' => array( diff --git a/version.php b/version.php index 540fecac6..dc6897c18 100644 --- a/version.php +++ b/version.php @@ -11,7 +11,7 @@ // YYYYMMDD = Elgg Date // XX = Interim incrementer -$version = 2012012000; +$version = 2012012100; // Human-friendly version name $release = '1.8.3'; diff --git a/views/default/forms/admin/site/update_advanced.php b/views/default/forms/admin/site/update_advanced.php index 786feb101..b935090f0 100644 --- a/views/default/forms/admin/site/update_advanced.php +++ b/views/default/forms/admin/site/update_advanced.php @@ -44,7 +44,7 @@ $form_body .= "
" . elgg_echo('installation:systemcache:description') . "
array(elgg_echo('installation:systemcache:label') => elgg_echo('installation:systemcache:label')), 'name' => 'system_cache_enabled', - 'value' => (elgg_get_config('viewpath_cache_enabled') ? elgg_echo('installation:systemcache:label') : ""), + 'value' => (elgg_get_config('system_cache_enabled') ? elgg_echo('installation:systemcache:label') : ""), )) . "
"; $debug_options = array('0' => elgg_echo('installation:debug:none'), 'ERROR' => elgg_echo('installation:debug:error'), 'WARNING' => elgg_echo('installation:debug:warning'), 'NOTICE' => elgg_echo('installation:debug:notice')); -- cgit v1.2.3