aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2006-01-04 06:37:17 +0000
committerDavid M <davidmj@users.sourceforge.net>2006-01-04 06:37:17 +0000
commit17dc26e19b1738ccb3a2c8bb4b3757168cf9eabd (patch)
treea336e7f3bff32c0afe1e78c67efdfc8f2ee71f53 /phpBB/includes/acp
parent6583da5bf03f563b97047871d60ed3ae70af69d0 (diff)
downloadforums-17dc26e19b1738ccb3a2c8bb4b3757168cf9eabd.tar
forums-17dc26e19b1738ccb3a2c8bb4b3757168cf9eabd.tar.gz
forums-17dc26e19b1738ccb3a2c8bb4b3757168cf9eabd.tar.bz2
forums-17dc26e19b1738ccb3a2c8bb4b3757168cf9eabd.tar.xz
forums-17dc26e19b1738ccb3a2c8bb4b3757168cf9eabd.zip
- file_get_contents instead of imploding file()s or fread()ing till the maximum filesize
- language and style properly use compression - language now prompts user for methods - functions_compress does not need to eval() to get a hex date, instead calls pack() - A writing method is defined at the end of tar operations only if data has been sent to the archive - BBCode parser does not have to eval(), it instead uses the regex to loop around the matches Hopefully nothing broke :-) git-svn-id: file:///svn/phpbb/trunk@5422 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r--phpBB/includes/acp/acp_language.php16
-rw-r--r--phpBB/includes/acp/acp_styles.php16
2 files changed, 16 insertions, 16 deletions
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php
index 0949311ae7..7bf8563440 100644
--- a/phpBB/includes/acp/acp_language.php
+++ b/phpBB/includes/acp/acp_language.php
@@ -479,7 +479,7 @@ class acp_language
{
if ($is_email_file)
{
- $lang = implode('', file($phpbb_root_path . $this->get_filename($lang_iso, $this->language_directory, $this->language_file, $file_from_store)));
+ $lang = file_get_contents($phpbb_root_path . $this->get_filename($lang_iso, $this->language_directory, $this->language_file, $file_from_store));
}
else
{
@@ -627,9 +627,9 @@ class acp_language
$db->sql_freeresult($result);
$use_method = request_var('use_method', '');
- $methods = array('tar');
+ $methods = array('.tar');
- $available_methods = array('tar.gz' => 'zlib', 'tar.bz2' => 'bz2', 'zip' => 'zlib');
+ $available_methods = array('.tar.gz' => 'zlib', '.tar.bz2' => 'bz2', '.zip' => 'zlib');
foreach ($available_methods as $type => $module)
{
if (!@extension_loaded($module))
@@ -640,11 +640,6 @@ class acp_language
$methods[] = $type;
}
- if (!in_array($use_method, $methods))
- {
- $use_method = 'tar';
- }
-
// Let the user decide in which format he wants to have the pack
if (!$use_method)
{
@@ -666,6 +661,11 @@ class acp_language
return;
}
+ if (!in_array($use_method, $methods))
+ {
+ $use_method = '.tar';
+ }
+
include_once($phpbb_root_path . 'includes/functions_compress.' . $phpEx);
if ($use_method == 'zip')
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index a4dae97559..72cc82ee4b 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -768,23 +768,23 @@ pagination_sep = \'{PAGINATION_SEP}\'
switch ($format)
{
case 'tar':
- $ext = 'tar';
+ $ext = '.tar';
$mimetype = 'x-tar';
$compress = 'compress_tar';
break;
case 'zip':
- $ext = 'zip';
+ $ext = '.zip';
$mimetype = 'zip';
break;
case 'tar.gz':
- $ext = 'tar.gz';
+ $ext = '.tar.gz';
$mimetype = 'x-gzip';
break;
case 'tar.bz2':
- $ext = 'tar.bz2';
+ $ext = '.tar.bz2';
$mimetype = 'x-bzip2';
break;
@@ -800,11 +800,11 @@ pagination_sep = \'{PAGINATION_SEP}\'
if ($format == 'zip')
{
- $compress = new compress_zip('w', $phpbb_root_path . "store/$path.$ext");
+ $compress = new compress_zip('w', $phpbb_root_path . "store/$path$ext");
}
else
{
- $compress = new compress_tar('w', $phpbb_root_path . "store/$path.$ext", $ext);
+ $compress = new compress_tar('w', $phpbb_root_path . "store/$path$ext", $ext);
}
if (sizeof($files))
@@ -830,11 +830,11 @@ pagination_sep = \'{PAGINATION_SEP}\'
if (!$store)
{
$compress->download($path);
- @unlink("{$phpbb_root_path}store/$path.$ext");
+ @unlink("{$phpbb_root_path}store/$path$ext");
exit;
}
- trigger_error(sprintf($user->lang[$l_prefix . '_EXPORTED'], "store/$path.$ext") . adm_back_link($this->u_action));
+ trigger_error(sprintf($user->lang[$l_prefix . '_EXPORTED'], "store/$path$ext") . adm_back_link($this->u_action));
}
}