diff options
| author | 2014-02-27 22:48:11 +0100 | |
|---|---|---|
| committer | 2014-02-27 22:48:11 +0100 | |
| commit | 6dffb8706f096acdbcda367210d0b7ad41937174 (patch) | |
| tree | 47ff4adf922c1a2468cdf9d048872c1ae360aa5f /app/Models/FeedDAO.php | |
| parent | f23c30d2cd338e9ae8c6cb92467587102b49d772 (diff) | |
Alpha version of Google Reader compatible API
https://github.com/marienfressinaud/FreshRSS/issues/13
Hardcoded passwords, no possibility to add/delete feeds or edit
categories yet.
Diffstat (limited to 'app/Models/FeedDAO.php')
| -rw-r--r-- | app/Models/FeedDAO.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php index 7ebe68d2b..79d8cff90 100644 --- a/app/Models/FeedDAO.php +++ b/app/Models/FeedDAO.php @@ -198,6 +198,19 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo { return self::daoToFeed ($stm->fetchAll (PDO::FETCH_ASSOC)); } + public function listCategoryNames() { + $sql = 'SELECT f.id, c.name as c_name FROM `' . $this->prefix . 'feed` f ' + . 'INNER JOIN `' . $this->prefix . 'category` c ON c.id = f.category'; + $stm = $this->bd->prepare ($sql); + $stm->execute (); + $res = $stm->fetchAll(PDO::FETCH_ASSOC); + $feedCategoryNames = array(); + foreach ($res as $line) { + $feedCategoryNames[$line['id']] = $line['c_name']; + } + return $feedCategoryNames; + } + public function listFeedsOrderUpdate ($cacheDuration = 1500) { $sql = 'SELECT id, name, url, lastUpdate, pathEntries, httpAuth, keep_history ' . 'FROM `' . $this->prefix . 'feed` ' |
