aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2009-05-06 08:38:30 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2009-05-06 08:38:30 +0000
commit6c3532761bbbcb26cd4186e8b204d62a7391d331 (patch)
tree500c2c1dd00fdc5bc78e47d3c32af6696ebae77b
parent4bf4f8588ec214d801863a9753ba7c52b1a96bae (diff)
downloadforums-6c3532761bbbcb26cd4186e8b204d62a7391d331.tar
forums-6c3532761bbbcb26cd4186e8b204d62a7391d331.tar.gz
forums-6c3532761bbbcb26cd4186e8b204d62a7391d331.tar.bz2
forums-6c3532761bbbcb26cd4186e8b204d62a7391d331.tar.xz
forums-6c3532761bbbcb26cd4186e8b204d62a7391d331.zip
slight change for 3.0.5 for updating.
- only return auth options having 2 or more columns (does not change the outcome, the script works fine) - purge the theme after a successful update the easy way to let style.php do the job git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9510 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/install/database_update.php2
-rw-r--r--phpBB/install/install_update.php19
2 files changed, 6 insertions, 15 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index ee28799694..60a20920bb 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -943,7 +943,7 @@ function change_database_data(&$no_updates, $version)
$sql = 'SELECT auth_option
FROM ' . ACL_OPTIONS_TABLE . '
GROUP BY auth_option
- HAVING COUNT(*) >= 1';
+ HAVING COUNT(*) >= 2';
$result = $db->sql_query($sql);
$auth_options = array();
diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php
index ea87847fa2..07362b9e5e 100644
--- a/phpBB/install/install_update.php
+++ b/phpBB/install/install_update.php
@@ -454,7 +454,7 @@ class install_update extends module
// Refresh prosilver css data - this may cause some unhappy users, but
$sql = 'SELECT *
FROM ' . STYLES_THEME_TABLE . "
- WHERE theme_name = 'prosilver'";
+ WHERE LOWER(theme_name) = 'prosilver'";
$result = $db->sql_query($sql);
$theme = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
@@ -491,22 +491,13 @@ class install_update extends module
if ($recache)
{
- include_once($phpbb_root_path . 'includes/acp/acp_styles.' . $phpEx);
-
- $theme['theme_data'] = acp_styles::db_theme_data($theme);
- $theme['theme_mtime'] = $update_time;
-
- // Save CSS contents
- $sql_ary = array(
- 'theme_mtime' => $theme['theme_mtime'],
- 'theme_data' => $theme['theme_data']
- );
-
- $sql = 'UPDATE ' . STYLES_THEME_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
- WHERE theme_id = ' . $theme['theme_id'];
+ // Instead of re-caching here, we simply remove theme_data... HAR HAR HAR (think about a carribean pirate)
+ $sql = 'UPDATE ' . STYLES_THEME_TABLE . " SET theme_data = ''
+ WHERE theme_id = " . $theme['theme_id'];
$db->sql_query($sql);
$cache->destroy('sql', STYLES_THEME_TABLE);
+ $cache->destroy('sql', STYLES_TABLE);
}
}