sync
[Pman.Admin] / Dump.php
index 9ade67e..4102bc1 100644 (file)
--- a/Dump.php
+++ b/Dump.php
@@ -50,6 +50,9 @@ require_once 'Pman.php';
 
 class Pman_Admin_Dump extends Pman {
     
+    static $cli_desc = "Dump database ?/ needs more info...";
+    
+    
     function getAuth()
     {
         
@@ -62,7 +65,7 @@ class Pman_Admin_Dump extends Pman {
     var $deps = array(); // list of dependants
     var $out = array(); // list of created sql/shell scripts.
     
-    function get($path )
+    function get($path, $opts = Array() )
     {
         ini_set('memory_limit', '256M'); // we need alot of memory
         set_time_limit(0);
@@ -71,7 +74,7 @@ class Pman_Admin_Dump extends Pman {
         array_shift($argv);
         array_shift($argv);
         
-        $opts = explode(',', 'table==,where==,dump-dir==,dump-dir==,debug=');
+        $opts = explode(',', 'table==,where==,dump-dir==,debug=');
         require_once 'Console/Getopt.php';
         $go = Console_Getopt::getopt2($argv, '', $opts );
         if (is_object($go)) {
@@ -125,7 +128,7 @@ class Pman_Admin_Dump extends Pman {
             echo "   " .$tbl . ' -> ' . count(array_keys($ar)) . " Records\n";
         }
         echo "FILES:\n";
-        echo "   Total : " . count($this->filetotal) . " using " . floor($this->filesize/1000000) . "Mb\n";
+        echo "   Total : " .  $this->filetotal  . " files using " . floor($this->filesize/1000000) . "Mb\n";
         
         echo "GENERATED FILES:\n";
         // summary
@@ -441,7 +444,7 @@ class Pman_Admin_Dump extends Pman {
         }
         fclose($fh);
         fclose($fh3); // restore does not need to bother with thumbnails.
-         ;
+         
         
         
         foreach($this->childthumbs as  $v) {