Skip to content

Commit

Permalink
Fixed problem with selecting user by IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
dziudek committed Sep 14, 2013
1 parent 8a92161 commit 6ed6f60
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion mod_gk_js_feed/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ public function __construct($module, $params) {
// function to get the feed data
public function getData() {
$db = JFactory::getDBO();

$actor_condition = '';

if(trim($this->config['user_id']) != '' && is_numeric($this->config['user_id']) {
$actor_condition = ' AND a.actor = ' . $this->config['user_id'] . ' ';
}

if($this->config['content_type'] == 'status') {
$query = '
Expand All @@ -45,6 +49,7 @@ public function getData() {
#__community_activities
WHERE
like_type = "profile.status"
'.$actor_condition.'
ORDER BY
created DESC
LIMIT
Expand Down Expand Up @@ -95,6 +100,7 @@ public function getData() {
a.like_id = p.id
WHERE
a.like_type = "photo"
'.$actor_condition.'
ORDER BY
a.created DESC
LIMIT
Expand Down
6 changes: 3 additions & 3 deletions mod_gk_js_feed/mod_gk_js_feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<extension type="module" version="3.0" client="site" method="upgrade">
<name>GK JomSocial Feed</name>
<author>GavickPro</author>
<creationDate>05/09/2013</creationDate>
<creationDate>14/09/2013</creationDate>
<copyright>Copyright (C) 2013 GavickPro. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later</license>
<authorEmail>info@gavick.com</authorEmail>
<authorUrl>www.gavickpro.com</authorUrl>
<version>1.0</version>
<version>1.0.1</version>
<description><![CDATA[
<style type="text/css">
span.readonly { padding: 10px; font-family: Arial; font-size:13px !important; font-weight: normal !important; text-align: justify; color: #4d4d4d; line-height: 24px; }
Expand All @@ -18,7 +18,7 @@
span.readonly p.license { border-top: 1px solid #eee; font-size: 11px; margin: 30px 26px 0; padding: 6px 0; }
</style>
<span class="readonly"><h1>GK JomSocial Feed<small>ver. 1.0</small></h1><p>With the GK JomSocial Feed module, you can implement space-saving blocks on websites and incorporate a variety of JomSocial statuses. There are a few useful options for selecting specific statuses.</p></p><p class='license'>GK JomSocial Feed is released under the <a target="_blank" href="http://www.gnu.org/licenses/gpl-2.0.html">GNU/GPL v2 license.</a></p></span>
<span class="readonly"><h1>GK JomSocial Feed<small>ver. 1.0.1</small></h1><p>With the GK JomSocial Feed module, you can implement space-saving blocks on websites and incorporate a variety of JomSocial statuses. There are a few useful options for selecting specific statuses.</p></p><p class='license'>GK JomSocial Feed is released under the <a target="_blank" href="http://www.gnu.org/licenses/gpl-2.0.html">GNU/GPL v2 license.</a></p></span>
]]></description>
<files>
<filename module="mod_gk_js_feed">mod_gk_js_feed.php</filename>
Expand Down

0 comments on commit 6ed6f60

Please sign in to comment.