]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Bugfix: do not store plugin errors in data.php 385/head
authorArthurHoaro <arthur@hoa.ro>
Sun, 22 Nov 2015 13:45:09 +0000 (14:45 +0100)
committerArthurHoaro <arthur@hoa.ro>
Sun, 22 Nov 2015 13:45:09 +0000 (14:45 +0100)
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
plugins/readityourself/readityourself.php
plugins/wallabag/wallabag.php

index 872acf098e9ec9f0b9e5ba9a4ffa0d980cdb50d5..7bcd0d15377658051835193365df7e1f6d904b8c 100644 (file)
--- a/index.php
+++ b/index.php
@@ -679,8 +679,8 @@ class pageBuilder
             $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']);
         }
     }
 
index 68efc543cd3b6643ebcce4ab11908f871c572b92..1b030bc84a2aa7039d416ed583f9f2e00a1a379f 100644 (file)
@@ -14,7 +14,7 @@ if (is_file(PluginManager::$PLUGINS_PATH . '/readityourself/config.php')) {
 }
 
 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.';
 }
index 024a3d2bd1f5adee9fe6d8d7dc7fba23e58d05cf..37969c976d780e71cb5b78c508d060d98476a356 100644 (file)
@@ -10,7 +10,7 @@ if (is_file(PluginManager::$PLUGINS_PATH . '/wallabag/config.php')) {
 }
 
 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.';
 }