Adding a couple themes, alien_glow is from Todd Hammer, dark_green is from me :)
[squirrelmail.git] / src / options_highlight.php
index b3e044ad4fb5af5c1baef80687ed595d425237c5..fdd0a279230080c635801b9a2245353d1cca4a10 100644 (file)
@@ -34,7 +34,7 @@ if (! isset($message_highlight_list)) {
 
 if ($action == 'delete' && isset($theid)) {
     removePref($data_dir, $username, "highlight$theid");
-    header( "Location: $PHP_SELF" );
+    header( "Location: $SCRIPT_NAME" );
     exit;
 } else if ($action == 'save') {
     if (!$theid) $theid = 0;
@@ -298,7 +298,12 @@ if ($action == 'edit' || $action == 'add') {
     # Show grid of color choices
     echo "<tr bgcolor=\"$color[0]\"><td colspan='2'>\n";
     echo "<table border=0 cellpadding=\"2\" align=\"center\" cellspacing=\"1\">\n";
-    $current_color = $message_highlight_list[$theid]['color'];
+    if (isset($message_highlight_list[$theid]['color'])) {
+        $current_color = $message_highlight_list[$theid]['color'];
+    }
+    else {
+        $current_color = '63aa7f';
+    }
     for($x = 0; $x < 5; $x++) {
         echo "<tr>\n";
         for($y = 0; $y < 19; $y++) {