Update of /cvsroot/phpweather/phpweather/locales
In directory usw-pr-cvs1:/tmp/cvs-serv2769
Modified Files:
locale_common.php
Log Message:
Fixed multiple precipitation types (bug 497585)
Index: locale_common.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/locales/locale_common.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- locale_common.php 19 Dec 2001 08:57:47 -0000 1.16
+++ locale_common.php 15 Mar 2002 10:37:14 -0000 1.17
@@ -427,7 +427,13 @@
/* There can only be one of the next three items. */
if (!empty($weather_group['precipitation'])) {
- $output .= $this->strings['weather'][$weather_group['precipitation']];
+ // precipitation can be more than one kind - need to check for this.
+ // explode precipitation into chunks of length 2
+ $precip = explode(" ",trim(chunk_split($weather_group['precipitation'],2," ")));
+ foreach($precip AS $ppnow){
+ $output .= $this->strings['weather'][$ppnow] . ", ";
+ }
+ $output = substr($output,0,-2); // trim off last comma
} elseif (!empty($weather_group['obscuration'])) {
$output .= $this->strings['weather'][$weather_group['obscuration']];
} elseif (!empty($weather_group['other'])) {
|