Update of /cvsroot/squirrelmail/squirrelmail/src
In directory sc8-pr-cvs1:/tmp/cvs-serv27725
Modified Files:
Tag: SM-1_2-STABLE
options_highlight.php
Log Message:
E_ALL fixes by Gertjan van Oosten
Index: options_highlight.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/src/options_highlight.php,v
retrieving revision 1.37.2.3
retrieving revision 1.37.2.4
diff -u -w -r1.37.2.3 -r1.37.2.4
--- options_highlight.php 29 Oct 2002 22:05:39 -0000 1.37.2.3
+++ options_highlight.php 20 Nov 2002 16:20:27 -0000 1.37.2.4
@@ -271,7 +271,7 @@
for ($i=0; $i < 14; $i++) {
${"selected".$i} = '';
}
- if ($action == 'edit' && isset($message_highlight_list[$theid]['color'])) {
+ if ($action == 'edit' && isset($theid) && isset($message_highlight_list[$theid]['color'])) {
for ($i=0; $i < 14; $i++) {
if ($color_list[$i] == $message_highlight_list[$theid]['color']) {
$selected_choose = ' checked';
@@ -288,14 +288,14 @@
echo '<form name="f" action="options_highlight.php">' . "\n";
echo '<input type="hidden" value="save" name="action">' . "\n";
if($action == 'edit')
- echo '<input type="hidden" value="'.$theid.'" name="theid">' ."\n";
+ echo '<input type="hidden" value="'.(isset($theid)?$theid:'').'" name="theid">' ."\n";
echo '<table width="80%" align="center" cellpadding="3" cellspacing="0" border="0">' . "\n";
echo " <tr bgcolor=\"$color[0]\">\n";
echo " <td align=\"right\" nowrap><b>\n";
echo _("Identifying name") . ":";
echo ' </b></td>' . "\n";
echo ' <td>' . "\n";
- if ($action == 'edit' && isset($message_highlight_list[$theid]['name']))
+ if ($action == 'edit' && isset($theid) && isset($message_highlight_list[$theid]['name']))
$disp = $message_highlight_list[$theid]['name'];
else
$disp = '';
@@ -326,7 +326,7 @@
echo " <option value=\"$color_list[13]\"$selected13>" . _("White") . "\n";
echo " </select><br>\n";
echo " <input type=\"radio\" name=color_type value=2$selected_input> ". _("Other:") ."<input type=\"text\" value=\"";
- if ($selected_input) echo $message_highlight_list[$theid]["color"];
+ if ($selected_input && isset($theid)) echo $message_highlight_list[$theid]["color"];
echo '" name="newcolor_input" size="7"> '._("Ex: 63aa7f")."<br>\n";
echo " </td>\n";
echo " </tr>\n";
@@ -334,7 +334,7 @@
# 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";
- if ($action == 'edit' && isset($message_highlight_list[$theid]['color'])) {
+ if ($action == 'edit' && isset($theid) && isset($message_highlight_list[$theid]['color'])) {
$current_color = $message_highlight_list[$theid]['color'];
}
else {
@@ -359,23 +359,23 @@
echo ' <td align="center" colspan=2>' . "\n";
echo " <select name=match_type>\n";
oh_opt( 'from',
- ($message_highlight_list[$theid]['match_type'] == 'from'),
+ (isset($theid)?$message_highlight_list[$theid]['match_type'] == 'from':1),
_("From") );
oh_opt( 'to',
- ($message_highlight_list[$theid]['match_type'] == 'to'),
+ (isset($theid)?$message_highlight_list[$theid]['match_type'] == 'to':0),
_("To") );
oh_opt( 'cc',
- ($message_highlight_list[$theid]['match_type'] == 'cc'),
+ (isset($theid)?$message_highlight_list[$theid]['match_type'] == 'cc':0),
_("Cc") );
oh_opt( 'to_cc',
- ($message_highlight_list[$theid]['match_type'] == 'to_cc'),
+ (isset($theid)?$message_highlight_list[$theid]['match_type'] == 'to_cc':0),
_("To or Cc") );
oh_opt( 'subject',
- ($message_highlight_list[$theid]['match_type'] == 'subject'),
+ (isset($theid)?$message_highlight_list[$theid]['match_type'] == 'subject':0),
_("Subject") );
echo " </select>\n";
echo '<b>' . _("Matches") . ':</b> ';
- if ($action == 'edit' && isset($message_highlight_list[$theid]['value']))
+ if ($action == 'edit' && isset($theid) && isset($message_highlight_list[$theid]['value']))
$disp = $message_highlight_list[$theid]['value'];
else
$disp = '';
|