aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_language.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/acp/acp_language.php')
-rw-r--r--phpBB/includes/acp/acp_language.php147
1 files changed, 57 insertions, 90 deletions
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php
index d560cdd0c5..013aab670f 100644
--- a/phpBB/includes/acp/acp_language.php
+++ b/phpBB/includes/acp/acp_language.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -34,6 +33,7 @@ class acp_language
global $config, $db, $user, $auth, $template, $cache;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
global $safe_mode, $file_uploads;
+ global $request;
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
@@ -58,7 +58,7 @@ class acp_language
if (isset($_POST['missing_file']))
{
$missing_file = request_var('missing_file', array('' => 0));
- list($_REQUEST['language_file'], ) = array_keys($missing_file);
+ $request->overwrite('language_file', array_shift(array_keys($missing_file)));
}
$selected_lang_file = request_var('language_file', '|common.' . $phpEx);
@@ -68,6 +68,23 @@ class acp_language
$this->language_directory = basename($this->language_directory);
$this->language_file = basename($this->language_file);
+ // detect language file type
+ if ($this->language_directory == 'email')
+ {
+ $language_file_type = 'email';
+ $request_default = '';
+ }
+ else if (strpos($this->language_file, 'help_') === 0)
+ {
+ $language_file_type = 'help';
+ $request_default = array(0 => array(0 => ''));
+ }
+ else
+ {
+ $language_file_type = 'normal';
+ $request_default = array('' => '');
+ }
+
$user->add_lang('acp/language');
$this->tpl_name = 'acp_language';
$this->page_title = 'ACP_LANGUAGE_PACKS';
@@ -83,11 +100,25 @@ class acp_language
switch ($method)
{
case 'ftp':
- $transfer = new ftp(request_var('host', ''), request_var('username', ''), request_var('password', ''), request_var('root_path', ''), request_var('port', ''), request_var('timeout', ''));
+ $transfer = new ftp(
+ request_var('host', ''),
+ request_var('username', ''),
+ htmlspecialchars_decode($request->untrimmed_variable('password', '')),
+ request_var('root_path', ''),
+ request_var('port', ''),
+ request_var('timeout', '')
+ );
break;
case 'ftp_fsock':
- $transfer = new ftp_fsock(request_var('host', ''), request_var('username', ''), request_var('password', ''), request_var('root_path', ''), request_var('port', ''), request_var('timeout', ''));
+ $transfer = new ftp_fsock(
+ request_var('host', ''),
+ request_var('username', ''),
+ htmlspecialchars_decode($request->untrimmed_variable('password', '')),
+ request_var('root_path', ''),
+ request_var('port', ''),
+ request_var('timeout', '')
+ );
break;
default:
@@ -119,7 +150,7 @@ class acp_language
'DATA' => $data,
'NAME' => $user->lang[strtoupper($method . '_' . $data)],
'EXPLAIN' => $user->lang[strtoupper($method . '_' . $data) . '_EXPLAIN'],
- 'DEFAULT' => (!empty($_REQUEST[$data])) ? request_var($data, '') : $default
+ 'DEFAULT' => $request->variable($data, (string) $default),
));
}
@@ -130,7 +161,7 @@ class acp_language
'method' => $method)
);
- $hidden_data .= build_hidden_fields(array('entry' => $_POST['entry']), true, STRIP);
+ $hidden_data .= build_hidd
@@ -10,7 +10,7 @@
msgid ""
msgstr ""
"Project-Id-Version: DrakX-is\n"
-"POT-Creation-Date: 2003-08-13 03:40+0200\n"
+"POT-Creation-Date: 2003-09-09 17:07+0200\n"
"PO-Revision-Date: 2003-03-10 10:18GMT\n"
"Last-Translator: Pjetur G. Hjaltason <pjetur@pjetur.net>\n"
"Language-Team: Icelandic <kde-isl@molar.is>\n"
@@ -63,6 +63,11 @@ msgstr "netgátt prentara"
msgid "Please insert floppy disk:"
msgstr "Settu diskling í drif:"
+#: ../../standalone/drakTermServ:1
+#, c-format
+msgid "DrakTermServ"
+msgstr ""
+
#: ../../install_steps_interactive.pm:1
#, c-format
msgid "PCMCIA"
@@ -92,6 +97,11 @@ msgstr "Hverju viltu bæta við?"
msgid "Restore partition table"
msgstr "Endurheimta sneiðatöflunna"
+#: ../../standalone/drakconnect:1
+#, fuzzy, c-format
+msgid "Configure hostname..."
+msgstr "Tilgreindu mús"
+
#: ../../printer/cups.pm:1
#, c-format
msgid "On CUPS server \"%s\""
@@ -201,11 +211,6 @@ msgstr "Tengi:"
msgid "Select installation class"
msgstr "Veldu innsetningarflokk"
-#: ../../standalone/drakbackup:1
-#, c-format
-msgid "on CDROM"
-msgstr "á geisladisk"
-
#: ../../network/tools.pm:1
#, c-format
msgid ""
@@ -261,6 +266,11 @@ msgstr "Eftirfarandi pakkar verða settir inn"
msgid "CUPS configuration"
msgstr "CUPS uppsetning"
+#: ../../standalone/drakbackup:1
+#, fuzzy, c-format
+msgid "Total progress"
+msgstr "Framvinda alls"
+
#: ../../lang.pm:1
#, c-format
msgid "Hong Kong"
@@ -404,6 +414,11 @@ msgstr "Það þarf að endurræsa netið, viltu endurræsa það núna?"
msgid "Swiss (French layout)"
msgstr "Svissneskt (frönsk uppsetn.)"
+#: ../../standalone/drakbackup:1
+#, c-format
+msgid "August"
+msgstr "Ágúst"
+
#: ../../raid.pm:1
#, c-format
msgid "mkraid failed (maybe raidtools are missing?)"
@@ -426,6 +441,11 @@ msgstr "Hljóðkort"
#: ../../standalone/drakbackup:1
#, fuzzy, c-format
+msgid "Month"
+msgstr "Tengipunktur"
+
+#: ../../standalone/drakbackup:1
+#, fuzzy, c-format
msgid "Search for files to restore"
msgstr "Gefðu upp dagsetningu sem á að endurheimta"
@@ -570,6 +590,11 @@ msgstr "Notandanafn"
msgid "Left \"Windows\" key"
msgstr "Vinstri \"Windows\" lykill"
+#: ../../lang.pm:1
+#, c-format
+msgid "Guyana"
+msgstr "Gvíana"
+
#: ../../standalone/drakTermServ:1
#, c-format
msgid "dhcpd Server Configuration"
@@ -582,16 +607,16 @@ msgid ""
" only owner of directory or file in this directory can delete it"
msgstr ""
-#: ../../lang.pm:1
-#, c-format
ecode($key), htmlspecialchars_decode($value));
fwrite($fp, $entry);
}
@@ -390,7 +418,14 @@ class acp_language
trigger_error($user->lang['INVALID_UPLOAD_METHOD'], E_USER_ERROR);
}
- $transfer = new $method(request_var('host', ''), request_var('username', ''), request_var('password', ''), request_var('root_path', ''), request_var('port', ''), request_var('timeout', ''));
+ $transfer = new $method(
+ request_var('host', ''),
+ request_var('username', ''),
+ htmlspecialchars_decode($request->untrimmed_variable('password', '')),
+ request_var('root_path', ''),
+ request_var('port', ''),
+ request_var('timeout', '')
+ );
if (($result = $transfer->open_session()) !== true)
{
@@ -782,11 +817,6 @@ class acp_language
$sql = 'DELETE FROM ' . PROFILE_FIELDS_LANG_TABLE . ' WHERE lang_id = ' . $lang_id;
$db->sql_query($sql);
- $sql = 'DELETE FROM ' . STYLES_IMAGESET_DATA_TABLE . " WHERE image_lang = '" . $db->sql_escape($row['lang_iso']) . "'";
- $result = $db->sql_query($sql);
-
- $cache->destroy('sql', STYLES_IMAGESET_DATA_TABLE);
-
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));
@@ -851,66 +881,6 @@ class acp_language
$db->sql_query('INSERT INTO ' . LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
$lang_id = $db->sql_nextid();
- $valid_localized = array(
- 'icon_back_top', 'icon_contact_aim', 'icon_contact_email', 'icon_contact_icq', 'icon_contact_jabber', 'icon_contact_msnm', 'icon_contact_pm', 'icon_contact_yahoo', 'icon_contact_www', 'icon_post_delete', 'icon_post_edit', 'icon_post_info', 'icon_post_quote', 'icon_post_report', 'icon_user_online', 'icon_user_offline', 'icon_user_profile', 'icon_user_search', 'icon_user_warn', 'button_pm_forward', 'button_pm_new', 'button_pm_reply', 'button_topic_locked', 'button_topic_new', 'button_topic_reply',
- );
-
- $sql_ary = array();
-
- $sql = 'SELECT *
- FROM ' . STYLES_IMAGESET_TABLE;
- $result = $db->sql_query($sql);
- while ($imageset_row = $db->sql_fetchrow($result))
- {
- if (@file_exists("{$phpbb_root_path}styles/{$imageset_row['imageset_path']}/imageset/{$lang_pack['iso']}/imageset.cfg"))
- {
- $cfg_data_imageset_data = parse_cfg_file("{$phpbb_root_path}styles/{$imageset_row['imageset_path']}/imageset/{$lang_pack['iso']}/imageset.cfg");
- foreach ($cfg_data_imageset_data as $image_name => $value)
- {
- if (strpos($value, '*') !== false)
- {
- if (substr($value, -1, 1) === '*')
- {
- list($image_filename, $image_height) = explode('*', $value);
- $image_width = 0;
- }
- else
- {
- list($image_filename, $image_height, $image_width) = explode('*', $value);
- }
- }
- else
- {
- $image_filename = $value;
- $image_height = $image_width = 0;
- }
-
- if (strpos($image_name, 'img_') === 0 && $image_filename)
- {
- $image_name = substr($image_name, 4);
- if (in_array($image_name, $valid_localized))
- {
- $sql_ary[] = array(
- 'image_name' => (string) $image_name,
- 'image_filename' => (string) $image_filename,
- 'image_height' => (int) $image_height,
- 'image_width' => (int) $image_width,
- 'imageset_id' => (int) $imageset_row['imageset_id'],
- 'image_lang' => (string) $lang_pack['iso'],
- );
- }
- }
- }
- }
- }
- $db->sql_freeresult($result);
-
- if (sizeof($sql_ary))
- {
- $db->sql_multi_insert(STYLES_IMAGESET_DATA_TABLE, $sql_ary);
- $cache->destroy('sql', STYLES_IMAGESET_DATA_TABLE);
- }
-
// Now let's copy the default language entries for custom profile fields for this new language - makes admin's life easier.
$sql = 'SELECT lang_id
FROM ' . LANG_TABLE . "
@@ -1186,10 +1156,9 @@ class acp_language
* {FILENAME} [{LANG_NAME}]
*
* @package language
-* @version $' . 'Id: ' . '$
* @copyright (c) ' . date('Y') . ' phpBB Group
* @author {CHANGED} - {AUTHOR}
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -1461,5 +1430,3 @@ $lang = array_merge($lang, array(
return $entry;
}
}
-
-?> \ No newline at end of file