Explorar o código

Bulk export: don't forget to cleanup in case of error.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3612 a333f486-631f-4898-b8df-5754b55c2be0
dflaven %!s(int64=10) %!d(string=hai) anos
pai
achega
5c34a750f9
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      webservices/export-v2.php

+ 2 - 0
webservices/export-v2.php

@@ -490,6 +490,7 @@ function DoExport(Page $oP, BulkExport $oExporter, $bInteractive = false)
 	
 	if ($aStatus['code'] == 'error')
 	{
+		$oExporter->Cleanup();
 		ReportErrorAndExit("Export failed: '{$aStatus['message']}'");
 	}
 	else
@@ -501,6 +502,7 @@ function DoExport(Page $oP, BulkExport $oExporter, $bInteractive = false)
 	}
 }
 
+
 /////////////////////////////////////////////////////////////////////////////
 //
 // Command Line mode