summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xclasses/feeds.php2
-rwxr-xr-xclasses/pref/feeds.php6
-rwxr-xr-xclasses/pref/filters.php4
-rw-r--r--include/feedbrowser.php2
-rw-r--r--include/functions2.php2
-rw-r--r--js/feedlist.js2
-rwxr-xr-xjs/functions.js4
-rwxr-xr-xjs/prefs.js4
-rw-r--r--js/tt-rss.js6
-rwxr-xr-xjs/viewfeed.js2
10 files changed, 17 insertions, 17 deletions
diff --git a/classes/feeds.php b/classes/feeds.php
index 8f101e5cb..e0756b664 100755
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -741,7 +741,7 @@ class Feeds extends Handler_Protected {
<a title=\"".__('Edit tags for this article')."\"
href=\"#\" onclick=\"editArticleTags($id)\">(+)</a>";
- $num_comments = $line["num_comments"];
+ $num_comments = (int) $line["num_comments"];
$entry_comments = "";
if ($num_comments > 0) {
diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php
index faef0900f..bac859d75 100755
--- a/classes/pref/feeds.php
+++ b/classes/pref/feeds.php
@@ -62,7 +62,7 @@ class Pref_Feeds extends Handler_Protected {
$cat['items'] = $this->get_category_items($line['id']);
$num_children = $this->calculate_children_count($cat);
- $cat['param'] = vsprintf(_ngettext('(%d feed)', '(%d feeds)', $num_children), $num_children);
+ $cat['param'] = vsprintf(_ngettext('(%d feed)', '(%d feeds)', (int) $num_children), $num_children);
if ($num_children > 0 || $show_empty_cats)
array_push($items, $cat);
@@ -211,7 +211,7 @@ class Pref_Feeds extends Handler_Protected {
$cat['items'] = $this->get_category_items($line['id']);
$num_children = $this->calculate_children_count($cat);
- $cat['param'] = vsprintf(_ngettext('(%d feed)', '(%d feeds)', $num_children), $num_children);
+ $cat['param'] = vsprintf(_ngettext('(%d feed)', '(%d feeds)', (int) $num_children), $num_children);
if ($num_children > 0 || $show_empty_cats)
array_push($root['items'], $cat);
@@ -261,7 +261,7 @@ class Pref_Feeds extends Handler_Protected {
array_push($root['items'], $cat);
$num_children = $this->calculate_children_count($root);
- $root['param'] = vsprintf(_ngettext('(%d feed)', '(%d feeds)', $num_children), $num_children);
+ $root['param'] = vsprintf(_ngettext('(%d feed)', '(%d feeds)', (int) $num_children), $num_children);
} else {
$feed_result = $this->dbh->query("SELECT id, title, last_error,
diff --git a/classes/pref/filters.php b/classes/pref/filters.php
index 95f82765f..b7c286ecf 100755
--- a/classes/pref/filters.php
+++ b/classes/pref/filters.php
@@ -1096,7 +1096,7 @@ class Pref_Filters extends Handler_Protected {
if (!$title) $title = __("[No caption]");
- $title = sprintf(_ngettext("%s (%d rule)", "%s (%d rules)", $num_rules), $title, $num_rules);
+ $title = sprintf(_ngettext("%s (%d rule)", "%s (%d rules)", (int) $num_rules), $title, $num_rules);
$result = $this->dbh->query(
@@ -1114,7 +1114,7 @@ class Pref_Filters extends Handler_Protected {
if ($match_any_rule) $title .= " (" . __("matches any rule") . ")";
if ($num_actions > 0)
- $actions = sprintf(_ngettext("%s (+%d action)", "%s (+%d actions)", $num_actions), $actions, $num_actions);
+ $actions = sprintf(_ngettext("%s (+%d action)", "%s (+%d actions)", (int) $num_actions), $actions, $num_actions);
return array($title, $actions);
}
diff --git a/include/feedbrowser.php b/include/feedbrowser.php
index 800bcd970..4772420ab 100644
--- a/include/feedbrowser.php
+++ b/include/feedbrowser.php
@@ -81,7 +81,7 @@
$class = ($feedctr % 2) ? "even" : "odd";
if ($line['articles_archived'] > 0) {
- $archived = sprintf(_ngettext("%d archived article", "%d archived articles", $line['articles_archived']), $line['articles_archived']);
+ $archived = sprintf(_ngettext("%d archived article", "%d archived articles", (int) $line['articles_archived']), $line['articles_archived']);
$archived = "&nbsp;<span class='subscribers'>($archived)</span>";
} else {
$archived = '';
diff --git a/include/functions2.php b/include/functions2.php
index 4535e6267..28477a0cf 100644
--- a/include/functions2.php
+++ b/include/functions2.php
@@ -1316,7 +1316,7 @@
$line = $p->hook_render_article($line);
}
- $num_comments = $line["num_comments"];
+ $num_comments = (int) $line["num_comments"];
$entry_comments = "";
if ($num_comments > 0) {
diff --git a/js/feedlist.js b/js/feedlist.js
index c98cfaab5..e66a0c1b6 100644
--- a/js/feedlist.js
+++ b/js/feedlist.js
@@ -198,7 +198,7 @@ function feedlist_init() {
loading_set_progress(50);
document.onkeydown = hotkey_handler;
- setTimeout("hotkey_prefix_timeout()", 5*1000);
+ setTimeout(hotkey_prefix_timeout, 5*1000);
if (!getActiveFeedId()) {
viewfeed({feed: -3});
diff --git a/js/functions.js b/js/functions.js
index 384382554..63ff4121b 100755
--- a/js/functions.js
+++ b/js/functions.js
@@ -668,7 +668,7 @@ function hotkey_prefix_timeout() {
Element.hide('cmdline');
}
- setTimeout("hotkey_prefix_timeout()", 1000);
+ setTimeout(hotkey_prefix_timeout, 1000);
} catch (e) {
exception_error("hotkey_prefix_timeout", e);
@@ -1325,7 +1325,7 @@ function unsubscribeFeed(feed_id, title) {
updateFeedList();
} else {
if (feed_id == getActiveFeedId())
- setTimeout("viewfeed({feed:-5})", 100);
+ setTimeout(function() { viewfeed({feed:-5}) }, 100);
if (feed_id < 0) updateFeedList();
}
diff --git a/js/prefs.js b/js/prefs.js
index 69e779d45..23d43f366 100755
--- a/js/prefs.js
+++ b/js/prefs.js
@@ -901,10 +901,10 @@ function init_second_stage() {
if (method == 'editFeed') {
var param = getURLParam('methodparam');
- window.setTimeout('editFeed(' + param + ')', 100);
+ window.setTimeout(function() { editFeed(param) }, 100);
}
- setTimeout("hotkey_prefix_timeout()", 5*1000);
+ setTimeout(hotkey_prefix_timeout, 5*1000);
} catch (e) {
exception_error("init_second_stage", e);
diff --git a/js/tt-rss.js b/js/tt-rss.js
index 26982608e..20e0fc5a9 100644
--- a/js/tt-rss.js
+++ b/js/tt-rss.js
@@ -159,7 +159,7 @@ function viewCurrentFeed(method) {
function timeout() {
if (getInitParam("bw_limit") != "1") {
request_counters();
- setTimeout("timeout()", 60*1000);
+ setTimeout(timeout, 60*1000);
}
}
@@ -654,7 +654,7 @@ function init_second_stage() {
if (getInitParam("simple_update")) {
console.log("scheduling simple feed updater...");
- window.setTimeout("update_random_feed()", 30*1000);
+ window.setTimeout(update_random_feed, 30*1000);
}
} catch (e) {
@@ -1130,7 +1130,7 @@ function update_random_feed() {
parameters: "op=rpc&method=updateRandomFeed",
onComplete: function(transport) {
handle_rpc_json(transport, true);
- window.setTimeout("update_random_feed()", 30*1000);
+ window.setTimeout(update_random_feed, 30*1000);
} });
} catch (e) {
diff --git a/js/viewfeed.js b/js/viewfeed.js
index feb397157..007728a10 100755
--- a/js/viewfeed.js
+++ b/js/viewfeed.js
@@ -2315,7 +2315,7 @@ function updateFloatingTitle(unread_only) {
function catchupCurrentBatchIfNeeded() {
if (catchup_id_batch.length > 0) {
window.clearTimeout(catchup_timeout_id);
- catchup_timeout_id = window.setTimeout('catchupBatchedArticles()', 1000);
+ catchup_timeout_id = window.setTimeout(catchupBatchedArticles, 1000);
if (catchup_id_batch.length >= 10) {
catchupBatchedArticles();