Changeset 1774 for trunk/gregarius/update.php
- Timestamp:
- 12/26/07 22:37:40 (10 months ago)
- Files:
-
- 1 modified
-
trunk/gregarius/update.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gregarius/update.php
r1581 r1774 28 28 define ('RSS_NO_CACHE',true); 29 29 require_once('init.php'); 30 30 31 $cline = isset($argv) && !$_REQUEST && isset($argc) && $argc; 31 32 if (!$cline && getConfig('rss.config.restrictrefresh')) { … … 41 42 sajax_init(); 42 43 43 44 44 if (array_key_exists('js',$_GET)) { 45 45 header('Content-Type: text/javascript'); … … 52 52 } 53 53 54 55 54 $browser = new Browser(); 56 55 $silent = array_key_exists('silent', $_GET) || ($cline && in_array('--silent',$argv)); 57 56 $newsonly = array_key_exists('newsonly', $_GET) || ($cline && in_array('--newsonly', $argv)); 58 57 $mobile = array_key_exists('mobile',$_GET); 58 59 $cid = DEFAULT_CID; 60 if(array_key_exists('cid', $_GET)) { 61 $cid = $_GET['cid']; 62 } else if ($cline && in_array('--update-only', $argv)) { 63 foreach($argv as $k => $v) { 64 if ('--update-only' == $v) { 65 $cid = $argv[$k+1]; 66 break; 67 } 68 } 69 } 59 70 60 71 $GLOBALS['rss'] -> header = new Header( … … 68 79 $GLOBALS['rss'] -> feedList = new FeedList(false); 69 80 70 71 81 // Instantiate a different Update object, depending on the client 72 82 if ($cline && !$silent && !$newsonly) { 73 $update = new CommandLineUpdate( );83 $update = new CommandLineUpdate($cid); 74 84 75 85 } elseif ($cline && !$silent && $newsonly) { 76 $update = new CommandLineUpdateNews( );86 $update = new CommandLineUpdateNews($cid); 77 87 78 88 } elseif (getConfig('rss.config.serverpush') && !$silent && $browser->supportsServerPush()) { 79 $update = new HTTPServerPushUpdate( );89 $update = new HTTPServerPushUpdate($cid); 80 90 81 91 } elseif(!$silent && $browser->supportsAJAX()) { 82 $update = new AJAXUpdate( );92 $update = new AJAXUpdate($cid); 83 93 84 94 } elseif($mobile) { 85 $update = new MobileUpdate( );95 $update = new MobileUpdate($cid); 86 96 87 97 } else { 88 98 error_reporting(0); 89 $update = new SilentUpdate( );99 $update = new SilentUpdate($cid); 90 100 } 91 101
