Show
Ignore:
Timestamp:
10/17/07 22:58:01 (14 months ago)
Author:
cfriesen
Message:

Refresh interval in the feed properties.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/extlib/rss_dbcache.inc

    r1534 r1762  
    109109        } 
    110110 
    111         $res = rss_query("select UNIX_TIMESTAMP(daterefreshed) as ts, refreshinterval from " . getTable("channels") 
     111        $res = rss_query("select UNIX_TIMESTAMP(daterefreshed) as ts from " . getTable("channels") 
    112112                         . " where id=$cid"); 
    113113        if ( ! $res ) { 
     
    116116        } 
    117117 
    118         list($dateRefreshed, $refreshInterval) = rss_fetch_row($res); 
    119  
    120         // Lets hope that the web server and sql server have their clocks in sync 
     118        list($dateRefreshed) = rss_fetch_row($res); 
     119        $refreshInterval = getProperty($cid, 'rss.config.refreshinterval'); 
     120        if(true == empty($refreshInterval)) { 
     121            $refreshInterval = 60; 
     122        } 
     123         
     124          // Lets hope that the web server and sql server have their clocks in sync 
    121125        $age = time() - $dateRefreshed; 
     126         
    122127        if (!$refreshInterval || ($refreshInterval < 10)) { 
    123128            // We should change the Gregarius UA if we allow refreshInterval to be small