| 297 | | |
| 298 | | } |
| 299 | | |
| 300 | | } |
| 301 | | |
| | 296 | } |
| | 297 | } |
| | 298 | |
| | 299 | class 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 | |