Skip to content

Commit 297a229

Browse files
committed
small changes runtime
1 parent 545ff0f commit 297a229

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

easysocial/easysocial/discussion.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,12 @@ function createGroupDiscussion()
136136

137137

138138
// Check if the user is allowed to create a discussion
139-
/*if( !$group->isMember() )
139+
if( !$group->isMember() )
140140
{
141-
//error code add here
142-
return false;
143-
}*/
141+
$wres->status = 0;
142+
$wres->message[] = 'Not allowed to create group discussion';
143+
return $wres;
144+
}
144145

145146
// Assign discussion properties
146147
$discussion->uid = $group->id;

easysocial/easysocial/groupinvite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,5 +142,5 @@ function inviteGroup()
142142
}
143143
return( $result );
144144
}
145-
145+
146146
}

easysocial/easysocial/newsfeed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function getStream()
6767
$options = array('clusterId' => $group_id, 'clusterType' => SOCIAL_TYPE_GROUP, 'startlimit' => $startlimit, 'limit' => $limit);
6868
}
6969

70-
if(!$target_user)
70+
if($target_user == $id )
7171
{
7272
switch($filter) {
7373
case 'everyone':

easysocial/libraries/mappingHelper.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
defined('_JEXEC') or die('Restricted access');
44
jimport( 'libraries.schema.group' );
5+
jimport( 'joomla.filesystem.file' );
56

67
require_once JPATH_ADMINISTRATOR.'/components/com_easysocial/includes/foundry.php';
78
require_once JPATH_ADMINISTRATOR.'/components/com_easysocial/models/groups.php';
@@ -109,7 +110,6 @@ public function streamSchema($rows,$userid)
109110

110111
foreach($rows as $ky=>$row)
111112
{
112-
113113
if(isset($row->uid))
114114
{
115115
$item = new streamSimpleSchema();
@@ -403,14 +403,16 @@ public function groupSchema($rows=null,$userid=0)
403403
$item->creator_name = JFactory::getUser($row->creator_uid)->username;
404404
//$item->type = ($row->type == 1 )?'Public':'Public';
405405
$item->type = $row->type;
406+
$item->params = $row->params;
406407

407408
foreach($row->avatars As $ky=>$avt)
408409
{
409410
$avt_key = 'avatar_'.$ky;
410411
$item->$avt_key = JURI::root().'media/com_easysocial/avatars/group/'.$row->id.'/'.$avt;
411-
412+
413+
$fst = JFile::exists('media/com_easysocial/avatars/group/'.$row->id.'/'.$avt);
412414
//set default image
413-
if(!file_exists($item->$avt_key))
415+
if(!$fst)
414416
{
415417
$item->$avt_key = JURI::root().'media/com_easysocial/avatars/group/'.$ky.'.png';
416418
}

easysocial/libraries/schema/group.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@ class GroupSimpleSchema {
2626
public $approval_pending;
2727
public $cover;
2828
public $more_info;
29+
public $params;
2930

3031
}

0 commit comments

Comments
 (0)