aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2011-11-17 12:44:04 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2011-11-17 12:44:04 -0500
commitaeb896399c430e772d5489c981d9ccae603451e7 (patch)
treeacb502024ef66165cbdf1a5a667ea8deb023c547 /phpBB/includes/acp
parent39f8592312933eba903818f1a4de6bc5ac2b3dd0 (diff)
parentb2b057910e57961b3d31432267fadb4ddc922783 (diff)
downloadforums-aeb896399c430e772d5489c981d9ccae603451e7.tar
forums-aeb896399c430e772d5489c981d9ccae603451e7.tar.gz
forums-aeb896399c430e772d5489c981d9ccae603451e7.tar.bz2
forums-aeb896399c430e772d5489c981d9ccae603451e7.tar.xz
forums-aeb896399c430e772d5489c981d9ccae603451e7.zip
Merge remote-tracking branch 'nickvergessen/ticket/10157' into develop-olympus
* nickvergessen/ticket/10157: [ticket/10157] Add notification to update cpfs when installing a language.
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r--phpBB/includes/acp/acp_language.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php
index 598b390302..d560cdd0c5 100644
--- a/phpBB/includes/acp/acp_language.php
+++ b/phpBB/includes/acp/acp_language.php
@@ -919,6 +919,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"
@@ -932,6 +935,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);
@@ -944,12 +948,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;