aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <aledeg@users.noreply.github.com> 2025-09-30 16:59:41 -0400
committerGravatar GitHub <noreply@github.com> 2025-09-30 22:59:41 +0200
commit72884813e13596d211471482ffdc6d723ed678c9 (patch)
tree043856f23bdcae7f9f88294c47c499657c2d05ff /app
parentbf6e634e042b726edd97335ac36b2305f8101b3f (diff)
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
Diffstat (limited to 'app')
-rw-r--r--app/Controllers/feedController.php18
-rw-r--r--app/Controllers/importExportController.php8
-rw-r--r--app/Controllers/javascriptController.php2
-rw-r--r--app/Controllers/updateController.php2
-rw-r--r--app/FreshRSS.php2
-rw-r--r--app/Models/Entry.php4
-rw-r--r--app/Models/EntryDAO.php2
-rw-r--r--app/Models/Feed.php6
-rw-r--r--app/Models/FilterActionsTrait.php2
-rw-r--r--app/Models/ViewMode.php2
-rw-r--r--app/Services/ImportService.php2
-rwxr-xr-xapp/actualize_script.php2
-rw-r--r--app/layout/aside_configure.phtml4
-rw-r--r--app/layout/header.phtml6
-rw-r--r--app/layout/nav_menu.phtml4
-rw-r--r--app/views/auth/formLogin.phtml2
-rw-r--r--app/views/auth/register.phtml2
-rw-r--r--app/views/helpers/export/articles.phtml2
-rw-r--r--app/views/helpers/feed/update.phtml2
-rw-r--r--app/views/helpers/javascript_vars.phtml2
-rw-r--r--app/views/index/normal.phtml2
-rw-r--r--app/views/index/reader.phtml2
-rw-r--r--app/views/index/rss.phtml2
23 files changed, 41 insertions, 41 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index 0b8c63bbe..fe190dc77 100644
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -55,7 +55,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
$url = trim($url);
/** @var string|null $urlHooked */
- $urlHooked = Minz_ExtensionManager::callHook('check_url_before_add', $url);
+ $urlHooked = Minz_ExtensionManager::callHook(Minz_HookType::CheckUrlBeforeAdd, $url);
if ($urlHooked === null) {
throw new FreshRSS_FeedNotAdded_Exception($url);
}
@@ -106,7 +106,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
}
/** @var FreshRSS_Feed|null $feed */
- $feed = Minz_ExtensionManager::callHook('feed_before_insert', $feed);
+ $feed = Minz_ExtensionManager::callHook(Minz_HookType::FeedBeforeInsert, $feed);
if ($feed === null) {
throw new FreshRSS_FeedNotAdded_Exception($url);
}
@@ -465,7 +465,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
$categoriesEntriesTitle = [];
foreach ($feeds as $feed) {
- $feed = Minz_ExtensionManager::callHook('feed_before_actualize', $feed);
+ $feed = Minz_ExtensionManager::callHook(Minz_HookType::FeedBeforeActualize, $feed);
if (!($feed instanceof FreshRSS_Feed)) {
continue;
}
@@ -616,10 +616,10 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
$entry->_isFavorite(null); // Do not change favourite state
$entry->_isRead($mark_updated_article_unread ? false : null); //Change is_read according to policy.
if ($mark_updated_article_unread) {
- Minz_ExtensionManager::callHook('entry_auto_unread', $entry, 'updated_article');
+ Minz_ExtensionManager::callHook(Minz_HookType::EntryAutoUnread, $entry, 'updated_article');
}
- $entry = Minz_ExtensionManager::callHook('entry_before_insert', $entry);
+ $entry = Minz_ExtensionManager::callHook(Minz_HookType::EntryBeforeInsert, $entry);
if (!($entry instanceof FreshRSS_Entry)) {
// An extension has returned a null value, there is nothing to insert.
continue;
@@ -642,7 +642,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
// If the entry has changed, there is a good chance for the full content to have changed as well.
$entry->loadCompleteContent(true);
- $entry = Minz_ExtensionManager::callHook('entry_before_update', $entry);
+ $entry = Minz_ExtensionManager::callHook(Minz_HookType::EntryBeforeUpdate, $entry);
if (!($entry instanceof FreshRSS_Entry)) {
// An extension has returned a null value, there is nothing to insert.
continue;
@@ -655,7 +655,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
$id = uTimeString();
$entry->_id($id);
- $entry = Minz_ExtensionManager::callHook('entry_before_insert', $entry);
+ $entry = Minz_ExtensionManager::callHook(Minz_HookType::EntryBeforeInsert, $entry);
if (!($entry instanceof FreshRSS_Entry)) {
// An extension has returned a null value, there is nothing to insert.
continue;
@@ -681,7 +681,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
$feed->pubSubHubbubError(true);
}
- $entry = Minz_ExtensionManager::callHook('entry_before_add', $entry);
+ $entry = Minz_ExtensionManager::callHook(Minz_HookType::EntryBeforeAdd, $entry);
if (!($entry instanceof FreshRSS_Entry)) {
// An extension has returned a null value, there is nothing to insert.
continue;
@@ -911,7 +911,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
// Case of a batch refresh (e.g. cron)
$databaseDAO = FreshRSS_Factory::createDatabaseDAO();
$databaseDAO->minorDbMaintenance();
- Minz_ExtensionManager::callHookVoid('freshrss_user_maintenance');
+ Minz_ExtensionManager::callHookVoid(Minz_HookType::FreshrssUserMaintenance);
FreshRSS_feed_Controller::commitNewEntries();
$feedDAO = FreshRSS_Factory::createFeedDao();
diff --git a/app/Controllers/importExportController.php b/app/Controllers/importExportController.php
index 9f9f6b2bd..8e03299f9 100644
--- a/app/Controllers/importExportController.php
+++ b/app/Controllers/importExportController.php
@@ -478,14 +478,14 @@ class FreshRSS_importExport_Controller extends FreshRSS_ActionController {
}
$newGuids[$entry->guid()] = true;
- $entry = Minz_ExtensionManager::callHook('entry_before_insert', $entry);
+ $entry = Minz_ExtensionManager::callHook(Minz_HookType::EntryBeforeInsert, $entry);
if (!($entry instanceof FreshRSS_Entry)) {
// An extension has returned a null value, there is nothing to insert.
continue;
}
if (isset($existingHashForGuids['f_' . $feed_id][$entry->guid()])) {
- $entry = Minz_ExtensionManager::callHook('entry_before_update', $entry);
+ $entry = Minz_ExtensionManager::callHook(Minz_HookType::EntryBeforeUpdate, $entry);
if (!($entry instanceof FreshRSS_Entry)) {
// An extension has returned a null value, there is nothing to insert.
continue;
@@ -495,7 +495,7 @@ class FreshRSS_importExport_Controller extends FreshRSS_ActionController {
} else {
$entry->_lastSeen(time());
- $entry = Minz_ExtensionManager::callHook('entry_before_add', $entry);
+ $entry = Minz_ExtensionManager::callHook(Minz_HookType::EntryBeforeAdd, $entry);
if (!($entry instanceof FreshRSS_Entry)) {
// An extension has returned a null value, there is nothing to insert.
continue;
@@ -581,7 +581,7 @@ class FreshRSS_importExport_Controller extends FreshRSS_ActionController {
}
// Call the extension hook
- $feed = Minz_ExtensionManager::callHook('feed_before_insert', $feed);
+ $feed = Minz_ExtensionManager::callHook(Minz_HookType::FeedBeforeInsert, $feed);
if ($feed instanceof FreshRSS_Feed) {
// addFeedObject checks if feed is already in DB so nothing else to
// check here.
diff --git a/app/Controllers/javascriptController.php b/app/Controllers/javascriptController.php
index 5fd925f72..1370c00c7 100644
--- a/app/Controllers/javascriptController.php
+++ b/app/Controllers/javascriptController.php
@@ -32,7 +32,7 @@ class FreshRSS_javascript_Controller extends FreshRSS_ActionController {
$databaseDAO = FreshRSS_Factory::createDatabaseDAO();
$databaseDAO->minorDbMaintenance();
- Minz_ExtensionManager::callHookVoid('freshrss_user_maintenance');
+ Minz_ExtensionManager::callHookVoid(Minz_HookType::FreshrssUserMaintenance);
$catDAO = FreshRSS_Factory::createCategoryDao();
$this->view->categories = $catDAO->listCategoriesOrderUpdate(FreshRSS_Context::userConf()->dynamic_opml_ttl_default);
diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php
index bec639b39..bd140b6d5 100644
--- a/app/Controllers/updateController.php
+++ b/app/Controllers/updateController.php
@@ -283,7 +283,7 @@ class FreshRSS_update_Controller extends FreshRSS_ActionController {
$res = do_post_update();
}
- Minz_ExtensionManager::callHookVoid('post_update');
+ Minz_ExtensionManager::callHookVoid(Minz_HookType::PostUpdate);
if ($res === true) {
@unlink(UPDATE_FILENAME);
diff --git a/app/FreshRSS.php b/app/FreshRSS.php
index cac803329..0d433dc2b 100644
--- a/app/FreshRSS.php
+++ b/app/FreshRSS.php
@@ -66,7 +66,7 @@ class FreshRSS extends Minz_FrontController {
self::checkEmailValidated();
}
- Minz_ExtensionManager::callHookVoid('freshrss_init');
+ Minz_ExtensionManager::callHookVoid(Minz_HookType::FreshrssInit);
}
private static function initAuth(): void {
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);
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php
index ad1cc4393..f236cd3f3 100644
--- a/app/Models/EntryDAO.php
+++ b/app/Models/EntryDAO.php
@@ -387,7 +387,7 @@ SQL;
$values = array_merge($values, $ids);
$stm = $this->pdo->prepare($sql);
if ($stm !== false && $stm->execute($values)) {
- Minz_ExtensionManager::callHook('entries_favorite', $ids, $is_favorite);
+ Minz_ExtensionManager::callHook(Minz_HookType::EntriesFavorite, $ids, $is_favorite);
return $stm->rowCount();
} else {
$info = $stm === false ? $this->pdo->errorInfo() : $stm->errorInfo();
diff --git a/app/Models/Feed.php b/app/Models/Feed.php
index 2b29f7b22..112da1a00 100644
--- a/app/Models/Feed.php
+++ b/app/Models/Feed.php
@@ -255,7 +255,7 @@ class FreshRSS_Feed extends Minz_Model {
$params = '';
if ($this->customFavicon()) {
$current = $this->id . Minz_User::name();
- $hookParams = Minz_ExtensionManager::callHook('custom_favicon_hash', $this);
+ $hookParams = Minz_ExtensionManager::callHook(Minz_HookType::CustomFaviconHash, $this);
$params = $hookParams !== null ? $hookParams : $current;
} else {
$params = $this->website(fallback: true) . $this->proxyParam();
@@ -579,9 +579,9 @@ class FreshRSS_Feed extends Minz_Model {
// Do not use `$simplePie->enable_cache(false);` as it would prevent caching in multiuser context
$this->clearCache();
}
- Minz_ExtensionManager::callHook('simplepie_before_init', $simplePie, $this);
+ Minz_ExtensionManager::callHook(Minz_HookType::SimplepieBeforeInit, $simplePie, $this);
$simplePieResult = $simplePie->init();
- Minz_ExtensionManager::callHook('simplepie_after_init', $simplePie, $this, $simplePieResult);
+ Minz_ExtensionManager::callHook(Minz_HookType::SimplepieAfterInit, $simplePie, $this, $simplePieResult);
if ($simplePieResult === false || $simplePie->get_hash() === '' || !empty($simplePie->error())) {
if ($simplePie->status_code() === 429) {
diff --git a/app/Models/FilterActionsTrait.php b/app/Models/FilterActionsTrait.php
index 3d8257e34..36b3682d8 100644
--- a/app/Models/FilterActionsTrait.php
+++ b/app/Models/FilterActionsTrait.php
@@ -132,7 +132,7 @@ trait FreshRSS_FilterActionsTrait {
case 'read':
if (!$entry->isRead()) {
$entry->_isRead(true);
- Minz_ExtensionManager::callHook('entry_auto_read', $entry, 'filter');
+ Minz_ExtensionManager::callHook(Minz_HookType::EntryAutoRead, $entry, 'filter');
}
break;
case 'star':
diff --git a/app/Models/ViewMode.php b/app/Models/ViewMode.php
index 54379b130..fde073097 100644
--- a/app/Models/ViewMode.php
+++ b/app/Models/ViewMode.php
@@ -51,7 +51,7 @@ final class FreshRSS_ViewMode {
$modes = self::getDefaultModes();
// Allow extensions to add their own view modes
- $extensionModes = Minz_ExtensionManager::callHook('view_modes', []);
+ $extensionModes = Minz_ExtensionManager::callHook(Minz_HookType::ViewModes, []);
if (is_array($extensionModes)) {
foreach ($extensionModes as $mode) {
if ($mode instanceof FreshRSS_ViewMode) {
diff --git a/app/Services/ImportService.php b/app/Services/ImportService.php
index e7af7589d..b567544b3 100644
--- a/app/Services/ImportService.php
+++ b/app/Services/ImportService.php
@@ -311,7 +311,7 @@ class FreshRSS_Import_Service {
// Call the extension hook
/** @var FreshRSS_Feed|null */
- $feed = Minz_ExtensionManager::callHook('feed_before_insert', $feed);
+ $feed = Minz_ExtensionManager::callHook(Minz_HookType::FeedBeforeInsert, $feed);
if ($dry_run) {
if ($feed !== null) {
diff --git a/app/actualize_script.php b/app/actualize_script.php
index 2be2a117a..e64d0b707 100755
--- a/app/actualize_script.php
+++ b/app/actualize_script.php
@@ -96,7 +96,7 @@ foreach ($users as $user) {
// NB: Extensions and hooks are reinitialised there
$app->init();
- Minz_ExtensionManager::addHook('feed_before_actualize', static function (FreshRSS_Feed $feed) use ($mutexFile) {
+ Minz_ExtensionManager::addHook(Minz_HookType::FeedBeforeActualize, static function (FreshRSS_Feed $feed) use ($mutexFile) {
touch($mutexFile);
return $feed;
});
diff --git a/app/layout/aside_configure.phtml b/app/layout/aside_configure.phtml
index 7413f002d..6ebf232e2 100644
--- a/app/layout/aside_configure.phtml
+++ b/app/layout/aside_configure.phtml
@@ -60,7 +60,7 @@
<a href="<?= _url('index', 'logs') ?>"><?= _t('gen.menu.logs') ?></a>
</li>
<?php } ?>
- <?= Minz_ExtensionManager::callHookString('menu_configuration_entry') ?>
+ <?= Minz_ExtensionManager::callHookString(Minz_HookType::MenuConfigurationEntry) ?>
</ul>
</li>
@@ -88,7 +88,7 @@
<li class="item<?= Minz_Request::actionName() === 'logs' ? ' active' : '' ?>">
<a href="<?= _url('index', 'logs') ?>"><?= _t('gen.menu.logs') ?></a>
</li>
- <?= Minz_ExtensionManager::callHookString('menu_admin_entry') ?>
+ <?= Minz_ExtensionManager::callHookString(Minz_HookType::MenuAdminEntry) ?>
</ul>
</li>
<?php } ?>
diff --git a/app/layout/header.phtml b/app/layout/header.phtml
index 1e4290f98..e92b3c2ef 100644
--- a/app/layout/header.phtml
+++ b/app/layout/header.phtml
@@ -87,7 +87,7 @@
<li class="item"><a href="<?= _url('configure', 'queries') ?>"><?= _t('gen.menu.queries') ?></a></li>
<li class="item"><a href="<?= _url('extension', 'index') ?>"><?= _t('gen.menu.extensions') ?></a></li>
<li class="item"><a href="<?= _url('configure', 'privacy') ?>"><?= _t('gen.menu.privacy') ?></a></li>
- <?= Minz_ExtensionManager::callHookString('menu_configuration_entry') ?>
+ <?= Minz_ExtensionManager::callHookString(Minz_HookType::MenuConfigurationEntry) ?>
</ul>
</li>
<?php if (FreshRSS_Auth::hasAccess('admin')) { ?>
@@ -103,7 +103,7 @@
<?php if (!FreshRSS_Context::systemConf()->disable_update) { ?>
<li class="item"><a href="<?= _url('update', 'index') ?>"><?= _t('gen.menu.update') ?></a></li>
<?php } ?>
- <?= Minz_ExtensionManager::callHookString('menu_admin_entry') ?>
+ <?= Minz_ExtensionManager::callHookString(Minz_HookType::MenuAdminEntry) ?>
</ul>
</li>
<?php } ?>
@@ -117,7 +117,7 @@
<a href="<?= _url('index', 'tos') ?>"><?= _t('index.tos.title')?></a>
</li>
<?php } ?>
- <?= Minz_ExtensionManager::callHookString('menu_other_entry') ?>
+ <?= Minz_ExtensionManager::callHookString(Minz_HookType::MenuOtherEntry) ?>
</ul>
</li>
</ul>
diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml
index 2f09465aa..d477bff37 100644
--- a/app/layout/nav_menu.phtml
+++ b/app/layout/nav_menu.phtml
@@ -190,7 +190,7 @@
<div id="nav_menu_views" class="group">
<?php
$readingModes = FreshRSS_ReadingMode::getReadingModes();
- $readingModes = Minz_ExtensionManager::callHook('nav_reading_modes', $readingModes);
+ $readingModes = Minz_ExtensionManager::callHook(Minz_HookType::NavReadingModes, $readingModes);
if (!is_iterable($readingModes)) {
$readingModes = FreshRSS_ReadingMode::getReadingModes();
}
@@ -207,7 +207,7 @@
?>
</div>
- <?php $nav_menu_hooks = Minz_ExtensionManager::callHookString('nav_menu'); ?>
+ <?php $nav_menu_hooks = Minz_ExtensionManager::callHookString(Minz_HookType::NavMenu); ?>
<?php if ($nav_menu_hooks != '') { ?>
<div id="nav_menu_hooks" class="group">
<?= $nav_menu_hooks ?>
diff --git a/app/views/auth/formLogin.phtml b/app/views/auth/formLogin.phtml
index 23fceeb88..24427193d 100644
--- a/app/views/auth/formLogin.phtml
+++ b/app/views/auth/formLogin.phtml
@@ -38,7 +38,7 @@
</label>
</div>
- <?= Minz_ExtensionManager::callHookString('before_login_btn') ?>
+ <?= Minz_ExtensionManager::callHookString(Minz_HookType::BeforeLoginBtn) ?>
<div class="form-group form-group-actions">
<button id="loginButton" type="submit" class="btn btn-important" disabled="disabled">
diff --git a/app/views/auth/register.phtml b/app/views/auth/register.phtml
index 5787b36fc..9e1728dc7 100644
--- a/app/views/auth/register.phtml
+++ b/app/views/auth/register.phtml
@@ -66,7 +66,7 @@
</div>
<?php } ?>
- <?= Minz_ExtensionManager::callHookString('before_login_btn') ?>
+ <?= Minz_ExtensionManager::callHookString(Minz_HookType::BeforeLoginBtn) ?>
<div class="form-group form-group-actions">
<?php
diff --git a/app/views/helpers/export/articles.phtml b/app/views/helpers/export/articles.phtml
index 75ff5db84..f7d2022c9 100644
--- a/app/views/helpers/export/articles.phtml
+++ b/app/views/helpers/export/articles.phtml
@@ -22,7 +22,7 @@ if (empty($this->entryIdsTagNames)) {
foreach ($this->entries as $entry) {
if (!$this->internal_rendering) {
/** @var FreshRSS_Entry|null $entry */
- $entry = Minz_ExtensionManager::callHook('entry_before_display', $entry);
+ $entry = Minz_ExtensionManager::callHook(Minz_HookType::EntryBeforeDisplay, $entry);
}
if ($entry === null) {
continue;
diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml
index 0666a7130..c5dae8460 100644
--- a/app/views/helpers/feed/update.phtml
+++ b/app/views/helpers/feed/update.phtml
@@ -50,7 +50,7 @@
$originalIconUrl = $this->feed->favicon();
$this->feed->_attribute('customFavicon', $currentIconUrl !== $originalIconUrl);
$this->feed->resetFaviconHash();
- $ext_url = Minz_ExtensionManager::callHook('custom_favicon_btn_url', $this->feed);
+ $ext_url = Minz_ExtensionManager::callHook(Minz_HookType::CustomFaviconBtnUrl, $this->feed);
?>
<div class="group-name"><?= _t('sub.feed.icon') ?></div>
<div class="group-controls">
diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml
index 2d2d2e364..2cedc20c3 100644
--- a/app/views/helpers/javascript_vars.phtml
+++ b/app/views/helpers/javascript_vars.phtml
@@ -3,7 +3,7 @@ declare(strict_types=1);
/** @var FreshRSS_View $this */
$mark = FreshRSS_Context::userConf()->mark_when;
$s = FreshRSS_Context::userConf()->shortcuts;
-$extData = Minz_ExtensionManager::callHook('js_vars', []);
+$extData = Minz_ExtensionManager::callHook(Minz_HookType::JsVars, []);
echo json_encode([
'context' => [
'anonymous' => !FreshRSS_Auth::hasAccess(),
diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml
index cc800c3fe..1b942ae17 100644
--- a/app/views/index/normal.phtml
+++ b/app/views/index/normal.phtml
@@ -47,7 +47,7 @@ $today = @strtotime('today');
$nbEntries = 0;
foreach ($this->entries as $item):
/** @var FreshRSS_Entry|null $item */
- $item = Minz_ExtensionManager::callHook('entry_before_display', $item);
+ $item = Minz_ExtensionManager::callHook(Minz_HookType::EntryBeforeDisplay, $item);
if ($item === null) {
continue;
}
diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml
index bb957f232..49321f9f5 100644
--- a/app/views/index/reader.phtml
+++ b/app/views/index/reader.phtml
@@ -20,7 +20,7 @@ $useKeepUnreadImportant = !FreshRSS_Context::isImportant() && !FreshRSS_Context:
$nbEntries = 0;
foreach ($this->entries as $entry):
/** @var FreshRSS_Entry|null $entry */
- $entry = Minz_ExtensionManager::callHook('entry_before_display', $entry);
+ $entry = Minz_ExtensionManager::callHook(Minz_HookType::EntryBeforeDisplay, $entry);
if ($entry === null) {
continue;
}
diff --git a/app/views/index/rss.phtml b/app/views/index/rss.phtml
index 7d92bd140..7caf4cb9d 100644
--- a/app/views/index/rss.phtml
+++ b/app/views/index/rss.phtml
@@ -23,7 +23,7 @@
foreach ($this->entries as $item) {
if (!$this->internal_rendering) {
/** @var FreshRSS_Entry|null $item */
- $item = Minz_ExtensionManager::callHook('entry_before_display', $item);
+ $item = Minz_ExtensionManager::callHook(Minz_HookType::EntryBeforeDisplay, $item);
if ($item === null) {
continue;
}