aboutsummaryrefslogtreecommitdiff
path: root/views/default/friends/collection.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/friends/collection.php')
-rw-r--r--views/default/friends/collection.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/views/default/friends/collection.php b/views/default/friends/collection.php
index deadb2f6a..ddd0a0ed0 100644
--- a/views/default/friends/collection.php
+++ b/views/default/friends/collection.php
@@ -24,7 +24,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 == $_SESSION['user']->getGUID()) {
+if ($coll->owner_guid == get_loggedin_userid()) {
echo "<div class=\"friends_collections_controls\">";
echo elgg_view('output/confirmlink', array(
'href' => $vars['url'] . 'action/friends/deletecollection?collection=' . $coll->id,
@@ -36,8 +36,8 @@ echo $coll->name;
echo " (<span id=\"friends_membership_count{$vars['friendspicker']}\">{$count}</span>) </h2>";
// individual collection panels
-if($friends = $vars['collection']->entities) {
- $content = elgg_view('friends/collectiontabs', array('owner' => $_SESSION['user'], 'collection' => $vars['collection'], 'friendspicker' => $vars['friendspicker']));
+if ($friends = $vars['collection']->entities) {
+ $content = elgg_view('friends/collectiontabs', array('owner' => get_loggedin_user(), 'collection' => $vars['collection'], 'friendspicker' => $vars['friendspicker']));
echo elgg_view('friends/picker',array('entities' => $friends, 'value' => $members, 'content' => $content, 'replacement' => '', 'friendspicker' => $vars['friendspicker']));
?>
@@ -45,7 +45,7 @@ if($friends = $vars['collection']->entities) {
<script type="text/javascript">
$(document).ready(function () {
- $('#friends_picker_placeholder<?php echo $vars['friendspicker']; ?>').load('<?php echo $vars['url']; ?>friends/pickercallback.php?username=<?php echo $_SESSION['user']->username; ?>&type=list&collection=<?php echo $vars['collection']->id; ?>');
+ $('#friends_picker_placeholder<?php echo $vars['friendspicker']; ?>').load('<?php echo $vars['url']; ?>friends/pickercallback.php?username=<?php echo get_loggedin_user()->username; ?>&type=list&collection=<?php echo $vars['collection']->id; ?>');
});
</script>