diff options
author | ArthurHoaro <arthur@hoa.ro> | 2016-10-14 13:22:58 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2016-10-14 13:22:58 +0200 |
commit | 7fde6de1212323418401c15efba06026c704ca87 (patch) | |
tree | 63b7efe598d1c563eee939fe9be3505afff1d873 /index.php | |
parent | f63632a6fb84594b8aeacb387a5cd17b4a841d2c (diff) | |
download | Shaarli-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.php | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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'] : ''; |