cvs: pear /DB_DataObject/DataObject Generator.php createTables.php
| From: | Alan Knowles | Date: | Tue, 24 Dec 2002 04:01:30 +0000 |
| Subject: | cvs: pear /DB_DataObject/DataObject Generator.php createTables.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-7957@lists.php.net to get a copy of this message | ||
alan_k Mon Dec 23 23:01:30 2002 EDT
Modified files:
/pear/DB_DataObject/DataObject Generator.php createTables.php
Log:
fix to make multiple createTables work again .. - thanks to Mike Carter for spotting this one
Index: pear/DB_DataObject/DataObject/Generator.php
diff -u pear/DB_DataObject/DataObject/Generator.php:1.19
pear/DB_DataObject/DataObject/Generator.php:1.20
--- pear/DB_DataObject/DataObject/Generator.php:1.19 Sun Dec 8 22:50:18 2002
+++ pear/DB_DataObject/DataObject/Generator.php Mon Dec 23 23:01:30 2002
@@ -15,7 +15,7 @@
// | Author: Alan Knowles <alan@akbkhome.com>
// +----------------------------------------------------------------------+
//
-// $Id: Generator.php,v 1.19 2002/12/09 03:50:18 alan_k Exp $
+// $Id: Generator.php,v 1.20 2002/12/24 04:01:30 alan_k Exp $
//
/* generation tools for DB_DataObject
*
@@ -94,7 +94,7 @@
$databases = array();
foreach($options as $k=>$v) {
if (substr($k,0,9) == 'database_') {
- $databases[] = substr($k,9);
+ $databases[] = $v;
}
}
Index: pear/DB_DataObject/DataObject/createTables.php
diff -u pear/DB_DataObject/DataObject/createTables.php:1.13
pear/DB_DataObject/DataObject/createTables.php:1.14
--- pear/DB_DataObject/DataObject/createTables.php:1.13 Thu Nov 21 00:05:39 2002
+++ pear/DB_DataObject/DataObject/createTables.php Mon Dec 23 23:01:30 2002
@@ -16,10 +16,12 @@
// | Author: Alan Knowles <alan@akbkhome.com>
// +----------------------------------------------------------------------+
//
-// $Id: createTables.php,v 1.13 2002/11/21 05:05:39 alan_k Exp $
+// $Id: createTables.php,v 1.14 2002/12/24 04:01:30 alan_k Exp $
//
-require_once 'DB/DataObject/Generator.php';
+// require once will include relative paths!!!
+require_once dirname(__FILE__) . '/../DataObject.php';
+require_once dirname(__FILE__) . '/Generator.php';
if (!ini_get('register_argc_argv')) {
PEAR::raiseError("\nERROR: You must turn register_argc_argv On in you php.ini file for
this to work\neg.\n\nregister_argc_argv = On\n\n", null, PEAR_ERROR_DIE);