aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/database_update.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-12-01 15:09:38 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2012-12-01 15:09:38 -0500
commit21caf6db6ffe8f58b663bd2d0441626ecdb02e72 (patch)
tree072a0e06d5ba128dfba985a4523d079f74541301 /phpBB/install/database_update.php
parentab6c284dddecebbe359874e205c7e2ed15e38ac1 (diff)
parent1ce06711811561d2e3fa3c6ba2aeac4ebffa6581 (diff)
downloadforums-21caf6db6ffe8f58b663bd2d0441626ecdb02e72.tar
forums-21caf6db6ffe8f58b663bd2d0441626ecdb02e72.tar.gz
forums-21caf6db6ffe8f58b663bd2d0441626ecdb02e72.tar.bz2
forums-21caf6db6ffe8f58b663bd2d0441626ecdb02e72.tar.xz
forums-21caf6db6ffe8f58b663bd2d0441626ecdb02e72.zip
Merge PR #545 branch 'brunoais/ticket/10601' into develop
* brunoais/ticket/10601: [ticket/10601] The ORDER BY is only taking space there [ticket/10601] New approach in the update algorithm [ticket/10601] Comment to help understanding the code [ticket/10601] Requested code changes [ticket/10601] Cosmetic code changes [ticket/10601] Database updating code v2 [ticket/10601] Database updating code [ticket/10601] Comment explaning the basename applied to categories [ticket/10601] Correctly access class property [ticket/10601]Move Inbox the default in private messages module
Diffstat (limited to 'phpBB/install/database_update.php')
-rw-r--r--phpBB/install/database_update.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index dde0fdcf47..e966756337 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -2770,6 +2770,28 @@ function change_database_data(&$no_updates, $version)
$config->set('site_home_text', '');
}
+ // PHPBB3-10601: Make inbox default. Add basename to ucp's pm category
+
+ // Get the category wanted while checking, at the same time, if this has already been applied
+ $sql = 'SELECT module_id, module_basename
+ FROM ' . MODULES_TABLE . "
+ WHERE module_basename <> 'ucp_pm' AND
+ module_langname='UCP_PM'
+ ";
+ $result = $db->sql_query_limit($sql, 1);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ // This update is still not applied. Applying it
+
+ $sql = 'UPDATE ' . MODULES_TABLE . "
+ SET module_basename = 'ucp_pm'
+ WHERE module_id = " . (int) $row['module_id'];
+
+ _sql($sql, $errored, $error_ary);
+ }
+ $db->sql_freeresult($result);
+
break;
}
}