فهرست منبع

Assorted fixes, courtesy Roberto De Luca && kink

Thijs Kinkhorst 22 سال پیش
والد
کامیت
b57577e4fd

+ 2 - 2
functions/addressbook.php

@@ -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']

+ 2 - 2
functions/imap_general.php

@@ -455,7 +455,7 @@ function sqimap_find_displayable_name ($string) {
              $string = sqimap_find_email($orig_string);
         }
         if( $string == '' || $string == ' ' ){
-            $string = '&nbsp';
+            $string = ' ';
         }
     }
     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 = ' ';
             }
         } else {
             $string = $regs[1];

+ 3 - 2
functions/page_header.php

@@ -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 );

+ 5 - 5
plugins/calendar/calendar.php

@@ -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 {

+ 5 - 5
plugins/calendar/day.php

@@ -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' );

+ 1 - 1
plugins/calendar/event_create.php

@@ -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";

+ 1 - 1
plugins/calendar/event_delete.php

@@ -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();

+ 1 - 1
plugins/calendar/event_edit.php

@@ -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";

+ 30 - 30
plugins/calendar/functions.php

@@ -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)) {

+ 1 - 1
plugins/calendar/setup.php

@@ -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";
 }
 
 ?>

+ 5 - 5
plugins/spamcop/setup.php

@@ -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
    }

+ 1 - 1
plugins/translate/setup.php

@@ -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);
     }

+ 2 - 2
src/read_body.php

@@ -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");
 

+ 1 - 1
src/search.php

@@ -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'];