Skip to content

Commit

Permalink
small changes runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
vishal22 committed Apr 29, 2015
1 parent 545ff0f commit 297a229
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
9 changes: 5 additions & 4 deletions easysocial/easysocial/discussion.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,12 @@ function createGroupDiscussion()


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

// Assign discussion properties
$discussion->uid = $group->id;
Expand Down
2 changes: 1 addition & 1 deletion easysocial/easysocial/groupinvite.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,5 @@ function inviteGroup()
}
return( $result );
}

}
2 changes: 1 addition & 1 deletion easysocial/easysocial/newsfeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function getStream()
$options = array('clusterId' => $group_id, 'clusterType' => SOCIAL_TYPE_GROUP, 'startlimit' => $startlimit, 'limit' => $limit);
}

if(!$target_user)
if($target_user == $id )
{
switch($filter) {
case 'everyone':
Expand Down
8 changes: 5 additions & 3 deletions easysocial/libraries/mappingHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

defined('_JEXEC') or die('Restricted access');
jimport( 'libraries.schema.group' );
jimport( 'joomla.filesystem.file' );

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

foreach($rows as $ky=>$row)
{

if(isset($row->uid))
{
$item = new streamSimpleSchema();
Expand Down Expand Up @@ -403,14 +403,16 @@ public function groupSchema($rows=null,$userid=0)
$item->creator_name = JFactory::getUser($row->creator_uid)->username;
//$item->type = ($row->type == 1 )?'Public':'Public';
$item->type = $row->type;
$item->params = $row->params;

foreach($row->avatars As $ky=>$avt)
{
$avt_key = 'avatar_'.$ky;
$item->$avt_key = JURI::root().'media/com_easysocial/avatars/group/'.$row->id.'/'.$avt;


$fst = JFile::exists('media/com_easysocial/avatars/group/'.$row->id.'/'.$avt);
//set default image
if(!file_exists($item->$avt_key))
if(!$fst)
{
$item->$avt_key = JURI::root().'media/com_easysocial/avatars/group/'.$ky.'.png';
}
Expand Down
1 change: 1 addition & 0 deletions easysocial/libraries/schema/group.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ class GroupSimpleSchema {
public $approval_pending;
public $cover;
public $more_info;
public $params;

}

0 comments on commit 297a229

Please sign in to comment.