summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/g2_import/helpers/g2_import.php6
-rw-r--r--modules/gallery/models/item.php2
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php
index c3737f8f..515eb73d 100644
--- a/modules/g2_import/helpers/g2_import.php
+++ b/modules/g2_import/helpers/g2_import.php
@@ -452,9 +452,9 @@ class g2_import_Core {
"title" => "title",
"viewCount" => "view_count");
$direction_map = array(
- 1 => "asc",
- ORDER_ASCENDING => "asc",
- ORDER_DESCENDING => "desc");
+ 1 => "ASC",
+ ORDER_ASCENDING => "ASC",
+ ORDER_DESCENDING => "DESC");
// Only consider G2's first sort order
$g2_order = explode("|", $g2_album->getOrderBy() . "");
$g2_order = $g2_order[0];
diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php
index 34c22021..485cd8cf 100644
--- a/modules/gallery/models/item.php
+++ b/modules/gallery/models/item.php
@@ -530,7 +530,7 @@ class Item_Model extends ORM_MPTT {
* the first child in the album is at position 1.
*/
public function get_position($child, $where=array()) {
- if ($this->sort_order == "DESC") {
+ if (!strcasecmp($this->sort_order, "DESC")) {
$comp = ">";
} else {
$comp = "<";