As promised here are the code changes that need to be made
in a file located at include/dir_inc.php
change the function findAllFiles to this
Code:
function findAllFiles( $the_dir, $the_array, $include_dirs=false, $ext=''){
$d = dir($the_dir);
while( $f = $d->read() ) {
if( $f == "." || $f == ".." ){
continue;
}
if( is_dir( "$the_dir/$f" ) ) {
if($include_dirs) {
$the_array[] = clean_path("$the_dir/$f");
}
$the_array = findAllFiles( "$the_dir/$f/", $the_array, $include_dirs , $ext );
} else {
if(empty($ext) || strrpos("$f", $ext) == strlen("$f") - strlen($ext)){
$the_array[] = clean_path("$the_dir/$f");
}
}
}
rsort($the_array);
return $the_array;
} This will allow you to filter the files that are being browsed and we are going to use this filter in the file
modules/UpgradeWizard/uw_utils.php. Around line 283 there is a function called getValidPatchName in there change
Code:
$upgrade_contents = findAllFiles($base_upgrade_dir, array(), false);
To
Code:
$upgrade_contents = findAllFiles($base_upgrade_dir, array(), false, 'zip');
This should boost your performance if not let me know. The patch is checked in, but it was checked in a while ago so i may be missing 1 more change that needs to occur.
As for deleting the zip you should be able to just remove it from the directory. You also will need to delete the manifest.php file.
Thanks,
Majed
Bookmarks