diff options
Diffstat (limited to 'views/default')
25 files changed, 35 insertions, 35 deletions
diff --git a/views/default/admin/dashboard.php b/views/default/admin/dashboard.php index 1b042f14b..d3976ca38 100644 --- a/views/default/admin/dashboard.php +++ b/views/default/admin/dashboard.php @@ -1,6 +1,6 @@ <?php -elgg_set_page_owner_guid(get_loggedin_userid()); +elgg_set_page_owner_guid(elgg_get_logged_in_user_guid()); $params = array( 'num_columns' => 2, 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 "<li><h2>"; //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 "<div class=\"friends_collections_controls\">"; echo elgg_view('output/confirmlink', array( 'href' => 'action/friends/deletecollection?collection=' . $coll->id, @@ -35,7 +35,7 @@ echo " (<span id=\"friends_membership_count{$vars['friendspicker']}\">{$count}</ // individual collection panels if ($friends = $vars['collection']->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) { <script type="text/javascript"> $(document).ready(function () { - $('#friends-picker_placeholder<?php echo $vars['friendspicker']; ?>').load('<?php echo elgg_get_site_url(); ?>pages/friends/pickercallback.php?username=<?php echo get_loggedin_user()->username; ?>&type=list&collection=<?php echo $vars['collection']->id; ?>'); + $('#friends-picker_placeholder<?php echo $vars['friendspicker']; ?>').load('<?php echo elgg_get_site_url(); ?>pages/friends/pickercallback.php?username=<?php echo elgg_get_logged_in_user_entity()->username; ?>&type=list&collection=<?php echo $vars['collection']->id; ?>'); }); </script> 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<?php echo $friendspicker; ?>').click(function () { // load collection members pane - $('#friends-picker_placeholder<?php echo $friendspicker; ?>').load('<?php echo elgg_get_site_url(); ?>pages/friends/pickercallback.php?username=<?php echo get_loggedin_user()->username; ?>&type=list&collection=<?php echo $collectionid; ?>&friendspicker=<?php echo $friendspicker; ?>'); + $('#friends-picker_placeholder<?php echo $friendspicker; ?>').load('<?php echo elgg_get_site_url(); ?>pages/friends/pickercallback.php?username=<?php echo elgg_get_logged_in_user_entity()->username; ?>&type=list&collection=<?php echo $collectionid; ?>&friendspicker=<?php echo $friendspicker; ?>'); // remove selected state from previous tab $(this).parent().parent().find("li.selected").removeClass("selected"); @@ -42,7 +42,7 @@ $(document).ready(function () { $('a.editmembers<?php echo $friendspicker; ?>').click(function () { // load friends picker pane - $('#friends-picker_placeholder<?php echo $friendspicker; ?>').load('<?php echo elgg_get_site_url(); ?>pages/friends/pickercallback.php?username=<?php echo get_loggedin_user()->username; ?>&type=picker&collection=<?php echo $collectionid; ?>&friendspicker=<?php echo $friendspicker; ?>'); + $('#friends-picker_placeholder<?php echo $friendspicker; ?>').load('<?php echo elgg_get_site_url(); ?>pages/friends/pickercallback.php?username=<?php echo elgg_get_logged_in_user_entity()->username; ?>&type=picker&collection=<?php echo $collectionid; ?>&friendspicker=<?php echo $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) { <div class="elgg-body"> <?php // only make the admin user enter current password for changing his own password. - if (!isadminloggedin() || isadminloggedin() && $user->guid == get_loggedin_userid()) { + if (!elgg_is_admin_logged_in() || elgg_is_admin_logged_in() && $user->guid == elgg_get_logged_in_user_guid()) { ?> <p> <?php echo elgg_echo('user:current_password:label'); ?>: 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")) { diff --git a/views/default/export/entity.php b/views/default/export/entity.php index 333179fbb..faf27e932 100644 --- a/views/default/export/entity.php +++ b/views/default/export/entity.php @@ -22,7 +22,7 @@ $exportable_values = $entity->getExportableValues(); <h2><?php echo elgg_echo('Entity'); ?></h2> <?php foreach ($entity as $k => $v) { - if ((in_array($k, $exportable_values)) || (isadminloggedin())) { + if ((in_array($k, $exportable_values)) || (elgg_is_admin_logged_in())) { ?> <p class="margin-none"><b><?php echo $k; ?>: </b><?php echo strip_tags($v); ?></p> <?php diff --git a/views/default/forms/comments/add.php b/views/default/forms/comments/add.php index 74ee5ba4b..238777422 100644 --- a/views/default/forms/comments/add.php +++ b/views/default/forms/comments/add.php @@ -7,7 +7,7 @@ * @uses $vars['entity'] */ -if (isset($vars['entity']) && isloggedin()) { +if (isset($vars['entity']) && elgg_is_logged_in()) { ?> <p class="mbn"> <label><?php echo elgg_echo("generic_comments:text"); ?></label> diff --git a/views/default/forms/comments/inline.php b/views/default/forms/comments/inline.php index ee5883435..9c44905be 100644 --- a/views/default/forms/comments/inline.php +++ b/views/default/forms/comments/inline.php @@ -5,7 +5,7 @@ * @uses $vars['entity'] */ -if (isset($vars['entity']) && isloggedin()) { +if (isset($vars['entity']) && elgg_is_logged_in()) { echo elgg_view('input/text', array('internalname' => 'generic_comment')); echo elgg_view('input/hidden', array( 'internalname' => 'entity_guid', diff --git a/views/default/forms/register.php b/views/default/forms/register.php index 93e2585d8..b2f4d14f7 100644 --- a/views/default/forms/register.php +++ b/views/default/forms/register.php @@ -11,7 +11,7 @@ $email = get_input('e'); $name = get_input('n'); $admin_option = false; -if (isadminloggedin() && isset($vars['show_admin'])) { +if (elgg_is_admin_logged_in() && isset($vars['show_admin'])) { $admin_option = true; } diff --git a/views/default/forms/useradd.php b/views/default/forms/useradd.php index efb691551..ae0049267 100644 --- a/views/default/forms/useradd.php +++ b/views/default/forms/useradd.php @@ -7,7 +7,7 @@ */ $admin_option = false; -if ((get_loggedin_user()->isAdmin()) && ($vars['show_admin'])) { +if ((elgg_get_logged_in_user_entity()->isAdmin()) && ($vars['show_admin'])) { $admin_option = true; } diff --git a/views/default/icon/user/default.php b/views/default/icon/user/default.php index c0bfc4676..9d5a862d8 100644 --- a/views/default/icon/user/default.php +++ b/views/default/icon/user/default.php @@ -10,7 +10,7 @@ * @uses $vars['hover'] Display the hover menu? (true) */ -$user = elgg_get_array_value('entity', $vars, get_loggedin_user()); +$user = elgg_get_array_value('entity', $vars, elgg_get_logged_in_user_entity()); $size = elgg_get_array_value('size', $vars, 'medium'); if (!in_array($size, array('topbar', 'tiny', 'small', 'medium', 'large', 'master'))) { $size = 'medium'; @@ -37,7 +37,7 @@ $spacer_url = elgg_get_site_url() . '_graphics/spacer.gif'; $icon_url = $user->getIconURL($size); $icon = "<img src=\"$spacer_url\" alt=\"$name\" title=\"$name\" $js style=\"background: url($icon_url) no-repeat;\" />"; -$show_menu = $hover && (isadminloggedin() || !$user->isBanned()); +$show_menu = $hover && (elgg_is_admin_logged_in() || !$user->isBanned()); ?> <div class="elgg-avatar elgg-avatar-<?php echo $size; ?>"> diff --git a/views/default/js/initialize_elgg.php b/views/default/js/initialize_elgg.php index 6a82b879e..b967a0914 100644 --- a/views/default/js/initialize_elgg.php +++ b/views/default/js/initialize_elgg.php @@ -28,7 +28,7 @@ if ($page_owner instanceof ElggEntity) { echo 'elgg.page_owner = '.json_encode($page_owner_json).';'; } -$user = get_loggedin_user(); +$user = elgg_get_logged_in_user_entity(); if ($user instanceof ElggUser) { $user_json = array(); diff --git a/views/default/layout/elements/owner_block.php b/views/default/layout/elements/owner_block.php index 6ec4ebabe..dce4c1632 100644 --- a/views/default/layout/elements/owner_block.php +++ b/views/default/layout/elements/owner_block.php @@ -13,7 +13,7 @@ elgg_push_context('owner_block'); // groups and other users get owner block $owner = elgg_get_page_owner_entity(); if ($owner instanceof ElggGroup || - ($owner instanceof ElggUser && $owner->getGUID() != get_loggedin_userid())) { + ($owner instanceof ElggUser && $owner->getGUID() != elgg_get_logged_in_user_guid())) { $header = elgg_view_entity($owner, false); diff --git a/views/default/layout/shells/admin.php b/views/default/layout/shells/admin.php index 988606ec1..7d38500d7 100644 --- a/views/default/layout/shells/admin.php +++ b/views/default/layout/shells/admin.php @@ -30,7 +30,7 @@ $logout = elgg_view('output/url', array( </a> </h1> <ul class="elgg-menu-user"> - <li><?php echo elgg_echo('admin:loggedin', array(get_loggedin_user()->name)); ?></li> + <li><?php echo elgg_echo('admin:loggedin', array(elgg_get_logged_in_user_entity()->name)); ?></li> <li><?php echo $view_site; ?></li> <li><?php echo $logout; ?></li> </ul> diff --git a/views/default/layout/shells/content/filter.php b/views/default/layout/shells/content/filter.php index d84c27a63..c9f774e72 100644 --- a/views/default/layout/shells/content/filter.php +++ b/views/default/layout/shells/content/filter.php @@ -16,8 +16,8 @@ if (isset($vars['filter_override'])) { $context = elgg_get_array_value('context', $vars, elgg_get_context()); -if (isloggedin() && $context) { - $username = get_loggedin_user()->username; +if (elgg_is_logged_in() && $context) { + $username = elgg_get_logged_in_user_entity()->username; $filter_context = elgg_get_array_value('filter_context', $vars, 'everyone'); // generate a list of default tabs diff --git a/views/default/layout/shells/content/header.php b/views/default/layout/shells/content/header.php index b0bab9dc9..f3517e9ad 100644 --- a/views/default/layout/shells/content/header.php +++ b/views/default/layout/shells/content/header.php @@ -25,12 +25,12 @@ if ($context) { if (isset($vars['buttons'])) { $buttons = $vars['buttons']; } else { - if (isloggedin() && $context) { + if (elgg_is_logged_in() && $context) { $owner = elgg_get_page_owner_entity(); if (elgg_instanceof($owner, 'group')) { $guid = $owner->getGUID(); } else { - $guid = get_loggedin_userid(); + $guid = elgg_get_logged_in_user_guid(); } $new_link = elgg_get_array_value('new_link', $vars, "pg/$context/add/$guid/"); $params = array( diff --git a/views/default/navigation/menu/user_hover.php b/views/default/navigation/menu/user_hover.php index 25bed11f5..9ceda38e5 100644 --- a/views/default/navigation/menu/user_hover.php +++ b/views/default/navigation/menu/user_hover.php @@ -23,7 +23,7 @@ $name_link = elgg_view('output/url', array( echo "<li>$name_link</li>"; // actions -if (isloggedin() && $actions) { +if (elgg_is_logged_in() && $actions) { echo '<li><ul>'; foreach ($actions as $menu_item) { echo elgg_view('navigation/menu/elements/item', array('item' => $menu_item)); @@ -41,7 +41,7 @@ if ($main) { } // admin -if (isadminloggedin() && $admin) { +if (elgg_is_admin_logged_in() && $admin) { echo '<li><ul class="elgg-hover-admin">'; foreach ($admin as $menu_item) { echo elgg_view('navigation/menu/elements/item', array('item' => $menu_item)); diff --git a/views/default/page/elements/content_header.php b/views/default/page/elements/content_header.php index 6383c2f18..becf4a13a 100644 --- a/views/default/page/elements/content_header.php +++ b/views/default/page/elements/content_header.php @@ -18,7 +18,7 @@ */ $page_owner = elgg_get_page_owner_entity(); -$logged_in_user = get_loggedin_user(); +$logged_in_user = elgg_get_logged_in_user_entity(); $username = $logged_in_user->username; if (!$page_owner) { @@ -61,7 +61,7 @@ $title = elgg_echo($type); $title = '<div class="content-header-title">' . elgg_view_title($title) . '</div>'; // must be logged in to see any action buttons -if (isloggedin()) { +if (elgg_is_logged_in()) { // only show the new button when not on the add form. // hide the tabs when on the add form. if ($filter_context == 'action') { diff --git a/views/default/page/elements/topbar.php b/views/default/page/elements/topbar.php index 40306fcc3..6981d7d7a 100644 --- a/views/default/page/elements/topbar.php +++ b/views/default/page/elements/topbar.php @@ -4,7 +4,7 @@ * The standard elgg top toolbar */ -$user = get_loggedin_user(); +$user = elgg_get_logged_in_user_entity(); if (!elgg_instanceof($user, 'user')) { // do not show tobpar to logged out users return true; diff --git a/views/default/user/default.php b/views/default/user/default.php index 3e2b9f433..2abc19991 100644 --- a/views/default/user/default.php +++ b/views/default/user/default.php @@ -12,9 +12,9 @@ $icon = elgg_view('profile/icon', array('entity' => $user, 'size' => 'tiny')); // Simple XFN $rel = ''; -if (get_loggedin_userid() == $user->guid) { +if (elgg_get_logged_in_user_guid() == $user->guid) { $rel = 'rel="me"'; -} elseif (check_entity_relationship(get_loggedin_userid(), 'friend', $user->guid)) { +} elseif (check_entity_relationship(elgg_get_logged_in_user_guid(), 'friend', $user->guid)) { $rel = 'rel="friend"'; } |