From e4b9a7633d5eb325e2ae3a098417d5e1d5609852 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sun, 22 Nov 2015 14:45:09 +0100 Subject: [PATCH] Bugfix: do not store plugin errors in data.php Before this, calling writeConfig() would have write error messages in data.php, because it uses 'plugins' array which is used for plugin configuration. Causing the message error appear everytime. --- index.php | 4 ++-- plugins/readityourself/readityourself.php | 2 +- plugins/wallabag/wallabag.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index 872acf09..7bcd0d15 100644 --- a/index.php +++ b/index.php @@ -679,8 +679,8 @@ private function initialize() $this->tpl->assign('pagetitle', $GLOBALS['pagetitle']); } $this->tpl->assign('shaarlititle', empty($GLOBALS['title']) ? 'Shaarli': $GLOBALS['title']); - if (!empty($GLOBALS['plugins']['errors'])) { - $this->tpl->assign('plugin_errors', $GLOBALS['plugins']['errors']); + if (!empty($GLOBALS['plugin_errors'])) { + $this->tpl->assign('plugin_errors', $GLOBALS['plugin_errors']); } } diff --git a/plugins/readityourself/readityourself.php b/plugins/readityourself/readityourself.php index 68efc543..1b030bc8 100644 --- a/plugins/readityourself/readityourself.php +++ b/plugins/readityourself/readityourself.php @@ -14,7 +14,7 @@ } if (!isset($GLOBALS['plugins']['READITYOUSELF_URL'])) { - $GLOBALS['plugins']['errors'][] = 'Readityourself plugin error: '. + $GLOBALS['plugin_errors'][] = 'Readityourself plugin error: '. 'Please define "$GLOBALS[\'plugins\'][\'READITYOUSELF_URL\']" '. 'in "plugins/readityourself/config.php" or in your Shaarli config.php file.'; } diff --git a/plugins/wallabag/wallabag.php b/plugins/wallabag/wallabag.php index 024a3d2b..37969c97 100644 --- a/plugins/wallabag/wallabag.php +++ b/plugins/wallabag/wallabag.php @@ -10,7 +10,7 @@ } if (!isset($GLOBALS['plugins']['WALLABAG_URL'])) { - $GLOBALS['plugins']['errors'][] = 'Wallabag plugin error: '. + $GLOBALS['plugin_errors'][] = 'Wallabag plugin error: '. 'Please define "$GLOBALS[\'plugins\'][\'WALLABAG_URL\']" '. 'in "plugins/wallabag/config.php" or in your Shaarli config.php file.'; }