diff --git a/phpBB/db/mssql.php b/phpBB/db/mssql.php
index eadfcf265a..393f5fdd24 100644
--- a/phpBB/db/mssql.php
+++ b/phpBB/db/mssql.php
@@ -10,15 +10,6 @@
*
***************************************************************************/
-/***************************************************************************
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- ***************************************************************************/
-
if(!defined("SQL_LAYER"))
{
@@ -204,6 +195,8 @@ class sql_db
}
else
{
+ $query = preg_replace("/\\\'/s", "''", $query);
+
$this->query_result = @mssql_query($query, $this->db_connect_id);
if($this->query_result)
{
diff --git a/phpBB/db/mysql.php b/phpBB/db/mysql.php
index 0e123a8244..ab558892e3 100644
--- a/phpBB/db/mysql.php
+++ b/phpBB/db/mysql.php
@@ -10,15 +10,6 @@
*
***************************************************************************/
-/***************************************************************************
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- ***************************************************************************/
-
if(!defined("SQL_LAYER"))
{
diff --git a/phpBB/db/odbc.php b/phpBB/db/odbc.php
index f47b67be90..ee6ca446d5 100644
--- a/phpBB/db/odbc.php
+++ b/phpBB/db/odbc.php
@@ -1,6 +1,6 @@
query_result = @OCIParse($this->db_connect_id, $query);
$success = @OCIExecute($this->query_result);
}
diff --git a/phpBB/db/postgres7.php b/phpBB/db/postgres7.php
index e0c54037d5..b06123b167 100644
--- a/phpBB/db/postgres7.php
+++ b/phpBB/db/postgres7.php
@@ -1,6 +1,6 @@
tag linking
@@ -411,10 +389,8 @@ function bbencode_second_pass_code($text, $uid)
* Notes: the email one might get annoying - it's easy to make it more restrictive, though.. maybe
* have it require something like xxxx@yyyy.zzzz or such. We'll see.
*/
-
function make_clickable($text)
{
-
// pad it with a space so we can match things at the start of the 1st line.
$ret = " " . $text;
@@ -448,9 +424,8 @@ function make_clickable($text)
* - Does not distinguish between "www.xxxx.yyyy" and "http://aaaa.bbbb" type URLs.
*
*/
-
-function undo_make_clickable($text) {
-
+function undo_make_clickable($text)
+{
$text = preg_replace("#.*?#i", "\\1", $text);
$text = preg_replace("#.*?#i", "\\1", $text);
@@ -458,14 +433,13 @@ function undo_make_clickable($text) {
}
-
-
/**
* Nathan Codding - August 24, 2000.
* Takes a string, and does the reverse of the PHP standard function
* htmlspecialchars().
*/
-function undo_htmlspecialchars($input) {
+function undo_htmlspecialchars($input)
+{
$input = preg_replace("/>/i", ">", $input);
$input = preg_replace("/</i", "<", $input);
$input = preg_replace("/"/i", "\"", $input);
@@ -474,8 +448,6 @@ function undo_htmlspecialchars($input) {
return $input;
}
-
-
/**
* This is used to change a [*] tag into a [*:$uid] tag as part
* of the first-pass bbencoding of [list] tags. It fits the
@@ -489,7 +461,6 @@ function replace_listitems($text, $uid)
return $text;
}
-
/**
* Escapes the "/" character with "\/". This is useful when you need
* to stick a runtime string into a PREG regexp that is being delimited
@@ -501,13 +472,13 @@ function escape_slashes($input)
return $output;
}
-
/**
* This function does exactly what the PHP4 function array_push() does
* however, to keep phpBB compatable with PHP 3 we had to come up with our own
* method of doing it.
*/
-function bbcode_array_push(&$stack, $value) {
+function bbcode_array_push(&$stack, $value)
+{
$stack[] = $value;
return(sizeof($stack));
}
@@ -517,9 +488,11 @@ function bbcode_array_push(&$stack, $value) {
* however, to keep phpBB compatable with PHP 3 we had to come up with our own
* method of doing it.
*/
-function bbcode_array_pop(&$stack) {
+function bbcode_array_pop(&$stack)
+{
$arrSize = count($stack);
$x = 1;
+
while(list($key, $val) = each($stack))
{
if($x < count($stack))
@@ -537,6 +510,4 @@ function bbcode_array_pop(&$stack) {
return($return_val);
}
-
-
-?>
+?>
\ No newline at end of file
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index 24011932fb..3a6d881b38 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -11,17 +11,6 @@
*
***************************************************************************/
-
-/***************************************************************************
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- *
- ***************************************************************************/
-
//
// Constants
//
@@ -151,4 +140,4 @@ define('USERS_TABLE', $table_prefix.'users');
define('WORDS_TABLE', $table_prefix.'words');
define('PRUNE_TABLE', $table_prefix.'forum_prune');
-?>
+?>
\ No newline at end of file
diff --git a/phpBB/includes/db.php b/phpBB/includes/db.php
index ff1088ea50..dba00ce7ef 100644
--- a/phpBB/includes/db.php
+++ b/phpBB/includes/db.php
@@ -11,16 +11,6 @@
*
***************************************************************************/
-/***************************************************************************
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- *
- ***************************************************************************/
-
switch($dbms)
{
case 'mysql':
diff --git a/phpBB/includes/emailer.php b/phpBB/includes/emailer.php
index 8be125256e..6859f33bb2 100755
--- a/phpBB/includes/emailer.php
+++ b/phpBB/includes/emailer.php
@@ -1,6 +1,6 @@
+?>
\ No newline at end of file
diff --git a/phpBB/includes/sessions.php b/phpBB/includes/sessions.php
index 83f42b199a..59a52f17fe 100644
--- a/phpBB/includes/sessions.php
+++ b/phpBB/includes/sessions.php
@@ -1,6 +1,6 @@
+
+?>
\ No newline at end of file