cvs: pear /DB_DataObject DataObject.php /DB_DataObject/DataObject Generator.php
| From: | Alan Knowles | Date: | Wed, 02 Apr 2003 06:55:40 +0000 |
| Subject: | cvs: pear /DB_DataObject DataObject.php /DB_DataObject/DataObject Generator.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-9699@lists.php.net to get a copy of this message | ||
alan_k Wed Apr 2 01:55:40 2003 EDT
Modified files:
/pear/DB_DataObject DataObject.php
/pear/DB_DataObject/DataObject Generator.php
Log:
change to correct test and remove debug code
Index: pear/DB_DataObject/DataObject.php
diff -u pear/DB_DataObject/DataObject.php:1.73 pear/DB_DataObject/DataObject.php:1.74
--- pear/DB_DataObject/DataObject.php:1.73 Tue Mar 25 05:30:41 2003
+++ pear/DB_DataObject/DataObject.php Wed Apr 2 01:55:40 2003
@@ -20,7 +20,7 @@
* @package DB_DataObject
* @category DB
*
- * $Id: DataObject.php,v 1.73 2003/03/25 10:30:41 alan_k Exp $
+ * $Id: DataObject.php,v 1.74 2003/04/02 06:55:40 alan_k Exp $
*/
/**
@@ -659,7 +659,7 @@
}
$this->_clear_cache();
- if (isset($key)) {
+ if ($key) {
return $this->$key;
}
return true;
Index: pear/DB_DataObject/DataObject/Generator.php
diff -u pear/DB_DataObject/DataObject/Generator.php:1.27
pear/DB_DataObject/DataObject/Generator.php:1.28
--- pear/DB_DataObject/DataObject/Generator.php:1.27 Wed Mar 26 23:57:46 2003
+++ pear/DB_DataObject/DataObject/Generator.php Wed Apr 2 01:55:40 2003
@@ -14,7 +14,7 @@
// +----------------------------------------------------------------------+
// | Author: Alan Knowles <alan@akbkhome.com>
// +----------------------------------------------------------------------+
-// $Id: Generator.php,v 1.27 2003/03/27 04:57:46 alan_k Exp $
+// $Id: Generator.php,v 1.28 2003/04/02 06:55:40 alan_k Exp $
/**
* Generation tools for DB_DataObject
@@ -156,6 +156,7 @@
foreach($this->tables as $table) {
$defs = $__DB->tableInfo($table);
+
// cast all definitions to objects - as we deal with that better.
foreach($defs as $def) {
if (is_array($def)) {
@@ -220,7 +221,7 @@
$this->_newConfig .= "\n[{$this->table}]\n";
$keys_out = "\n[{$this->table}__keys]\n";
foreach($defs as $t) {
- print_r($t);
+
$n=0;
switch (strtoupper($t->type)) {