Changeset 1518

Show
Ignore:
Timestamp:
07/23/06 00:47:29 (2 years ago)
Author:
cfriesen
Message:

Strike out feeds that are above the now configured dead treshold.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gregarius/admin/channels.php

    r1512 r1518  
    9797 
    9898    $sql = "select " 
    99            ." c.id, c.title, c.url, c.siteurl, d.name, c.descr, c.parent, c.icon, c.mode
     99           ." c.id, c.title, c.url, c.siteurl, d.name, c.descr, c.parent, c.icon, c.mode, c.daterefreshed
    100100           ." from " .getTable("channels") ." c, " . getTable("folders") ." d " 
    101101           ." where d.id = c.parent "; 
     
    109109    $res = rss_query($sql); 
    110110    $cntr = 0; 
    111     while (list($id, $title, $url, $siteurl, $parent, $descr, $pid, $icon,$mode) = rss_fetch_row($res)) { 
     111    while (list($id, $title, $url, $siteurl, $parent, $descr, $pid, $icon, $mode, $daterefreshed) = rss_fetch_row($res)) { 
    112112 
    113113        if (getConfig('rss.output.usemodrewrite')) { 
     
    135135            } 
    136136        } 
     137         
     138                if(NULL == $daterefreshed) { 
     139                    $dead = true; 
     140                } else { 
     141                    $dead = (time() - strtotime($daterefreshed) > getConfig('rss.config.deadthreshhold')*60 ? true : false); 
     142                } 
    137143 
    138144        $fmode = array(); 
     
    142148        if ($mode & RSS_MODE_DELETED_STATE) { 
    143149            $fmode[] = "D"; 
    144         } 
     150                        $dead = false; 
     151        } 
     152 
    145153        $slabel = count($fmode)?implode(", ",$fmode):" "; 
    146154        if ($icon && substr($icon,0,5) == 'blob:') { 
     
    152160        .((getConfig('rss.output.showfavicons') && $icon != "")? 
    153161          "<img src=\"$icon\" class=\"favicon\" alt=\"\" width=\"16\" height=\"16\" />":"") 
    154         ."<label for=\"scb_$id\">$title</label>" 
     162        ."<label for=\"scb_$id\">".($dead ? "<strike>" : "").$title.($dead ? "</strike>" : "")."</label>" 
    155163        ."</td>\n" 
    156164        ."\t<td class=\"cntr\">".preg_replace('/ /','&nbsp;',$parentLabel)."</td>\n" 
  • trunk/gregarius/schema.php

    r1507 r1518  
    470470        "rss.config.ajaxparallelsize"           => array('3','3','num','Sets the number of feeds to update in parallel. Remember to set rss.config.serverpush to false.',NULL), 
    471471        "rss.config.ajaxbatchsize"          => array('3','3','num','Sets the number of feeds in a batch when using the ajax updater. Remember to set rss.config.serverpush to false.',NULL), 
    472         "rss.config.defaultdashboard"           => array('true','true','boolean','If the first page seen when entering the admin section should be the dashboard',NULL) 
     472        "rss.config.defaultdashboard"           => array('true','true','boolean','If the first page seen when entering the admin section should be the dashboard',NULL), 
     473        "rss.config.deadthreshhold" =>  array('24', '24', 'num', 'Sets the threshold for when a feed is marked as dead, in hours', NULL) 
    473474    ); 
    474475