aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_install.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2012-07-18 11:07:32 +0200
committerJoas Schilling <nickvergessen@gmx.de>2012-07-18 11:07:32 +0200
commitf4136eacdc319b2029692a9c19a845a115b94129 (patch)
treef610d14df9e80ee74e8b35e4e8b8183170555f02 /phpBB/includes/functions_install.php
parent3637cd395e39c1fa5b7279222abe1da5d2abcd00 (diff)
parentb176b86f111a05338ed3c74026bcf19d42ec0ee3 (diff)
downloadforums-f4136eacdc319b2029692a9c19a845a115b94129.tar
forums-f4136eacdc319b2029692a9c19a845a115b94129.tar.gz
forums-f4136eacdc319b2029692a9c19a845a115b94129.tar.bz2
forums-f4136eacdc319b2029692a9c19a845a115b94129.tar.xz
forums-f4136eacdc319b2029692a9c19a845a115b94129.zip
Merge branch 'develop' of git://github.com/phpbb/phpbb3 into feature/new-tz-handling
Diffstat (limited to 'phpBB/includes/functions_install.php')
-rw-r--r--phpBB/includes/functions_install.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php
index 50af8fe019..46541acd44 100644
--- a/phpBB/includes/functions_install.php
+++ b/phpBB/includes/functions_install.php
@@ -463,17 +463,21 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix,
}
/**
-* Removes comments from schema files
+* Removes "/* style" as well as "# style" comments from $input.
+*
+* @param string $input Input string
+*
+* @return string Input string with comments removed
*/
-function remove_comments($sql)
+function phpbb_remove_comments($input)
{
// Remove /* */ comments (http://ostermiller.org/findcomment.html)
- $sql = preg_replace('#/\*(.|[\r\n])*?\*/#', "\n", $sql);
+ $input = preg_replace('#/\*(.|[\r\n])*?\*/#', "\n", $input);
// Remove # style comments
- $sql = preg_replace('/\n{2,}/', "\n", preg_replace('/^#.*$/m', "\n", $sql));
+ $input = preg_replace('/\n{2,}/', "\n", preg_replace('/^#.*$/m', "\n", $input));
- return $sql;
+ return $input;
}
/**