/**
  * Logic for export process
  */
 public function DoExport()
 {
     global $Supported;
     // Test connection
     $Msg = $this->TestDatabase();
     if ($Msg === true) {
         // Create db object
         $Ex = new ExportModel();
         $Ex->SetConnection($this->DbInfo['dbhost'], $this->DbInfo['dbuser'], $this->DbInfo['dbpass'], $this->DbInfo['dbname']);
         $Ex->Prefix = $this->DbInfo['prefix'];
         $Ex->UseStreaming = $this->UseStreaming;
         // Test src tables' existence structure
         $Msg = $Ex->VerifySource($this->SourceTables);
         if ($Msg === true) {
             // Good src tables - Start dump
             $Ex->UseCompression(TRUE);
             $Ex->FilenamePrefix = $this->DbInfo['dbname'];
             set_time_limit(60 * 60);
             $this->ForumExport($Ex);
             // Write the results.
             if ($Ex->UseStreaming) {
                 exit;
             } else {
                 ViewExportResult($Ex->Comments, 'Info', $Ex->Path);
             }
         } else {
             ViewForm(array('Supported' => $Supported, 'Msg' => $Msg, 'Info' => $this->DbInfo));
         }
         // Back to form with error
     } else {
         ViewForm(array('Supported' => $Supported, 'Msg' => $Msg, 'Info' => $this->DbInfo));
     }
     // Back to form with error
 }
Beispiel #2
0
 /**
  * Logic for export process.
  */
 public function DoExport()
 {
     global $Supported;
     // Test connection
     $Msg = $this->TestDatabase();
     if ($Msg === true) {
         // Test src tables' existence structure
         $Msg = $this->Ex->VerifySource($this->SourceTables);
         if ($Msg === true) {
             // Good src tables - Start dump
             $this->Ex->UseCompression(true);
             $this->Ex->FilenamePrefix = $this->DbInfo['dbname'];
             set_time_limit(60 * 60);
             //            ob_start();
             $this->ForumExport($this->Ex);
             //            $Errors = ob_get_clean();
             $Msg = $this->Ex->Comments;
             // Write the results.  Send no path if we don't know where it went.
             $RelativePath = $this->Param('destpath', false) ? false : $this->Ex->Path;
             ViewExportResult($Msg, 'Info', $RelativePath);
         } else {
             ViewForm(array('Supported' => $Supported, 'Msg' => $Msg, 'Info' => $this->DbInfo));
         }
         // Back to form with error
     } else {
         ViewForm(array('Supported' => $Supported, 'Msg' => $Msg, 'Info' => $this->DbInfo));
     }
     // Back to form with error
 }