Update of /cvsroot/phpweather/phpweather
In directory usw-pr-cvs1:/tmp/cvs-serv6004
Modified Files:
index.php
Log Message:
There's no need (in PHP version 4) to supply an empty array to
functions that already default to the empty array.
Also, use English as the default language.
Index: index.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/index.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -3 -r1.33 -r1.34
--- index.php 26 Aug 2002 14:56:58 -0000 1.33
+++ index.php 26 Aug 2002 16:00:37 -0000 1.34
@@ -7,7 +7,7 @@
require('phpweather.php');
require('pw_utilities.php');
-$weather = new phpweather(array());
+$weather = new phpweather();
$output = '<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
@@ -46,7 +46,7 @@
stations in that country. */
if (empty($icao)) $icao = '';
- if (empty($language)) $language = '';
+ if (empty($language)) $language = 'en';
$output .= '<form action="index.php" method="get">' . "\n<p>" .
'<input type="hidden" name="action" value="show_weather" /> ' .
@@ -70,10 +70,10 @@
$weather->set_icao($icao);
include(PHPWEATHER_BASE_DIR . "/output/pw_text_$language.php");
$type = 'pw_text_' . $language;
- $text = new $type($weather, array());
+ $text = new $type($weather);
include(PHPWEATHER_BASE_DIR . "/output/pw_images.php");
- $icons = new pw_images($weather, array());
+ $icons = new pw_images($weather);
$output .= '<p>This is the current weather in ' .
$weather->get_location() . ":</p>\n<blockquote>\n" .
|