From: Philippe M. <phi...@us...> - 2002-02-02 02:17:11
|
Update of /cvsroot/squirrelmail/squirrelmail/src In directory usw-pr-cvs1:/tmp/cvs-serv23831/src Modified Files: options.php right_main.php search.php Log Message: The 2000000 bugfix ------------------ This is mostly a warning removal "a la Tyler". I've also installed 4.1.1 on my portable and it looks it works fine with some bugfixs. Please 4.1.1 report feedback. Index: options.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/src/options.php,v retrieving revision 1.108 retrieving revision 1.109 diff -u -w -r1.108 -r1.109 --- options.php 2002/01/29 10:46:02 1.108 +++ options.php 2002/02/02 02:17:05 1.109 @@ -235,7 +235,8 @@ echo '<B>' . _("Successfully Saved Options") . ": $optpage_name</B><BR>\n"; /* If $max_refresh != SMOPT_REFRESH_NONE, provide a refresh link. */ - if ($max_refresh == SMOPT_REFRESH_FOLDERLIST) { + if ( !isset( $max_refresh ) ) { + } else if ($max_refresh == SMOPT_REFRESH_FOLDERLIST) { echo '<A HREF="../src/left_main.php" TARGET="left">' . _("Refresh Folder List") . '</A><BR>'; } else if ($max_refresh) { echo '<A HREF="../src/webmail.php?right_frame=options.php" TARGET="' . $frame_top . '">' . _("Refresh Page") . '</A><BR>'; Index: right_main.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/src/right_main.php,v retrieving revision 1.68 retrieving revision 1.69 diff -u -w -r1.68 -r1.69 --- right_main.php 2002/02/01 14:48:58 1.68 +++ right_main.php 2002/02/02 02:17:05 1.69 @@ -108,9 +108,11 @@ } /* There is a problem with registered vars in 4.1 */ +/* if( substr( phpversion(), 0, 3 ) == '4.1' ) { $use_mailbox_cache = FALSE; } +*/ if ($use_mailbox_cache && session_is_registered('msgs')) { showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort, $color, $show_num, $use_mailbox_cache); Index: search.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/src/search.php,v retrieving revision 1.47 retrieving revision 1.48 diff -u -w -r1.47 -r1.48 --- search.php 2002/02/01 17:04:49 1.47 +++ search.php 2002/02/02 02:17:05 1.48 @@ -169,20 +169,22 @@ // if the page is called from a search link or button update recent values // in pref files here -if ($submit == "Search" && !empty($what)) { +if ( !isset( $submit ) ) { + $submit = ''; +} else if ($submit == 'Search' && !empty($what)) { update_recent($what_array, $what, "search_what", $username, $data_dir); update_recent($where_array, $where, "search_where", $username, $data_dir); update_recent($folder_array, $mailbox, "search_folder", $username, $data_dir); } // if the page is called from a "forget recent" link remove search from pref file -elseif ($submit == "forget") { +elseif ($submit == 'forget') { forget_recent($count, $username, $data_dir); } // if the page is called from a "save recent" link add search to saved searches -elseif ($submit == "save") { +elseif ($submit == 'save') { save_recent($count, $username, $data_dir); } -elseif ($submit == "delete") { +elseif ($submit == 'delete') { delete_saved($count, $username, $data_dir); } // if the page is called from a "delete saved" link delete saved search @@ -194,7 +196,6 @@ " <CENTER><B>"._("Search")."</B></CENTER>\n". " </TD></TR>\n". " </TABLE>\n"; -# ' <TR><td align=center>'; // update the recent and saved searches from the pref files @@ -311,6 +312,9 @@ echo ' </SELECT>'. " </TD>\n". " <TD ALIGN=\"CENTER\">\n"; +if ( !isset( $what ) ) { + $what = ''; +} $what_disp = str_replace(',', ' ', $what); $what_disp = str_replace('\\\\', '\\', $what_disp); $what_disp = str_replace('\\"', '"', $what_disp); @@ -335,44 +339,51 @@ " </TABLE>\n". "</TD></TR></TABLE>\n"; - -do_hook("search_after_form"); -// search all folders option still in the works. returns a table for each -// folder it finds a match in. The toggle all link does not work +do_hook('search_after_form'); +/* + search all folders option still in the works. returns a table for each + folder it finds a match in. The toggle all link does not work +*/ -if ($search_all == "all") { - $mailbox == ""; +if ($search_all == 'all') { + $mailbox == ''; $boxcount = count($boxes); - echo "<BR><CENTER><B>Search Results</B><CENTER><BR>\n"; + echo '<BR><CENTER><B>' . + _("Search Results") . + "</B><CENTER><BR>\n"; for ($x=0;$x<$boxcount;$x++) { if (!in_array('noselect', $boxes[$x]['flags'])) { $mailbox = $boxes[$x]['unformatted']; } if (($submit == "Search" || $submit == "Search_no_update") && !empty($what)) { sqimap_mailbox_select($imapConnection, $mailbox); - $count_all = sqimap_search($imapConnection, $where, $what, $mailbox, $color, $pos, $search_all, $count_all); + $count_all = sqimap_search($imapConnection, $where, $what, $mailbox, $color, 0, $search_all, $count_all); } } if ($count_all == 0) { - echo "<br><b>No Messages found</b><br>"; + echo '<br><b>' . + _("No Messages found") . + '</b><br>'; } } // search one folder option else { - if (($submit == "Search" || $submit == "Search_no_update") && !empty($what)) { - echo "<BR><CENTER><B>Search Results</B></CENTER>\n"; + if (($submit == 'Search' || $submit == 'Search_no_update') && !empty($what)) { + echo '<BR><CENTER><B>' . + _("Search Results") . + "</B></CENTER>\n"; sqimap_mailbox_select($imapConnection, $mailbox); - sqimap_search($imapConnection, $where, $what, $mailbox, $color, $pos, $search_all, $count_all); + sqimap_search($imapConnection, $where, $what, $mailbox, $color, 0, $search_all, $count_all); } } // must have search terms to search -if ($submit == "Search" && empty($what)) { +if ($submit == 'Search' && empty($what)) { echo "<BR><CENTER><B>Please enter something to search for</B></CENTER>\n"; } |