diff options
author | Bruno Ais <brunoaiss@gmail.com> | 2012-11-07 22:26:54 +0000 |
---|---|---|
committer | Bruno Ais <brunoaiss@gmail.com> | 2012-11-26 17:45:31 +0000 |
commit | 85ebbbaec471ea64f22543e006f8c160b02d503f (patch) | |
tree | d5c3447cb3723e2bfed91aff49faf7d94e738be0 | |
parent | 80da19ca7c12feb2996fd9d64dbdc8cb5c3cd2d9 (diff) | |
download | forums-85ebbbaec471ea64f22543e006f8c160b02d503f.tar forums-85ebbbaec471ea64f22543e006f8c160b02d503f.tar.gz forums-85ebbbaec471ea64f22543e006f8c160b02d503f.tar.bz2 forums-85ebbbaec471ea64f22543e006f8c160b02d503f.tar.xz forums-85ebbbaec471ea64f22543e006f8c160b02d503f.zip |
[ticket/10601] Database updating code v2
Added the space after the (int) as requested
PHPBB3-10601
-rw-r--r-- | phpBB/install/database_update.php | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 7b20404cf2..620af92173 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -2753,29 +2753,29 @@ function change_database_data(&$no_updates, $version) // ticket/10601: Make inbox default. Add basename to ucp's pm category // Check if this was already applied - $sql = 'SELECT module_id, module_basename, parent_id, left_id, right_id - FROM ' . MODULES_TABLE . ' - WHERE - module_basename = \'ucp_pm\' - ORDER BY module_id'; - $result = $db->sql_query_limit($sql, 1); + $sql = 'SELECT module_id, module_basename, parent_id, left_id, right_id + FROM ' . MODULES_TABLE . ' + WHERE + module_basename = \'ucp_pm\' + ORDER BY module_id'; + $result = $db->sql_query_limit($sql, 1); - if ($row = $db->sql_fetchrow($result)) + if ($row = $db->sql_fetchrow($result)) + { + // Checking if this is not a category + if ($row['left_id'] === $row['right_id'] - 1) { - // Checking if this is not a category - if ($row['left_id'] === $row['right_id'] - 1) - { - // This update is still not applied. Applying it - - $sql = 'UPDATE ' . MODULES_TABLE . ' - SET module_basename = \'ucp_pm\' - WHERE module_id = ' . (int)$row['parent_id']; - - _sql($sql, $errored, $error_ary); + // This update is still not applied. Applying it - } + $sql = 'UPDATE ' . MODULES_TABLE . ' + SET module_basename = \'ucp_pm\' + WHERE module_id = ' . (int) $row['parent_id']; + + _sql($sql, $errored, $error_ary); + } - $db->sql_freeresult($result); + } + $db->sql_freeresult($result); break; } |