diff options
| author | 2012-10-23 18:29:43 +0200 | |
|---|---|---|
| committer | 2012-10-23 18:29:43 +0200 | |
| commit | fca236dc6d6ff6e09182c560f3566904cbc7a70a (patch) | |
| tree | 850bfab52359702dad2a9eccd03f01b5c68c9bcb /app/models/Feed.php | |
| parent | 9a95cb844e80512205c519da69ec373e046b7f52 (diff) | |
affichage par catégories + meilleur exportation opml
Diffstat (limited to 'app/models/Feed.php')
| -rw-r--r-- | app/models/Feed.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/models/Feed.php b/app/models/Feed.php index 57696f64d..90656de15 100644 --- a/app/models/Feed.php +++ b/app/models/Feed.php @@ -159,6 +159,18 @@ class FeedDAO extends Model_array { return HelperFeed::daoToFeed ($list); } + public function listByCategory ($cat) { + $list = array (); + + foreach ($this->array as $key => $feed) { + if ($feed['category'] == $cat) { + $list[$key] = $feed; + } + } + + return HelperFeed::daoToFeed ($list); + } + public function count () { return count ($this->array); } |
