aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_install.php
diff options
context:
space:
mode:
authorIgor Wiedler <igor@wiedler.ch>2012-07-21 00:37:48 +0200
committerIgor Wiedler <igor@wiedler.ch>2012-07-21 00:37:48 +0200
commit0e2a30a27b92a851221be489370217b9c7bf8e07 (patch)
tree78e6a55815d2dffbc07b101beffe17c98a8642f5 /phpBB/includes/functions_install.php
parentdf16bd1c49e6e970b147f15e752825dd3186fb87 (diff)
parent841ea0e494504400c798faa6cc860dd1179e1004 (diff)
downloadforums-0e2a30a27b92a851221be489370217b9c7bf8e07.tar
forums-0e2a30a27b92a851221be489370217b9c7bf8e07.tar.gz
forums-0e2a30a27b92a851221be489370217b9c7bf8e07.tar.bz2
forums-0e2a30a27b92a851221be489370217b9c7bf8e07.tar.xz
forums-0e2a30a27b92a851221be489370217b9c7bf8e07.zip
Merge branch 'develop' into feature/avatars
* develop: (201 commits) [feature/new-tz-handling] Don't use global user but make it a parameter [feature/new-tz-handling] Fix size of suggestion button in chrome [feature/new-tz-handling] Fall back to UTC, if the timezone is invalid [feature/new-tz-handling] Add previous selected value to validation if valid [feature/new-tz-handling] Display suggestion when a different value is selected [ticket/10998] Add border-radius to forum rules block - prosilver [feature/new-tz-handling] Remove additional marking of selected items [feature/new-tz-handling] Move update helper function to new class [feature/new-tz-handling] Fix unit test [feature/new-tz-handling] Delete old variable which is not used anymore [feature/new-tz-handling] Rename $user->tz back to $user->timezone [feature/pagination-as-list] New parameter for name of start var [feature/pagination-as-list] Updates for nils comments [feature/pagination-as-list] Rename and deprecate functions [feature/pagination-as-list] Various fixes and improvements [ticket/10968] Render pagination within the template [feature/new-tz-handling] Remove "timezone might be numeric" [feature/new-tz-handling] Add function to update the timezone [feature/new-tz-handling] Correctly update user and board timezones on update [ticket/10996] Use correct DBMS name in Travis config for PostgreSQL ...
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;
}
/**