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 9b98f61bf386d2f1ee6a3e0a3763326eaddf4a84..56010ca97b7df7f6443b7620b2d673a4f629def2 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 1268831ce3db932acb1712c1613a6035be2d28cb..ba53e1b933b65ff0e1a735dd236c47b7b1a3a311 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 db7ecee93611259f971e73a7a63079c8062b33c0..ae0a104677b85b0b26b58c6643405eef11c4040f 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 975838adce46a54b695fce89ee0a668feb2b1ff6..a0fcc4e9335cb4bd5768303aae455ea7c9f1386c 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 bb5f39a3f3506b7179d6f59297c727ce885a5fd3..503a796d6512e9088fec01959294f4bf932c222d 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 01d1d4e3e7529accbc00e7b7a6ab131085c1a2eb..5ce78fb7db2ca5de1eb3bfb2f99dfd77b3991e89 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 92a1099f2b78956e40159b9c3fc3524d35387d83..bcf2c8586aa9b26ddc32e9d5e8231a2f0c388c56 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 098d65c0735928ee24075661a413f231039213e7..6211c3cb7cd07cd5e0c7067530235a77f3828049 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 e11bb049e241b05b7e0de53a7f1f54b5cd777d91..b4ee71aaa5d72e261e26f7cea047e1cf007aba31 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 0d7b7ac4ece98eceadfd5307402519177b773ded..0a3f0cf6b8e9d13c1eb547328823360136c8751a 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 835884dd06868e3d80a7faf7f71a01f8c6661b8e..d8779afcb07977efb33cc17e442d4f5b0e219084 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 c01cebcae2c3e92ab5f758786134e75ea54a2aa5..26d57590488b0afd4501f6b4157ebc286df31560 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 1e48b44fba19e9a91fe819a839450567c7db124e..736df268bda8d43122a402b1e8f74181772e99db 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 fcdbf000442cc43b71f1e009f9405aee5498937a..4126773669a1df18aad02a1acb3bb2bdc2a4ca66 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'];