From f1eec57221f9bca047ff8d422ade1e26df0fa233 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sun, 5 Apr 2009 16:57:51 +0000 Subject: Add a weight column to the items model. Change the album ordering to use this as the default instead of id. This prepares the way for manual reordering in the organize functionality. --- core/helpers/core_installer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/helpers/core_installer.php') 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); -- cgit v1.2.3