added check for ZipArchive availability
This commit is contained in:
		| @ -199,7 +199,6 @@ allow_set_time_limit = "no" | |||||||
| ;------------------------------------------------------------------------------ | ;------------------------------------------------------------------------------ | ||||||
| signin_for_code_search = "yes" | signin_for_code_search = "yes" | ||||||
|  |  | ||||||
|  |  | ||||||
| ;------------------------------------------------------------------------------ | ;------------------------------------------------------------------------------ | ||||||
| ; customized footer | ; customized footer | ||||||
| ;------------------------------------------------------------------------------ | ;------------------------------------------------------------------------------ | ||||||
|  | |||||||
| @ -151,9 +151,10 @@ if ( !function_exists ('codepot_zip_dir')) | |||||||
| 	// $exclude: file names to exclude. string or array of strings | 	// $exclude: file names to exclude. string or array of strings | ||||||
| 	function codepot_zip_dir ($output_file, $path, $local_path = NULL, $exclude = NULL) | 	function codepot_zip_dir ($output_file, $path, $local_path = NULL, $exclude = NULL) | ||||||
| 	{ | 	{ | ||||||
| 		$stack = array (); |  | ||||||
|  |  | ||||||
| 		if (!is_dir($path)) return FALSE; | 		if (!is_dir($path)) return FALSE; | ||||||
|  | 		if (!class_exists('ZipArchive')) return FALSE; | ||||||
|  |  | ||||||
|  | 		$stack = array (); | ||||||
|  |  | ||||||
| 		array_push ($stack, $path);  | 		array_push ($stack, $path);  | ||||||
| 		$prefix = strlen($path); | 		$prefix = strlen($path); | ||||||
|  | |||||||
| @ -1042,7 +1042,6 @@ class SubversionModel extends Model | |||||||
| 			return FALSE; | 			return FALSE; | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		//exec ("zip {$tfname}.zip -r {$actual_tfname}"); |  | ||||||
| 		if (codepot_zip_dir ("{$tfname}.zip", $actual_tfname, $topdir, array('.svn')) === FALSE)  | 		if (codepot_zip_dir ("{$tfname}.zip", $actual_tfname, $topdir, array('.svn')) === FALSE)  | ||||||
| 		{ | 		{ | ||||||
| 			codepot_delete_files ($actual_tfname, TRUE); | 			codepot_delete_files ($actual_tfname, TRUE); | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user