summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xclasses/feeds.php16
-rwxr-xr-xinclude/rssfuncs.php8
2 files changed, 9 insertions, 15 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;
diff --git a/include/rssfuncs.php b/include/rssfuncs.php
index af4762c7f..115d9c9c2 100755
--- a/include/rssfuncs.php
+++ b/include/rssfuncs.php
@@ -9,7 +9,11 @@
foreach ($article as $k => $v) {
if ($k != "feed" && isset($v)) {
- $tmp .= sha1("$k:" . (is_array($v) ? implode(",", $v) : $v));
+ $x = strip_tags(is_array($v) ? implode(",", $v) : $v);
+
+ //_debug("$k:" . sha1($x) . ":" . htmlspecialchars($x), true);
+
+ $tmp .= sha1("$k:" . sha1($x));
}
}
@@ -1043,6 +1047,8 @@
SET score = '$score' WHERE ref_id = '$ref_id'");
if ($mark_unread_on_update) {
+ _debug("article updated, marking unread as requested.", $debug_enabled);
+
db_query("UPDATE ttrss_user_entries
SET last_read = null, unread = true WHERE ref_id = '$ref_id'");
}