phpBB

Code Changes

File: includes/acp/acp_language.php

  Unmodified   Added   Modified   Removed
Line 766Line 766
					trigger_error($user->lang['NO_REMOVE_DEFAULT_LANG'] . adm_back_link($this->u_action), E_USER_WARNING);
}


					trigger_error($user->lang['NO_REMOVE_DEFAULT_LANG'] . adm_back_link($this->u_action), E_USER_WARNING);
}


 
				if (confirm_box(true))
{

				$db->sql_query('DELETE FROM ' . LANG_TABLE . ' WHERE lang_id = ' . $lang_id);

$sql = 'UPDATE ' . USERS_TABLE . "

				$db->sql_query('DELETE FROM ' . LANG_TABLE . ' WHERE lang_id = ' . $lang_id);

$sql = 'UPDATE ' . USERS_TABLE . "

Line 788Line 790
				add_log('admin', 'LOG_LANGUAGE_PACK_DELETED', $row['lang_english_name']);

trigger_error(sprintf($user->lang['LANGUAGE_PACK_DELETED'], $row['lang_english_name']) . adm_back_link($this->u_action));

				add_log('admin', 'LOG_LANGUAGE_PACK_DELETED', $row['lang_english_name']);

trigger_error(sprintf($user->lang['LANGUAGE_PACK_DELETED'], $row['lang_english_name']) . adm_back_link($this->u_action));

 
				}
else
{
$s_hidden_fields = array(
'i' => $id,
'mode' => $mode,
'action' => $action,
'id' => $lang_id,
);
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields($s_hidden_fields));
}

			break;

case 'install':

			break;

case 'install':

Line 905Line 918
				$result = $db->sql_query($sql);
$default_lang_id = (int) $db->sql_fetchfield('lang_id');
$db->sql_freeresult($result);

				$result = $db->sql_query($sql);
$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.


// 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.

Line 919Line 935
				{
$row['lang_id'] = $lang_id;
$db->sql_query('INSERT INTO ' . PROFILE_LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $row));

				{
$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);


				}
$db->sql_freeresult($result);


Line 931Line 948
				{
$row['lang_id'] = $lang_id;
$db->sql_query('INSERT INTO ' . PROFILE_FIELDS_LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $row));

				{
$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']);


				}
$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;



break;


Line 1042Line 1062
				$iso_src .= htmlspecialchars_decode($row['lang_author']);
$compress->add_data($iso_src, 'language/' . $row['lang_iso'] . '/iso.txt');


				$iso_src .= htmlspecialchars_decode($row['lang_author']);
$compress->add_data($iso_src, 'language/' . $row['lang_iso'] . '/iso.txt');


				// index.html files
$compress->add_data('', 'language/' . $row['lang_iso'] . '/index.html');
$compress->add_data('', 'language/' . $row['lang_iso'] . '/email/index.html');
$compress->add_data('', 'language/' . $row['lang_iso'] . '/acp/index.html');

				// index.htm files
$compress->add_data('', 'language/' . $row['lang_iso'] . '/index.htm');
$compress->add_data('', 'language/' . $row['lang_iso'] . '/email/index.htm');
$compress->add_data('', 'language/' . $row['lang_iso'] . '/acp/index.htm');

				
if (sizeof($mod_files))
{

				
if (sizeof($mod_files))
{

					$compress->add_data('', 'language/' . $row['lang_iso'] . '/mods/index.html');

					$compress->add_data('', 'language/' . $row['lang_iso'] . '/mods/index.htm');

				}

$compress->close();

				}

$compress->close();

Line 1107Line 1127
		{
while (($file = readdir($dp)) !== false)
{

		{
while (($file = readdir($dp)) !== false)
{

				if ($file[0] != '.' && file_exists("{$phpbb_root_path}language/$file/iso.txt"))






				if ($file[0] == '.' || !is_dir($phpbb_root_path . 'language/' . $file))
{
continue;
}

if (file_exists("{$phpbb_root_path}language/$file/iso.txt"))

				{
if (!in_array($file, $installed))
{

				{
if (!in_array($file, $installed))
{

Line 1199Line 1224
';

// Language files in language root directory

';

// Language files in language root directory

		$this->main_files = array("common.$phpEx", "groups.$phpEx", "install.$phpEx", "mcp.$phpEx", "memberlist.$phpEx", "posting.$phpEx", "search.$phpEx", "ucp.$phpEx", "viewforum.$phpEx", "viewtopic.$phpEx", "help_bbcode.$phpEx", "help_faq.$phpEx");

		$this->main_files = array("captcha_qa.$phpEx", "captcha_recaptcha.$phpEx", "common.$phpEx", "groups.$phpEx", "install.$phpEx", "mcp.$phpEx", "memberlist.$phpEx", "posting.$phpEx", "search.$phpEx", "ucp.$phpEx", "viewforum.$phpEx", "viewtopic.$phpEx", "help_bbcode.$phpEx", "help_faq.$phpEx");

	}

/**

	}

/**

Line 1254Line 1279
		$keys = func_get_args();

$non_static = array_shift($keys);

		$keys = func_get_args();

$non_static = array_shift($keys);

		$value			= array_shift($keys);

		$value			= utf8_normalize_nfc(array_shift($keys));


if (!$non_static)
{


if (!$non_static)
{