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 --- mod/profile/edit.php | 2 +- mod/profile/editicon.php | 2 +- mod/profile/icon.php | 2 +- mod/profile/start.php | 2 +- mod/profile/views/default/profile/admin_menu.php | 4 ++-- mod/profile/views/default/profile/commentwall/commentwalladd.php | 2 +- mod/profile/views/default/profile/edit.php | 4 ++-- mod/profile/views/default/profile/listing.php | 4 ++-- mod/profile/views/default/profile/metatags.php | 2 +- mod/profile/views/default/profile/profile_contents/details.php | 4 ++-- mod/profile/views/default/profile/profile_ownerblock.php | 4 ++-- 11 files changed, 16 insertions(+), 16 deletions(-) (limited to 'mod/profile') diff --git a/mod/profile/edit.php b/mod/profile/edit.php index 2b09c7ff8..97b656a5c 100644 --- a/mod/profile/edit.php +++ b/mod/profile/edit.php @@ -15,7 +15,7 @@ if (!isloggedin()) { } // Get owner of profile - set in page handler -$user = page_owner_entity(); +$user = elgg_get_page_owner(); if (!$user) { register_error(elgg_echo("profile:notfound")); forward(); diff --git a/mod/profile/editicon.php b/mod/profile/editicon.php index 2b1a40d0f..9b0a654d2 100644 --- a/mod/profile/editicon.php +++ b/mod/profile/editicon.php @@ -14,7 +14,7 @@ if (!isloggedin()) { } // Get owner of profile - set in page handler -$user = page_owner_entity(); +$user = elgg_get_page_owner(); if (!$user) { register_error(elgg_echo("profile:notfound")); forward(); diff --git a/mod/profile/icon.php b/mod/profile/icon.php index b7b4f921c..48ccc16c2 100644 --- a/mod/profile/icon.php +++ b/mod/profile/icon.php @@ -8,7 +8,7 @@ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); // Get the owning user -$user = page_owner_entity(); +$user = elgg_get_page_owner(); // Get the size $size = strtolower(get_input('size')); diff --git a/mod/profile/start.php b/mod/profile/start.php index 48547c0bf..d1840babb 100644 --- a/mod/profile/start.php +++ b/mod/profile/start.php @@ -174,7 +174,7 @@ function profile_pagesetup() //add submenu options if (get_context() == "profile") { - $page_owner = page_owner_entity(); + $page_owner = elgg_get_page_owner(); if ($page_owner && $page_owner->canEdit()) { add_submenu_item(elgg_echo('profile:editdetails'), $CONFIG->wwwroot . "pg/profile/{$page_owner->username}/edit/details"); add_submenu_item(elgg_echo('profile:editicon'), $CONFIG->wwwroot . "pg/profile/{$page_owner->username}/edit/icon"); diff --git a/mod/profile/views/default/profile/admin_menu.php b/mod/profile/views/default/profile/admin_menu.php index a33910309..a896a0ace 100755 --- a/mod/profile/views/default/profile/admin_menu.php +++ b/mod/profile/views/default/profile/admin_menu.php @@ -5,8 +5,8 @@ global $CONFIG; if (isadminloggedin()){ - if ($_SESSION['id']!=page_owner()){ - $user = get_user(page_owner()); + if ($_SESSION['id']!=elgg_get_page_owner_guid()){ + $user = get_user(elgg_get_page_owner_guid()); $url = $vars['url']; $ts = time(); $token = generate_action_token($ts); diff --git a/mod/profile/views/default/profile/commentwall/commentwalladd.php b/mod/profile/views/default/profile/commentwall/commentwalladd.php index f5bd1bdce..0491925c6 100644 --- a/mod/profile/views/default/profile/commentwall/commentwalladd.php +++ b/mod/profile/views/default/profile/commentwall/commentwalladd.php @@ -10,7 +10,7 @@ - + diff --git a/mod/profile/views/default/profile/edit.php b/mod/profile/views/default/profile/edit.php index 045436da4..310536527 100644 --- a/mod/profile/views/default/profile/edit.php +++ b/mod/profile/views/default/profile/edit.php @@ -14,7 +14,7 @@

'name', 'value' => page_owner_entity()->name)); + echo elgg_view('input/text',array('internalname' => 'name', 'value' => elgg_get_page_owner()->name)); ?>

@@ -73,7 +73,7 @@ ?>

- + " />

diff --git a/mod/profile/views/default/profile/listing.php b/mod/profile/views/default/profile/listing.php index 404d123c8..6dc8e0948 100644 --- a/mod/profile/views/default/profile/listing.php +++ b/mod/profile/views/default/profile/listing.php @@ -18,9 +18,9 @@ $banned = $vars['entity']->isBanned(); // Simple XFN $rel = ""; -if (page_owner() == $vars['entity']->guid) +if (elgg_get_page_owner_guid() == $vars['entity']->guid) $rel = 'me'; -else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid)) +else if (check_entity_relationship(elgg_get_page_owner_guid(), 'friend', $vars['entity']->guid)) $rel = 'friend'; if (!$banned) { diff --git a/mod/profile/views/default/profile/metatags.php b/mod/profile/views/default/profile/metatags.php index e67d19c04..a90b12494 100644 --- a/mod/profile/views/default/profile/metatags.php +++ b/mod/profile/views/default/profile/metatags.php @@ -6,6 +6,6 @@ * */ -if ($owner = page_owner_entity()) { ?> +if ($owner = elgg_get_page_owner()) { ?> \ No newline at end of file diff --git a/mod/profile/views/default/profile/profile_contents/details.php b/mod/profile/views/default/profile/profile_contents/details.php index 6a214557d..360ea0f9e 100755 --- a/mod/profile/views/default/profile/profile_contents/details.php +++ b/mod/profile/views/default/profile/profile_contents/details.php @@ -6,9 +6,9 @@ // Simple XFN $rel = ""; -if (page_owner() == $vars['entity']->guid) { +if (elgg_get_page_owner_guid() == $vars['entity']->guid) { $rel = 'me'; -} else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid)) { +} else if (check_entity_relationship(elgg_get_page_owner_guid(), 'friend', $vars['entity']->guid)) { $rel = 'friend'; } diff --git a/mod/profile/views/default/profile/profile_ownerblock.php b/mod/profile/views/default/profile/profile_ownerblock.php index 58386fc04..57c1dfb8b 100755 --- a/mod/profile/views/default/profile/profile_ownerblock.php +++ b/mod/profile/views/default/profile/profile_ownerblock.php @@ -12,7 +12,7 @@ if ($vars['entity']) { $user = get_entity($vars['entity']->guid); } } else { - $user = page_owner_entity(); + $user = elgg_get_page_owner(); } if (!$user) { // no user so we quit view @@ -36,7 +36,7 @@ if ($section == 'details') { $more_info .= ""; } $profile_actions = ""; -if (isloggedin() && (get_loggedin_userid() == page_owner())) { +if (isloggedin() && (get_loggedin_userid() == elgg_get_page_owner_guid())) { $profile_actions = "
"; $profile_actions .= "username}/edit/details' class='action_button'>". elgg_echo('profile:edit') .""; $profile_actions .= "username}/edit/icon' class='action_button'>". elgg_echo('profile:editicon') .""; -- cgit v1.2.3