[dev] Patch for Metar Block
Rick Emery
rick at emery.homelinux.net
Wed Feb 18 18:33:39 PST 2004
Quoting Jan Schneider <jan at horde.org>:
> Zitat von Rick Emery <rick at emery.homelinux.net>:
>
>> The attached patch fixes "Call to undefined function: trtoupper()" errors on
>> the portal page.
>
> Committed. Though it should be String::upper() instead.
>
> Jan.
OK, the attached patch replaces all occurrences I could find in the Block
directory.
Thanks,
Rick
P.S. Sorry to add to the deluge of patches you've been getting, but things are
tight at work and I wanted to submit the patch while I had a chance.
--
Rick Emery
"When once you have tasted flight, you will forever walk the Earth
with your eyes turned skyward, for there you have been, and there
you will always long to return"
-- Leonardo Da Vinci
-------------- next part --------------
Index: metar.php
===================================================================
RCS file: /repository/horde/lib/Block/metar.php,v
retrieving revision 1.14
diff -u -r1.14 metar.php
--- metar.php 18 Feb 2004 21:23:30 -0000 1.14
+++ metar.php 19 Feb 2004 02:12:22 -0000
@@ -196,13 +196,13 @@
// Temperature/DewPoint.
if (isset($weather['temperature'])) {
- $html .= $this->_row(_("Temperature"), round($weather['temperature']) . '°' . strtoupper($units['temp']));
+ $html .= $this->_row(_("Temperature"), round($weather['temperature']) . '°' . String::upper($units['temp']));
}
if (isset($weather['dewPoint'])) {
- $html .= $this->_row(_("Dew Point"), round($weather['dewPoint']) . '°' . strtoupper($units['temp']));
+ $html .= $this->_row(_("Dew Point"), round($weather['dewPoint']) . '°' . String::upper($units['temp']));
}
if (isset($weather['feltTemperature'])) {
- $html .= $this->_row(_("Feels Like"), round($weather['feltTemperature']) . '°' . strtoupper($units['temp']));
+ $html .= $this->_row(_("Feels Like"), round($weather['feltTemperature']) . '°' . String::upper($units['temp']));
}
// Pressure.
@@ -272,27 +272,27 @@
break;
case '1htemp':
- $remarks .= '<br />' . _("Temp for last hour: ") . round($value) . '°' . strtoupper($units['temp']);
+ $remarks .= '<br />' . _("Temp for last hour: ") . round($value) . '°' . String::upper($units['temp']);
break;
case '1hdew':
- $remarks .= '<br />' . _("Dew Point for last hour: ") . round($value) . '°' . strtoupper($units['temp']);
+ $remarks .= '<br />' . _("Dew Point for last hour: ") . round($value) . '°' . String::upper($units['temp']);
break;
case '6hmaxtemp':
- $remarks .= '<br />' . _("Max temp last 6 hours: ") . round($value) . '°' . strtoupper($units['temp']);
+ $remarks .= '<br />' . _("Max temp last 6 hours: ") . round($value) . '°' . String::upper($units['temp']);
break;
case '6hmintemp':
- $remarks .= '<br />' . _("Min temp last 6 hours: ") . round($value) . '°' . strtoupper($units['temp']);
+ $remarks .= '<br />' . _("Min temp last 6 hours: ") . round($value) . '°' . String::upper($units['temp']);
break;
case '24hmaxtemp':
- $remarks .= '<br />' . _("Max temp last 24 hours: ") . round($value) . '°' . strtoupper($units['temp']);
+ $remarks .= '<br />' . _("Max temp last 24 hours: ") . round($value) . '°' . String::upper($units['temp']);
break;
case '24hmintemp':
- $remarks .= '<br />' . _("Min temp last 24 hours: ") . round($value) . '°' . strtoupper($units['temp']);
+ $remarks .= '<br />' . _("Min temp last 24 hours: ") . round($value) . '°' . String::upper($units['temp']);
break;
case 'sensors':
Index: weatherdotcom.php
===================================================================
RCS file: /repository/horde/lib/Block/weatherdotcom.php,v
retrieving revision 1.9
diff -u -r1.9 weatherdotcom.php
--- weatherdotcom.php 13 Feb 2004 05:18:08 -0000 1.9
+++ weatherdotcom.php 19 Feb 2004 02:12:22 -0000
@@ -172,15 +172,15 @@
// Temperature.
$html .= '<br /><b>' . _("Temperature: ") . '</b>';
- $html .= $weather['temperature'] . '°' . strtoupper($units['temp']);
+ $html .= $weather['temperature'] . '°' . String::upper($units['temp']);
// Dew point.
$html .= ' <b>' . _("Dew point: ") . '</b>';
- $html .= $weather['dewPoint'] . '°' . strtoupper($units['temp']);
+ $html .= $weather['dewPoint'] . '°' . String::upper($units['temp']);
// Feels like temperature.
$html .= ' <b>' . _("Feels like: ") . '</b>';
- $html .= $weather['feltTemperature'] . '°' . strtoupper($units['temp']);
+ $html .= $weather['feltTemperature'] . '°' . String::upper($units['temp']);
// Pressure and trend.
$html .= '<br /><b>' . _("Pressure: ") . '</b>';
@@ -247,10 +247,10 @@
if ($which > 0 || ($which == 0 &&
(strtotime($location['time']) < strtotime('14:00')))) {
$html .= '<span style="color:red">' . $day['tempertureHigh'] .
- '°' . strtoupper($units['temp']) . '</span>/';
+ '°' . String::upper($units['temp']) . '</span>/';
}
$html .= '<span style="color:blue">' . $day['temperatureLow'] .
- '°' . strtoupper($units['temp']) . '</span>';
+ '°' . String::upper($units['temp']) . '</span>';
$html .= '</td>';
}
$html .= '</tr><tr>';
More information about the dev
mailing list