Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ignore the presort when transferring over sort orders. Fixes #1710.

  • Loading branch information...
commit 701c1fb12f2f254d8d7e7756a09cb5e825123a2f 1 parent 15f4657
@bharat bharat authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 modules/g2_import/helpers/g2_import.php
View
5 modules/g2_import/helpers/g2_import.php
@@ -475,9 +475,10 @@ static function import_album(&$queue) {
1 => "ASC",
ORDER_ASCENDING => "ASC",
ORDER_DESCENDING => "DESC");
- // Only consider G2's first sort order
+ // G2 sorts can either be <sort> or <presort>|<sort>. Right now we can't
+ // map presorts so ignore them.
$g2_order = explode("|", $g2_album->getOrderBy() . "");
- $g2_order = $g2_order[0];
+ $g2_order = end($g2_order);
if (empty($g2_order)) {
$g2_order = g2(GalleryCoreApi::getPluginParameter('module', 'core', 'default.orderBy'));
}
Please sign in to comment.
Something went wrong with that request. Please try again.