calculate_article_hash: ignore some useless or read-only fields (i.e. GUID) when calculating hash
This commit is contained in:
parent
25c8467753
commit
3a142cbf58
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue