Fix importing an Archive in default order. Update the test to now explicitly test for archive order. Fixes bug #11866.
This commit is contained in:
parent
c141978be1
commit
4899bcd7c4
4 changed files with 12 additions and 8 deletions
|
|
@ -11,6 +11,7 @@
|
|||
- fixed #11875: Error loading empty module
|
||||
- fixed #11873: findBrokenAssets.pl doesn't support custom assets
|
||||
- added findBrokenAssets.pl shows the classname of broken assets (William McKee, Knowmad Technologies)
|
||||
- fixed #11866: Default ordering for Zip files is wrong
|
||||
|
||||
7.10.0
|
||||
- fixed #11812: Checking www_ajaxSave's response in the cart js, urlencoding post parameters
|
||||
|
|
|
|||
|
|
@ -127,12 +127,9 @@ sub addArchive {
|
|||
$archive->extract( $tempdirName );
|
||||
|
||||
# Get all the files in the archive
|
||||
my @files;
|
||||
my $wanted = sub { push @files, $File::Find::name; $outputSub->('Found file: %s', $File::Find::name); };
|
||||
find( {
|
||||
wanted => $wanted,
|
||||
}, $tempdirName );
|
||||
|
||||
$outputSub->('Getting list of files for sorting purposes');
|
||||
my @files = map { File::Spec->catfile($tempdirName, $_); } $archive->files;
|
||||
|
||||
# Sort files by date
|
||||
if ($sortBy eq 'date') {
|
||||
# Hash for storing last modified timestamps
|
||||
|
|
|
|||
|
|
@ -672,6 +672,12 @@ our $I18N = {
|
|||
context => 'label for progress bar in addArchive',
|
||||
},
|
||||
|
||||
'Getting list of files for sorting purposes' => {
|
||||
message => 'Getting list of files for sorting purposes',
|
||||
lastUpdated => 1237403498,
|
||||
context => 'label for progress bar in addArchive',
|
||||
},
|
||||
|
||||
'Found file: %s' => {
|
||||
message => 'Found file %s',
|
||||
lastUpdated => 1237403498,
|
||||
|
|
|
|||
|
|
@ -134,9 +134,9 @@ $album->addArchive( WebGUI::Test->getTestCollateralPath('gallery_archive_sorting
|
|||
# Get all children
|
||||
my $images = $album->getLineage(['descendants'], { returnObjects => 1 });
|
||||
# Check order
|
||||
cmp_bag(
|
||||
cmp_deeply(
|
||||
[ map { $_->get("filename") } @{ $images } ],
|
||||
[ "photo1.jpg", "photo4.jpg", "photo3.jpg", "photo2.jpg", ],
|
||||
[ "photo3.jpg", "photo2.jpg", "photo4.jpg", "photo1.jpg", ],
|
||||
"Photos sorted by file order (all files exist)"
|
||||
);
|
||||
# Empty gallery album
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue