initialize color array in case it isn't set at this stage.
[squirrelmail.git] / functions / display_messages.php
index 6a279599ed2ba2afa9a9c8284a1565fdf8944e92..90fbca7c76fe4652bdcf8914f819d0c93b48e7ce 100644 (file)
  * @package squirrelmail
  */
 
+/**
+ * including plugin functions
+ */
+require_once(SM_PATH . 'functions/plugin.php');
+
 /**
  * Find out where squirrelmail lives and try to be smart about it.
  * The only problem would be when squirrelmail lives in directories
@@ -122,6 +127,16 @@ function logout_error( $errString, $errTitle = '' ) {
 function error_box($string, $color) {
     global $pageheader_sent;
 
+    if ( !isset( $color ) ) {
+        $color = array();
+        $color[0]  = '#DCDCDC';  /* light gray    TitleBar               */
+        $color[1]  = '#800000';  /* red                                  */
+        $color[2]  = '#CC0000';  /* light red     Warning/Error Messages */
+        $color[4]  = '#FFFFFF';  /* white         Normal Background      */
+        $color[7]  = '#0000CC';  /* blue          Links                  */
+        $color[8]  = '#000000';  /* black         Normal text            */
+    }
+
     $err = _("ERROR");
 
     $ret = concat_hook_function('error_box', $string);