diff options
Diffstat (limited to 'core/helpers')
-rw-r--r-- | core/helpers/album.php | 4 | ||||
-rw-r--r-- | core/helpers/core_installer.php | 3 | ||||
-rw-r--r-- | core/helpers/movie.php | 2 | ||||
-rw-r--r-- | core/helpers/photo.php | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/core/helpers/album.php b/core/helpers/album.php index ecb8b5ff..db816470 100644 --- a/core/helpers/album.php +++ b/core/helpers/album.php @@ -46,7 +46,7 @@ class album_Core { $album->thumb_dirty = 1; $album->resize_dirty = 1; $album->rand_key = ((float)mt_rand()) / (float)mt_getrandmax(); - $album->sort_column = "id"; + $album->sort_column = "weight"; $album->sort_order = "ASC"; while (ORM::factory("item") @@ -93,7 +93,7 @@ class album_Core { $sort_order->dropdown("column", array("id" => "gAlbumSortColumn")) ->label(t("Sort by")) - ->options(array("id" => t("select a column"), + ->options(array("weight" => t("Default"), "created" => t("Creation Date"), "title" => t("Title"), "updated" => t("Updated Date"), diff --git a/core/helpers/core_installer.php b/core/helpers/core_installer.php index ef1afa19..7bdcd376 100644 --- a/core/helpers/core_installer.php +++ b/core/helpers/core_installer.php @@ -76,6 +76,7 @@ class core_installer { `rand_key` float default NULL, `sort_column` varchar(64) default NULL, `sort_order` char(4) default 'ASC', + `weight` int(9) NOT NULL default 0, PRIMARY KEY (`id`), KEY `parent_id` (`parent_id`), KEY `type` (`type`), @@ -201,7 +202,7 @@ class core_installer { $root->level = 1; $root->thumb_dirty = 1; $root->resize_dirty = 1; - $root->sort_column = "id"; + $root->sort_column = "weight"; $root->sort_order = "ASC"; $root->save(); access::add_item($root); diff --git a/core/helpers/movie.php b/core/helpers/movie.php index 59258dd9..658bc185 100644 --- a/core/helpers/movie.php +++ b/core/helpers/movie.php @@ -63,7 +63,7 @@ class movie_Core { $movie->mime_type = strtolower($pi["extension"]) == "mp4" ? "video/mp4" : "video/x-flv"; $movie->thumb_dirty = 1; $movie->resize_dirty = 1; - $movie->sort_column = "id"; + $movie->sort_column = "weight"; $movie->rand_key = ((float)mt_rand()) / (float)mt_getrandmax(); // Randomize the name if there's a conflict diff --git a/core/helpers/photo.php b/core/helpers/photo.php index 72e43419..a3f88ecb 100644 --- a/core/helpers/photo.php +++ b/core/helpers/photo.php @@ -63,7 +63,7 @@ class photo_Core { $photo->mime_type = empty($image_info['mime']) ? "application/unknown" : $image_info['mime']; $photo->thumb_dirty = 1; $photo->resize_dirty = 1; - $photo->sort_column = "id"; + $photo->sort_column = "weight"; $photo->rand_key = ((float)mt_rand()) / (float)mt_getrandmax(); // Randomize the name if there's a conflict |