added check for ZipArchive availability

This commit is contained in:
hyung-hwan 2015-04-14 05:16:41 +00:00
parent 73d47592aa
commit 39ca68b8ad
3 changed files with 3 additions and 4 deletions

View File

@ -199,7 +199,6 @@ allow_set_time_limit = "no"
;------------------------------------------------------------------------------
signin_for_code_search = "yes"
;------------------------------------------------------------------------------
; customized footer
;------------------------------------------------------------------------------

View File

@ -151,9 +151,10 @@ if ( !function_exists ('codepot_zip_dir'))
// $exclude: file names to exclude. string or array of strings
function codepot_zip_dir ($output_file, $path, $local_path = NULL, $exclude = NULL)
{
$stack = array ();
if (!is_dir($path)) return FALSE;
if (!class_exists('ZipArchive')) return FALSE;
$stack = array ();
array_push ($stack, $path);
$prefix = strlen($path);

View File

@ -1042,7 +1042,6 @@ class SubversionModel extends Model
return FALSE;
}
//exec ("zip {$tfname}.zip -r {$actual_tfname}");
if (codepot_zip_dir ("{$tfname}.zip", $actual_tfname, $topdir, array('.svn')) === FALSE)
{
codepot_delete_files ($actual_tfname, TRUE);