diff --git a/class_image.php b/class_image.php index d931976..5e83ee2 100644 --- a/class_image.php +++ b/class_image.php @@ -186,7 +186,7 @@ class Image implements JsonSerializable { public static function getImagesForAlbum($albumid = 0) { global $globaldbh; - $query = "SELECT id FROM " . AppDB::TABLE_IMAGES . " WHERE album_id=:album_id ORDER BY title"; + $query = "SELECT id FROM " . AppDB::TABLE_IMAGES . " WHERE album_id=:album_id ORDER BY filename"; $sth = $globaldbh->prepare($query); $sth->bindValue(":album_id", (int) $albumid, PDO::PARAM_INT); $sth->execute(); @@ -238,7 +238,7 @@ class Image implements JsonSerializable { public static function getList() { global $globaldbh; - $query = "SELECT id FROM " . AppDB::TABLE_IMAGES . " ORDER BY album_id, title"; + $query = "SELECT id FROM " . AppDB::TABLE_IMAGES . " ORDER BY album_id, filename"; $sth = $globaldbh->prepare($query); $sth->execute(); $thelist = array(); diff --git a/js/scalemodels.js b/js/scalemodels.js index ebfe521..bbe3a6a 100644 --- a/js/scalemodels.js +++ b/js/scalemodels.js @@ -60,6 +60,7 @@ function refreshAlbums() { dataType: 'json', success: function(data, stat, jqo) { toastr.success("Album list refreshed", "Refresh"); + getAlbumInfo(); }, error: function(jqp, status, error) { toastr.error("Error refreshing album list!\n" + error, "Server Error");