aboutsummaryrefslogtreecommitdiff
path: root/mod/sitepages
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-03 03:33:52 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-03 03:33:52 +0000
commit949a233076ec18f86e60f90a7a8837cb422664af (patch)
tree0286c9cb2c3301a164505e39dccf02a4e0a98497 /mod/sitepages
parentd4e4268d11612408e4989a5c57f69fcb2febe8aa (diff)
downloadelgg-949a233076ec18f86e60f90a7a8837cb422664af.tar.gz
elgg-949a233076ec18f86e60f90a7a8837cb422664af.tar.bz2
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
Diffstat (limited to 'mod/sitepages')
-rw-r--r--mod/sitepages/sitepages_functions.php8
1 files changed, 4 insertions, 4 deletions
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;
}