aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-30 21:32:54 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-30 21:32:54 +0000
commitf49fdf4e1c80fe5bde922c25bdd6ca0e2c912ddb (patch)
treeeb2fdb272ba76e83af60378d05602a26a265be36 /mod/groups/views/default
parent9ebb6cff1cf22d4fb708c4ced37604c6cf5bbfae (diff)
downloadelgg-f49fdf4e1c80fe5bde922c25bdd6ca0e2c912ddb.tar.gz
elgg-f49fdf4e1c80fe5bde922c25bdd6ca0e2c912ddb.tar.bz2
Refs #2124: Using get_loggedin_user functions instead of $vars['user'], $_SESSION['user'], etc.
git-svn-id: http://code.elgg.org/elgg/trunk@7139 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views/default')
-rw-r--r--mod/groups/views/default/forum/topics.php2
-rw-r--r--mod/groups/views/default/forum/viewposts.php2
-rw-r--r--mod/groups/views/default/groups/forum_latest.php2
-rw-r--r--mod/groups/views/default/groups/side_menu.php4
4 files changed, 5 insertions, 5 deletions
diff --git a/mod/groups/views/default/forum/topics.php b/mod/groups/views/default/forum/topics.php
index 91834aa08..d5e533f81 100644
--- a/mod/groups/views/default/forum/topics.php
+++ b/mod/groups/views/default/forum/topics.php
@@ -9,7 +9,7 @@
<h2><?php echo elgg_echo("groups:forum"); ?></h2>
</div>
<?php // only show the add topic button if the user is a member
- if(page_owner_entity()->isMember($vars['user'])) {
+ if(page_owner_entity()->isMember(get_loggedin_user())) {
?>
<div class="content_header_options">
<a class="action_button" href="<?php echo $vars['url']; ?>mod/groups/addtopic.php?group_guid=<?php echo $vars['group_guid']; ?>"><?php echo elgg_echo("groups:addtopic"); ?></a>
diff --git a/mod/groups/views/default/forum/viewposts.php b/mod/groups/views/default/forum/viewposts.php
index aa8b334f2..f0810ba18 100644
--- a/mod/groups/views/default/forum/viewposts.php
+++ b/mod/groups/views/default/forum/viewposts.php
@@ -39,7 +39,7 @@ echo elgg_view('navigation/pagination',array(
echo "<h3>" . elgg_echo("groups:topicisclosed") . "</h3>";
echo "<p>" . elgg_echo("groups:topiccloseddesc") . "</p>";
- }elseif(page_owner_entity()->isMember($vars['user'])){
+ }elseif(page_owner_entity()->isMember(get_loggedin_user())){
//comments are on and the user viewing is a member
echo elgg_view_comments($vars['entity']);
}else{
diff --git a/mod/groups/views/default/groups/forum_latest.php b/mod/groups/views/default/groups/forum_latest.php
index 161455703..2a9ddaf42 100644
--- a/mod/groups/views/default/groups/forum_latest.php
+++ b/mod/groups/views/default/groups/forum_latest.php
@@ -23,7 +23,7 @@ if($vars['entity']->forum_enable != 'no'){
echo "</div>";
}
} else {
- if(page_owner_entity()->isMember($vars['user'])){
+ if(page_owner_entity()->isMember(get_loggedin_user())){
$create_discussion = $vars['url'] . "mod/groups/addtopic.php?group_guid=" . page_owner();
echo "<p class='margin_top'><a href=\"{$create_discussion}\">".elgg_echo("groups:addtopic")."</a></p>";
}else{
diff --git a/mod/groups/views/default/groups/side_menu.php b/mod/groups/views/default/groups/side_menu.php
index a86cd8adb..3048ea431 100644
--- a/mod/groups/views/default/groups/side_menu.php
+++ b/mod/groups/views/default/groups/side_menu.php
@@ -1,8 +1,8 @@
<ul class="submenu page_navigation">
<?php
if(isloggedin()){
- echo "<li><a href=\"{$vars['url']}pg/groups/member/{$_SESSION['user']->username}\">". elgg_echo('groups:yours') ."</a></li>";
- echo "<li><a href=\"{$vars['url']}pg/groups/invitations/{$_SESSION['user']->username}\">". elgg_echo('groups:invitations') ."</a></li>";
+ echo "<li><a href=\"{$vars['url']}pg/groups/member/{get_loggedin_user()->username}\">". elgg_echo('groups:yours') ."</a></li>";
+ echo "<li><a href=\"{$vars['url']}pg/groups/invitations/{get_loggedin_user()->username}\">". elgg_echo('groups:invitations') ."</a></li>";
}
?>
</ul> \ No newline at end of file