diff options
-rw-r--r-- | phpBB/db/mssql.php | 11 | ||||
-rw-r--r-- | phpBB/db/mysql.php | 9 | ||||
-rw-r--r-- | phpBB/db/odbc.php | 11 | ||||
-rw-r--r-- | phpBB/db/oracle.php | 16 | ||||
-rw-r--r-- | phpBB/db/postgres7.php | 11 | ||||
-rw-r--r-- | phpBB/includes/auth.php | 11 | ||||
-rw-r--r-- | phpBB/includes/bbcode.php | 49 | ||||
-rw-r--r-- | phpBB/includes/constants.php | 13 | ||||
-rw-r--r-- | phpBB/includes/db.php | 10 | ||||
-rwxr-xr-x | phpBB/includes/emailer.php | 11 | ||||
-rw-r--r-- | phpBB/includes/message.php | 11 | ||||
-rw-r--r-- | phpBB/includes/page_header.php | 11 | ||||
-rw-r--r-- | phpBB/includes/page_tail.php | 11 | ||||
-rw-r--r-- | phpBB/includes/post.php | 11 | ||||
-rw-r--r-- | phpBB/includes/prune.php | 11 | ||||
-rw-r--r-- | phpBB/includes/sessions.php | 12 | ||||
-rw-r--r-- | phpBB/includes/smtp.php | 13 | ||||
-rw-r--r-- | phpBB/includes/template.php | 13 |
18 files changed, 28 insertions, 217 deletions
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 @@ <?php /*************************************************************************** - * odbc.php + * odbc.php * ------------------- * begin : Saturday, Feb 13, 2001 * copyright : (C) 2001 The phpBB Group @@ -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/oracle.php b/phpBB/db/oracle.php index a7dc09eb33..8879567513 100644 --- a/phpBB/db/oracle.php +++ b/phpBB/db/oracle.php @@ -1,6 +1,6 @@ <?php /*************************************************************************** - * oracle.php + * oracle.php * ------------------- * begin : Thrusday Feb 15, 2001 * copyright : (C) 2001 The phpBB Group @@ -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")) { @@ -109,6 +100,11 @@ class sql_db } } + if(eregi("^(INSERT|UPDATE) ", $query)) + { + $query = preg_replace("/\\\'/s", "''", $query); + } + $this->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 @@ <?php /*************************************************************************** - * postgres7.php + * postgres7.php * ------------------- * begin : Saturday, Feb 13, 2001 * copyright : (C) 2001 The phpBB Group @@ -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/includes/auth.php b/phpBB/includes/auth.php index 80a1909e5c..8da22c1671 100644 --- a/phpBB/includes/auth.php +++ b/phpBB/includes/auth.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. - * - * - ***************************************************************************/ - /* $type's accepted (pre-pend with AUTH_): VIEW, READ, POST, REPLY, EDIT, DELETE, STICKY, ANNOUNCE, VOTE, VOTECREATE, diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index 528c00eba0..03e0f0fab4 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -10,21 +10,8 @@ * ***************************************************************************/ - /*************************************************************************** - * - * 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. - * - * - * - ***************************************************************************/ - - define("BBCODE_UID_LEN", 10); - /** * Does second-pass bbencoding. This should be used before displaying the message in * a thread. Assumes the message is already first-pass encoded, and has the required @@ -112,8 +99,6 @@ function bbencode_second_pass($text, $uid) } // bbencode_second_pass() - - function make_bbcode_uid() { // Unique ID for this message.. @@ -123,8 +108,6 @@ function make_bbcode_uid() return $uid; } - - function bbencode_first_pass($text, $uid) { // pad it with a space so we can distinguish between FALSE and matching the 1st char (index 0). @@ -169,7 +152,6 @@ function bbencode_first_pass($text, $uid) } // bbencode_first_pass() - /** * $text - The text to operate on. * $uid - The UID to add to matching tags. @@ -350,9 +332,6 @@ function bbencode_first_pass_pda($text, $uid, $open_tag, $close_tag, $close_tag_ } // bbencode_first_pass_pda() - - - /** * Does second-pass bbencoding of the [code] tags. This includes * running htmlspecialchars() over the text contained between @@ -397,7 +376,6 @@ function bbencode_second_pass_code($text, $uid) } // bbencode_second_pass_code() - /** * Rewritten by Nathan Codding - Feb 6, 2001. * - Goes through the given string, and replaces xxxx://yyyy with an HTML <a> 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("#<!-- BBCode auto-link start --><a href=\"(.*?)\" target=\"_blank\">.*?</a><!-- BBCode auto-link end -->#i", "\\1", $text); $text = preg_replace("#<!-- BBcode auto-mailto start --><a href=\"mailto:(.*?)\">.*?</a><!-- BBCode auto-mailto end -->#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 @@ <?php /*************************************************************************** - emailer.php - description + emailer.php ------------------- begin : Sunday Aug. 12, 2001 copyright : (C) 2001 The phpBB Group @@ -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. - * - ***************************************************************************/ - // // The emailer class has support for attaching files, that isn't implemented // in the 2.0 release but we can probable find some way of using it in a future diff --git a/phpBB/includes/message.php b/phpBB/includes/message.php index 32a64af6cf..3ede14e842 100644 --- a/phpBB/includes/message.php +++ b/phpBB/includes/message.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. - * - * - ***************************************************************************/ - // // This function gets called to output any message or error // that doesn't require additional output from the calling diff --git a/phpBB/includes/page_header.php b/phpBB/includes/page_header.php index 243e58e4a5..5bc749cdd7 100644 --- a/phpBB/includes/page_header.php +++ b/phpBB/includes/page_header.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. - * - * - ***************************************************************************/ - define(HEADER_INC, TRUE); // diff --git a/phpBB/includes/page_tail.php b/phpBB/includes/page_tail.php index b9365871cf..88f034863f 100644 --- a/phpBB/includes/page_tail.php +++ b/phpBB/includes/page_tail.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. - * - * - ***************************************************************************/ - // // Show the overall footer. // diff --git a/phpBB/includes/post.php b/phpBB/includes/post.php index b66bf8c0bb..09b83ef0f6 100644 --- a/phpBB/includes/post.php +++ b/phpBB/includes/post.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. - * - * - ***************************************************************************/ - // // This function will prepare a posted message for // entry into the database. diff --git a/phpBB/includes/prune.php b/phpBB/includes/prune.php index 33bcfe9cc7..4163c49b43 100644 --- a/phpBB/includes/prune.php +++ b/phpBB/includes/prune.php @@ -11,15 +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. -* -\**************************************************************************/ - function prune($forum_id, $prune_date) { global $db, $lang; @@ -179,4 +170,4 @@ function auto_prune($forum_id = 0) return; } -?> +?>
\ 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 @@ <?php /*************************************************************************** - * sessions.php + * sessions.php * ------------------- * begin : Saturday, Feb 13, 2001 * copyright : (C) 2001 The phpBB Group @@ -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. - * - * - ***************************************************************************/ - // // session_begin() // diff --git a/phpBB/includes/smtp.php b/phpBB/includes/smtp.php index e13082f1bd..a05e6fe0f0 100644 --- a/phpBB/includes/smtp.php +++ b/phpBB/includes/smtp.php @@ -1,7 +1,7 @@ <?php /*************************************************************************** - smtp.php - description - ------------------- + smtp.php + ------------------- begin : Wed May 09 2001 copyright : (C) 2001 The phpBB Group email : support@phpbb.com @@ -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. - * - ***************************************************************************/ - /**************************************************************************** * This script should be included if the admin has configured the board for * smtp mail instead of standard sendmail. It includes a function smtpmail diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index 268fd46da4..105dcb5867 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.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. - * - * - ***************************************************************************/ - /** * Template class. By Nathan Codding of the phpBB group. * The interface was originally inspired by PHPLib templates, @@ -472,4 +462,5 @@ class Template { } } -?> + +?>
\ No newline at end of file |