Generator.php
[Pman.Core] / Generator.php
index 67a9a82..03f0294 100644 (file)
@@ -222,7 +222,7 @@ class Pman_Core_Generator extends DB_DataObject_Generator
             $url['user'] = '*****';
             $url['host'] = '*****';
         }
-         
+        
         require_once 'System.php';
         $cat = System::which('cat');
         $mysql = System::which('mysql');
@@ -230,7 +230,7 @@ class Pman_Core_Generator extends DB_DataObject_Generator
         foreach($this->modsql as $m => $fl)
         {
             if ($cli && isset($options['database_'. $m])) {
-                $url =parse_url($options['database_'.$m]);
+                $url = parse_url($options['database_'.$m]);
             }
             
             $mysql_cmd = $mysql .
@@ -355,17 +355,24 @@ class Pman_Core_Generator extends DB_DataObject_Generator
                 if (in_array($this->table, $ignore)) {
                     continue;
                 }
-             
-             
-                die("No existing DataObject file found for table {$this->table} 
+                if (empty($mods)) {
+                
                 
+                   die("No existing DataObject file found for table {$this->table} 
+            
 - either add it to Pman_Builder[skip_tables] or\n
+- run generator and specify that module..
 - create an empty file in the related Module/DataObjects directory
 eg. 
 touch Pman/????/DataObjects/".ucfirst($this->table).".php
-
-");
-                    
+   
+   ");
+                }
+                // use mods to determine where it should output to..
+                var_dump($mods);exit;
+                $this->modmap[$tn] = $mods;
+                
+                
             }
             $mod = $this->modmap[$tn];
             $inis[$mod] = isset($inis[$mod]) ? $inis[$mod] : '';