Language changes, take them while they are hot.

#13295


git-svn-id: file:///svn/phpbb/trunk@8009 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Henry Sudhof 2007-08-06 10:49:42 +00:00
parent 7693609d0c
commit 4c4dbba46d
3 changed files with 36 additions and 7 deletions

View file

@ -203,6 +203,8 @@ p a {
<li>[Fix] Properly parse SQL expressions for Oracle (Bug #13916)</li> <li>[Fix] Properly parse SQL expressions for Oracle (Bug #13916)</li>
<li>[Fix] Added label bindings to the custom profile fields in the ACP (Bug #13936) - patch provided by damnian</li> <li>[Fix] Added label bindings to the custom profile fields in the ACP (Bug #13936) - patch provided by damnian</li>
<li>[Change] Made group avatar/rank changes more intuitive</li> <li>[Change] Made group avatar/rank changes more intuitive</li>
<li>[Fix] Give more feedback in icon/smilie management (Bug #13295)</li>
</ul> </ul>

View file

@ -323,6 +323,7 @@ class acp_icons
} }
} }
$icons_updated = 0;
foreach ($images as $image) foreach ($images as $image)
{ {
if (($mode == 'smilies' && ($image_emotion[$image] == '' || $image_code[$image] == '')) || if (($mode == 'smilies' && ($image_emotion[$image] == '' || $image_code[$image] == '')) ||
@ -387,25 +388,43 @@ class acp_icons
SET " . $db->sql_build_array('UPDATE', $img_sql) . " SET " . $db->sql_build_array('UPDATE', $img_sql) . "
WHERE {$fields}_id = " . $image_id[$image]; WHERE {$fields}_id = " . $image_id[$image];
$db->sql_query($sql); $db->sql_query($sql);
$icons_updated++;
} }
else if ($action !== 'modify') else if ($action !== 'modify')
{ {
$sql = "INSERT INTO $table " . $db->sql_build_array('INSERT', $img_sql); $sql = "INSERT INTO $table " . $db->sql_build_array('INSERT', $img_sql);
$db->sql_query($sql); $db->sql_query($sql);
$icons_updated++;
} }
} }
} }
$cache->destroy('_icons'); $cache->destroy('_icons');
$cache->destroy('sql', $table); $cache->destroy('sql', $table);
$level = E_USER_NOTICE;
switch ($icons_updated)
{
case 0:
$suc_lang = "{$lang}_NONE";
$level = E_USER_WARNING;
break;
case 1:
$suc_lang = "{$lang}_ONE";
break;
default:
$suc_lang = $lang;
}
if ($action == 'modify') if ($action == 'modify')
{ {
trigger_error($user->lang[$lang . '_EDITED'] . adm_back_link($this->u_action)); trigger_error($user->lang[$suc_lang . '_EDITED'] . adm_back_link($this->u_action), $level);
} }
else else
{ {
trigger_error($user->lang[$lang . '_ADDED'] . adm_back_link($this->u_action)); trigger_error($user->lang[$suc_lang . '_ADDED'] . adm_back_link($this->u_action), $level);
} }
break; break;

View file

@ -108,11 +108,15 @@ $lang = array_merge($lang, array(
'FIRST' => 'First', 'FIRST' => 'First',
'ICONS_ADD' => 'Add a new icon', 'ICONS_ADD' => 'Add a new icon',
'ICONS_ADDED' => 'The icon has been added successfully.', 'ICON_NONE_ADDED' => 'No icons were added.',
'ICONS_ONE_ADDED' => 'The icon has been added successfully.',
'ICONS_ADDED' => 'The icons have been added successfully.',
'ICONS_CONFIG' => 'Icon configuration', 'ICONS_CONFIG' => 'Icon configuration',
'ICONS_DELETED' => 'The icon has been removed successfully.', 'ICONS_DELETED' => 'The icon has been removed successfully.',
'ICONS_EDIT' => 'Edit icon', 'ICONS_EDIT' => 'Edit icon',
'ICONS_EDITED' => 'The icon has been updated successfully.', 'ICONS_ONE_EDITED' => 'The icon has been updated successfully.',
'ICON_NONE_EDITED' => 'No icons were updated.',
'ICONS_EDITED' => 'The icons have been updated successfully.',
'ICONS_HEIGHT' => 'Icon height', 'ICONS_HEIGHT' => 'Icon height',
'ICONS_IMAGE' => 'Icon image', 'ICONS_IMAGE' => 'Icon image',
'ICONS_IMPORTED' => 'The icons pack has been installed successfully.', 'ICONS_IMPORTED' => 'The icons pack has been installed successfully.',
@ -144,12 +148,16 @@ $lang = array_merge($lang, array(
'SELECT_PACKAGE' => 'Select a package file', 'SELECT_PACKAGE' => 'Select a package file',
'SMILIES_ADD' => 'Add a new smiley', 'SMILIES_ADD' => 'Add a new smiley',
'SMILIES_ADDED' => 'The smiley has been added successfully.', 'SMILIES_NONE_ADDED' => 'No smilies were added.',
'SMILIE_ONE_ADDED' => 'The smiley has been added successfully.',
'SMILIES_ADDED' => 'The smilies have been added successfully.',
'SMILIES_CODE' => 'Smiley code', 'SMILIES_CODE' => 'Smiley code',
'SMILIES_CONFIG' => 'Smiley configuration', 'SMILIES_CONFIG' => 'Smiley configuration',
'SMILIES_DELETED' => 'The smiley has been removed successfully.', 'SMILIES_DELETED' => 'The smiley has been removed successfully.',
'SMILIES_EDIT' => 'Edit smiley', 'SMILIES_EDIT' => 'Edit smiley',
'SMILIES_EDITED' => 'The smiley has been updated successfully.', 'SMILIES_NONE_EDITED' => 'No smilies were updated.',
'SMILIE__ONE_EDITED' => 'The smiley has been updated successfully.',
'SMILIES_EDITED' => 'The smilies have been updated successfully.',
'SMILIES_EMOTION' => 'Emotion', 'SMILIES_EMOTION' => 'Emotion',
'SMILIES_HEIGHT' => 'Smiley height', 'SMILIES_HEIGHT' => 'Smiley height',
'SMILIES_IMAGE' => 'Smiley image', 'SMILIES_IMAGE' => 'Smiley image',