Update of /cvsroot/phpweather/phpweather
In directory usw-pr-cvs1:/tmp/cvs-serv11313
Modified Files:
db_layer.php
Log Message:
Updated for new db-names.
Index: db_layer.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/db_layer.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- db_layer.php 8 Jul 2001 19:25:36 -0000 1.10
+++ db_layer.php 7 Mar 2002 09:42:41 -0000 1.11
@@ -7,10 +7,10 @@
}
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');
+require(PHPWEATHER_BASE_DIR . '/db/pw_db_null.php');
+require(PHPWEATHER_BASE_DIR . '/db/pw_db_dba.php');
+require(PHPWEATHER_BASE_DIR . '/db/pw_db_mysql.php');
+require(PHPWEATHER_BASE_DIR . '/db/pw_db_pgsql.php');
/**
* This class is used to maintain the database-object.
@@ -54,25 +54,24 @@
* @param $type string The database-type, like 'null', 'mysql' and so on.
*/
function set_db_type($type) {
+ $this->properties['db_type'] = $type;
switch ($type) {
case 'null':
- $this->db = new db_null($this->properties);
- $this->properties['db_type'] = $type;
+ $this->db = new pw_db_null($this->properties);
break;
case 'mysql':
- $this->db = new db_mysql($this->properties);
- $this->properties['db_type'] = $type;
+ $this->db = new pw_db_mysql($this->properties);
break;
case 'pgsql':
- $this->db = new db_pgsql($this->properties);
- $this->properties['db_type'] = $type;
+ $this->db = new pw_db_pgsql($this->properties);
break;
case 'dba':
- $this->db = new db_dba($this->properties);
- $this->properties['db_type'] = $type;
+ $this->db = new pw_db_dba($this->properties);
break;
default:
- $this->error('db_type not recognized: <code>' . $this->properties['db_type'] . '</code>, using <code>null</code>.');
+ $this->error('db_type not recognized: <code>' .
+ $this->properties['db_type'] .
+ '</code>, using <code>null</code>.');
$this->set_db_type('null');
break;
}
|