From 0020f87d6a23ce00200074b678a9293d055e27a3 Mon Sep 17 00:00:00 2001
From: Joe7 <jozsef.rnagy@site.hu>
Date: Sat, 15 Jan 2011 21:49:22 +0100
Subject: Fixed paging for albums ordered by random. MySql has problems when
 comparing float values against -seemingly same- float input, see
 http://dev.mysql.com/doc/refman/5.0/en/problems-with-float.html for details.
 Fixes #1610

---
 installer/install.sql | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'installer/install.sql')

diff --git a/installer/install.sql b/installer/install.sql
index 0ed7f2f3..07aae36d 100644
--- a/installer/install.sql
+++ b/installer/install.sql
@@ -160,7 +160,7 @@ CREATE TABLE {items} (
   `name` varchar(255) DEFAULT NULL,
   `owner_id` int(9) DEFAULT NULL,
   `parent_id` int(9) NOT NULL,
-  `rand_key` float DEFAULT NULL,
+  `rand_key` decimal(11,10) DEFAULT NULL,
   `relative_path_cache` varchar(255) DEFAULT NULL,
   `relative_url_cache` varchar(255) DEFAULT NULL,
   `resize_dirty` tinyint(1) DEFAULT '1',
@@ -244,7 +244,7 @@ CREATE TABLE {modules} (
   KEY `weight` (`weight`)
 ) AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO {modules} VALUES (1,1,'gallery',43,1);
+INSERT INTO {modules} VALUES (1,1,'gallery',44,1);
 INSERT INTO {modules} VALUES (2,1,'user',3,2);
 INSERT INTO {modules} VALUES (3,1,'comment',3,3);
 INSERT INTO {modules} VALUES (4,1,'organize',3,4);
-- 
cgit v1.2.3


From df703fbd5cf8f3c5152cd6448dd0e08b3e48ea93 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta <bharat@menalto.com>
Date: Mon, 17 Jan 2011 20:06:54 -0800
Subject: Update installer for #1612 and #1605.

---
 installer/install.sql | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

(limited to 'installer/install.sql')

diff --git a/installer/install.sql b/installer/install.sql
index 07aae36d..1d2e6720 100644
--- a/installer/install.sql
+++ b/installer/install.sql
@@ -225,7 +225,7 @@ CREATE TABLE {messages} (
   `id` int(9) NOT NULL AUTO_INCREMENT,
   `key` varchar(255) DEFAULT NULL,
   `severity` varchar(32) DEFAULT NULL,
-  `value` varchar(255) DEFAULT NULL,
+  `value` text,
   PRIMARY KEY (`id`),
   UNIQUE KEY `key` (`key`)
 ) DEFAULT CHARSET=utf8;
@@ -244,7 +244,7 @@ CREATE TABLE {modules} (
   KEY `weight` (`weight`)
 ) AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO {modules} VALUES (1,1,'gallery',44,1);
+INSERT INTO {modules} VALUES (1,1,'gallery',46,1);
 INSERT INTO {modules} VALUES (2,1,'user',3,2);
 INSERT INTO {modules} VALUES (3,1,'comment',3,3);
 INSERT INTO {modules} VALUES (4,1,'organize',3,4);
@@ -382,7 +382,7 @@ CREATE TABLE {vars} (
   `value` text,
   PRIMARY KEY (`id`),
   UNIQUE KEY `module_name` (`module_name`,`name`)
-) AUTO_INCREMENT=39 DEFAULT CHARSET=utf8;
+) AUTO_INCREMENT=40 DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
 INSERT INTO {vars} VALUES (NULL,'gallery','active_site_theme','wind');
 INSERT INTO {vars} VALUES (NULL,'gallery','active_admin_theme','admin_wind');
@@ -392,8 +392,9 @@ INSERT INTO {vars} VALUES (NULL,'gallery','resize_size','640');
 INSERT INTO {vars} VALUES (NULL,'gallery','default_locale','en_US');
 INSERT INTO {vars} VALUES (NULL,'gallery','image_quality','75');
 INSERT INTO {vars} VALUES (NULL,'gallery','image_sharpen','15');
+INSERT INTO {vars} VALUES (NULL,'gallery','upgrade_checker_auto_enabled','1');
 INSERT INTO {vars} VALUES (NULL,'gallery','blocks_dashboard_sidebar','a:4:{i:2;a:2:{i:0;s:7:\"gallery\";i:1;s:11:\"block_adder\";}i:3;a:2:{i:0;s:7:\"gallery\";i:1;s:5:\"stats\";}i:4;a:2:{i:0;s:7:\"gallery\";i:1;s:13:\"platform_info\";}i:5;a:2:{i:0;s:7:\"gallery\";i:1;s:12:\"project_news\";}}');
-INSERT INTO {vars} VALUES (NULL,'gallery','blocks_dashboard_center','a:3:{i:6;a:2:{i:0;s:7:\"gallery\";i:1;s:7:\"welcome\";}i:7;a:2:{i:0;s:7:\"gallery\";i:1;s:12:\"photo_stream\";}i:8;a:2:{i:0;s:7:\"gallery\";i:1;s:11:\"log_entries\";}}');
+INSERT INTO {vars} VALUES (NULL,'gallery','blocks_dashboard_center','a:4:{i:6;a:2:{i:0;s:7:\"gallery\";i:1;s:7:\"welcome\";}i:7;a:2:{i:0;s:7:\"gallery\";i:1;s:15:\"upgrade_checker\";}i:8;a:2:{i:0;s:7:\"gallery\";i:1;s:12:\"photo_stream\";}i:9;a:2:{i:0;s:7:\"gallery\";i:1;s:11:\"log_entries\";}}');
 INSERT INTO {vars} VALUES (NULL,'gallery','choose_default_tookit','1');
 INSERT INTO {vars} VALUES (NULL,'gallery','date_format','Y-M-d');
 INSERT INTO {vars} VALUES (NULL,'gallery','date_time_format','Y-M-d H:i:s');
@@ -411,7 +412,7 @@ INSERT INTO {vars} VALUES (NULL,'gallery','email_line_length','70');
 INSERT INTO {vars} VALUES (NULL,'gallery','email_header_separator','s:1:\"\n\";');
 INSERT INTO {vars} VALUES (NULL,'gallery','show_user_profiles_to','registered_users');
 INSERT INTO {vars} VALUES (NULL,'gallery','extra_binary_paths','/usr/local/bin:/opt/local/bin:/opt/bin');
-INSERT INTO {vars} VALUES (NULL,'gallery','blocks_site_sidebar','a:4:{i:9;a:2:{i:0;s:7:\"gallery\";i:1;s:8:\"language\";}i:10;a:2:{i:0;s:4:\"info\";i:1;s:8:\"metadata\";}i:11;a:2:{i:0;s:3:\"rss\";i:1;s:9:\"rss_feeds\";}i:12;a:2:{i:0;s:3:\"tag\";i:1;s:3:\"tag\";}}');
+INSERT INTO {vars} VALUES (NULL,'gallery','blocks_site_sidebar','a:4:{i:10;a:2:{i:0;s:7:\"gallery\";i:1;s:8:\"language\";}i:11;a:2:{i:0;s:4:\"info\";i:1;s:8:\"metadata\";}i:12;a:2:{i:0;s:3:\"rss\";i:1;s:9:\"rss_feeds\";}i:13;a:2:{i:0;s:3:\"tag\";i:1;s:3:\"tag\";}}');
 INSERT INTO {vars} VALUES (NULL,'gallery','identity_provider','user');
 INSERT INTO {vars} VALUES (NULL,'user','mininum_password_length','5');
 INSERT INTO {vars} VALUES (NULL,'comment','spam_caught','0');
-- 
cgit v1.2.3


From f657a05d7ed21423afb925755bacbb07a1384044 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta <bharat@menalto.com>
Date: Tue, 18 Jan 2011 10:06:29 -0800
Subject: Get rid of the "organize needs rest" message when upgrading to the
 new organize; it may be hanging around from a prior version.  Reinstate the
 installer for this.  Bump organize module to v4.  Follow-on for #1584.

---
 installer/install.sql                           |  2 +-
 modules/organize/helpers/organize_installer.php | 28 +++++++++++++++++++++++++
 modules/organize/module.info                    |  2 +-
 3 files changed, 30 insertions(+), 2 deletions(-)
 create mode 100644 modules/organize/helpers/organize_installer.php

(limited to 'installer/install.sql')

diff --git a/installer/install.sql b/installer/install.sql
index 1d2e6720..865cb2a4 100644
--- a/installer/install.sql
+++ b/installer/install.sql
@@ -247,7 +247,7 @@ CREATE TABLE {modules} (
 INSERT INTO {modules} VALUES (1,1,'gallery',46,1);
 INSERT INTO {modules} VALUES (2,1,'user',3,2);
 INSERT INTO {modules} VALUES (3,1,'comment',3,3);
-INSERT INTO {modules} VALUES (4,1,'organize',3,4);
+INSERT INTO {modules} VALUES (4,1,'organize',4,4);
 INSERT INTO {modules} VALUES (5,1,'info',2,5);
 INSERT INTO {modules} VALUES (6,1,'rss',1,6);
 INSERT INTO {modules} VALUES (7,1,'search',1,7);
diff --git a/modules/organize/helpers/organize_installer.php b/modules/organize/helpers/organize_installer.php
new file mode 100644
index 00000000..d68bc3b6
--- /dev/null
+++ b/modules/organize/helpers/organize_installer.php
@@ -0,0 +1,28 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Gallery - a web based photo album viewer and editor
+ * Copyright (C) 2000-2010 Bharat Mediratta
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+class organize_installer {
+  static function upgrade($version) {
+    if ($version < 4) {
+      // No longer necessary, make sure that it's cleared.
+      site_status::clear("organize_needs_rest");
+      module::set_version("organize", $version = 4);
+    }
+  }
+}
diff --git a/modules/organize/module.info b/modules/organize/module.info
index be0bc86d..0d16144d 100644
--- a/modules/organize/module.info
+++ b/modules/organize/module.info
@@ -1,3 +1,3 @@
 name = "Organize"
 description = "Visually rearrange and move photos in your gallery"
-version = 3
+version = 4
-- 
cgit v1.2.3

