diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-11-17 12:46:00 -0500 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-11-17 12:46:00 -0500 |
commit | ff91c037c9ff575a6085c43406fa68f351842792 (patch) | |
tree | d42ebb769d5be308562803676fd9d1d64200b703 | |
parent | 512aee5124c04bed2b20f416796b30fdf1101c02 (diff) | |
parent | aeb896399c430e772d5489c981d9ccae603451e7 (diff) | |
download | forums-ff91c037c9ff575a6085c43406fa68f351842792.tar forums-ff91c037c9ff575a6085c43406fa68f351842792.tar.gz forums-ff91c037c9ff575a6085c43406fa68f351842792.tar.bz2 forums-ff91c037c9ff575a6085c43406fa68f351842792.tar.xz forums-ff91c037c9ff575a6085c43406fa68f351842792.zip |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/10157] Add notification to update cpfs when installing a language.
-rw-r--r-- | phpBB/includes/acp/acp_language.php | 9 | ||||
-rw-r--r-- | phpBB/language/en/acp/language.php | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php index ffa8df1848..91b48f013e 100644 --- a/phpBB/includes/acp/acp_language.php +++ b/phpBB/includes/acp/acp_language.php @@ -869,6 +869,9 @@ class acp_language $default_lang_id = (int) $db->sql_fetchfield('lang_id'); $db->sql_freeresult($result); + // We want to notify the admin that custom profile fields need to be updated for the new language. + $notify_cpf_update = false; + // From the mysql documentation: // Prior to MySQL 4.0.14, the target table of the INSERT statement cannot appear in the FROM clause of the SELECT part of the query. This limitation is lifted in 4.0.14. // Due to this we stay on the safe side if we do the insertion "the manual way" @@ -882,6 +885,7 @@ class acp_language { $row['lang_id'] = $lang_id; $db->sql_query('INSERT INTO ' . PROFILE_LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $row)); + $notify_cpf_update = true; } $db->sql_freeresult($result); @@ -894,12 +898,15 @@ class acp_language { $row['lang_id'] = $lang_id; $db->sql_query('INSERT INTO ' . PROFILE_FIELDS_LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $row)); + $notify_cpf_update = true; } $db->sql_freeresult($result); add_log('admin', 'LOG_LANGUAGE_PACK_INSTALLED', $lang_pack['name']); - trigger_error(sprintf($user->lang['LANGUAGE_PACK_INSTALLED'], $lang_pack['name']) . adm_back_link($this->u_action)); + $message = sprintf($user->lang['LANGUAGE_PACK_INSTALLED'], $lang_pack['name']); + $message .= ($notify_cpf_update) ? '<br /><br />' . $user->lang['LANGUAGE_PACK_CPF_UPDATE'] : ''; + trigger_error($message . adm_back_link($this->u_action)); break; diff --git a/phpBB/language/en/acp/language.php b/phpBB/language/en/acp/language.php index 8d57c2f3ce..790997e8a6 100644 --- a/phpBB/language/en/acp/language.php +++ b/phpBB/language/en/acp/language.php @@ -59,6 +59,7 @@ $lang = array_merge($lang, array( 'LANGUAGE_PACK_DELETED' => 'The language pack <strong>%s</strong> has been removed successfully. All users using this language have been reset to the boards default language.', 'LANGUAGE_PACK_DETAILS' => 'Language pack details', 'LANGUAGE_PACK_INSTALLED' => 'The language pack <strong>%s</strong> has been successfully installed.', + 'LANGUAGE_PACK_CPF_UPDATE' => 'The custom profile fields’ language strings were copied from the default language. Please change them if necessary.', 'LANGUAGE_PACK_ISO' => 'ISO', 'LANGUAGE_PACK_LOCALNAME' => 'Local name', 'LANGUAGE_PACK_NAME' => 'Name', |