Merge branch 'develop' of git://github.com/phpbb/phpbb3 into ticket/11103

This commit is contained in:
Nathan Guse 2012-09-09 09:09:21 -05:00
commit b58ef116e1
3 changed files with 6 additions and 3 deletions

View file

@ -159,8 +159,10 @@ class compress
/** /**
* Return available methods * Return available methods
*
* @return array Array of strings of available compression methods (.tar, .tar.gz, .zip, etc.)
*/ */
function methods() public static function methods()
{ {
$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');

View file

@ -1410,7 +1410,8 @@ function phpbb_gen_download_links($param_key, $param_val, $phpbb_root_path, $php
foreach ($methods as $method) foreach ($methods as $method)
{ {
$type = array_pop(explode('.', $method)); $exploded = explode('.', $method);
$type = array_pop($exploded);
$params = array('archive' => $method); $params = array('archive' => $method);
$params[$param_key] = $param_val; $params[$param_key] = $param_val;

View file

@ -209,7 +209,7 @@ class phpbb_template_filter extends php_user_filter
*/ */
$data = preg_replace('~(?<!^)(<\?php(?:(?<!\?>).)+(?<!/\*\*/)\?>)$~m', "$1\n", $data); $data = preg_replace('~(?<!^)(<\?php.+(?<!/\*\*/)\?>)$~m', "$1\n", $data);
$data = str_replace('/**/?>', "?>\n", $data); $data = str_replace('/**/?>', "?>\n", $data);
$data = str_replace('?><?php', '', $data); $data = str_replace('?><?php', '', $data);
return $data; return $data;