From 949a233076ec18f86e60f90a7a8837cb422664af Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 3 Feb 2011 03:33:52 +0000 Subject: Refs #2428 almost done removing CONFIG access - mostly plugin start.php left git-svn-id: http://code.elgg.org/elgg/trunk@7999 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/sitepages/sitepages_functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mod/sitepages') diff --git a/mod/sitepages/sitepages_functions.php b/mod/sitepages/sitepages_functions.php index 4410bd7e7..5a2fcd8ee 100644 --- a/mod/sitepages/sitepages_functions.php +++ b/mod/sitepages/sitepages_functions.php @@ -16,9 +16,8 @@ * @return mixed ElggSitePage on success, FALSE on fail */ function sitepages_get_sitepage_object($page_type) { - global $CONFIG; - $page_guid = get_private_setting($CONFIG->site->getGUID(), "sitepages:$page_type"); + $page_guid = get_private_setting(elgg_get_site_entity()->guid, "sitepages:$page_type"); $sitepage = get_entity($page_guid); if ($sitepage instanceof ElggSitePage || $sitepage->page_type == $page_type) { @@ -35,14 +34,15 @@ function sitepages_get_sitepage_object($page_type) { * @return mixed ElggSitePage on success, FALSE on fail. */ function sitepages_create_sitepage_object($page_type) { - global $CONFIG; $sitepage = new ElggSitePage(); $sitepage->page_type = $page_type; $sitepage->access_id = ACCESS_PUBLIC; $sitepage->save(); - if ($sitepage->save() && set_private_setting($CONFIG->site->getGUID(), "sitepages:$page_type", $sitepage->getGUID())) { + $site = elgg_get_site_entity(); + + if ($sitepage->save() && set_private_setting($site->getGUID(), "sitepages:$page_type", $sitepage->getGUID())) { return $sitepage; } -- cgit v1.2.3