aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Entry.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Models/Entry.php')
-rw-r--r--app/Models/Entry.php8
1 files changed, 8 insertions, 0 deletions
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;
}