summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2014-08-18 21:55:48 +0400
committerAndrew Dolgov <[email protected]>2014-08-18 21:55:48 +0400
commitaf244f927e3464c595fd53021f315dd0c4c31ec0 (patch)
tree1d720be118f949f3b36fcdd604692f27a6fbf9a9 /include
parent129d62635430167fbdf837420ca952ccbef7a331 (diff)
tweak article hash function
Diffstat (limited to 'include')
-rw-r--r--include/rssfuncs.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/rssfuncs.php b/include/rssfuncs.php
index 776ad54ca..754b4f4cc 100644
--- a/include/rssfuncs.php
+++ b/include/rssfuncs.php
@@ -5,8 +5,15 @@
define_default('_MIN_CACHE_IMAGE_SIZE', 1024);
function calculate_article_hash($article) {
- $ph = PluginHost::getInstance();
- return sha1(implode(":", $ph->get_plugin_names()) . serialize($article));
+ $tmp = "";
+
+ foreach ($article as $k => $v) {
+ if ($k != "feed" && isset($v)) {
+ $tmp .= sha1("$k:" . (is_array($v) ? implode(",", $v) : $v));
+ }
+ }
+
+ return sha1(implode(",", PluginHost::getInstance()->get_plugin_names())) . ":" . sha1($tmp);
}
function update_feedbrowser_cache() {