From 72884813e13596d211471482ffdc6d723ed678c9 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Tue, 30 Sep 2025 16:59:41 -0400 Subject: Add hook enums (#8036) - add an enum to handle hook types (enum are available since PHP 8.1) - change hook calls from string value to enum value --- app/Models/Entry.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/Models/Entry.php') diff --git a/app/Models/Entry.php b/app/Models/Entry.php index 7254dd513..0769762f8 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -818,12 +818,12 @@ HTML; if (!$this->isRead()) { if ($feed->attributeBoolean('read_upon_reception') ?? FreshRSS_Context::userConf()->mark_when['reception']) { $this->_isRead(true); - Minz_ExtensionManager::callHook('entry_auto_read', $this, 'upon_reception'); + Minz_ExtensionManager::callHook(Minz_HookType::EntryAutoRead, $this, 'upon_reception'); } if (!empty($titlesAsRead[$this->title()])) { Minz_Log::debug('Mark title as read: ' . $this->title()); $this->_isRead(true); - Minz_ExtensionManager::callHook('entry_auto_read', $this, 'same_title_in_feed'); + Minz_ExtensionManager::callHook(Minz_HookType::EntryAutoRead, $this, 'same_title_in_feed'); } } FreshRSS_Context::userConf()->applyFilterActions($this); -- cgit v1.2.3