Update of /cvsroot/phpweather/phpweather/db
In directory usw-pr-cvs1:/tmp/cvs-serv19600

Modified Files:
        db_common.php db_dba.php db_mysql.php db_null.php db_pgsql.php 
Log Message:
These files should also be a little more compatible with PHP3 now.


Index: db_common.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/db/db_common.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- db_common.php       2001/06/27 11:16:21     1.1
+++ db_common.php       2001/07/05 16:03:57     1.2
@@ -1,5 +1,12 @@
 <?php
-require_once(PHPWEATHER_BASE_DIR . '/base_object.php');
+/* This code makes sure that the file is only included once. */
+if (defined('')) {
+  return;
+} else {
+  define('', true);
+}
+
+require(PHPWEATHER_BASE_DIR . '/base_object.php');
 
 /**
  * Common class for all the database-types.

Index: db_dba.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/db/db_dba.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- db_dba.php  2001/06/30 19:20:58     1.2
+++ db_dba.php  2001/07/05 16:03:57     1.3
@@ -1,5 +1,12 @@
 <?php
-require_once(PHPWEATHER_BASE_DIR . '/db/db_common.php');
+/* This code makes sure that the file is only included once. */
+if (defined('DB_DBA')) {
+  return;
+} else {
+  define('DB_DBA', true);
+}
+
+require(PHPWEATHER_BASE_DIR . '/db/db_common.php');
 
 /**
  * This class is the 'dba' database-type. This type of database is a wrapper itself, 
so you have to pass a handler to it as the index 'db_handler', when you create it.

Index: db_mysql.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/db/db_mysql.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- db_mysql.php        2001/06/27 11:16:21     1.1
+++ db_mysql.php        2001/07/05 16:03:57     1.2
@@ -1,5 +1,12 @@
 <?php
-require_once(PHPWEATHER_BASE_DIR . '/db/db_common.php');
+/* This code makes sure that the file is only included once. */
+if (defined('DB_MYSQL')) {
+  return;
+} else {
+  define('DB_MYSQL', true);
+}
+
+require(PHPWEATHER_BASE_DIR . '/db/db_common.php');
 
 /**
  * This class is the 'mysql' database-type.

Index: db_null.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/db/db_null.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- db_null.php 2001/06/27 11:16:21     1.1
+++ db_null.php 2001/07/05 16:03:57     1.2
@@ -1,5 +1,12 @@
 <?php
-require_once(PHPWEATHER_BASE_DIR . '/db/db_common.php');
+/* This code makes sure that the file is only included once. */
+if (defined('DB_NULL')) {
+  return;
+} else {
+  define('DB_NULL', true);
+}
+
+require(PHPWEATHER_BASE_DIR . '/db/db_common.php');
 
 /**
  * This class is the 'null' database-type

Index: db_pgsql.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/db/db_pgsql.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- db_pgsql.php        2001/06/27 11:16:21     1.1
+++ db_pgsql.php        2001/07/05 16:03:57     1.2
@@ -1,5 +1,12 @@
 <?php
-require_once(PHPWEATHER_BASE_DIR . '/db/db_common.php');
+/* This code makes sure that the file is only included once. */
+if (defined('DB_PGSQL')) {
+  return;
+} else {
+  define('DB_PGSQL', true);
+}
+
+require(PHPWEATHER_BASE_DIR . '/db/db_common.php');
 
 /**
  * This class is the 'pgsql' database-type


_______________________________________________
PHPWeather-checkins mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/phpweather-checkins

Reply via email to