Quellcode durchsuchen

load default theme in logout_error if possible.

tokul vor 20 Jahren
Ursprung
Commit
0299e0bc98
2 geänderte Dateien mit 7 neuen und 2 gelöschten Zeilen
  1. 1 0
      ChangeLog
  2. 6 2
      functions/display_messages.php

+ 1 - 0
ChangeLog

@@ -398,6 +398,7 @@ Version 1.5.1 -- CVS
   - Moved time zone configuration from locale/timezones.cfg to php array.
     Adds time zone name localization options and fixes problems on systems
     that don't support GNU C time zone mappings (#1177067).
+  - Use default color theme in logout_error function when possible.
 
 Version 1.5.0 - 2 February 2004
 -------------------------------

+ 6 - 2
functions/display_messages.php

@@ -84,7 +84,8 @@ function plain_error_message($message, $color) {
  */
 function logout_error( $errString, $errTitle = '' ) {
     global $frame_top, $org_logo, $org_name, $org_logo_width, $org_logo_height,
-           $hide_sm_attributions, $version, $squirrelmail_language, $color;
+           $hide_sm_attributions, $version, $squirrelmail_language, 
+           $color, $theme, $theme_default;
 
     $base_uri = sqm_baseuri();
 
@@ -106,7 +107,10 @@ function logout_error( $errString, $errTitle = '' ) {
         $frame_top = '_top';
     }
 
-    // TODO: load default theme if possible
+    // load default theme if possible
+    if (!isset($color) && @file_exists($theme[$theme_default]['PATH']))
+        @include ($theme[$theme_default]['PATH']);
+
     if ( !isset( $color ) ) {
         $color = array();
         $color[0]  = '#dcdcdc';  /* light gray    TitleBar               */