mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 15:45:56 +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) {
|
||||
$tmp = "";
|
||||
|
||||
$ignored_fields = [ "feed", "guid", "guid_hashed", "owner_uid", "force_catchup" ];
|
||||
|
||||
foreach ($article as $k => $v) {
|
||||
if (in_array($k, $ignored_fields))
|
||||
continue;
|
||||
|
||||
if ($k != "feed" && isset($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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user