aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-10-14 13:22:58 +0200
committerArthurHoaro <arthur@hoa.ro>2016-10-14 13:22:58 +0200
commit7fde6de1212323418401c15efba06026c704ca87 (patch)
tree63b7efe598d1c563eee939fe9be3505afff1d873 /index.php
parentf63632a6fb84594b8aeacb387a5cd17b4a841d2c (diff)
downloadShaarli-7fde6de1212323418401c15efba06026c704ca87.tar.gz
Shaarli-7fde6de1212323418401c15efba06026c704ca87.tar.zst
Shaarli-7fde6de1212323418401c15efba06026c704ca87.zip
New init function for plugins, supports errors reporting
All plugins can optionally add an init function named `pluginname_init()` which is called when the plugin is loaded. This function is aware of the config, and can return initialization errors, which are displayed in the header template. Note that the previous error system hack no longer work.
Diffstat (limited to 'index.php')
-rw-r--r--index.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/index.php b/index.php
index 5bc13d49..f7e73bde 100644
--- a/index.php
+++ b/index.php
@@ -778,6 +778,7 @@ function renderPage($conf, $pluginManager)
778 $PAGE = new PageBuilder($conf); 778 $PAGE = new PageBuilder($conf);
779 $PAGE->assign('linkcount', count($LINKSDB)); 779 $PAGE->assign('linkcount', count($LINKSDB));
780 $PAGE->assign('privateLinkcount', count_private($LINKSDB)); 780 $PAGE->assign('privateLinkcount', count_private($LINKSDB));
781 $PAGE->assign('plugin_errors', $pluginManager->getErrors());
781 782
782 // Determine which page will be rendered. 783 // Determine which page will be rendered.
783 $query = (isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : ''; 784 $query = (isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : '';