_db_add_field() calls table_by_key - so avoid calling it twice ...

This commit is contained in:
David Goodwin committed 2017-11-11 12:53:11 +00:00
1 parent 17e347de7f
commit 0f09b8c176
1 file changed
+1 -2
+1 -2
View File
@@ -1686,8 +1686,7 @@ function upgrade_1836_mysql() {
function upgrade_1837() {
# alternative contact means to reset a forgotten password
foreach(array('admin', 'mailbox') as $table_to_change) {
$table = table_by_key($table_to_change);
foreach(array('admin', 'mailbox') as $table) {
_db_add_field($table, 'phone', "varchar(30) {UTF-8} NOT NULL DEFAULT ''", 'active');
_db_add_field($table, 'email_other', "varchar(255) {UTF-8} NOT NULL DEFAULT ''", 'phone');
_db_add_field($table, 'token', "varchar(255) {UTF-8} NOT NULL DEFAULT ''", 'email_other');