diff options
| author | Nathan Guse <nathaniel.guse@gmail.com> | 2012-09-09 09:09:21 -0500 |
|---|---|---|
| committer | Nathan Guse <nathaniel.guse@gmail.com> | 2012-09-09 09:09:21 -0500 |
| commit | b58ef116e1157311463ae9c5c313b314764eb9e2 (patch) | |
| tree | 8061c9ff09a684520cf963636937c99d7cbbb3ec | |
| parent | 86b801df7304d43f117bea762710149c25385260 (diff) | |
| parent | 8a91598b14e0c638a7674294790a3f4079c58758 (diff) | |
| download | forums-b58ef116e1157311463ae9c5c313b314764eb9e2.tar forums-b58ef116e1157311463ae9c5c313b314764eb9e2.tar.gz forums-b58ef116e1157311463ae9c5c313b314764eb9e2.tar.bz2 forums-b58ef116e1157311463ae9c5c313b314764eb9e2.tar.xz forums-b58ef116e1157311463ae9c5c313b314764eb9e2.zip | |
Merge branch 'develop' of git://github.com/phpbb/phpbb3 into ticket/11103
| -rw-r--r-- | phpBB/includes/functions_compress.php | 4 | ||||
| -rw-r--r-- | phpBB/includes/functions_display.php | 3 | ||||
| -rw-r--r-- | phpBB/includes/template/filter.php | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php index 8e07e6d1b8..4675394633 100644 --- a/phpBB/includes/functions_compress.php +++ b/phpBB/includes/functions_compress.php @@ -159,8 +159,10 @@ class compress /** * 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'); $available_methods = array('.tar.gz' => 'zlib', '.tar.bz2' => 'bz2', '.zip' => 'zlib'); diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 881c95907b..8328b9ee7a 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -1410,7 +1410,8 @@ function phpbb_gen_download_links($param_key, $param_val, $phpbb_root_path, $php foreach ($methods as $method) { - $type = array_pop(explode('.', $method)); + $exploded = explode('.', $method); + $type = array_pop($exploded); $params = array('archive' => $method); $params[$param_key] = $param_val; diff --git a/phpBB/includes/template/filter.php b/phpBB/includes/template/filter.php index ad2e35de6a..abee32c8f7 100644 --- a/phpBB/includes/template/filter.php +++ b/phpBB/includes/template/filter.php @@ -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('?><?php', '', $data); return $data; |
