aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/group.php3
-rw-r--r--engine/lib/users.php3
-rw-r--r--mod/groups/actions/forums/addtopic.php2
-rw-r--r--mod/groups/addtopic.php2
-rw-r--r--mod/groups/topicposts.php4
5 files changed, 8 insertions, 6 deletions
diff --git a/engine/lib/group.php b/engine/lib/group.php
index a8d2d570e..da6876be9 100644
--- a/engine/lib/group.php
+++ b/engine/lib/group.php
@@ -230,7 +230,8 @@
*/
public function isMember($user = 0)
{
- if (!($user instanceof ElggUser)) $user = $_SESSION['user'];
+ if (!($user instanceof ElggUser)) $user = $_SESSION['user'];
+ if (!($_SESSION['user'] instanceof ElggUser)) return false;
return is_group_member($this->getGUID(), $user->getGUID());
}
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 690a582d7..80e9286fb 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -1175,7 +1175,8 @@
// Change this to set the number of users that display on the search page
$threshold = 4;
-
+
+ if (!get_input('offset'))
if ($users = search_for_user($tag,$threshold)) {
$countusers = search_for_user($tag,0,0,"",true);
diff --git a/mod/groups/actions/forums/addtopic.php b/mod/groups/actions/forums/addtopic.php
index 3159d639f..e96815aa0 100644
--- a/mod/groups/actions/forums/addtopic.php
+++ b/mod/groups/actions/forums/addtopic.php
@@ -62,7 +62,7 @@
$grouptopic->status = $status; // the current status i.e sticky, closed, resolved, open
// now add the topic message as an annotation
- $grouptopic->annotate('group_topic_post',$message,$access, $user);
+ $grouptopic->annotate('group_topic_post',$message,$access, $user);
// Success message
system_message(elgg_echo("grouptopic:created"));
diff --git a/mod/groups/addtopic.php b/mod/groups/addtopic.php
index 08e335f03..5dfeb881d 100644
--- a/mod/groups/addtopic.php
+++ b/mod/groups/addtopic.php
@@ -15,7 +15,7 @@
gatekeeper();
- $page_owner = set_page_owner((int)get_input('group_guid'));
+ $page_owner = set_page_owner((int) get_input('group_guid'));
if (!(page_owner_entity() instanceof ElggGroup)) forward();
diff --git a/mod/groups/topicposts.php b/mod/groups/topicposts.php
index ad4ea9fbd..6a732ca52 100644
--- a/mod/groups/topicposts.php
+++ b/mod/groups/topicposts.php
@@ -14,7 +14,7 @@
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
//get_input('group_guid');
- set_page_owner((int)get_input('group_guid'));
+ set_page_owner(get_input('group_guid'));
if (!(page_owner_entity() instanceof ElggGroup)) forward();
// get the entity from id
@@ -22,7 +22,7 @@
// Display them
$area2 = elgg_view("forum/viewposts", array('entity' => $topic));
- $body = elgg_view_layout("two_column_left_sidebar", $area1, $area2);
+ $body = elgg_view_layout("two_column_left_sidebar", '' , $area2);
// Display page
page_draw($topic->title,$body);