Changeset 841

Show
Ignore:
Timestamp:
09/03/05 13:33:19 (3 years ago)
Author:
mbonetti
Message:

Fixes #138

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/rss/cls/categories.php

    r817 r841  
    2727    var $tagCnt = 0; 
    2828    var $taggedFeedCnt = 0; 
     29    var $feedCnt = 0; 
    2930     
    3031    function CatList() { 
     
    3738    } 
    3839     
     40    function getFeedCount() { 
     41        // cached? 
     42        if ($this -> feedCnt > 0) { 
     43            return $this -> feedCnt; 
     44        } 
     45     
     46        $sql = "select " 
     47                ." count(*) as cnt " 
     48                ." from ".getTable("channels")." c " 
     49                ." where  not(c.mode & ".FEED_MODE_DELETED_STATE.") "; 
     50 
     51        if (hidePrivate()) { 
     52            $sql .= " and not(c.mode & ".FEED_MODE_PRIVATE_STATE.") "; 
     53        } 
     54 
     55 
     56        list($this -> feedCnt) = rss_fetch_row(rss_query($sql)); 
     57 
     58        return $this -> feedCnt; 
     59    } 
    3960     
    4061