From 4f06b17e005456515768f46b3cc3130428f579bf Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 3 Dec 2017 17:30:02 +0100 Subject: Extension function to override entry hash (#1707) Extension function to override entry hash https://github.com/FreshRSS/FreshRSS/issues/1706 --- app/Models/Entry.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/Models/Entry.php') diff --git a/app/Models/Entry.php b/app/Models/Entry.php index df3d59bea..0ad3781e5 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -97,6 +97,14 @@ class FreshRSS_Entry extends Minz_Model { return $this->hash; } + public function _hash($value) { + $value = trim($value); + if (ctype_xdigit($value)) { + $this->hash = substr($value, 0, 32); + } + return $this->hash; + } + public function _id($value) { $this->id = $value; } -- cgit v1.2.3