Changeset 1774 for trunk/gregarius/cls
- Timestamp:
- 12/26/07 22:37:40 (9 months ago)
- Location:
- trunk/gregarius/cls
- Files:
-
- 2 modified
-
update.php (modified) (13 diffs)
-
wrappers/feeds.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gregarius/cls/update.php
r1629 r1774 32 32 define('NO_NEW_ITEMS', '-'); 33 33 define ('UPDATING','...'); 34 define ('DEFAULT_CID', -1); 34 35 35 36 … … 64 65 var $chans = array (); 65 66 66 function Update($doPopulate = true, $updatePrivateAlso = false ) {67 function Update($doPopulate = true, $updatePrivateAlso = false, $cid = DEFAULT_CID) { 67 68 rss_plugin_hook('rss.plugins.updates.before', null); 68 69 if($doPopulate) { 69 $this->populate($updatePrivateAlso );70 $this->populate($updatePrivateAlso, $cid); 70 71 } 71 72 … … 75 76 } 76 77 77 function populate($updatePrivateAlso = false ) {78 function populate($updatePrivateAlso = false, $cid) { 78 79 $sql = "select c.id, c.url, c.title from ".getTable("channels") . " c " 79 80 . " inner join " . getTable('folders') . " f on f.id = c.parent " … … 83 84 $sql .= " and not(mode & ".RSS_MODE_PRIVATE_STATE.") "; 84 85 } 85 86 if (getConfig('rss.config.absoluteordering')) { 87 $sql .= " order by f.position asc, c.position asc"; 88 } else { 89 $sql .= " order by f.name, c.title asc"; 90 } 86 87 if(DEFAULT_CID != $cid) { 88 $sql .= " and c.id = " . $cid . " "; 89 } else { 90 if (getConfig('rss.config.absoluteordering')) { 91 $sql .= " order by f.position asc, c.position asc"; 92 } else { 93 $sql .= " order by f.name, c.title asc"; 94 } 95 } 91 96 92 97 $res = rss_query($sql); … … 159 164 } 160 165 161 162 166 /** 163 167 * HTTP Server Push update … … 165 169 class HTTPServerPushUpdate extends Update { 166 170 167 function HTTPServerPushUpdate( ) {168 parent::Update( );171 function HTTPServerPushUpdate($cid) { 172 parent::Update($doPopulate = true, $updatePrivateAlso = false, $cid); 169 173 170 174 $GLOBALS['rss']->header->appendHeader("Connection: close"); … … 228 232 } 229 233 230 231 234 /** 232 235 * AJAXUpdate updates feeds via AJAX. It's a bit more server-intesive … … 235 238 class AJAXUpdate extends Update { 236 239 237 function AJAXUpdate( ) {238 parent::Update( );240 function AJAXUpdate($cid) { 241 parent::Update($doPopulate = true, $updatePrivateAlso = false, $cid); 239 242 $GLOBALS['rss']->header->extraHTML .= "<script type=\"text/javascript\" src=\"" 240 243 .getPath()."update.php?js\"></script>\n"; … … 275 278 } 276 279 277 278 279 280 class CommandLineUpdate extends Update { 280 function CommandLineUpdate( ) {281 parent::Update($doPopulate = true, $updatePrivateAlso = true );281 function CommandLineUpdate($cid) { 282 parent::Update($doPopulate = true, $updatePrivateAlso = true, $cid); 282 283 } 283 284 … … 309 310 310 311 class MobileUpdate extends Update { 311 function MobileUpdate() { 312 parent::Update($doPopulate = true); 313 } 312 function MobileUpdate($cid) { 313 parent::Update($doPopulate = true, $updatePrivateAlso = false, $cid); 314 } 315 314 316 function render() { 315 317 $newIds = array(); … … 334 336 } 335 337 } 336 337 338 338 339 /** … … 372 373 } 373 374 374 375 376 375 /** 377 376 * SilentUpdate updates the feeds silently for those lame … … 380 379 */ 381 380 class SilentUpdate extends Update { 382 function SilentUpdate( ) {383 parent::Update($doPopulate = false );381 function SilentUpdate($cid) { 382 parent::Update($doPopulate = false, $updatePrivateAlso = false, $cid); 384 383 } 385 384 -
trunk/gregarius/cls/wrappers/feeds.php
r1561 r1774 112 112 } 113 113 114 function rss_feeds_feed_id() { 115 return ($GLOBALS['rss']->currentFeedsFeed-> id); 116 } 117 114 118 function rss_feeds_feed_title_entities() { 115 119 return htmlentities($GLOBALS['rss']->currentFeedsFeed-> title);
