Update of /cvsroot/phpweather/phpweather
In directory usw-pr-cvs1:/tmp/cvs-serv23266
Modified Files:
index.php
Log Message:
Fix from Reini Urban <ru...@x-...> to deal with PHP 4.2 where the
default setting for register_globals is off.
Index: index.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/index.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -3 -r1.36 -r1.37
--- index.php 28 Aug 2002 10:10:01 -0000 1.36
+++ index.php 28 Aug 2002 10:17:08 -0000 1.37
@@ -39,24 +39,25 @@
* ``http://example.com/weather.php?icao=lztt'' if he or she knows
* particular code for airport (icao). */
-if (empty($cc)) {
+if (empty($HTTP_GET_VARS['cc'])) {
$cc = '';
} else {
- $cc = stripslashes($cc);
+ $cc = stripslashes($HTTP_GET_VARS['cc']);
}
-if (empty($icao)) {
+if (empty($HTTP_GET_VARS['icao'])) {
$icao = '';
} else {
- $icao = stripslashes($icao);
+ $icao = stripslashes($HTTP_GET_VARS['icao']);
}
$languages = $weather->get_languages('text');
-if (empty($language) || !in_array($language, array_keys($languages))) {
+if (empty($HTTP_GET_VARS['language']) ||
+ !in_array($HTTP_GET_VARS['language'], array_keys($languages))) {
$language = 'en';
} else {
- $language = stripslashes($language);
+ $language = stripslashes($HTTP_GET_VARS['language']);
}
if ($icao != '') {
|