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-11-05 14:30:13 +0100
commitbaec9c402873a716497b591b9756bf5b2c46ed9b (patch)
tree33ae9c12bdcce378ca08973f553df15a50c00e8c /index.php
parentb3c039b02f9608802d0ba2cf5b5742caa3b9d430 (diff)
downloadShaarli-baec9c402873a716497b591b9756bf5b2c46ed9b.tar.gz
Shaarli-baec9c402873a716497b591b9756bf5b2c46ed9b.tar.zst
Shaarli-baec9c402873a716497b591b9756bf5b2c46ed9b.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'] : '';