diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-04-05 16:57:51 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-04-05 16:57:51 +0000 |
commit | f1eec57221f9bca047ff8d422ade1e26df0fa233 (patch) | |
tree | 8d271693657c7383be277742caaeaa9a81ccde9d /core/helpers/core_installer.php | |
parent | 15fc9b9399ede22879c5f5a6ff95d058986d0278 (diff) |
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.
Diffstat (limited to 'core/helpers/core_installer.php')
-rw-r--r-- | core/helpers/core_installer.php | 3 |
1 files changed, 2 insertions, 1 deletions
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); |