mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-21 15:11:28 +00:00
calculate_article_hash: ignore some useless or read-only fields (i.e. GUID) when calculating hash
This commit is contained in:
@@ -3,7 +3,12 @@ class RSSUtils {
|
|||||||
static function calculate_article_hash($article, $pluginhost) {
|
static function calculate_article_hash($article, $pluginhost) {
|
||||||
$tmp = "";
|
$tmp = "";
|
||||||
|
|
||||||
|
$ignored_fields = [ "feed", "guid", "guid_hashed", "owner_uid", "force_catchup" ];
|
||||||
|
|
||||||
foreach ($article as $k => $v) {
|
foreach ($article as $k => $v) {
|
||||||
|
if (in_array($k, $ignored_fields))
|
||||||
|
continue;
|
||||||
|
|
||||||
if ($k != "feed" && isset($v)) {
|
if ($k != "feed" && isset($v)) {
|
||||||
$x = strip_tags(is_array($v) ? implode(",", $v) : $v);
|
$x = strip_tags(is_array($v) ? implode(",", $v) : $v);
|
||||||
|
|
||||||
@@ -11,6 +16,8 @@ class RSSUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
die;
|
||||||
|
|
||||||
return sha1(implode(",", $pluginhost->get_plugin_names()) . $tmp);
|
return sha1(implode(",", $pluginhost->get_plugin_names()) . $tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user