From c27eac2d2a970e76a1204757bbe15da8efb2870c Mon Sep 17 00:00:00 2001 From: ewinslow Date: Sat, 30 Oct 2010 21:48:24 +0000 Subject: Refs #1439: Using new page_owner functions in all of core git-svn-id: http://code.elgg.org/elgg/trunk@7140 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/canvas/layouts/widgets.php | 14 +++++++------- views/default/notifications/settings/usersettings.php | 2 +- views/default/page_elements/content_header.php | 2 +- views/default/page_elements/content_header_member.php | 4 ++-- views/default/page_elements/owner_block.php | 2 +- views/default/page_elements/title.php | 2 +- views/default/user/settings/default_access.php | 2 +- views/default/user/settings/email.php | 2 +- views/default/user/settings/language.php | 2 +- views/default/user/settings/name.php | 2 +- views/default/user/settings/password.php | 2 +- views/default/widgets/editwrapper.php | 2 +- views/default/widgets/wrapper.php | 2 +- 13 files changed, 20 insertions(+), 20 deletions(-) (limited to 'views/default') diff --git a/views/default/canvas/layouts/widgets.php b/views/default/canvas/layouts/widgets.php index 8526b9d92..001755932 100644 --- a/views/default/canvas/layouts/widgets.php +++ b/views/default/canvas/layouts/widgets.php @@ -6,11 +6,11 @@ $widgettypes = get_widget_types(); - $owner = page_owner_entity(); + $owner = elgg_get_page_owner(); - $area1widgets = get_widgets(page_owner(),get_context(),1); - $area2widgets = get_widgets(page_owner(),get_context(),2); - $area3widgets = get_widgets(page_owner(),get_context(),3); + $area1widgets = get_widgets(elgg_get_page_owner_guid(),get_context(),1); + $area2widgets = get_widgets(elgg_get_page_owner_guid(),get_context(),2); + $area3widgets = get_widgets(elgg_get_page_owner_guid(),get_context(),3); if (empty($area1widgets) && empty($area2widgets) && empty($area3widgets)) { @@ -23,7 +23,7 @@ - if(get_loggedin_userid() == page_owner() || ($owner instanceof ElggGroup && $owner->canEdit())){ + if(get_loggedin_userid() == elgg_get_page_owner_guid() || ($owner instanceof ElggGroup && $owner->canEdit())){ if(get_context() == "profile") { ?> @@ -246,7 +246,7 @@ if(get_context() != "profile"){ /* on groups */ - + @@ -270,7 +270,7 @@ if(get_context() != "profile"){ /* on groups */ canEdit())){ + if(get_loggedin_userid() == elgg_get_page_owner_guid() || ($owner instanceof ElggGroup && $owner->canEdit())){ if(get_context() != "profile") { ?> diff --git a/views/default/notifications/settings/usersettings.php b/views/default/notifications/settings/usersettings.php index 0da9f4c30..c7a27a16f 100644 --- a/views/default/notifications/settings/usersettings.php +++ b/views/default/notifications/settings/usersettings.php @@ -7,7 +7,7 @@ */ global $NOTIFICATION_HANDLERS; -$notification_settings = get_user_notification_settings(page_owner()); +$notification_settings = get_user_notification_settings(elgg_get_page_owner_guid()); ?>
diff --git a/views/default/page_elements/content_header.php b/views/default/page_elements/content_header.php index 4c3197b58..91e73f4af 100644 --- a/views/default/page_elements/content_header.php +++ b/views/default/page_elements/content_header.php @@ -17,7 +17,7 @@ * @subpackage Core */ -$page_owner = page_owner_entity(); +$page_owner = elgg_get_page_owner(); $logged_in_user = get_loggedin_user(); $username = $logged_in_user->username; diff --git a/views/default/page_elements/content_header_member.php b/views/default/page_elements/content_header_member.php index 14b35d87f..82909e1b5 100644 --- a/views/default/page_elements/content_header_member.php +++ b/views/default/page_elements/content_header_member.php @@ -8,8 +8,8 @@ * */ -$page_owner = page_owner_entity(); -$name = page_owner_entity()->name; +$page_owner = elgg_get_page_owner(); +$name = elgg_get_page_owner()->name; // get the object type $type = $vars['type']; diff --git a/views/default/page_elements/owner_block.php b/views/default/page_elements/owner_block.php index 649591058..45e4f70af 100644 --- a/views/default/page_elements/owner_block.php +++ b/views/default/page_elements/owner_block.php @@ -28,7 +28,7 @@ END; if(is_plugin_enabled('profile')) { // Is there a page owner? - $owner = page_owner_entity(); + $owner = elgg_get_page_owner(); if ($owner instanceof ElggGroup || ($owner instanceof ElggUser && $owner->getGUID() != get_loggedin_userid()) ) { diff --git a/views/default/page_elements/title.php b/views/default/page_elements/title.php index a340e7a09..5eb628976 100644 --- a/views/default/page_elements/title.php +++ b/views/default/page_elements/title.php @@ -4,7 +4,7 @@ * @uses $vars['title'] The page title */ -$page_owner = page_owner(); +$page_owner = elgg_get_page_owner_guid(); $page_owner_entity = get_entity($page_owner); $display = "

" . $vars['title'] . "

"; diff --git a/views/default/user/settings/default_access.php b/views/default/user/settings/default_access.php index 30f3da8b6..c557fd09d 100644 --- a/views/default/user/settings/default_access.php +++ b/views/default/user/settings/default_access.php @@ -6,7 +6,7 @@ * @subpackage Core */ if ($vars['config']->allow_user_default_access) { - $user = page_owner_entity(); + $user = elgg_get_page_owner(); if ($user) { if (false === ($default_access = $user->getPrivateSetting('elgg_default_access'))) { diff --git a/views/default/user/settings/email.php b/views/default/user/settings/email.php index 19902d532..0a08b1faf 100644 --- a/views/default/user/settings/email.php +++ b/views/default/user/settings/email.php @@ -6,7 +6,7 @@ * @subpackage Core */ -$user = page_owner_entity(); +$user = elgg_get_page_owner(); if ($user) { ?> diff --git a/views/default/user/settings/language.php b/views/default/user/settings/language.php index fd93cfbba..06486ae3e 100644 --- a/views/default/user/settings/language.php +++ b/views/default/user/settings/language.php @@ -7,7 +7,7 @@ */ global $CONFIG; -$user = page_owner_entity(); +$user = elgg_get_page_owner(); if ($user) { ?> diff --git a/views/default/user/settings/name.php b/views/default/user/settings/name.php index 5111b5db1..fad6c488f 100644 --- a/views/default/user/settings/name.php +++ b/views/default/user/settings/name.php @@ -8,7 +8,7 @@ */ -$user = page_owner_entity(); +$user = elgg_get_page_owner(); // all hidden, but necessary for properly updating user details echo elgg_view('input/hidden', array('internalname' => 'name', 'value' => $user->name)); diff --git a/views/default/user/settings/password.php b/views/default/user/settings/password.php index 82806e06b..ea7be401d 100644 --- a/views/default/user/settings/password.php +++ b/views/default/user/settings/password.php @@ -6,7 +6,7 @@ * @subpackage Core */ -$user = page_owner_entity(); +$user = elgg_get_page_owner(); if ($user) { ?> diff --git a/views/default/widgets/editwrapper.php b/views/default/widgets/editwrapper.php index 45068adfe..572624034 100644 --- a/views/default/widgets/editwrapper.php +++ b/views/default/widgets/editwrapper.php @@ -28,7 +28,7 @@ $(document).ready(function() { $.post($("#widgetform").attr("action"),variables,function() { $("#submit").attr("disabled",""); $("#submit").attr("value",""); - $("#widgetcontent").load("pg/view/?shell=no&username=username; ?>&context=&callback=true"); + $("#widgetcontent").load("pg/view/?shell=no&username=username; ?>&context=&callback=true"); }); return false; diff --git a/views/default/widgets/wrapper.php b/views/default/widgets/wrapper.php index 888938d97..d66563858 100644 --- a/views/default/widgets/wrapper.php +++ b/views/default/widgets/wrapper.php @@ -87,7 +87,7 @@ if ($callback != "true") {