Changeset 1655

Show
Ignore:
Timestamp:
01/06/07 23:01:06 (3 years ago)
Author:
mbonetti
Message:

experimental fix for #302

Location:
trunk/gregarius
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/cls/channels.php

    r1653 r1655  
    142142    } 
    143143     
    144     function render() {      
    145         $GLOBALS['rss']->currentFeedsFolder = $this; 
    146         eval($GLOBALS['rss'] ->getCachedTemplateFile("feedsfolder.php")); 
     144    function render() { 
     145        if ((!getConfig('rss.output.minimalchannellist')) || ($this->feeds)) {  
     146            $GLOBALS['rss']->currentFeedsFolder = $this;  
     147            require($GLOBALS['rss'] ->getTemplateFile("feedsfolder.php"));  
     148        } 
    147149    } 
    148150} 
     
    213215               // Lets collapse all folders 
    214216               $res = rss_query("select id from " . getTable('folders') . " where id != 0"); 
    215                while (list ($this->collapsed_ids[]) = rss_fetch_row($res)) { 
    216                } 
     217               while (list ($this->collapsed_ids[]) = rss_fetch_row($res)) {} 
    217218               if (!headers_sent()) { // Sajax does not allow us to set cookies 
    218219                setcookie(COLLAPSED_FOLDERS_COOKIE,  
     
    287288                $this->folders[$cparent] = new FeedFolder($fname, $cparent,$this); 
    288289            } 
    289             $this->folders[$cparent]->feeds[] = $f; 
     290            //$this->folders[$cparent]->feeds[] = $f; 
     291            if(($ucc != 0) || (!getConfig('rss.output.minimalchannellist'))) {  
     292                $this->folders[$cparent]->feeds[] = $f;  
     293            } 
    290294            $this->folders[$cparent]->isCollapsed = in_array($cparent, $this->collapsed_ids) && ($cparent > 0); 
    291295 
  • trunk/gregarius/schema.php

    r1586 r1655  
    458458        "rss.output.frontpage.mixeditems"   => array('true','true','boolean','Show read items along with unread items on the front page?',NULL), 
    459459        "rss.output.frontpage.numreaditems" => array(-1,-1,'num','If there are no unread items then how many items to show on the frontpage. Set this to -1 if you want it to be the same as rss.output.numitemsonmainpage',NULL), 
     460        "rss.output.mimimalchannellist" => array('false','false','boolean','Exclude folders and channels without unread items in channel list?',NULL), 
    460461        "rss.output.theme"          =>      array('default','default','string','The theme to use. Download more themes from the <a href="http://themes.gregarius.net/">Gregarius Themes Repository</a>.',NULL), 
    461462        "rss.output.cachecontrol"   =>      array('false','false','boolean','If true, Gregarius will negotiate with the browser and check whether it should get a fresh document or not.',NULL), 
     
    478479        "rss.search.maxitems" => array(500, 500, 'num', 'Sets the maximum number of items returned on a search', NULL), 
    479480        "rss.config.restrictrefresh"    => array("false","false","boolean","Restrict refresh to command line only (eg php -f update.php). Useful for busy sites with multiple users.",NULL), 
     481        "rss.output.minimalchannellist" => array('false','false','boolean','Exclude folders and channels without unread items in channel list?',NULL),  
    480482    ); 
    481483