aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-11-27 16:05:23 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-11-27 16:05:23 +0000
commit688ef7560a4c785ab5191ca2ff589c9361c459f6 (patch)
tree019d567d43f1e1db2495424191266d23f03a02a2 /phpBB
parent22c729c41b275d443e1ec3ffc9c6afc723b339ac (diff)
downloadforums-688ef7560a4c785ab5191ca2ff589c9361c459f6.tar
forums-688ef7560a4c785ab5191ca2ff589c9361c459f6.tar.gz
forums-688ef7560a4c785ab5191ca2ff589c9361c459f6.tar.bz2
forums-688ef7560a4c785ab5191ca2ff589c9361c459f6.tar.xz
forums-688ef7560a4c785ab5191ca2ff589c9361c459f6.zip
Using a different approach for the data updates (same as the schema updates)
git-svn-id: file:///svn/phpbb/trunk@6671 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions.php2
-rw-r--r--phpBB/includes/ucp/ucp_prefs.php2
-rw-r--r--phpBB/install/database_update.php43
3 files changed, 21 insertions, 26 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 614b5bbc64..5d12f9684c 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -687,7 +687,7 @@ function tz_select($default = '', $truncate = false)
if ($truncate)
{
$zone_trunc = truncate_string($zone, 50, false, '...');
- }
+ }
else
{
$zone_trunc = $zone;
diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php
index d9afd7e623..e72673c023 100644
--- a/phpBB/includes/ucp/ucp_prefs.php
+++ b/phpBB/includes/ucp/ucp_prefs.php
@@ -130,7 +130,7 @@ class ucp_prefs
'S_LANG_OPTIONS' => language_select($data['lang']),
'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($data['style']),
- 'S_TZ_OPTIONS' => tz_select($data['tz'], true),
+ 'S_TZ_OPTIONS' => tz_select($data['tz'], true),
'S_CAN_HIDE_ONLINE' => ($auth->acl_get('u_hideonline')) ? true : false,
'S_SELECT_NOTIFY' => ($config['jab_enable'] && $user->data['user_jabber'] && @extension_loaded('xml')) ? true : false)
);
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index ea736bf4c4..461b5807c2 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -308,7 +308,7 @@ $database_update_info = array(
),
),
// Latest version
- '3.0.b4-dev' => array(),
+ '3.0.b4' => array(),
);
// Determine mapping database type
@@ -458,34 +458,29 @@ $errored = $no_updates = false;
flush();
+$no_updates = true;
+
// some code magic
-switch ($current_version)
+if (version_compare($current_version, '3.0.b3', '<'))
{
- case '3.0.b3':
- // Set group_founder_manage for administrators group
- $sql = 'SELECT group_id
- FROM ' . GROUPS_TABLE . "
- WHERE group_name = 'ADMINISTRATORS'
- AND group_type = " . GROUP_SPECIAL;
- $result = $db->sql_query($sql);
- $group_id = (int) $db->sql_fetchfield('group_id');
- $db->sql_freeresult($result);
-
- if ($group_id)
- {
- $sql = 'UPDATE ' . GROUPS_TABLE . ' SET group_founder_manage = 1 WHERE group_id = ' . $group_id;
- _sql($sql, $errored, $error_ary);
- }
+ // Set group_founder_manage for administrators group
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = 'ADMINISTRATORS'
+ AND group_type = " . GROUP_SPECIAL;
+ $result = $db->sql_query($sql);
+ $group_id = (int) $db->sql_fetchfield('group_id');
+ $db->sql_freeresult($result);
- add_bots();
+ if ($group_id)
+ {
+ $sql = 'UPDATE ' . GROUPS_TABLE . ' SET group_founder_manage = 1 WHERE group_id = ' . $group_id;
+ _sql($sql, $errored, $error_ary);
+ }
- // No need to change here. Before this line, no break should appear
- break;
+ add_bots();
- case '3.0.b4-dev':
- default:
- $no_updates = true;
- break;
+ $no_updates = false;
}
_write_result($no_updates, $errored, $error_ary);