aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/PageBuilder.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 /application/PageBuilder.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 'application/PageBuilder.php')
-rw-r--r--application/PageBuilder.php3
1 files changed, 0 insertions, 3 deletions
diff --git a/application/PageBuilder.php b/application/PageBuilder.php
index 42932f32..32c7f9f1 100644
--- a/application/PageBuilder.php
+++ b/application/PageBuilder.php
@@ -77,9 +77,6 @@ class PageBuilder
77 $this->tpl->assign('openshaarli', $this->conf->get('security.open_shaarli', false)); 77 $this->tpl->assign('openshaarli', $this->conf->get('security.open_shaarli', false));
78 $this->tpl->assign('showatom', $this->conf->get('feed.show_atom', false)); 78 $this->tpl->assign('showatom', $this->conf->get('feed.show_atom', false));
79 $this->tpl->assign('hide_timestamps', $this->conf->get('privacy.hide_timestamps', false)); 79 $this->tpl->assign('hide_timestamps', $this->conf->get('privacy.hide_timestamps', false));
80 if (!empty($GLOBALS['plugin_errors'])) {
81 $this->tpl->assign('plugin_errors', $GLOBALS['plugin_errors']);
82 }
83 $this->tpl->assign('token', getToken($this->conf)); 80 $this->tpl->assign('token', getToken($this->conf));
84 // To be removed with a proper theme configuration. 81 // To be removed with a proper theme configuration.
85 $this->tpl->assign('conf', $this->conf); 82 $this->tpl->assign('conf', $this->conf);