mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-07-19 11:33:11 -04:00
Extension function to override entry hash (#1707)
Extension function to override entry hash https://github.com/FreshRSS/FreshRSS/issues/1706
This commit is contained in:
committed by
GitHub
parent
ac73ba3acc
commit
4f06b17e00
@@ -22,6 +22,8 @@
|
||||
* Perform `VACUUM` on SQLite and PostgreSQL databases when optimisation is requested [#918](https://github.com/FreshRSS/FreshRSS/issues/918)
|
||||
* I18n
|
||||
* Improved German [#1698](https://github.com/FreshRSS/FreshRSS/pull/1698)
|
||||
* Extensions
|
||||
* New function `$entry->_hash($hex)` for extensios that change the content of entries [#1707](https://github.com/FreshRSS/FreshRSS/pull/1707)
|
||||
* Misc.
|
||||
* Translation validation tool [#1653](https://github.com/FreshRSS/FreshRSS/pull/1653)
|
||||
* Translation manipulation tool [#1658](https://github.com/FreshRSS/FreshRSS/pull/1658)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user