]> git.mxchange.org Git - friendica.git/commitdiff
bug #372 - category feeds
authorfriendica <info@friendica.com>
Sat, 14 Apr 2012 11:19:41 +0000 (04:19 -0700)
committerfriendica <info@friendica.com>
Sat, 14 Apr 2012 11:19:41 +0000 (04:19 -0700)
include/items.php

index 05c0d501698f3b3c535b38ca70890c8c6412d3c9..85df340d3f65a5ffc89098588ab2447b1cab3c27 100644 (file)
@@ -19,9 +19,15 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0)
                                $converse = true;
                        if($a->argv[$x] == 'starred')
                                $starred = true;
+                       if($a->argv[$x] === 'category' && $a->argc > ($x + 1) && strlen($a->argv[$x+1]))
+                               $category = $a->argv[$x+1];
                }
+
+
        }
 
+       
+
        // default permissions - anonymous user
 
        $sql_extra = " AND `allow_cid` = '' AND `allow_gid` = '' AND `deny_cid`  = '' AND `deny_gid`  = '' ";
@@ -101,6 +107,10 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0)
        if(! strlen($last_update))
                $last_update = 'now -30 days';
 
+       if(x($category)) {
+               $sql_extra .= file_tag_file_query('item',$category,'category');
+       }
+
        if($public_feed) {
                if(! $converse)
                        $sql_extra .= " AND `contact`.`self` = 1 ";