From db7b497114329dda5f560198884c5bc5fbb3c1a8 Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 3 Nov 2010 02:13:36 +0000 Subject: Fixes #2128 - replaces all uses of set_context() and get_context() in core and plugins git-svn-id: http://code.elgg.org/elgg/trunk@7215 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/sitepages/index.php | 6 ++++-- mod/sitepages/start.php | 8 ++++---- mod/sitepages/views/default/sitepages/metatags.php | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) (limited to 'mod/sitepages') diff --git a/mod/sitepages/index.php b/mod/sitepages/index.php index 5b575ef37..f1f6585da 100644 --- a/mod/sitepages/index.php +++ b/mod/sitepages/index.php @@ -13,7 +13,8 @@ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); //Load the front page $content = elgg_view('sitepages/welcome'); $content .= elgg_view_title(elgg_echo('content:latest')); -set_context('search'); + +elgg_set_context('search'); $offset = (int)get_input('offset', 0); if(is_plugin_enabled('riverdashboard')){ $items = elgg_view_river_items(0, 0, "", "", "", '', 10, 0, 0, true, false); @@ -21,7 +22,8 @@ if(is_plugin_enabled('riverdashboard')){ }else{ $content .= elgg_list_registered_entities(array('limit' => 10, 'offset' => $offset, 'full_view' => FALSE, 'allowed_types' => array('object','group'))); } -set_context('main'); +elgg_set_context('main'); + global $autofeed; $autofeed = FALSE; diff --git a/mod/sitepages/start.php b/mod/sitepages/start.php index fb562b631..3b0242a43 100644 --- a/mod/sitepages/start.php +++ b/mod/sitepages/start.php @@ -69,18 +69,18 @@ function sitepages_runonce() { */ function sitepages_custom_index() { // context is checked by the extended metatags view to print out its custom CSS - //$context = get_context(); - //set_context('sitepages:front'); + //$context = elgg_get_context(); + //elgg_set_context('sitepages:front'); //if ($contents = elgg_view('sitepages/custom_frontpage')) { // echo elgg_view_page(FALSE, $contents); - // set_context($context); + // elgg_set_context($context); // return TRUE to tell index.php we've got its content right here. // return TRUE; //} - //set_context($context); + //elgg_set_context($context); // return NULL to pass this to next in chain, or back to standard index.php. //return NULL; diff --git a/mod/sitepages/views/default/sitepages/metatags.php b/mod/sitepages/views/default/sitepages/metatags.php index ac8ece148..6213dde52 100644 --- a/mod/sitepages/views/default/sitepages/metatags.php +++ b/mod/sitepages/views/default/sitepages/metatags.php @@ -20,7 +20,7 @@ ___END; } // only show on the custom front page. -if (get_context() == 'sitepages:front') { +if (elgg_get_context() == 'sitepages:front') { $custom_css = sitepages_get_sitepage_object('front'); if ($custom_css && $custom_css->css) { -- cgit v1.2.3