Changeset 1629
- Timestamp:
- 11/07/06 14:23:57 (2 years ago)
- Location:
- trunk/gregarius
- Files:
-
- 37 modified
-
admin/channels.php (modified) (2 diffs)
-
api.php (modified) (2 diffs)
-
cls/update.php (modified) (11 diffs)
-
extlib/rss_fetch.inc (modified) (2 diffs)
-
intl/da/LC_MESSAGES/messages.mo (modified) (previous)
-
intl/da/LC_MESSAGES/messages.po (modified) (13 diffs)
-
intl/de/LC_MESSAGES/messages.mo (modified) (previous)
-
intl/de/LC_MESSAGES/messages.po (modified) (13 diffs)
-
intl/es/LC_MESSAGES/messages.mo (modified) (previous)
-
intl/es/LC_MESSAGES/messages.po (modified) (13 diffs)
-
intl/fr/LC_MESSAGES/messages.mo (modified) (previous)
-
intl/fr/LC_MESSAGES/messages.po (modified) (13 diffs)
-
intl/he/LC_MESSAGES/messages.mo (modified) (previous)
-
intl/he/LC_MESSAGES/messages.po (modified) (13 diffs)
-
intl/hu/LC_MESSAGES/messages.mo (modified) (previous)
-
intl/hu/LC_MESSAGES/messages.po (modified) (13 diffs)
-
intl/id/LC_MESSAGES/messages.mo (modified) (previous)
-
intl/id/LC_MESSAGES/messages.po (modified) (13 diffs)
-
intl/it/LC_MESSAGES/messages.mo (modified) (previous)
-
intl/it/LC_MESSAGES/messages.po (modified) (13 diffs)
-
intl/ja/LC_MESSAGES/messages.mo (modified) (previous)
-
intl/ja/LC_MESSAGES/messages.po (modified) (13 diffs)
-
intl/messages.pot (modified) (15 diffs)
-
intl/nl/LC_MESSAGES/messages.mo (modified) (previous)
-
intl/nl/LC_MESSAGES/messages.po (modified) (13 diffs)
-
intl/pt/LC_MESSAGES/messages.mo (modified) (previous)
-
intl/pt/LC_MESSAGES/messages.po (modified) (13 diffs)
-
intl/pt_BR/LC_MESSAGES/messages.mo (modified) (previous)
-
intl/pt_BR/LC_MESSAGES/messages.po (modified) (13 diffs)
-
intl/ru/LC_MESSAGES/messages.mo (modified) (previous)
-
intl/ru/LC_MESSAGES/messages.po (modified) (13 diffs)
-
intl/sv/LC_MESSAGES/messages.mo (modified) (previous)
-
intl/sv/LC_MESSAGES/messages.po (modified) (13 diffs)
-
intl/vi/LC_MESSAGES/messages.mo (modified) (previous)
-
intl/vi/LC_MESSAGES/messages.po (modified) (14 diffs)
-
intl/zh_CN/LC_MESSAGES/messages.mo (modified) (previous)
-
intl/zh_CN/LC_MESSAGES/messages.po (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gregarius/admin/channels.php
r1602 r1629 281 281 282 282 if ($label != 'http://' && substr($label, 0,4) == "http") { 283 $tags = $_REQUEST['channel_tags'];283 $tags = @$_REQUEST['channel_tags']; 284 284 $ret = add_channel($label,$fid,null,null,$tags); 285 285 //var_dump($ret); … … 900 900 901 901 // Description 902 $descr = strip_tags($descr);902 $descr = trim(strip_tags($descr)); 903 903 echo "<p><label for=\"c_descr\">". __('Description:') ."</label>\n" 904 904 ."<input type=\"text\" id=\"c_descr\" name=\"c_descr\" value=\"$descr\" /></p>\n"; -
trunk/gregarius/api.php
r1613 r1629 52 52 rss_require('extlib/JSON.php'); 53 53 $json = new Services_JSON(); 54 $query = sanitize(@$_REQUEST['q'], RSS_SANITIZER_WORDS);54 $query = preg_replace('#[^a-z0-9\s]#','',@$_REQUEST['q']); 55 55 if ($query) { 56 56 $res = osSearch($query); 57 57 } else { 58 $res = array($query,array() );58 $res = array($query,array(),array(),array()); 59 59 } 60 header('Content-Type: application/json');60 header('Content-Type: text/plain'); 61 61 die ($json->encode($res)); 62 62 break; … … 218 218 } 219 219 } 220 return array($q,$results );220 return array($q,$results,array(),array()); 221 221 } 222 222 ?> -
trunk/gregarius/cls/update.php
r1561 r1629 65 65 66 66 function Update($doPopulate = true, $updatePrivateAlso = false) { 67 rss_plugin_hook('rss.plugins.updates.before', null);67 rss_plugin_hook('rss.plugins.updates.before', null); 68 68 if($doPopulate) { 69 69 $this->populate($updatePrivateAlso); … … 77 77 function populate($updatePrivateAlso = false) { 78 78 $sql = "select c.id, c.url, c.title from ".getTable("channels") . " c " 79 . " inner join " . getTable('folders') . " f on f.id = c.parent "80 . " where not(c.mode & ".RSS_MODE_DELETED_STATE.") ";79 . " inner join " . getTable('folders') . " f on f.id = c.parent " 80 . " where not(c.mode & ".RSS_MODE_DELETED_STATE.") "; 81 81 82 82 if (hidePrivate() && !$updatePrivateAlso) { … … 104 104 } 105 105 } 106 106 107 107 setProperty('__meta__','meta.lastupdate','misc',time()); 108 108 109 109 if (count($newIds) > 0) { 110 110 rss_invalidate_cache(); 111 111 } 112 rss_plugin_hook('rss.plugins.updates.after', null);112 rss_plugin_hook('rss.plugins.updates.after', null); 113 113 } 114 114 115 115 function magpieError($error) { 116 if ( $error & MAGPIE_FEED_ORIGIN_CACHE) {116 if (is_numeric($error) && ($error & MAGPIE_FEED_ORIGIN_CACHE)) { 117 117 if ($error & MAGPIE_FEED_ORIGIN_HTTP_304) { 118 118 $label = __('OK (304 Not modified)'); … … 121 121 elseif ($error & MAGPIE_FEED_ORIGIN_HTTP_TIMEOUT) { 122 122 $label = __('HTTP Timeout (Local cache)'); 123 $cls = ERROR_ WARNING;123 $cls = ERROR_ERROR; 124 124 } 125 125 elseif ($error & MAGPIE_FEED_ORIGIN_NOT_FETCHED) { … … 131 131 $cls = ERROR_ERROR; 132 132 } 133 elseif ($error & MAGPIE_FEED_ORIGIN_HTTP_403) { 134 $label = __('403 Forbidden (Local cache)'); 135 $cls = ERROR_ERROR; 136 } 133 137 else { 134 138 $label = $error; … … 142 146 else { 143 147 if (is_numeric($error)) { 144 $label = __('ERROR') ;148 $label = __('ERROR') ." $error"; 145 149 $cls = ERROR_ERROR; 146 150 } else { … … 169 173 rss_set_hook('rss.plugins.bodystart', "pushHeaderCallBack"); 170 174 rss_set_hook('rss.plugins.bodyend', "pushFooterCallBack"); 171 175 172 176 ob_implicit_flush(); 173 177 } … … 260 264 echo "</table>\n"; 261 265 echo "<script type=\"text/javascript\">\n"; 262 echo "function runAjaxUpdate() { \n";266 echo "function runAjaxUpdate() { \n"; 263 267 echo " for (k =0; k < " . AJAX_PARALLEL_SIZE . "; k++){\n"; 264 echo " doUpdate();\n";265 echo " }\n";266 echo "}\n";267 // Fix for IE's stupid "Operation Aborted" Error268 echo " if (window.addEventListener) window.addEventListener(\"load\",runAjaxUpdate,false); else if (window.attachEvent) window.attachEvent(\"onload\",runAjaxUpdate);\n";269 echo "</script>\n";268 echo " doUpdate();\n"; 269 echo " }\n"; 270 echo "}\n"; 271 // Fix for IE's stupid "Operation Aborted" Error 272 echo " if (window.addEventListener) window.addEventListener(\"load\",runAjaxUpdate,false); else if (window.attachEvent) window.attachEvent(\"onload\",runAjaxUpdate);\n"; 273 echo "</script>\n"; 270 274 } 271 275 } … … 305 309 306 310 class MobileUpdate extends Update { 307 function MobileUpdate() {308 parent::Update($doPopulate = true);309 }310 function render() {311 $newIds = array();312 foreach ($this->chans as $chan) {313 list ($cid, $url, $title) = $chan;314 echo "$title ...\t";315 flush();316 $ret = update($cid);317 318 if (is_array($ret)) {319 list ($error, $unreadIds) = $ret;320 $newIds = array_merge($newIds, $unreadIds);321 } else {322 $error = 0;323 $unreadIds = array ();324 }325 $unread = count($unreadIds);326 list($label,$cls) = parent::magpieError($error);327 echo "\n$label, $unread " . __('New Items') . "<br />";328 flush();329 }330 }331 } 332 333 311 function MobileUpdate() { 312 parent::Update($doPopulate = true); 313 } 314 function render() { 315 $newIds = array(); 316 foreach ($this->chans as $chan) { 317 list ($cid, $url, $title) = $chan; 318 echo "$title ...\t"; 319 flush(); 320 $ret = update($cid); 321 322 if (is_array($ret)) { 323 list ($error, $unreadIds) = $ret; 324 $newIds = array_merge($newIds, $unreadIds); 325 } else { 326 $error = 0; 327 $unreadIds = array (); 328 } 329 $unread = count($unreadIds); 330 list($label,$cls) = parent::magpieError($error); 331 echo "\n$label, $unread " . __('New Items') . "<br />"; 332 flush(); 333 } 334 } 335 } 336 337 334 338 /** 335 339 * CommandLineUpdateNews updates the feeds and displays only feeds with … … 337 341 */ 338 342 class CommandLineUpdateNews extends CommandLineUpdate { 339 function render() {340 $newIds = array();341 foreach ($this->chans as $chan) {342 list ($cid, $url, $title) = $chan;343 $ret = update($cid);344 345 if (is_array($ret)) {346 list ($error, $unreadIds) = $ret;347 $newIds = array_merge($newIds, $unreadIds);348 } else {349 $error = 0;350 $unreadIds = array();351 }352 $unread = count($unreadIds);353 354 list($label, $cls) = parent::magpieError($error);355 356 if (($cls != ERROR_NOERROR) || ($unread > 0)) {357 echo "$title ...\t";358 flush();359 echo "\n$label, $unread " . __('New Items') . "\n\n";360 flush();361 }362 }363 364 if (!hidePrivate()) {365 parent::cleanUp($newIds);366 }367 }343 function render() { 344 $newIds = array(); 345 foreach ($this->chans as $chan) { 346 list ($cid, $url, $title) = $chan; 347 $ret = update($cid); 348 349 if (is_array($ret)) { 350 list ($error, $unreadIds) = $ret; 351 $newIds = array_merge($newIds, $unreadIds); 352 } else { 353 $error = 0; 354 $unreadIds = array(); 355 } 356 $unread = count($unreadIds); 357 358 list($label, $cls) = parent::magpieError($error); 359 360 if (($cls != ERROR_NOERROR) || ($unread > 0)) { 361 echo "$title ...\t"; 362 flush(); 363 echo "\n$label, $unread " . __('New Items') . "\n\n"; 364 flush(); 365 } 366 } 367 368 if (!hidePrivate()) { 369 parent::cleanUp($newIds); 370 } 371 } 368 372 } 369 373 … … 417 421 echo "\n".PUSH_BOUNDARY."\n"; 418 422 echo "WARNING: YOUR BROWSER DOESN'T SUPPORT THIS SERVER-PUSH TECHNOLOGY.\n"; 419 423 420 424 flush(); 421 425 } -
trunk/gregarius/extlib/rss_fetch.inc
r1164 r1629 50 50 // Not fetched because age < MAGPIE_CACHE_AGE 51 51 define ('MAGPIE_FEED_ORIGIN_NOT_FETCHED', 64); 52 // 403 Forbidden 53 define ('MAGPIE_FEED_ORIGIN_HTTP_403', 128); 52 54 53 55 /* … … 239 241 $rss -> rss_origin |= MAGPIE_FEED_ORIGIN_HTTP_404; 240 242 break; 243 case '403': 244 $rss -> rss_origin |= MAGPIE_FEED_ORIGIN_HTTP_403; 245 break; 241 246 default: 242 247 $rss -> rss_origin |= MAGPIE_FEED_ORIGIN_HTTP_TIMEOUT; -
trunk/gregarius/intl/da/LC_MESSAGES/messages.po
r1614 r1629 5 5 "Project-Id-Version: Gregarius 0.5.5\n" 6 6 "Report-Msgid-Bugs-To: \n" 7 "POT-Creation-Date: 2006-1 0-30 16:21+0100\n"7 "POT-Creation-Date: 2006-11-07 14:25+0100\n" 8 8 "PO-Revision-Date: \n" 9 9 "Last-Translator: \n" … … 40 40 41 41 #: author.php:41 cls/wrappers/item.php:222 author.php:42 42 #: cls/wrappers/item.php:221 42 43 msgid " by " 43 44 msgstr " af " … … 56 57 #: cls/channels.php:158 cls/header.php:97 cls/wrappers/feeds.php:76 57 58 #: themes/default/mobile/nav.php:3 themes/milsi/feeds.php:1 59 #: themes/default/mobile/nav.php:2 58 60 msgid "Feeds" 59 61 msgstr "Feeds" … … 113 115 msgstr "404 Ikke fundet (Lokal cache)" 114 116 115 #: cls/update.php:137 cls/update.php:139 117 #: cls/update.php:137 cls/update.php:139 cls/update.php:143 116 118 msgid "OK (HTTP 200)" 117 119 msgstr "OK (HTTP 200)" 118 120 119 #: cls/update.php:142 cls/update.php:144 121 #: cls/update.php:142 cls/update.php:144 cls/update.php:148 120 122 msgid "ERROR" 121 123 msgstr "FEJL" 122 124 123 125 #: cls/update.php:175 cls/update.php:237 cls/update.php:179 cls/update.php:241 126 #: cls/update.php:183 cls/update.php:245 124 127 #, php-format 125 128 msgid "Updating %d Feeds..." … … 127 130 128 131 #: cls/update.php:178 cls/update.php:241 cls/update.php:182 cls/update.php:245 132 #: cls/update.php:186 cls/update.php:249 129 133 msgid "Feed" 130 134 msgstr "Feed" 131 135 132 136 #: cls/update.php:179 cls/update.php:242 cls/update.php:183 cls/update.php:246 137 #: cls/update.php:187 cls/update.php:250 133 138 msgid "Status" 134 139 msgstr "Status" … … 136 141 #: cls/update.php:180 cls/update.php:243 cls/update.php:294 cls/update.php:323 137 142 #: cls/update.php:355 cls/update.php:184 cls/update.php:247 cls/update.php:298 138 #: cls/update.php:327 cls/update.php:359 143 #: cls/update.php:327 cls/update.php:359 cls/update.php:188 cls/update.php:251 144 #: cls/update.php:302 cls/update.php:331 cls/update.php:363 139 145 msgid "New Items" 140 146 msgstr "Nye items" … … 144 150 msgstr "Permanent link for " 145 151 146 #: cls/wrappers/item.php:201 152 #: cls/wrappers/item.php:201 cls/wrappers/item.php:200 147 153 msgid "Posted: " 148 154 msgstr "Skrevet: " 149 155 150 #: cls/wrappers/item.php:201 156 #: cls/wrappers/item.php:201 cls/wrappers/item.php:200 151 157 msgid "Fetched: " 152 158 msgstr "Hented: " … … 585 591 #: themes/default/mobile/item.php:15 themes/default/web/item.php:28 586 592 #: themes/lilina/web/item.php:52 themes/lilina/web/item.php:108 593 #: themes/default/mobile/item.php:22 587 594 msgid "Tags" 588 595 msgstr "Tags" … … 652 659 653 660 #: intl/en.php:225 intl/en.php:226 plugins/stickyflag/stickyflag.php:92 654 #: state.php:39 661 #: state.php:39 themes/default/mobile/item.php:40 655 662 msgid "Sticky" 656 663 msgstr "Sticky" … … 722 729 #: cls/wrappers/feeds.php:73 themes/default/mobile/nav.php:4 723 730 #: admin/channels.php:100 admin/channels.php:864 731 #: themes/default/mobile/nav.php:3 724 732 msgid "Categories" 725 733 msgstr "Kategorier" … … 745 753 #: intl/en.php:255 intl/en.php:256 themes/default/mobile/item.php:12 746 754 #: themes/default/web/item.php:24 themes/lilina/web/item.php:48 747 #: themes/lilina/web/item.php:104 755 #: themes/lilina/web/item.php:104 themes/default/mobile/item.php:19 748 756 msgid "Enclosure:" 749 757 msgstr "Bilag:" … … 751 759 #: intl/en.php:256 intl/en.php:257 themes/default/mobile/item.php:12 752 760 #: themes/default/web/item.php:24 themes/lilina/web/item.php:48 753 #: themes/lilina/web/item.php:104 761 #: themes/lilina/web/item.php:104 themes/default/mobile/item.php:19 754 762 msgid "download" 755 763 msgstr "download" … … 1100 1108 msgstr "Slet også Sticky items: " 1101 1109 1110 #: themes/default/mobile/item.php:34 1111 msgid "Read" 1112 msgstr "" 1113 1114 #: themes/default/mobile/item.php:35 1115 msgid "Unread" 1116 msgstr "" 1117 1118 #: themes/default/mobile/nav.php:4 1119 msgid "Refresh" 1120 msgstr "" 1121 1122 #: themes/default/web/item.php:8 themes/default/web/item.php:9 1123 msgid "Edit Item Properties" 1124 msgstr "" 1125 1126 #: cls/update.php:134 1127 msgid "403 Forbidden (Local cache)" 1128 msgstr "" 1129 1102 1130 #, fuzzy 1103 1131 #~ msgid "tag" -
trunk/gregarius/intl/de/LC_MESSAGES/messages.po
r1614 r1629 5 5 "Project-Id-Version: Gregarius 0.5.5\n" 6 6 "Report-Msgid-Bugs-To: \n" 7 "POT-Creation-Date: 2006-1 0-30 16:21+0100\n"7 "POT-Creation-Date: 2006-11-07 14:25+0100\n" 8 8 "PO-Revision-Date: 2006-10-23 05:28+0000\n" 9 9 "Last-Translator: mbi <mbonetti@gmail.com>\n" … … 40 40 41 41 #: author.php:41 cls/wrappers/item.php:222 author.php:42 42 #: cls/wrappers/item.php:221 42 43 msgid " by " 43 44 msgstr " by " … … 56 57 #: cls/channels.php:158 cls/header.php:97 cls/wrappers/feeds.php:76 57 58 #: themes/default/mobile/nav.php:3 themes/milsi/feeds.php:1 59 #: themes/default/mobile/nav.php:2 58 60 msgid "Feeds" 59 61 msgstr "Feeds" … … 113 115 msgstr "404 Not Found (Local cache)" 114 116 115 #: cls/update.php:137 cls/update.php:139 117 #: cls/update.php:137 cls/update.php:139 cls/update.php:143 116 118 msgid "OK (HTTP 200)" 117 119 msgstr "OK (HTTP 200)" 118 120 119 #: cls/update.php:142 cls/update.php:144 121 #: cls/update.php:142 cls/update.php:144 cls/update.php:148 120 122 msgid "ERROR" 121 123 msgstr "ERROR" 122 124 123 125 #: cls/update.php:175 cls/update.php:237 cls/update.php:179 cls/update.php:241 126 #: cls/update.php:183 cls/update.php:245 124 127 #, php-format 125 128 msgid "Updating %d Feeds..." … … 127 130 128 131 #: cls/update.php:178 cls/update.php:241 cls/update.php:182 cls/update.php:245 132 #: cls/update.php:186 cls/update.php:249 129 133 msgid "Feed" 130 134 msgstr "Feed" 131 135 132 136 #: cls/update.php:179 cls/update.php:242 cls/update.php:183 cls/update.php:246 137 #: cls/update.php:187 cls/update.php:250 133 138 msgid "Status" 134 139 msgstr "Status" … … 136 141 #: cls/update.php:180 cls/update.php:243 cls/update.php:294 cls/update.php:323 137 142 #: cls/update.php:355 cls/update.php:184 cls/update.php:247 cls/update.php:298 138 #: cls/update.php:327 cls/update.php:359 143 #: cls/update.php:327 cls/update.php:359 cls/update.php:188 cls/update.php:251 144 #: cls/update.php:302 cls/update.php:331 cls/update.php:363 139 145 msgid "New Items" 140 146 msgstr "Neue Begriffe" … … 144 150 msgstr "Permalink für " 145 151 146 #: cls/wrappers/item.php:201 152 #: cls/wrappers/item.php:201 cls/wrappers/item.php:200 147 153 msgid "Posted: " 148 154 msgstr "Veröffentlicht: " 149 155 150 #: cls/wrappers/item.php:201 156 #: cls/wrappers/item.php:201 cls/wrappers/item.php:200 151 157 msgid "Fetched: " 152 158 msgstr "geholt: " … … 589 595 #: themes/default/mobile/item.php:15 themes/default/web/item.php:28 590 596 #: themes/lilina/web/item.php:52 themes/lilina/web/item.php:108 597 #: themes/default/mobile/item.php:22 591 598 msgid "Tags" 592 599 msgstr "Markierungen" … … 656 663 657 664 #: intl/en.php:225 intl/en.php:226 plugins/stickyflag/stickyflag.php:92 658 #: state.php:39 665 #: state.php:39 themes/default/mobile/item.php:40 659 666 msgid "Sticky" 660 667 msgstr "Sticky" … … 726 733 #: cls/wrappers/feeds.php:73 themes/default/mobile/nav.php:4 727 734 #: admin/channels.php:100 admin/channels.php:864 735 #: themes/default/mobile/nav.php:3 728 736 msgid "Categories" 729 737 msgstr "Kategorien" … … 749 757 #: intl/en.php:255 intl/en.php:256 themes/default/mobile/item.php:12 750 758 #: themes/default/web/item.php:24 themes/lilina/web/item.php:48 751 #: themes/lilina/web/item.php:104 759 #: themes/lilina/web/item.php:104 themes/default/mobile/item.php:19 752 760 msgid "Enclosure:" 753 761 msgstr "Enclosure (Einschlüsse):" … … 755 763 #: intl/en.php:256 intl/en.php:257 themes/default/mobile/item.php:12 756 764 #: themes/default/web/item.php:24 themes/lilina/web/item.php:48 757 #: themes/lilina/web/item.php:104 765 #: themes/lilina/web/item.php:104 themes/default/mobile/item.php:19 758 766 msgid "download" 759 767 msgstr "download" … … 1101 1109 msgstr "" 1102 1110 1111 #: themes/default/mobile/item.php:34 1112 msgid "Read" 1113 msgstr "" 1114 1115 #: themes/default/mobile/item.php:35 1116 msgid "Unread" 1117 msgstr "" 1118 1119 #: themes/default/mobile/nav.php:4 1120 msgid "Refresh" 1121 msgstr "" 1122 1123 #: themes/default/web/item.php:8 themes/default/web/item.php:9 1124 msgid "Edit Item Properties" 1125 msgstr "" 1126 1127 #: cls/update.php:134 1128 msgid "403 Forbidden (Local cache)" 1129 msgstr "" 1130 1103 1131 #, fuzzy 1104 1132 #~ msgid "tag" -
