UpdateDatabase.php
authorEdward <edward@roojs.com>
Wed, 22 May 2013 11:16:13 +0000 (19:16 +0800)
committerEdward <edward@roojs.com>
Wed, 22 May 2013 11:16:13 +0000 (19:16 +0800)
UpdateDatabase.php

index a806f91..7f5067b 100644 (file)
@@ -32,6 +32,20 @@ class Pman_Core_UpdateDatabase extends Pman
             'min' => 1,
             'max' => 1,
         ),
+        'name' => array(
+            'desc' => 'name of the company',
+            'short' => 'n',
+            'default' => '',
+            'min' => 1,
+            'max' => 1,
+        ),
+        'comptype' => array(
+            'desc' => 'the type of company',
+            'short' => 't',
+            'default' => '',
+            'min' => 1,
+            'max' => 1,
+        ),
         
     );
     
@@ -85,6 +99,14 @@ class Pman_Core_UpdateDatabase extends Pman
             die("DONE! \n");
         }
         
+        if($args == 'Company'){
+            if(empty($opt['name']) || empty($opt['comptype'])){
+                die("Missing company name or type! Try --name [the name of company] -- comptype [the type of company] \n");
+            }
+            
+            die("DONE! \n");
+        }
+        
         $this->importSQL();
         $this->runUpdateModulesData();