From d097b4fc027ff558bf5f580298c7bed3696dcd3d Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 26 Feb 2009 23:38:17 +0000 Subject: Update to image_block based on bharat's feedback 1) move the rand_key column into core 2) don't do a max rand, just try to a get a random number less than the current random number if that doesn't successd look the other way --- core/helpers/core_installer.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core/helpers/core_installer.php') diff --git a/core/helpers/core_installer.php b/core/helpers/core_installer.php index 68b03a30..bf83c339 100644 --- a/core/helpers/core_installer.php +++ b/core/helpers/core_installer.php @@ -77,9 +77,11 @@ class core_installer { `updated` int(9) default NULL, `view_count` int(9) default 0, `width` int(9) default NULL, + `rand_key` float default NULL, PRIMARY KEY (`id`), KEY `parent_id` (`parent_id`), - KEY `type` (`type`)) + KEY `type` (`type`), + KEY `random` (`rand_key` DESC)) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); $db->query("CREATE TABLE `logs` ( @@ -119,7 +121,7 @@ class core_installer { PRIMARY KEY (`id`), UNIQUE KEY(`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); - + $db->query("CREATE TABLE `permissions` ( `id` int(9) NOT NULL auto_increment, `name` varchar(64) default NULL, -- cgit v1.2.3