CVS: phpweather/db pw_db_common.php,1.1,1.2 pw_db_dba.php,1.2,1.3 pw_...
Brought to you by:
iridium
From: Martin G. <gim...@us...> - 2002-03-20 19:26:54
|
Update of /cvsroot/phpweather/phpweather/db In directory usw-pr-cvs1:/tmp/cvs-serv31666/db Modified Files: pw_db_common.php pw_db_dba.php pw_db_mysql.php pw_db_null.php pw_db_pgsql.php Log Message: All files now use require_once() instead of just require() - this means, that there's no need for those 'if defined('...') return ...' statements at the top of each file any more. Index: pw_db_common.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/db/pw_db_common.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- pw_db_common.php 7 Mar 2002 09:40:38 -0000 1.1 +++ pw_db_common.php 20 Mar 2002 19:26:50 -0000 1.2 @@ -1,12 +1,6 @@ <?php -/* This code makes sure that the file is only included once. */ -if (defined('PW_DB_COMMON')) { - return; -} else { - define('PW_DB_COMMON', true); -} -require(PHPWEATHER_BASE_DIR . '/base_object.php'); +require_once(PHPWEATHER_BASE_DIR . '/base_object.php'); /** * Common class for all the database-types. Index: pw_db_dba.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/db/pw_db_dba.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- pw_db_dba.php 18 Mar 2002 16:57:54 -0000 1.2 +++ pw_db_dba.php 20 Mar 2002 19:26:50 -0000 1.3 @@ -1,12 +1,6 @@ <?php -/* This code makes sure that the file is only included once. */ -if (defined('PW_DB_DBA')) { - return; -} else { - define('PW_DB_DBA', true); -} -require(PHPWEATHER_BASE_DIR . '/db/pw_db_common.php'); +require_once(PHPWEATHER_BASE_DIR . '/db/pw_db_common.php'); /** * This class is the 'dba' database-type. This type of database is a Index: pw_db_mysql.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/db/pw_db_mysql.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- pw_db_mysql.php 7 Mar 2002 09:40:38 -0000 1.1 +++ pw_db_mysql.php 20 Mar 2002 19:26:50 -0000 1.2 @@ -1,12 +1,6 @@ <?php -/* This code makes sure that the file is only included once. */ -if (defined('PW_DB_MYSQL')) { - return; -} else { - define('PW_DB_MYSQL', true); -} -require(PHPWEATHER_BASE_DIR . '/db/pw_db_common.php'); +require_once(PHPWEATHER_BASE_DIR . '/db/pw_db_common.php'); /** * This class is the 'mysql' database-type. Index: pw_db_null.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/db/pw_db_null.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- pw_db_null.php 7 Mar 2002 09:40:38 -0000 1.1 +++ pw_db_null.php 20 Mar 2002 19:26:50 -0000 1.2 @@ -1,12 +1,6 @@ <?php -/* This code makes sure that the file is only included once. */ -if (defined('PW_DB_NULL')) { - return; -} else { - define('PW_DB_NULL', true); -} -require(PHPWEATHER_BASE_DIR . '/db/pw_db_common.php'); +require_once(PHPWEATHER_BASE_DIR . '/db/pw_db_common.php'); /** * This class is the 'null' database-type Index: pw_db_pgsql.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/db/pw_db_pgsql.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- pw_db_pgsql.php 7 Mar 2002 09:40:38 -0000 1.1 +++ pw_db_pgsql.php 20 Mar 2002 19:26:50 -0000 1.2 @@ -1,12 +1,6 @@ <?php -/* This code makes sure that the file is only included once. */ -if (defined('PW_DB_PGSQL')) { - return; -} else { - define('PW_DB_PGSQL', true); -} -require(PHPWEATHER_BASE_DIR . '/db/pw_db_common.php'); +require_once(PHPWEATHER_BASE_DIR . '/db/pw_db_common.php'); /** * This class is the 'pgsql' database-type |