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
317a4d759a
commit
b4c20a1203
4 changed files with 12 additions and 8 deletions
|
|
@ -11,6 +11,7 @@
|
||||||
- fixed #11875: Error loading empty module
|
- fixed #11875: Error loading empty module
|
||||||
- fixed #11873: findBrokenAssets.pl doesn't support custom assets
|
- fixed #11873: findBrokenAssets.pl doesn't support custom assets
|
||||||
- added findBrokenAssets.pl shows the classname of broken assets (William McKee, Knowmad Technologies)
|
- 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
|
7.10.0
|
||||||
- fixed #11812: Checking www_ajaxSave's response in the cart js, urlencoding post parameters
|
- fixed #11812: Checking www_ajaxSave's response in the cart js, urlencoding post parameters
|
||||||
|
|
|
||||||
|
|
@ -146,12 +146,9 @@ sub addArchive {
|
||||||
$archive->extract( $tempdirName );
|
$archive->extract( $tempdirName );
|
||||||
|
|
||||||
# Get all the files in the archive
|
# Get all the files in the archive
|
||||||
my @files;
|
$outputSub->('Getting list of files for sorting purposes');
|
||||||
my $wanted = sub { push @files, $File::Find::name; $outputSub->('Found file: %s', $File::Find::name); };
|
my @files = map { File::Spec->catfile($tempdirName, $_); } $archive->files;
|
||||||
find( {
|
|
||||||
wanted => $wanted,
|
|
||||||
}, $tempdirName );
|
|
||||||
|
|
||||||
# Sort files by date
|
# Sort files by date
|
||||||
if ($sortBy eq 'date') {
|
if ($sortBy eq 'date') {
|
||||||
# Hash for storing last modified timestamps
|
# Hash for storing last modified timestamps
|
||||||
|
|
|
||||||
|
|
@ -672,6 +672,12 @@ our $I18N = {
|
||||||
context => 'label for progress bar in addArchive',
|
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' => {
|
'Found file: %s' => {
|
||||||
message => 'Found file %s',
|
message => 'Found file %s',
|
||||||
lastUpdated => 1237403498,
|
lastUpdated => 1237403498,
|
||||||
|
|
|
||||||
|
|
@ -136,9 +136,9 @@ $album->addArchive( WebGUI::Test->getTestCollateralPath('gallery_archive_sorting
|
||||||
# Get all children
|
# Get all children
|
||||||
my $images = $album->getLineage(['descendants'], { returnObjects => 1 });
|
my $images = $album->getLineage(['descendants'], { returnObjects => 1 });
|
||||||
# Check order
|
# Check order
|
||||||
cmp_bag(
|
cmp_deeply(
|
||||||
[ map { $_->get("filename") } @{ $images } ],
|
[ 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)"
|
"Photos sorted by file order (all files exist)"
|
||||||
);
|
);
|
||||||
# Empty gallery album
|
# Empty gallery album
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue