summaryrefslogtreecommitdiff
path: root/classes/feeds.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2015-12-05 04:04:44 +0300
committerAndrew Dolgov <[email protected]>2015-12-05 04:04:44 +0300
commitf61f2a2699b01eaf80eb3dbe4ba21c496364498b (patch)
tree9bcd365fd17306211fcaa76110e6c8ccbe496194 /classes/feeds.php
parent24e6ff5d1c29654fad74666a6d1bd061cf15cd30 (diff)
format_headlines_list: fix pg_num_rows() called incorrectly when firstid check failed
Diffstat (limited to 'classes/feeds.php')
-rwxr-xr-xclasses/feeds.php16
1 files changed, 2 insertions, 14 deletions
diff --git a/classes/feeds.php b/classes/feeds.php
index 7d12275d1..eff66dda6 100755
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -280,19 +280,7 @@ class Feeds extends Handler_Protected {
$feed, $cat_view, $search, $view_mode,
$last_error, $last_updated);
- $headlines_count = $this->dbh->num_rows($result);
-
- /* if (get_pref('COMBINED_DISPLAY_MODE')) {
- $button_plugins = array();
- foreach (explode(",", ARTICLE_BUTTON_PLUGINS) as $p) {
- $pclass = "button_" . trim($p);
-
- if (class_exists($pclass)) {
- $plugin = new $pclass();
- array_push($button_plugins, $plugin);
- }
- }
- } */
+ $headlines_count = is_numeric($result) ? 0 : $this->dbh->num_rows($result);
if ($offset == 0) {
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_HEADLINES_BEFORE) as $p) {
@@ -302,7 +290,7 @@ class Feeds extends Handler_Protected {
$reply['content'] = '';
- if (!is_numeric($result) && $this->dbh->num_rows($result) > 0) {
+ if ($headlines_count > 0) {
$lnum = $offset;