From ccb6d625239b59b283b4d3fc00da704ab743d74c Mon Sep 17 00:00:00 2001 From: brettp Date: Tue, 8 Feb 2011 19:52:10 +0000 Subject: Refs #2543: Updated trunk mods and views to use the new functions from previous 2 commits. git-svn-id: http://code.elgg.org/elgg/trunk@8079 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/core/account/login_dropdown.php | 2 +- views/default/core/friends/collection.php | 6 +++--- views/default/core/friends/collectiontabs.php | 4 ++-- views/default/core/likes/display.php | 2 +- views/default/core/river/controls.php | 4 ++-- views/default/core/settings/account/password.php | 2 +- views/default/core/settings/statistics/numentities.php | 2 +- views/default/core/settings/statistics/online.php | 2 +- views/default/core/settings/tools/plugin.php | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) (limited to 'views/default/core') diff --git a/views/default/core/account/login_dropdown.php b/views/default/core/account/login_dropdown.php index 356aa48de..fd01b4711 100644 --- a/views/default/core/account/login_dropdown.php +++ b/views/default/core/account/login_dropdown.php @@ -4,7 +4,7 @@ * */ -if (isloggedin()) { +if (elgg_is_logged_in()) { return true; } diff --git a/views/default/core/friends/collection.php b/views/default/core/friends/collection.php index 9463d5b42..bfe88a166 100644 --- a/views/default/core/friends/collection.php +++ b/views/default/core/friends/collection.php @@ -22,7 +22,7 @@ if (is_array($vars['collection']->members)) { echo "
  • "; //as collections are private, check that the logged in user is the owner -if ($coll->owner_guid == get_loggedin_userid()) { +if ($coll->owner_guid == elgg_get_logged_in_user_guid()) { echo "
    "; echo elgg_view('output/confirmlink', array( 'href' => 'action/friends/deletecollection?collection=' . $coll->id, @@ -35,7 +35,7 @@ echo " ({$count}entities) { - $content = elgg_view('core/friends/collectiontabs', array('owner' => get_loggedin_user(), 'collection' => $vars['collection'], 'friendspicker' => $vars['friendspicker'])); + $content = elgg_view('core/friends/collectiontabs', array('owner' => elgg_get_logged_in_user_entity(), 'collection' => $vars['collection'], 'friendspicker' => $vars['friendspicker'])); echo elgg_view('core/friends/picker', array('entities' => $friends, 'value' => $members, 'content' => $content, 'replacement' => '', 'friendspicker' => $vars['friendspicker'])); ?> @@ -43,7 +43,7 @@ if ($friends = $vars['collection']->entities) { diff --git a/views/default/core/friends/collectiontabs.php b/views/default/core/friends/collectiontabs.php index 6a939aca7..c8d0deb67 100644 --- a/views/default/core/friends/collectiontabs.php +++ b/views/default/core/friends/collectiontabs.php @@ -30,7 +30,7 @@ $(document).ready(function () { $('a.collectionmembers').click(function () { // load collection members pane - $('#friends-picker_placeholder').load('pages/friends/pickercallback.php?username=username; ?>&type=list&collection=&friendspicker='); + $('#friends-picker_placeholder').load('pages/friends/pickercallback.php?username=username; ?>&type=list&collection=&friendspicker='); // remove selected state from previous tab $(this).parent().parent().find("li.selected").removeClass("selected"); @@ -42,7 +42,7 @@ $(document).ready(function () { $('a.editmembers').click(function () { // load friends picker pane - $('#friends-picker_placeholder').load('pages/friends/pickercallback.php?username=username; ?>&type=picker&collection=&friendspicker='); + $('#friends-picker_placeholder').load('pages/friends/pickercallback.php?username=username; ?>&type=picker&collection=&friendspicker='); // remove selected state from previous tab $(this).parent().parent().find("li.selected").removeClass("selected"); diff --git a/views/default/core/likes/display.php b/views/default/core/likes/display.php index 5b59c7215..209b6de2d 100644 --- a/views/default/core/likes/display.php +++ b/views/default/core/likes/display.php @@ -25,7 +25,7 @@ if (!elgg_annotation_exists($guid, 'likes')) { ); $likes_button = elgg_view('output/url', $params); } else { - $likes = get_annotations($guid, '', '', 'likes', '', get_loggedin_userid()); + $likes = get_annotations($guid, '', '', 'likes', '', elgg_get_logged_in_user_guid()); $url = elgg_get_site_url() . "action/likes/delete?annotation_id={$likes[0]->id}"; $params = array( 'href' => $url, diff --git a/views/default/core/river/controls.php b/views/default/core/river/controls.php index 66fbc5059..7c5e94581 100644 --- a/views/default/core/river/controls.php +++ b/views/default/core/river/controls.php @@ -8,7 +8,7 @@ $object = $vars['item']->getObjectEntity(); -if (isloggedin()) { +if (elgg_is_logged_in()) { // comments and non-objects cannot be commented on or liked if ($object->getType() == 'object' && $vars['item']->annotation_id == 0) { $params = array( @@ -29,7 +29,7 @@ if (isloggedin()) { ); echo elgg_view('output/url', $params); } else { - $likes = get_annotations($guid, '', '', 'likes', '', get_loggedin_userid()); + $likes = get_annotations($guid, '', '', 'likes', '', elgg_get_logged_in_user_guid()); $url = elgg_get_site_url() . "action/likes/delete?annotation_id={$likes[0]->id}"; $params = array( 'href' => $url, diff --git a/views/default/core/settings/account/password.php b/views/default/core/settings/account/password.php index 0ee215f9c..06e59dfbb 100644 --- a/views/default/core/settings/account/password.php +++ b/views/default/core/settings/account/password.php @@ -17,7 +17,7 @@ if ($user) {
    guid == get_loggedin_userid()) { + if (!elgg_is_admin_logged_in() || elgg_is_admin_logged_in() && $user->guid == elgg_get_logged_in_user_guid()) { ?>

    : diff --git a/views/default/core/settings/statistics/numentities.php b/views/default/core/settings/statistics/numentities.php index 388af0af6..245fd67be 100644 --- a/views/default/core/settings/statistics/numentities.php +++ b/views/default/core/settings/statistics/numentities.php @@ -7,7 +7,7 @@ */ // Get entity statistics -$entity_stats = get_entity_statistics(get_loggedin_userid()); +$entity_stats = get_entity_statistics(elgg_get_logged_in_user_guid()); if ($entity_stats) { ?> diff --git a/views/default/core/settings/statistics/online.php b/views/default/core/settings/statistics/online.php index df477d871..65db42cb1 100644 --- a/views/default/core/settings/statistics/online.php +++ b/views/default/core/settings/statistics/online.php @@ -6,7 +6,7 @@ * @subpackage Core */ -$user = get_loggedin_user(); +$user = elgg_get_logged_in_user_entity(); $logged_in = 0; $log = get_system_log($user->guid, "login", "", 'user', '', 1); diff --git a/views/default/core/settings/tools/plugin.php b/views/default/core/settings/tools/plugin.php index 50cc55b50..d89e93c2f 100644 --- a/views/default/core/settings/tools/plugin.php +++ b/views/default/core/settings/tools/plugin.php @@ -18,7 +18,7 @@ $manifest = $details['manifest']; $user_guid = $details['user_guid']; if ($user_guid) { - $user_guid = get_loggedin_userid(); + $user_guid = elgg_get_logged_in_user_guid(); } if (elgg_view("usersettings/{$plugin}/edit")) { -- cgit v1.2.3