aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_language.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-07-12 07:08:21 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-07-12 07:08:21 +0000
commitf27d0c466e54e95aa1400e0435b78a8f7465256f (patch)
tree9e71b45fb9089a9b18d007cd0ed1ace40de46f73 /phpBB/includes/acp/acp_language.php
parent49cc38ebba21dc8b26240a87a23f1d422dd74472 (diff)
downloadforums-f27d0c466e54e95aa1400e0435b78a8f7465256f.tar
forums-f27d0c466e54e95aa1400e0435b78a8f7465256f.tar.gz
forums-f27d0c466e54e95aa1400e0435b78a8f7465256f.tar.bz2
forums-f27d0c466e54e95aa1400e0435b78a8f7465256f.tar.xz
forums-f27d0c466e54e95aa1400e0435b78a8f7465256f.zip
basically what is listed within the changelog. ;)
git-svn-id: file:///svn/phpbb/trunk@7872 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_language.php')
-rw-r--r--phpBB/includes/acp/acp_language.php24
1 files changed, 18 insertions, 6 deletions
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php
index 03ab523d7c..607bbd3cac 100644
--- a/phpBB/includes/acp/acp_language.php
+++ b/phpBB/includes/acp/acp_language.php
@@ -93,6 +93,11 @@ class acp_language
$method = request_var('method', '');
+ if (!class_exists($method))
+ {
+ trigger_error('Method does not exist.', E_USER_ERROR);
+ }
+
$requested_data = call_user_func(array($method, 'data'));
foreach ($requested_data as $data => $default)
{
@@ -201,7 +206,7 @@ class acp_language
// Get target filename for storage folder
$filename = $this->get_filename($row['lang_iso'], $this->language_directory, $this->language_file, true, true);
- $fp = fopen($phpbb_root_path . $filename, 'wb');
+ $fp = @fopen($phpbb_root_path . $filename, 'wb');
if (!$fp)
{
@@ -271,7 +276,7 @@ class acp_language
header('Content-Type: application/octetstream; name="' . $this->language_file . '"');
header('Content-disposition: attachment; filename=' . $this->language_file);
- $fp = fopen($phpbb_root_path . $filename, 'rb');
+ $fp = @fopen($phpbb_root_path . $filename, 'rb');
while ($buffer = fread($fp, 1024))
{
echo $buffer;
@@ -329,7 +334,10 @@ class acp_language
$transfer->close_session();
// Remove from storage folder
- @unlink($phpbb_root_path . 'store/' . $lang_path . $file);
+ if (file_exists($phpbb_root_path . 'store/' . $lang_path . $file))
+ {
+ @unlink($phpbb_root_path . 'store/' . $lang_path . $file);
+ }
add_log('admin', 'LOG_LANGUAGE_FILE_REPLACED', $file);
@@ -406,7 +414,11 @@ class acp_language
if (isset($_POST['remove_store']))
{
$store_filename = $this->get_filename($lang_iso, $this->language_directory, $this->language_file, true, true);
- @unlink($phpbb_root_path . $store_filename);
+
+ if (file_exists($phpbb_root_path . $store_filename))
+ {
+ @unlink($phpbb_root_path . $store_filename);
+ }
}
include_once($phpbb_root_path . 'includes/functions_transfer.' . $phpEx);
@@ -1323,12 +1335,12 @@ $lang = array_merge($lang, array(
if (!is_array($value))
{
- $entry .= "{$tabs}'{$key}'\t=> '" . $this->prepare_lang_entry($value) . "',\n";
+ $entry .= "{$tabs}'" . $this->prepare_lang_entry($key) . "'\t=> '" . $this->prepare_lang_entry($value) . "',\n";
}
else
{
$_tabs = $tabs . "\t";
- $entry .= "\n{$tabs}'{$key}'\t=> array(\n";
+ $entry .= "\n{$tabs}'" . $this->prepare_lang_entry($key) . "'\t=> array(\n";
foreach ($value as $_key => $_value)
{