aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-15 21:17:52 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-15 21:17:52 +0000
commited063396330dd8b9d07d211920fe28c8a2a0b925 (patch)
tree32f1f02d0d1c232ae99c87935cbe051a1e513fc4 /engine/lib
parent704f111bc362b3dd5b1553d2bcea46ef675537d2 (diff)
downloadelgg-ed063396330dd8b9d07d211920fe28c8a2a0b925.tar.gz
elgg-ed063396330dd8b9d07d211920fe28c8a2a0b925.tar.bz2
Fixes #2923: Removed "view" prefix from simplecache function names
git-svn-id: http://code.elgg.org/elgg/trunk@8260 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/actions.php2
-rw-r--r--engine/lib/admin.php6
-rw-r--r--engine/lib/cache.php29
-rw-r--r--engine/lib/deprecated-1.8.php38
-rw-r--r--engine/lib/upgrades/2010060101.php2
-rw-r--r--engine/lib/views.php14
6 files changed, 64 insertions, 27 deletions
diff --git a/engine/lib/actions.php b/engine/lib/actions.php
index 4538eda0b..26611e2d8 100644
--- a/engine/lib/actions.php
+++ b/engine/lib/actions.php
@@ -357,7 +357,7 @@ function elgg_action_exist($action) {
function actions_init() {
elgg_register_action('security/refreshtoken', '', 'public');
- elgg_view_register_simplecache('js/languages/en');
+ elgg_register_simplecache_view('js/languages/en');
elgg_register_plugin_hook_handler('action', 'all', 'ajax_action_hook');
elgg_register_plugin_hook_handler('forward', 'all', 'ajax_forward_hook');
diff --git a/engine/lib/admin.php b/engine/lib/admin.php
index 854a978b5..e5d78336f 100644
--- a/engine/lib/admin.php
+++ b/engine/lib/admin.php
@@ -171,7 +171,7 @@ function admin_init() {
elgg_register_action('profile/fields/delete', '', 'admin');
elgg_register_action('profile/fields/reorder', '', 'admin');
- elgg_view_register_simplecache('js/admin');
+ elgg_register_simplecache_view('js/admin');
// statistics
elgg_add_admin_menu_item('statistics', elgg_echo('admin:statistics'), null, 60);
@@ -258,7 +258,7 @@ function elgg_admin_add_plugin_settings_menu() {
*/
function admin_pagesetup() {
if (elgg_in_context('admin')) {
- $url = elgg_view_get_simplecache_url('css', 'admin');
+ $url = elgg_get_simplecache_url('css', 'admin');
elgg_register_css($url, 'admin');
elgg_unregister_css('elgg');
}
@@ -280,7 +280,7 @@ function admin_settings_page_handler($page) {
elgg_unregister_css('screen');
- $url = elgg_view_get_simplecache_url('js', 'admin');
+ $url = elgg_get_simplecache_url('js', 'admin');
elgg_register_js($url, 'admin');
$url = elgg_get_site_url() . 'vendors/jquery/jquery.jeditable.mini.js';
diff --git a/engine/lib/cache.php b/engine/lib/cache.php
index 1f24cddd1..2832a35b9 100644
--- a/engine/lib/cache.php
+++ b/engine/lib/cache.php
@@ -135,9 +135,10 @@ function elgg_disable_filepath_cache() {
*
* @return void
* @link http://docs.elgg.org/Views/Simplecache
- * @see elgg_view_regenerate_simplecache()
+ * @see elgg_regenerate_simplecache()
+ * @since 1.8.0
*/
-function elgg_view_register_simplecache($viewname) {
+function elgg_register_simplecache_view($viewname) {
global $CONFIG;
if (!isset($CONFIG->views)) {
@@ -159,11 +160,11 @@ function elgg_view_register_simplecache($viewname) {
* @return string
* @since 1.8.0
*/
-function elgg_view_get_simplecache_url($type, $view) {
+function elgg_get_simplecache_url($type, $view) {
global $CONFIG;
$lastcache = (int)$CONFIG->lastcache;
- if (elgg_view_is_simplecache_enabled()) {
+ if (elgg_is_simplecache_enabled()) {
$viewtype = elgg_get_viewtype();
$url = elgg_get_site_url() . "cache/$type/$view/$viewtype/$view.$lastcache.$type";
} else {
@@ -180,9 +181,10 @@ function elgg_view_get_simplecache_url($type, $view) {
* @param string $viewtype Optional viewtype to regenerate
*
* @return void
- * @see elgg_view_register_simplecache()
+ * @see elgg_register_simplecache_view()
+ * @since 1.8.0
*/
-function elgg_view_regenerate_simplecache($viewtype = NULL) {
+function elgg_regenerate_simplecache($viewtype = NULL) {
global $CONFIG;
if (!isset($CONFIG->views->simplecache) || !is_array($CONFIG->views->simplecache)) {
@@ -240,7 +242,7 @@ function elgg_view_regenerate_simplecache($viewtype = NULL) {
* @return bool
* @since 1.8.0
*/
-function elgg_view_is_simplecache_enabled() {
+function elgg_is_simplecache_enabled() {
global $CONFIG;
if ($CONFIG->simplecache_enabled) {
@@ -254,15 +256,16 @@ function elgg_view_is_simplecache_enabled() {
* Enables the simple cache.
*
* @access private
- * @see elgg_view_register_simplecache()
+ * @see elgg_register_simplecache_view()
* @return void
+ * @since 1.8.0
*/
-function elgg_view_enable_simplecache() {
+function elgg_enable_simplecache() {
global $CONFIG;
datalist_set('simplecache_enabled', 1);
$CONFIG->simplecache_enabled = 1;
- elgg_view_regenerate_simplecache();
+ elgg_regenerate_simplecache();
}
/**
@@ -271,10 +274,11 @@ function elgg_view_enable_simplecache() {
* @warning Simplecache is also purged when disabled.
*
* @access private
- * @see elgg_view_register_simplecache()
+ * @see elgg_register_simplecache_view()
* @return void
+ * @since 1.8.0
*/
-function elgg_view_disable_simplecache() {
+function elgg_disable_simplecache() {
global $CONFIG;
if ($CONFIG->simplecache_enabled) {
datalist_set('simplecache_enabled', 0);
@@ -316,3 +320,4 @@ function elgg_invalidate_simplecache() {
return $return;
}
+
diff --git a/engine/lib/deprecated-1.8.php b/engine/lib/deprecated-1.8.php
index 56bdee081..a5138ceba 100644
--- a/engine/lib/deprecated-1.8.php
+++ b/engine/lib/deprecated-1.8.php
@@ -1468,7 +1468,7 @@ function get_plugin_list() {
* Important: You should regenerate simplecache and the viewpath cache after executing this function
* otherwise you may experience view display artifacts. Do this with the following code:
*
- * elgg_view_regenerate_simplecache();
+ * elgg_regenerate_simplecache();
* elgg_filepath_cache_reset();
*
* @deprecated 1.8
@@ -1635,7 +1635,7 @@ function get_installed_plugins($status = 'all') {
* Important: You should regenerate simplecache and the viewpath cache after executing this function
* otherwise you may experience view display artifacts. Do this with the following code:
*
- * elgg_view_regenerate_simplecache();
+ * elgg_regenerate_simplecache();
* elgg_filepath_cache_reset();
*
* @deprecated 1.8
@@ -1676,7 +1676,7 @@ function enable_plugin($plugin, $site_guid = null) {
* Important: You should regenerate simplecache and the viewpath cache after executing this function
* otherwise you may experience view display artifacts. Do this with the following code:
*
- * elgg_view_regenerate_simplecache();
+ * elgg_regenerate_simplecache();
* elgg_filepath_cache_reset();
*
* @deprecated 1.8
@@ -3814,4 +3814,36 @@ function register_metadata_url_handler($function, $extender_name = "all") {
function register_relationship_url_handler($function_name, $relationship_type = "all") {
elgg_deprecated_notice("register_relationship_url_handler() was deprecated by elgg_register_relationship_url_handler()", 1.8);
return elgg_register_relationship_url_handler($relationship_type, $function_name);
+}
+
+/**
+ * @deprecated 1.8 Use {@link elgg_register_simplecache_view()}
+ */
+function elgg_view_register_simplecache($viewname) {
+ elgg_deprecated_notice("elgg_view_register_simplecache() was deprecated by elgg_register_simplecache_view()", 1.8);
+ return elgg_register_simplecache_view($viewname);
+}
+
+/**
+ * @deprecated 1.8 Use {@link elgg_regenerate_simplecache()}
+ */
+function elgg_view_regenerate_simplecache($viewtype = NULL) {
+ elgg_deprecated_notice("elgg_view_regenerate_simplecache() was deprecated by elgg_regenerate_simplecache()", 1.8);
+ return elgg_regenerate_simplecache($viewtype);
+}
+
+/**
+ * @deprecated 1.8 Use {@link elgg_enable_simplecache()}
+ */
+function elgg_view_enable_simplecache() {
+ elgg_deprecated_notice("elgg_view_enable_simplecache() was deprecated by elgg_enable_simplecache()", 1.8);
+ return elgg_enable_simplecache();
+}
+
+/**
+ * @deprecated 1.8 Use {@link elgg_disable_simplecache()}
+ */
+function elgg_view_disable_simplecache() {
+ elgg_deprecated_notice("elgg_view_disable_simplecache() was deprecated by elgg_disable_simplecache()", 1.8);
+ return elgg_disable_simplecache();
} \ No newline at end of file
diff --git a/engine/lib/upgrades/2010060101.php b/engine/lib/upgrades/2010060101.php
index 7772c42eb..bb7f7c1a6 100644
--- a/engine/lib/upgrades/2010060101.php
+++ b/engine/lib/upgrades/2010060101.php
@@ -10,7 +10,7 @@ delete_data($query);
if ($CONFIG->simplecache_enabled) {
datalist_set('simplecache_enabled', 1);
- elgg_view_regenerate_simplecache();
+ elgg_regenerate_simplecache();
} else {
datalist_set('simplecache_enabled', 0);
}
diff --git a/engine/lib/views.php b/engine/lib/views.php
index 49fba8bf6..8a5badc88 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -1456,10 +1456,10 @@ function autoregister_views($view_base, $folder, $base_location_path, $viewtype)
* Add the core Elgg head elements that could be cached
*/
function elgg_views_register_core_head_elements() {
- $url = elgg_view_get_simplecache_url('js', 'elgg');
+ $url = elgg_get_simplecache_url('js', 'elgg');
elgg_register_js($url, 'elgg');
- $url = elgg_view_get_simplecache_url('css', 'screen');
+ $url = elgg_get_simplecache_url('css', 'screen');
elgg_register_css($url, 'screen');
}
@@ -1474,11 +1474,11 @@ function elgg_views_register_core_head_elements() {
function elgg_views_boot() {
global $CONFIG;
- elgg_view_register_simplecache('css/screen');
- elgg_view_register_simplecache('css/ie');
- elgg_view_register_simplecache('css/ie6');
- elgg_view_register_simplecache('js/friendsPickerv1');
- elgg_view_register_simplecache('js/elgg');
+ elgg_register_simplecache_view('css/screen');
+ elgg_register_simplecache_view('css/ie');
+ elgg_register_simplecache_view('css/ie6');
+ elgg_register_simplecache_view('js/friendsPickerv1');
+ elgg_register_simplecache_view('js/elgg');
elgg_register_js("/vendors/jquery/jquery-1.5.min.js", 'jquery');
elgg_register_js("/vendors/jquery/jquery-ui-1.8.9.min.js", 'jquery-ui');