[geeklog-cvs] geeklog: Fixed Links upgrade problems dealing with adding config...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Tue Mar 13 10:03:07 EDT 2012
changeset 8532:c4d1865f2cfd
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/c4d1865f2cfd
user: Tom <websitemaster at cogeco.net>
date: Tue Mar 13 09:21:24 2012 -0400
description:
Fixed Links upgrade problems dealing with adding configuration options and security for the tabs.
diffstat:
plugins/links/functions.inc | 31 +++++++++++++++++++------------
plugins/links/sql/mssql_updates.php | 2 --
plugins/links/sql/mysql_updates.php | 2 --
plugins/links/sql/pgsql_updates.php | 2 --
4 files changed, 19 insertions(+), 18 deletions(-)
diffs (86 lines):
diff -r 20c144c4aeaf -r c4d1865f2cfd plugins/links/functions.inc
--- a/plugins/links/functions.inc Tue Mar 13 09:19:28 2012 -0400
+++ b/plugins/links/functions.inc Tue Mar 13 09:21:24 2012 -0400
@@ -736,16 +736,18 @@
break;
case '2.0.1': // Last version of old install (Geeklog 1.5.2)
- if (! isset($_LI_CONF['new_window'])) {
- $c = config::get_instance();
- $c->add('new_window',false,'select',0,0,1,55,TRUE,'links');
- }
-
- if (! isset($_LI_CONF['category_permissions'])) {
- $c = config::get_instance();
- $c->add('fs_cpermissions', NULL, 'fieldset', 0, 3, NULL, 0, true, 'links');
- $c->add('category_permissions', array (3, 2, 2, 2),
- '@select', 0, 3, 12, 150, true, 'links');
+ if (! $current_config) {
+ if (! isset($_LI_CONF['new_window'])) {
+ $c = config::get_instance();
+ $c->add('new_window',false,'select',0,0,1,55,TRUE,'links');
+ }
+
+ if (! isset($_LI_CONF['category_permissions'])) {
+ $c = config::get_instance();
+ $c->add('fs_cpermissions', NULL, 'fieldset', 0, 3, NULL, 0, true, 'links');
+ $c->add('category_permissions', array (3, 2, 2, 2),
+ '@select', 0, 3, 12, 150, true, 'links');
+ }
}
$current_version = '2.1.0';
@@ -760,10 +762,15 @@
}
if (! $current_config) {
+ // Update to Config Tables must be performed here and not in regualar SQL update array since if config is current then they shouldn't be run
+ // Set new Tab column to whatever fieldset is
+ $sql = "UPDATE {$_TABLES['conf_values']} SET tab = fieldset WHERE group_name = 'links'";
+ DB_query($sql);
+
links_update_ConfValues_2_1_0();
-
- links_update_ConfigSecurity_2_1_0();
}
+
+ links_update_ConfigSecurity_2_1_0();
$current_version = '2.1.1';
break;
diff -r 20c144c4aeaf -r c4d1865f2cfd plugins/links/sql/mssql_updates.php
--- a/plugins/links/sql/mssql_updates.php Tue Mar 13 09:19:28 2012 -0400
+++ b/plugins/links/sql/mssql_updates.php Tue Mar 13 09:21:24 2012 -0400
@@ -68,8 +68,6 @@
),
'2.1.0' => array(
- // Set new Tab column to whatever fieldset is
- "UPDATE {$_TABLES['conf_values']} SET tab = fieldset WHERE group_name = 'links'",
"INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('config.links.tab_public', 'Access to configure public links list settings', 0)",
"INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('config.links.tab_admin', 'Access to configure links admin settings', 0)",
"INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('config.links.tab_permissions', 'Access to configure link permissions', 0)",
diff -r 20c144c4aeaf -r c4d1865f2cfd plugins/links/sql/mysql_updates.php
--- a/plugins/links/sql/mysql_updates.php Tue Mar 13 09:19:28 2012 -0400
+++ b/plugins/links/sql/mysql_updates.php Tue Mar 13 09:21:24 2012 -0400
@@ -63,8 +63,6 @@
),
'2.1.0' => array(
- // Set new Tab column to whatever fieldset is
- "UPDATE {$_TABLES['conf_values']} SET tab = fieldset WHERE group_name = 'links'",
"INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('config.links.tab_public', 'Access to configure public links list settings', 0)",
"INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('config.links.tab_admin', 'Access to configure links admin settings', 0)",
"INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('config.links.tab_permissions', 'Access to configure link permissions', 0)",
diff -r 20c144c4aeaf -r c4d1865f2cfd plugins/links/sql/pgsql_updates.php
--- a/plugins/links/sql/pgsql_updates.php Tue Mar 13 09:19:28 2012 -0400
+++ b/plugins/links/sql/pgsql_updates.php Tue Mar 13 09:21:24 2012 -0400
@@ -40,8 +40,6 @@
$_UPDATES = array(
'2.1.0' => array(
- // Set new Tab column to whatever fieldset is
- "UPDATE {$_TABLES['conf_values']} SET tab = fieldset WHERE group_name = 'links'",
"INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('config.links.tab_public', 'Access to configure public links list settings', 0)",
"INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('config.links.tab_admin', 'Access to configure links admin settings', 0)",
"INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('config.links.tab_permissions', 'Access to configure link permissions', 0)",
More information about the geeklog-cvs
mailing list