Assorted fixes, courtesy Roberto De Luca && kink
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 21 Dec 2002 16:13:47 +0000 (16:13 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 21 Dec 2002 16:13:47 +0000 (16:13 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4299 7612ce4b-ef26-0410-bec9-ea0150e637f0

14 files changed:
functions/addressbook.php
functions/imap_general.php
functions/page_header.php
plugins/calendar/calendar.php
plugins/calendar/day.php
plugins/calendar/event_create.php
plugins/calendar/event_delete.php
plugins/calendar/event_edit.php
plugins/calendar/functions.php
plugins/calendar/setup.php
plugins/spamcop/setup.php
plugins/translate/setup.php
src/read_body.php
src/search.php

index 9b98f61..56010ca 100644 (file)
@@ -208,9 +208,9 @@ class AddressBook {
      */
 
     function full_address($row) {
-        global $addrsrch_fullname, $datadir, $user;
+        global $addrsrch_fullname, $data_dir, $username;
 
-        if (($prefix = getPref($datadir, $user, 'addrsrch_fullname') or
+        if (($prefix = getPref($data_dir, $username, 'addrsrch_fullname') or
             isset($addrsrch_fullname) and $prefix = $addrsrch_fullname)
             and $prefix !== 'noprefix') {
             $name = ($prefix === 'nickname') ? $row['nickname']
index 1268831..ba53e1b 100755 (executable)
@@ -455,7 +455,7 @@ function sqimap_find_displayable_name ($string) {
              $string = sqimap_find_email($orig_string);
         }
         if( $string == '' || $string == ' ' ){
-            $string = '&nbsp';
+            $string = '&nbsp;';
         }
     }
     elseif ( ereg('\((.*)\)', $string, $regs) ) {
@@ -463,7 +463,7 @@ function sqimap_find_displayable_name ($string) {
             if ( ereg('^(.+) \(', $string, $regs) ) {
                $string = ereg_replace( ' \(\)$', '', $string );
             } else {
-               $string = '&nbsp';
+               $string = '&nbsp;';
             }
         } else {
             $string = $regs[1];
index db7ecee..ae0a104 100644 (file)
@@ -82,7 +82,7 @@ function displayInternalLink($path, $text, $target='') {
 function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
 
     global $hide_sm_attributions, $PHP_SELF, $frame_top,
-           $compose_new_win, $username, $datadir, $compose_width, $compose_height,
+           $compose_new_win, $compose_width, $compose_height,
            $attachemessages, $provider_name, $provider_uri;
 
     if ( !check_php_version(4,1) ) {
@@ -279,7 +279,8 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
 /* blatently copied/truncated/modified from the above function */
 function compose_Header($color, $mailbox) {
 
-    global $delimiter, $hide_sm_attributions, $base_uri, $PHP_SELF, $frame_top, $compose_new_win;
+    global $delimiter, $hide_sm_attributions, $base_uri, $PHP_SELF, 
+           $data_dir, $username, $frame_top, $compose_new_win;
 
 
     $module = substr( $PHP_SELF, ( strlen( $PHP_SELF ) - strlen( $base_uri ) ) * -1 );
index 975838a..a0fcc4e 100644 (file)
@@ -61,19 +61,19 @@ function startcalendar() {
                    html_tag( 'table', '', '', $color[0], 'width="100%" border="0" cellpadding="2" cellspacing="1"' ) .
                        html_tag( 'tr', "\n".
                             html_tag( 'th',
-                                "<a href=\"$self?year=".($year-1)."&month=$month\">&lt;&lt;&nbsp;".($year-1)."</a>"
+                                "<a href=\"$self?year=".($year-1)."&amp;month=$month\">&lt;&lt;&nbsp;".($year-1)."</a>"
                             ) . "\n".
                             html_tag( 'th',
-                                "<a href=\"$self?year=$prev_year&month=$prev_month\">&lt;&nbsp;" .
+                                "<a href=\"$self?year=$prev_year&amp;month=$prev_month\">&lt;&nbsp;" .
                                 date_intl( 'M', $prev_date). "</a>"
                             ) . "\n".
                             html_tag( 'th', date_intl( 'F Y', $act_date ), '', $color[0], 'colspan="3"') .
                             html_tag( 'th',
-                                "<a href=\"$self?year=$next_year&month=$next_month\">" .
+                                "<a href=\"$self?year=$next_year&amp;month=$next_month\">" .
                                 date_intl( 'M', $next_date) . "&nbsp;&gt;</a>"
                             ) . "\n".
                             html_tag( 'th',
-                                "<a href=\"$self?year=".($year+1)."&month=$month\">".($year+1)."&nbsp;&gt;&gt;</a>"
+                                "<a href=\"$self?year=".($year+1)."&amp;month=$month\">".($year+1)."&nbsp;&gt;&gt;</a>"
                             )
                        ) . "\n".
                        html_tag( 'tr',
@@ -105,7 +105,7 @@ function drawmonthview() {
                 echo html_tag( 'td', '', 'left', $color[4], 'height="50" valign="top"' ) ."\n".
                      html_tag( 'div', '', 'right' );
                 echo(($cdate==$todayis) ? "<font size=-1 color=$color[1]>[ " . _("TODAY") . " ] " : "<font size=-1>");
-                echo "<a href=day.php?year=$year&month=$month&day=";
+                echo "<a href=day.php?year=$year&amp;month=$month&amp;day=";
                 echo(($aday<10) ? "0" : "");
                 echo "$aday>$aday</a></font></div>";
             } else {
index bb5f39a..503a796 100644 (file)
@@ -60,13 +60,13 @@ function day_header() {
                     html_tag( 'table', '', '', $color[0], 'width="100%" border="0" cellpadding="2" cellspacing="1"' ) ."\n" .
                         html_tag( 'tr', 
                             html_tag( 'th',
-                                "<a href=\"day.php?year=$prev_year&month=$prev_month&day=$prev_day\">&lt;&nbsp;".
+                                "<a href=\"day.php?year=$prev_year&amp;month=$prev_month&amp;day=$prev_day\">&lt;&nbsp;".
                                 date_intl('D',$prev_date)."</a>",
                             'left' ) .
                             html_tag( 'th', date_intl( _("l, F j Y"), mktime(0, 0, 0, $month, $day, $year)) ,
                                 '', '', 'width="75%"' ) .
                             html_tag( 'th',
-                                "<a href=\"day.php?year=$next_year&month=$next_month&day=$next_day\">".
+                                "<a href=\"day.php?year=$next_year&amp;month=$next_month&amp;day=$next_day\">".
                                 date_intl('D',$next_date)."&nbsp;&gt;</a>" ,
                             'right' )
                         );
@@ -114,7 +114,7 @@ function display_events() {
                        html_tag( 'td', $ehour . ':' . $eminute, 'left' ) .
                        html_tag( 'td', '&nbsp;', 'left' ) .
                        html_tag( 'td',
-                           "<font size=\"-1\"><a href=\"event_create.php?year=$year&month=$month&day=$day&hour=".substr($calfoo['key'],0,2)."\">".
+                           "<font size=\"-1\"><a href=\"event_create.php?year=$year&amp;month=$month&amp;day=$day&amp;hour=".substr($calfoo['key'],0,2)."\">".
                            _("ADD") . "</a></font>" ,
                        'center' ) ,
                    '', $color[$eo]);
@@ -133,9 +133,9 @@ function display_events() {
                             echo"] $calbar[message]&nbsp;" .
                         html_tag( 'td',
                             "<font size=\"-1\"><nobr>\n" .
-                            "<a href=\"event_edit.php?year=$year&month=$month&day=$day&hour=".substr($calfoo['key'],0,2)."&minute=".substr($calfoo['key'],2,2)."\">".
+                            "<a href=\"event_edit.php?year=$year&amp;month=$month&amp;day=$day&amp;hour=".substr($calfoo['key'],0,2)."&amp;minute=".substr($calfoo['key'],2,2)."\">".
                             _("EDIT") . "</a>&nbsp;|&nbsp;\n" .
-                            "<a href=\"event_delete.php?dyear=$year&dmonth=$month&dday=$day&dhour=".substr($calfoo['key'],0,2)."&dminute=".substr($calfoo['key'],2,2)."&year=$year&month=$month&day=$day\">" .
+                            "<a href=\"event_delete.php?dyear=$year&amp;dmonth=$month&amp;dday=$day&amp;dhour=".substr($calfoo['key'],0,2)."&amp;dminute=".substr($calfoo['key'],2,2)."&amp;year=$year&amp;month=$month&amp;day=$day\">" .
                             _("DEL") . '</a>' .
                             "</nobr></font>\n" ,
                         'center' );
index 01d1d4e..5ce78fb 100644 (file)
@@ -194,7 +194,7 @@ if(!isset($event_text)){
                 ) .
                 html_tag( 'tr',
                     html_tag( 'td',
-                        "<a href=\"day.php?year=$year&month=$month&day=$day\">" . _("Day View") . "</a>\n" ,
+                        "<a href=\"day.php?year=$year&amp;month=$month&amp;day=$day\">" . _("Day View") . "</a>\n" ,
                     'left', $color[4], 'colspan="2"' ) . "\n"
                 ) ,
             '', $color[0], 'width="100%" border="0" cellpadding="2" cellspacing="1"' ) ."\n";
index 92a1099..bcf2c85 100644 (file)
@@ -159,7 +159,7 @@ if (isset($dyear) && isset($dmonth) && isset($dday) && isset($dhour) && isset($d
     if (isset($confirmed)){
         delete_event("$dmonth$dday$dyear", "$dhour$dminute");
         echo '<br><br>' . _("Event deleted!") . "<br>\n";
-        echo "<a href=\"day.php?year=$year&month=$month&day=$day\">" .
+        echo "<a href=\"day.php?year=$year&amp;month=$month&amp;day=$day\">" .
           _("Day View") . "</a>\n";
     } else {
         readcalendardata();
index 098d65c..6211c3c 100644 (file)
@@ -300,7 +300,7 @@ if (!isset($updated)){
                 ) . "\n";
         echo html_tag( 'tr',
                    html_tag( 'td',
-                       "<a href=\"day.php?year=$year&month=$month&day=$day\">" . 
+                       "<a href=\"day.php?year=$year&amp;month=$month&amp;day=$day\">" . 
                        _("Day View") ."</a>",
                    'left' )
                 ) . "\n";
index e11bb04..b4ee71a 100644 (file)
@@ -23,11 +23,11 @@ function calendar_header() {
          html_tag( 'td', '', 'left', '', 'width="100%"' );
 
     displayInternalLink("plugins/calendar/calendar.php?year=$year&month=$month",_("Month View"),"right");
-    echo "&nbsp;&nbsp\n";
+    echo "&nbsp;&nbsp;\n";
     displayInternalLink("plugins/calendar/day.php?year=$year&month=$month&day=$day",_("Day View"),"right");
-    echo "&nbsp;&nbsp\n";
+    echo "&nbsp;&nbsp;\n";
     // displayInternalLink("plugins/calendar/event_create.php?year=$year&month=$month&day=$day",_("Add Event"),"right");
-    // echo "&nbsp;&nbsp\n";
+    // echo "&nbsp;&nbsp;\n";
     echo '</td></tr>';
 
 }
@@ -35,19 +35,19 @@ function calendar_header() {
 function select_option_length($selected) {
 
     $eventlength = array(
-        "0" => _("0 min."),
-        "15" => _("15 min."),
-        "30" => _("35 min."),
-        "45" => _("45 min."),
-        "60" => _("1 hr."),
-        "90" => _("1.5 hr."),
-        "120" => _("2 hr."),
-        "150" => _("2.5 hr."),
-        "180" => _("3 hr."),
-        "210" => _("3.5 hr."),
-        "240" => _("4 hr."),
-        "300" => _("5 hr."),
-        "360" => _("6 hr.")
+        '0' => _("0 min."),
+        '15' => _("15 min."),
+        '30' => _("35 min."),
+        '45' => _("45 min."),
+        '60' => _("1 hr."),
+        '90' => _("1.5 hr."),
+        '120' => _("2 hr."),
+        '150' => _("2.5 hr."),
+        '180' => _("3 hr."),
+        '210' => _("3.5 hr."),
+        '240' => _("4 hr."),
+        '300' => _("5 hr."),
+        '360' => _("6 hr.")
     );
 
     while( $bar = each($eventlength)) {
@@ -61,18 +61,18 @@ function select_option_length($selected) {
 
 function select_option_minute($selected) {
     $eventminute = array(
-    "00"=>"00",
-    "05"=>"05",
-    "10"=>"10",
-    "15"=>"15",
-    "20"=>"20",
-    "25"=>"25",
-    "30"=>"30",
-    "35"=>"35",
-    "40"=>"40",
-    "45"=>"45",
-    "50"=>"50",
-    "55"=>"55"
+    '00'=>'00',
+    '05'=>'05',
+    '10'=>'10',
+    '15'=>'15',
+    '20'=>'20',
+    '25'=>'25',
+    '30'=>'30',
+    '35'=>'35',
+    '40'=>'40',
+    '45'=>'45',
+    '50'=>'50',
+    '55'=>'55'
     );
 
     while ( $bar = each($eventminute)) {
@@ -98,8 +98,8 @@ function select_option_hour($selected) {
 
 function select_option_priority($selected) {
     $eventpriority = array(
-        "0" => _("Normal"),
-        "1" => _("High"),
+        '0' => _("Normal"),
+        '1' => _("High"),
     );
 
     while( $bar = each($eventpriority)) {
index 0d7b7ac..0a3f0cf 100644 (file)
@@ -21,7 +21,7 @@ function squirrelmail_plugin_init_calendar() {
 function calendar() {
     /* Add Calendar link to upper menu */
     displayInternalLink('plugins/calendar/calendar.php',_("Calendar"),'right');
-    echo "&nbsp;&nbsp\n";
+    echo "&nbsp;&nbsp;\n";
 }
 
 ?>
index 835884d..d8779af 100755 (executable)
@@ -72,21 +72,21 @@ function spamcop_show_link() {
    if ($spamcop_method == 'web_form') {
 ?><script language=javascript>
 document.write('<a href="../plugins/spamcop/spamcop.php?passed_id=<?PHP
-echo urlencode($passed_id); ?>&js_web=1&mailbox=<?PHP
+echo urlencode($passed_id); ?>&amp;js_web=1&amp;mailbox=<?PHP
 echo urlencode($mailbox); ?>" target="_blank">');
 document.write("<?PHP echo _("Report as Spam"); ?>");
 document.write("</a>");
 </script><noscript>
 <a href="../plugins/spamcop/spamcop.php?passed_id=<?PHP
-echo urlencode($passed_id); ?>&mailbox=<?PHP
-echo urlencode($mailbox); ?>&startMessage=<?PHP
+echo urlencode($passed_id); ?>&amp;mailbox=<?PHP
+echo urlencode($mailbox); ?>&amp;startMessage=<?PHP
 echo urlencode($startMessage); ?>"><?PHP
 echo _("Report as Spam"); ?></a>
 </noscript><?PHP
    } else {
 ?><a href="../plugins/spamcop/spamcop.php?passed_id=<?PHP
-echo urlencode($passed_id); ?>&mailbox=<?PHP
-echo urlencode($mailbox); ?>&startMessage=<?PHP
+echo urlencode($passed_id); ?>&amp;mailbox=<?PHP
+echo urlencode($mailbox); ?>&amp;startMessage=<?PHP
 echo urlencode($startMessage); ?>"><?PHP
 echo _("Report as Spam"); ?></a><?PHP
    }
index c01cebc..26d5759 100644 (file)
@@ -56,7 +56,7 @@ function translate_read_form() {
             
     $new_body = $body;
     $pos = strpos($new_body,
-            '">Download this as a file</A></CENTER><BR></SMALL>');
+            '">'. _("Download this as a file") . '</A></CENTER><BR></SMALL>');
     if (is_int($pos)) {
         $new_body = substr($new_body, 0, $pos);
     }
index 1e48b44..736df26 100644 (file)
@@ -112,8 +112,8 @@ function printer_friendly_link($mailbox, $passed_id, $passed_ent_id, $color) {
     global $javascript_on;
 
     $params = '?passed_ent_id=' . $passed_ent_id .
-              '&mailbox=' . urlencode($mailbox) .
-              '&passed_id=' . $passed_id;
+              '&amp;mailbox=' . urlencode($mailbox) .
+              '&amp;passed_id=' . $passed_id;
 
     $print_text = _("View Printable Version");
 
index fcdbf00..4126773 100644 (file)
@@ -495,7 +495,7 @@ if ($search_all == 'all') {
     $boxcount = count($boxes);
     echo '<BR><CENTER><B>' .
          _("Search Results") .
-         "</B><CENTER><BR>\n";
+         "</B></CENTER><BR>\n";
     for ($x=0;$x<$boxcount;$x++) {
         if (!in_array('noselect', $boxes[$x]['flags'])) {
             $mailbox = $boxes[$x]['unformatted'];