Show
Ignore:
Timestamp:
05/11/06 17:43:17 (3 years ago)
Author:
mbonetti
Message:

Mobile update

Files:
1 modified

Legend:

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

    r1405 r1468  
    293293 
    294294        } 
    295  
    296295        parent::cleanUp($newIds, $ignorePrivate = true); 
    297  
    298     } 
    299  
    300 } 
    301  
     296    } 
     297} 
     298 
     299class MobileUpdate extends Update { 
     300    function MobileUpdate() { 
     301        parent::Update($doPopulate = true); 
     302    } 
     303    function render() { 
     304        $newIds = array(); 
     305    foreach ($this->chans as $chan) { 
     306            list ($cid, $url, $title) = $chan; 
     307            echo "$title ...\t"; 
     308            flush(); 
     309            $ret = update($cid); 
     310 
     311            if (is_array($ret)) { 
     312                    list ($error, $unreadIds) = $ret; 
     313                    $newIds = array_merge($newIds, $unreadIds); 
     314            } else { 
     315                    $error = 0; 
     316                    $unreadIds = array (); 
     317            } 
     318            $unread = count($unreadIds); 
     319            list($label,$cls) = parent::magpieError($error); 
     320            echo "\n$label, $unread " . LBL_UPDATE_UNREAD . "<br />"; 
     321            flush(); 
     322    } 
     323    } 
     324} 
     325 
     326     
    302327/** 
    303328 * CommandLineUpdateNews updates the feeds and displays only feeds with