From 1ba8cd6be9ab9e969978e0149e79b82769c199d3 Mon Sep 17 00:00:00 2001 From: kink Date: Sat, 21 Dec 2002 16:13:47 +0000 Subject: [PATCH] Assorted fixes, courtesy Roberto De Luca && kink git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4299 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/addressbook.php | 4 +-- functions/imap_general.php | 4 +-- functions/page_header.php | 5 +-- plugins/calendar/calendar.php | 10 +++--- plugins/calendar/day.php | 10 +++--- plugins/calendar/event_create.php | 2 +- plugins/calendar/event_delete.php | 2 +- plugins/calendar/event_edit.php | 2 +- plugins/calendar/functions.php | 60 +++++++++++++++---------------- plugins/calendar/setup.php | 2 +- plugins/spamcop/setup.php | 10 +++--- plugins/translate/setup.php | 2 +- src/read_body.php | 4 +-- src/search.php | 2 +- 14 files changed, 60 insertions(+), 59 deletions(-) diff --git a/functions/addressbook.php b/functions/addressbook.php index 9b98f61b..56010ca9 100644 --- a/functions/addressbook.php +++ b/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'] diff --git a/functions/imap_general.php b/functions/imap_general.php index 1268831c..ba53e1b9 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -455,7 +455,7 @@ function sqimap_find_displayable_name ($string) { $string = sqimap_find_email($orig_string); } if( $string == '' || $string == ' ' ){ - $string = ' '; + $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 = ' '; + $string = ' '; } } else { $string = $regs[1]; diff --git a/functions/page_header.php b/functions/page_header.php index db7ecee9..ae0a1046 100644 --- a/functions/page_header.php +++ b/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 ); diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php index 975838ad..a0fcc4e9 100644 --- a/plugins/calendar/calendar.php +++ b/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', - "<< ".($year-1)."" + "<< ".($year-1)."" ) . "\n". html_tag( 'th', - "< " . + "< " . date_intl( 'M', $prev_date). "" ) . "\n". html_tag( 'th', date_intl( 'F Y', $act_date ), '', $color[0], 'colspan="3"') . html_tag( 'th', - "" . + "" . date_intl( 'M', $next_date) . " >" ) . "\n". html_tag( 'th', - "".($year+1)." >>" + "".($year+1)." >>" ) ) . "\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) ? "[ " . _("TODAY") . " ] " : ""); - echo "$aday"; } else { diff --git a/plugins/calendar/day.php b/plugins/calendar/day.php index bb5f39a3..503a796d 100644 --- a/plugins/calendar/day.php +++ b/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', - "< ". + "< ". date_intl('D',$prev_date)."", 'left' ) . html_tag( 'th', date_intl( _("l, F j Y"), mktime(0, 0, 0, $month, $day, $year)) , '', '', 'width="75%"' ) . html_tag( 'th', - "". + "". date_intl('D',$next_date)." >" , 'right' ) ); @@ -114,7 +114,7 @@ function display_events() { html_tag( 'td', $ehour . ':' . $eminute, 'left' ) . html_tag( 'td', ' ', 'left' ) . html_tag( 'td', - "". + "". _("ADD") . "" , 'center' ) , '', $color[$eo]); @@ -133,9 +133,9 @@ function display_events() { echo"] $calbar[message] " . html_tag( 'td', "\n" . - "". + "". _("EDIT") . " | \n" . - "" . + "" . _("DEL") . '' . "\n" , 'center' ); diff --git a/plugins/calendar/event_create.php b/plugins/calendar/event_create.php index 01d1d4e3..5ce78fb7 100644 --- a/plugins/calendar/event_create.php +++ b/plugins/calendar/event_create.php @@ -194,7 +194,7 @@ if(!isset($event_text)){ ) . html_tag( 'tr', html_tag( 'td', - "" . _("Day View") . "\n" , + "" . _("Day View") . "\n" , 'left', $color[4], 'colspan="2"' ) . "\n" ) , '', $color[0], 'width="100%" border="0" cellpadding="2" cellspacing="1"' ) ."\n"; diff --git a/plugins/calendar/event_delete.php b/plugins/calendar/event_delete.php index 92a1099f..bcf2c858 100644 --- a/plugins/calendar/event_delete.php +++ b/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 '

' . _("Event deleted!") . "
\n"; - echo "" . + echo "" . _("Day View") . "\n"; } else { readcalendardata(); diff --git a/plugins/calendar/event_edit.php b/plugins/calendar/event_edit.php index 098d65c0..6211c3cb 100644 --- a/plugins/calendar/event_edit.php +++ b/plugins/calendar/event_edit.php @@ -300,7 +300,7 @@ if (!isset($updated)){ ) . "\n"; echo html_tag( 'tr', html_tag( 'td', - "" . + "" . _("Day View") ."", 'left' ) ) . "\n"; diff --git a/plugins/calendar/functions.php b/plugins/calendar/functions.php index e11bb049..b4ee71aa 100644 --- a/plugins/calendar/functions.php +++ b/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 "  \n"; + echo "  \n"; displayInternalLink("plugins/calendar/day.php?year=$year&month=$month&day=$day",_("Day View"),"right"); - echo "  \n"; + echo "  \n"; // displayInternalLink("plugins/calendar/event_create.php?year=$year&month=$month&day=$day",_("Add Event"),"right"); - // echo "  \n"; + // echo "  \n"; echo ''; } @@ -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)) { diff --git a/plugins/calendar/setup.php b/plugins/calendar/setup.php index 0d7b7ac4..0a3f0cf6 100644 --- a/plugins/calendar/setup.php +++ b/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 "  \n"; + echo "  \n"; } ?> diff --git a/plugins/spamcop/setup.php b/plugins/spamcop/setup.php index 835884dd..d8779afc 100755 --- a/plugins/spamcop/setup.php +++ b/plugins/spamcop/setup.php @@ -72,21 +72,21 @@ function spamcop_show_link() { if ($spamcop_method == 'web_form') { ?>Download this as a file
'); + '">'. _("Download this as a file") . '
'); if (is_int($pos)) { $new_body = substr($new_body, 0, $pos); } diff --git a/src/read_body.php b/src/read_body.php index 1e48b44f..736df268 100644 --- a/src/read_body.php +++ b/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; + '&mailbox=' . urlencode($mailbox) . + '&passed_id=' . $passed_id; $print_text = _("View Printable Version"); diff --git a/src/search.php b/src/search.php index fcdbf000..41267736 100644 --- a/src/search.php +++ b/src/search.php @@ -495,7 +495,7 @@ if ($search_all == 'all') { $boxcount = count($boxes); echo '
' . _("Search Results") . - "

\n"; + "

\n"; for ($x=0;$x<$boxcount;$x++) { if (!in_array('noselect', $boxes[$x]['flags'])) { $mailbox = $boxes[$x]['unformatted']; -- 2.25.1