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

Modified Files:
        base_object.php data_retrieval.php db_layer.php 
        metar_parser.php phpweather.php 
Log Message:
Let's not forget these files too...


Index: base_object.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/base_object.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- base_object.php     2001/06/27 11:19:27     1.8
+++ base_object.php     2001/07/05 16:05:11     1.9
@@ -1,4 +1,11 @@
 <?php
+/* This code makes sure that the file is only included once. */
+if (defined('BASE_OBJECT')) {
+  return;
+} else {
+  define('BASE_OBJECT', true);
+}
+
 /**
  * Provides some basic capabilities like error-handling and handling of defaults.
  *

Index: data_retrieval.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/data_retrieval.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- data_retrieval.php  2001/06/29 09:42:36     1.11
+++ data_retrieval.php  2001/07/05 16:05:11     1.12
@@ -1,5 +1,12 @@
 <?php
-require_once(PHPWEATHER_BASE_DIR . '/db_layer.php');
+/* This code makes sure that the file is only included once. */
+if (defined('DATA_RETRIEVAL')) {
+  return;
+} else {
+  define('DATA_RETRIEVAL', true);
+}
+
+require(PHPWEATHER_BASE_DIR . '/db_layer.php');
 
 /**
  * This class contains all the logic needed to get and store METARs.

Index: db_layer.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/db_layer.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- db_layer.php        2001/06/27 11:20:56     1.8
+++ db_layer.php        2001/07/05 16:05:11     1.9
@@ -1,9 +1,16 @@
 <?php
-require_once(PHPWEATHER_BASE_DIR . '/base_object.php');
-require_once(PHPWEATHER_BASE_DIR . '/db/db_null.php');
-require_once(PHPWEATHER_BASE_DIR . '/db/db_dba.php');
-require_once(PHPWEATHER_BASE_DIR . '/db/db_mysql.php');
-require_once(PHPWEATHER_BASE_DIR . '/db/db_pgsql.php');
+/* This code makes sure that the file is only included once. */
+if (defined('DB_LAYER')) {
+  return;
+} else {
+  define('DB_LAYER', true);
+}
+
+require(PHPWEATHER_BASE_DIR . '/base_object.php');
+require(PHPWEATHER_BASE_DIR . '/db/db_null.php');
+require(PHPWEATHER_BASE_DIR . '/db/db_dba.php');
+require(PHPWEATHER_BASE_DIR . '/db/db_mysql.php');
+require(PHPWEATHER_BASE_DIR . '/db/db_pgsql.php');
 
 /**
  * This class is used to maintain the database-object.

Index: metar_parser.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/metar_parser.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- metar_parser.php    2001/06/28 11:44:01     1.7
+++ metar_parser.php    2001/07/05 16:05:11     1.8
@@ -1,5 +1,12 @@
 <?php
-require_once(PHPWEATHER_BASE_DIR . '/data_retrieval.php');
+/* This code makes sure that the file is only included once. */
+if (defined('METAR_PARSER')) {
+  return;
+} else {
+  define('METAR_PARSER', true);
+}
+
+require(PHPWEATHER_BASE_DIR . '/data_retrieval.php');
 
 /**
  * This class understands how to parse a raw METAR.

Index: phpweather.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/phpweather.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- phpweather.php      2001/06/30 19:23:18     1.9
+++ phpweather.php      2001/07/05 16:05:11     1.10
@@ -1,8 +1,15 @@
 <?php
+/* This code makes sure that the file is only included once. */
+if (defined('PHPWEATHER')) {
+  return;
+} else {
+  define('PHPWEATHER', true);
+}
+
 /* The location of this file defines the base directory */
 define('PHPWEATHER_BASE_DIR', dirname(__FILE__));
 
-require_once(PHPWEATHER_BASE_DIR . '/metar_parser.php');
+require(PHPWEATHER_BASE_DIR . '/metar_parser.php');
 
 /**
  * A container-class for the localized object.


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

Reply via email to