From 1a8ac737e52cb25a5c346232ee398f5908cee7d7 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Mon, 6 Jul 2020 08:04:35 +0200 Subject: Process main page (linklist) through Slim controller Including a bunch of improvements on the container, and helper used across new controllers. --- plugins/demo_plugin/demo_plugin.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/demo_plugin') diff --git a/plugins/demo_plugin/demo_plugin.php b/plugins/demo_plugin/demo_plugin.php index 8ae1b479..dd73d6a2 100644 --- a/plugins/demo_plugin/demo_plugin.php +++ b/plugins/demo_plugin/demo_plugin.php @@ -16,7 +16,7 @@ use Shaarli\Config\ConfigManager; use Shaarli\Plugin\PluginManager; -use Shaarli\Router; +use Shaarli\Render\TemplatePage; /** * In the footer hook, there is a working example of a translation extension for Shaarli. @@ -74,7 +74,7 @@ function demo_plugin_init($conf) function hook_demo_plugin_render_header($data) { // Only execute when linklist is rendered. - if ($data['_PAGE_'] == Router::$PAGE_LINKLIST) { + if ($data['_PAGE_'] == TemplatePage::LINKLIST) { // If loggedin if ($data['_LOGGEDIN_'] === true) { /* @@ -441,9 +441,9 @@ function hook_demo_plugin_delete_link($data) function hook_demo_plugin_render_feed($data) { foreach ($data['links'] as &$link) { - if ($data['_PAGE_'] == Router::$PAGE_FEED_ATOM) { + if ($data['_PAGE_'] == TemplatePage::FEED_ATOM) { $link['description'] .= ' - ATOM Feed' ; - } elseif ($data['_PAGE_'] == Router::$PAGE_FEED_RSS) { + } elseif ($data['_PAGE_'] == TemplatePage::FEED_RSS) { $link['description'] .= ' - RSS Feed'; } } -- cgit v1.2.3