CVS: phpweather/db pw_db_null.php,1.2,1.3
Brought to you by:
iridium
From: Martin G. <gim...@us...> - 2002-05-28 13:26:18
|
Update of /cvsroot/phpweather/phpweather/db In directory usw-pr-cvs1:/tmp/cvs-serv9211 Modified Files: pw_db_null.php Log Message: Fix the check for readability and remove the code that generated countries.php because this file now has all the countries in it anyway. Index: pw_db_null.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/db/pw_db_null.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- pw_db_null.php 20 Mar 2002 19:26:50 -0000 1.2 +++ pw_db_null.php 28 May 2002 13:26:15 -0000 1.3 @@ -134,7 +134,7 @@ * @access private */ function create_tables() { - return is_writable(PHPWEATHER_BASE_DIR . '/db'); + return is_writable(PHPWEATHER_BASE_DIR . '/db/files'); } /** @@ -186,21 +186,6 @@ fclose($fp); } - /* We also write a file with all the countries. */ - $fp = fopen(PHPWEATHER_BASE_DIR . '/db/files/countries.php', 'w'); - if ($fp) { - fputs($fp, "<?php\n/* File with names of all countries. */\n\n\$countries = array(\n"); - reset($countries); - list($cc, $country) = each($countries); - $country = addslashes($country); - fputs($fp, " '$cc' => '$country'"); - while(list($cc, $country) = each($countries)) { - $country = addslashes($country); - fputs($fp, ",\n '$cc' => '$country'"); - } - fputs($fp, "\n);\n\n?>\n"); - fclose($fp); - } return true; } |