1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

basically what is listed within the changelog. ;)

git-svn-id: file:///svn/phpbb/trunk@7872 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2007-07-12 07:08:21 +00:00
parent 49cc38ebba
commit f27d0c466e
10 changed files with 49 additions and 28 deletions

View File

@@ -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)
{

View File

@@ -700,7 +700,7 @@ parse_css_file = {PARSE_CSS_FILE}
// If the template is stored on the filesystem try to write the file else store it in the database
if (!$safe_mode && !$template_info['template_storedb'] && file_exists($file) && @is_writable($file))
{
if (!($fp = fopen($file, 'wb')))
if (!($fp = @fopen($file, 'wb')))
{
trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
@@ -1055,7 +1055,7 @@ parse_css_file = {PARSE_CSS_FILE}
// If the theme is stored on the filesystem try to write the file else store it in the database
if (!$safe_mode && !$theme_info['theme_storedb'] && file_exists($file) && @is_writable($file))
{
if (!($fp = fopen($file, 'wb')))
if (!($fp = @fopen($file, 'wb')))
{
trigger_error($user->lang['NO_THEME'] . adm_back_link($this->u_action), E_USER_WARNING);
}
@@ -2344,7 +2344,7 @@ parse_css_file = {PARSE_CSS_FILE}
{
foreach ($file_ary as $file)
{
if (!($fp = fopen("{$phpbb_root_path}styles/$template_path$pathfile$file", 'r')))
if (!($fp = @fopen("{$phpbb_root_path}styles/$template_path$pathfile$file", 'r')))
{
trigger_error("Could not open {$phpbb_root_path}styles/$template_path$pathfile$file", E_USER_ERROR);
}