display status of message when reading it (deleted, answered, flagged etc)
[squirrelmail.git] / src / configtest.php
index 4375cd72fca654c5656287a27575380616124dbc..ea552cb1f206259634e163cc39925c4b6e9e7011 100644 (file)
@@ -110,6 +110,13 @@ if (file_exists(SM_PATH . 'config/config_local.php')) {
     require(SM_PATH . 'config/config_local.php');
 }
 
+/** Load plugins */
+global $disable_plugins;
+$squirrelmail_plugin_hooks = array();
+if (!$disable_plugins && file_exists(SM_PATH . 'config/plugin_hooks.php')) {
+    require(SM_PATH . 'config/plugin_hooks.php');
+}
+
 /** Warning counter */
 $warnings = 0;
 
@@ -323,15 +330,14 @@ if (isset($plugins[0])) {
     ob_end_clean();
     // if plugins output more than newlines and spacing, stop script execution.
     if (!empty($output)) {
-        $plugin_load_error = 'Some output is produced when plugins are loaded.'
-            .' Usually it means error. Output said: '.htmlspecialchars($output);
+        $plugin_load_error = 'Some output is produced when plugins are loaded. Usually this means there is an error in one of the plugin setup or configuration files. The output was: '.htmlspecialchars($output);
         do_err($plugin_load_error);
     }
     /**
-     * Hook is added in 1.5.2. Plugins should print error message and return true
-     * if there is an error in plugin.
+     * This hook was added in 1.5.2. Each plugins should print an error 
+     * message and return TRUE if there are any errors in its setup/configuration.
      */
-    $plugin_err = boolean_hook_function('configtest');
+    $plugin_err = boolean_hook_function('configtest', $null);
     if($plugin_err) {
         do_err('Some plugin tests failed.');
     } else {