RunGenerator.php
[Pman.Core] / RunGenerator.php
index 814c8cb..4bcb0cf 100644 (file)
@@ -18,7 +18,7 @@ class Pman_Core_RunGenerator extends Pman
             'desc' => 'Module',
             'short' => 'm',
             'default' => '',
-            'min' => 0,
+            'min' => 1,
             'max' => 1,
             
         ),
@@ -26,7 +26,7 @@ class Pman_Core_RunGenerator extends Pman
             'desc' => 'Files to Overwrite',
             'default' => '',
             'short' => 'o',
-            'min' => 0,
+            'min' => 1,
             'max' => 999,
             
         )
@@ -52,11 +52,13 @@ class Pman_Core_RunGenerator extends Pman
         return true;
     }
      
-    function get($args)
+    function get($args, $opts)
     {
+        
+        
         HTML_FlexyFramework::run('Core/UpdateDatabase');
         
-        die("running generator");
+         
         
         require_once 'Pman/Core/Generator.php';
         ini_set('pcre.backtrack_limit', 2000000);
@@ -69,7 +71,12 @@ class Pman_Core_RunGenerator extends Pman
         }
         $x = new Pman_Core_Generator();
        // $x->page = clone($this);
-        $x->start($this->cli, $args, $lastarg);
+       
+        
+        $modules = is_string($opts['modules']) ? array($opts['modules']) : $opts['modules'];
+        $overwrite = is_string($opts['overwrite']) ? array($opts['overwrite']) : $opts['overwrite'];
+
+        $x->start($this->cli, $modules, overwrite);
         
         // technically it would be good to trash the cached ini files here.. 
         // however we can not really do that, as the ownships are off..