From d9975d86a2d159c0f2442b9ee02f0523b8577af3 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sat, 14 Sep 2013 21:59:54 +0200 Subject: Issue #155 : suppression fonctions commentées MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/Entry.php | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'app/models/Entry.php') diff --git a/app/models/Entry.php b/app/models/Entry.php index 63e573722..d73ce7245 100755 --- a/app/models/Entry.php +++ b/app/models/Entry.php @@ -461,24 +461,6 @@ class EntryDAO extends Model_pdo { return $unreadRead['unread']; } - /*public function countNotReadByFeed ($id) { //Is this used? - $sql = 'SELECT COUNT(*) AS count FROM ' . $this->prefix . 'entry WHERE is_read = 0 AND id_feed = ?'; - $stm = $this->bd->prepare ($sql); - $stm->execute (array ($id)); - $res = $stm->fetchAll (PDO::FETCH_ASSOC); - - return $res[0]['count']; - }*/ - - /*public function countNotReadByCat ($id) { //Is this used? - $sql = 'SELECT COUNT(*) AS count FROM ' . $this->prefix . 'entry e INNER JOIN ' . $this->prefix . 'feed f ON e.id_feed = f.id WHERE is_read=0 AND category = ?'; - $stm = $this->bd->prepare ($sql); - $stm->execute (array ($id)); - $res = $stm->fetchAll (PDO::FETCH_ASSOC); - - return $res[0]['count']; - }*/ - public function countUnreadReadFavorites () { $sql = 'SELECT is_read, COUNT(*) AS count FROM ' . $this->prefix . 'entry WHERE is_favorite=1 GROUP BY is_read'; $stm = $this->bd->prepare ($sql); @@ -493,10 +475,7 @@ class EntryDAO extends Model_pdo { } return $readUnread; } - /*public function countNotReadFavorites () { //Is this used? //Deprecated: use countUnreadReadFavorites() instead - $unreadRead = $this->countUnreadReadFavorites (); //This makes better use of caching - return $unreadRead['unread']; - }*/ + public function countFavorites () { //Deprecated: use countUnreadReadFavorites() instead $unreadRead = $this->countUnreadReadFavorites (); //This makes better use of caching return $unreadRead['unread'] + $unreadRead['read']; -- cgit v1.2.3