Generator.php
[Pman.Core] / Generator.php
index 2c543be..67a9a82 100644 (file)
@@ -164,8 +164,8 @@ class Pman_Core_Generator extends DB_DataObject_Generator
                 
                 if (!file_exists($tg) || !filesize($tg) ) {
                   
-                    if ($cli && in_array($f, $flist)) {
-                       echo "COPY $src $tg" . ($cli ? "\n" : "<BR>");
+                    if ($cli && !filesize($tg) || in_array($f, $flist)) {
+                        echo "COPY $src $tg" . ($cli ? "\n" : "<BR>");
                         copy($src, $tg);
                         continue;
                     }
@@ -203,9 +203,11 @@ class Pman_Core_Generator extends DB_DataObject_Generator
         
         
     }
-    
-    
-    
+    /**
+     * imports SQL files from all DataObjects directories....
+     * 
+     * except any matching /migrate/
+     */
     function importSQL()
     {
         $options = &PEAR::getStaticProperty('DB_DataObject','options');
@@ -221,8 +223,6 @@ class Pman_Core_Generator extends DB_DataObject_Generator
             $url['host'] = '*****';
         }
          
-        
-        
         require_once 'System.php';
         $cat = System::which('cat');
         $mysql = System::which('mysql');