mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Auto update fixes from DD32. see #5586
git-svn-id: https://develop.svn.wordpress.org/trunk@7238 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -231,7 +231,7 @@ function unzip_file($file, $to) {
|
||||
|
||||
// Is the archive valid?
|
||||
if ( false == ($archive_files = $archive->extract(PCLZIP_OPT_EXTRACT_AS_STRING)) )
|
||||
return new WP_Error('incompatible_archive', __('Incompatible archive'), $archive->error_string);
|
||||
return new WP_Error('incompatible_archive', __('Incompatible archive'), $archive->errorInfo(true));
|
||||
|
||||
if ( 0 == count($archive_files) )
|
||||
return new WP_Error('empty_archive', __('Empty archive'));
|
||||
@@ -240,12 +240,9 @@ function unzip_file($file, $to) {
|
||||
$path = explode('/', $to);
|
||||
$tmppath = '';
|
||||
for ( $j = 0; $j < count($path) - 1; $j++ ) {
|
||||
$prevpath = $tmppath;
|
||||
$tmppath .= $path[$j] . '/';
|
||||
if ( ! $fs->is_dir($tmppath) ) {
|
||||
//$fs->setDefaultPermissions( $fs->getchmod($tmppath) );
|
||||
if ( ! $fs->is_dir($tmppath) )
|
||||
$fs->mkdir($tmppath, 0755);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($archive_files as $file) {
|
||||
|
||||
Reference in New Issue
Block a user