aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/build.xml4
-rwxr-xr-xbuild/build_changelog.php2
-rwxr-xr-xbuild/build_diff.php5
-rw-r--r--build/build_helper.php3
-rw-r--r--build/diff_class.php3
-rwxr-xr-xbuild/package.php3
-rwxr-xr-xgit-tools/merge.php2
-rwxr-xr-xgit-tools/setup_github_network.php2
-rw-r--r--phpBB/adm/style/acp_styles.html6
-rw-r--r--phpBB/adm/style/install_update.html5
-rw-r--r--phpBB/develop/change_smiley_ref.php2
-rw-r--r--phpBB/develop/check_flash_bbcodes.php3
-rw-r--r--phpBB/develop/create_schema_files.php3
-rw-r--r--phpBB/develop/create_search_index.php2
-rw-r--r--phpBB/develop/create_variable_overview.php2
-rw-r--r--phpBB/develop/fill.php2
-rw-r--r--phpBB/develop/generate_utf_casefold.php3
-rw-r--r--phpBB/develop/generate_utf_confusables.php3
-rw-r--r--phpBB/develop/generate_utf_tables.php3
-rw-r--r--phpBB/develop/merge_post_tables.php1
-rw-r--r--phpBB/develop/mysql_upgrader.php3
-rw-r--r--phpBB/develop/utf_normalizer_test.php3
-rw-r--r--phpBB/docs/AUTHORS2
-rw-r--r--phpBB/docs/CHANGELOG.html2
-rw-r--r--phpBB/docs/FAQ.html4
-rw-r--r--phpBB/docs/INSTALL.html4
-rw-r--r--phpBB/docs/README.html2
-rw-r--r--phpBB/docs/auth_api.html2
-rw-r--r--phpBB/docs/coding-guidelines.html5
-rw-r--r--phpBB/docs/hook_system.html2
-rw-r--r--phpBB/download/file.php2
-rw-r--r--phpBB/includes/acp/acp_board.php2
-rw-r--r--phpBB/includes/acp/acp_captcha.php2
-rw-r--r--phpBB/includes/acp/acp_profile.php35
-rw-r--r--phpBB/includes/acp/acp_ranks.php2
-rw-r--r--phpBB/includes/acp/acp_styles.php27
-rw-r--r--phpBB/includes/acp/acp_users.php57
-rw-r--r--phpBB/includes/db/dbal.php40
-rw-r--r--phpBB/includes/db/mysql.php70
-rw-r--r--phpBB/includes/db/mysqli.php70
-rw-r--r--phpBB/includes/functions.php21
-rw-r--r--phpBB/includes/functions_convert.php12
-rw-r--r--phpBB/includes/functions_messenger.php6
-rw-r--r--phpBB/includes/functions_posting.php14
-rw-r--r--phpBB/includes/functions_profile_fields.php11
-rw-r--r--phpBB/includes/search/fulltext_mysql.php8
-rw-r--r--phpBB/includes/search/fulltext_native.php15
-rw-r--r--phpBB/includes/search/search.php2
-rw-r--r--phpBB/includes/session.php57
-rw-r--r--phpBB/includes/ucp/ucp_register.php20
-rw-r--r--phpBB/index.php2
-rw-r--r--phpBB/install/database_update.php6
-rw-r--r--phpBB/language/en/acp/styles.php1
-rw-r--r--phpBB/language/en/install.php1
-rw-r--r--phpBB/search.php49
-rw-r--r--phpBB/styles/prosilver/template/memberlist_body.html2
-rw-r--r--phpBB/styles/prosilver/template/memberlist_leaders.html4
-rw-r--r--phpBB/styles/prosilver/template/search_body.html2
-rw-r--r--phpBB/styles/prosilver/template/template.cfg5
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_front.html4
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_message_header.html23
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewfolder.html1
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewmessage.html11
-rw-r--r--phpBB/styles/prosilver/template/viewonline_body.html2
-rw-r--r--phpBB/styles/prosilver/theme/bidi.css13
-rw-r--r--phpBB/styles/prosilver/theme/colours.css6
-rw-r--r--phpBB/styles/prosilver/theme/common.css14
-rw-r--r--phpBB/styles/prosilver/theme/cp.css28
-rw-r--r--phpBB/styles/prosilver/theme/tweaks.css4
-rw-r--r--phpBB/styles/subsilver2/template/captcha_default.html2
-rw-r--r--phpBB/styles/subsilver2/template/captcha_qa.html2
-rw-r--r--phpBB/styles/subsilver2/template/faq_body.html2
-rw-r--r--phpBB/styles/subsilver2/template/login_body.html2
-rw-r--r--phpBB/styles/subsilver2/template/posting_body.html1
-rw-r--r--phpBB/styles/subsilver2/template/template.cfg4
-rw-r--r--phpBB/styles/subsilver2/template/ucp_main_front.html4
-rw-r--r--phpBB/viewforum.php2
-rw-r--r--phpBB/viewtopic.php2
-rw-r--r--tests/bbcode/url_bbcode_test.php2
-rw-r--r--tests/bootstrap.php22
-rw-r--r--tests/dbal/cross_join_test.php2
-rw-r--r--tests/dbal/db_tools_test.php2
-rw-r--r--tests/dbal/fixtures/styles.xml39
-rw-r--r--tests/dbal/order_lower_test.php62
-rw-r--r--tests/dbal/select_test.php27
-rw-r--r--tests/dbal/write_test.php2
-rw-r--r--tests/error_collector_test.php2
-rw-r--r--tests/mock/cache.php2
-rw-r--r--tests/mock/session_testable.php2
-rw-r--r--tests/mock_user.php2
-rw-r--r--tests/network/checkdnsrr_test.php2
-rw-r--r--tests/network/ftp_fsock_pasv_epsv_test.php2
-rw-r--r--tests/profile/custom_test.php2
-rw-r--r--tests/random/gen_rand_string_test.php2
-rw-r--r--tests/regex/censor_test.php2
-rw-r--r--tests/regex/email_test.php2
-rw-r--r--tests/regex/ipv4_test.php2
-rw-r--r--tests/regex/ipv6_test.php2
-rw-r--r--tests/regex/password_complexity_test.php2
-rw-r--r--tests/regex/table_prefix_test.php2
-rw-r--r--tests/regex/url_test.php2
-rw-r--r--tests/request/request_var_test.php2
-rw-r--r--tests/security/base.php2
-rw-r--r--tests/security/extract_current_page_test.php2
-rw-r--r--tests/security/hash_test.php2
-rw-r--r--tests/security/redirect_test.php2
-rw-r--r--tests/session/append_sid_test.php2
-rw-r--r--tests/session/continue_test.php2
-rw-r--r--tests/session/init_test.php2
-rw-r--r--tests/session/testable_factory.php2
-rw-r--r--tests/template/template_test.php2
-rw-r--r--tests/test_framework/phpbb_database_test_case.php2
-rw-r--r--tests/test_framework/phpbb_database_test_connection_manager.php2
-rw-r--r--tests/test_framework/phpbb_test_case.php2
-rw-r--r--tests/test_framework/phpbb_test_case_helpers.php2
-rw-r--r--tests/text_processing/censor_text_test.php2
-rw-r--r--tests/text_processing/make_clickable_test.php2
-rw-r--r--tests/user/lang_test.php2
-rw-r--r--tests/utf/normalizer_test.php2
-rw-r--r--tests/utf/utf8_clean_string_test.php2
-rw-r--r--tests/utf/utf8_wordwrap_test.php2
-rw-r--r--tests/wrapper/gmgetdate_test.php2
-rw-r--r--tests/wrapper/mt_rand_test.php2
-rw-r--r--tests/wrapper/version_compare_test.php2
124 files changed, 685 insertions, 309 deletions
diff --git a/build/build.xml b/build/build.xml
index bf4c97297b..3d8d3de640 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -2,9 +2,9 @@
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
<!-- a few settings for the build -->
- <property name="newversion" value="3.0.10-RC3" />
+ <property name="newversion" value="3.0.10" />
<property name="prevversion" value="3.0.9" />
- <property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.7-PL1, 3.0.8, 3.0.10-RC1, 3.0.10-RC2" />
+ <property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.7-PL1, 3.0.8, 3.0.10-RC1, 3.0.10-RC2, 3.0.10-RC3" />
<!-- no configuration should be needed beyond this point -->
<property name="oldversions" value="${olderversions}, ${prevversion}" />
diff --git a/build/build_changelog.php b/build/build_changelog.php
index 4eb5ebd83b..1e80959adf 100755
--- a/build/build_changelog.php
+++ b/build/build_changelog.php
@@ -4,7 +4,7 @@
*
* @package build
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU General Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/build/build_diff.php b/build/build_diff.php
index 6a6070228f..0824b53caa 100755
--- a/build/build_diff.php
+++ b/build/build_diff.php
@@ -3,9 +3,8 @@
/**
*
* @package build
-* @version $Id$
* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -388,7 +387,7 @@ function build_header($mode, $filenames, $header)
$html .= "## {$filename['phpbb_filename']}\n";
}
}
- $html .= "## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 \n";
+ $html .= "## License: http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 \n";
$html .= "############################################################## \n";
$html .= "\n";
diff --git a/build/build_helper.php b/build/build_helper.php
index 2d9b86b3c3..d6169b913b 100644
--- a/build/build_helper.php
+++ b/build/build_helper.php
@@ -2,9 +2,8 @@
/**
*
* @package build
-* @version $Id$
* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/build/diff_class.php b/build/diff_class.php
index 4625ffde24..2d8555400d 100644
--- a/build/diff_class.php
+++ b/build/diff_class.php
@@ -2,10 +2,9 @@
/**
*
* @package build
-* @version $Id$
* @copyright (c) 2000 Geoffrey T. Dairiki <dairiki@dairiki.org>
* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/build/package.php b/build/package.php
index 4ce644e8ca..48f42b3572 100755
--- a/build/package.php
+++ b/build/package.php
@@ -3,9 +3,8 @@
/**
*
* @package build
-* @version $Id$
* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/git-tools/merge.php b/git-tools/merge.php
index cbd84b896f..034bd2032c 100755
--- a/git-tools/merge.php
+++ b/git-tools/merge.php
@@ -4,7 +4,7 @@
*
* @package phpBB3
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/git-tools/setup_github_network.php b/git-tools/setup_github_network.php
index e4e212eef6..5f2e1609a7 100755
--- a/git-tools/setup_github_network.php
+++ b/git-tools/setup_github_network.php
@@ -4,7 +4,7 @@
*
* @package phpBB3
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html
index 098cc723d9..6aa1c0ccc9 100644
--- a/phpBB/adm/style/acp_styles.html
+++ b/phpBB/adm/style/acp_styles.html
@@ -402,6 +402,12 @@
<td class="row3" colspan="{$COLSPAN}"><strong>{L_INSTALLED}</strong></td>
</tr>
<!-- BEGIN installed -->
+ <!-- IF installed.S_INACTIVE and not $INACTIVE_STYLES -->
+ <!-- DEFINE $INACTIVE_STYLES = 1 -->
+ <tr>
+ <td class="row3" colspan="{$COLSPAN}"><strong>{L_INACTIVE_STYLES}</strong></td>
+ </tr>
+ <!-- ENDIF -->
<tr>
<td><strong>{installed.NAME}</strong><!-- IF installed.S_DEFAULT_STYLE --> *<!-- ENDIF --></td>
<!-- IF S_STYLE -->
diff --git a/phpBB/adm/style/install_update.html b/phpBB/adm/style/install_update.html
index 22d21d8314..818889c89b 100644
--- a/phpBB/adm/style/install_update.html
+++ b/phpBB/adm/style/install_update.html
@@ -43,6 +43,11 @@
<p>{WARNING_MSG}</p>
</div>
<!-- ENDIF -->
+
+ <div class="errorbox" style="margin-top: 0;">
+ <h3>{L_NOTICE}</h3>
+ <p>{L_BACKUP_NOTICE}</p>
+ </div>
<form id="install_update" method="post" action="{U_ACTION}">
diff --git a/phpBB/develop/change_smiley_ref.php b/phpBB/develop/change_smiley_ref.php
index db65dd52d4..3d6dd45d6f 100644
--- a/phpBB/develop/change_smiley_ref.php
+++ b/phpBB/develop/change_smiley_ref.php
@@ -5,8 +5,6 @@
* begin : Tuesday, February 25, 2003
* copyright : (C) 2003 The phpBB Group
* email : support@phpbb.com
- *
- * $Id$
*
***************************************************************************/
diff --git a/phpBB/develop/check_flash_bbcodes.php b/phpBB/develop/check_flash_bbcodes.php
index b0fa399209..2ce288ee3e 100644
--- a/phpBB/develop/check_flash_bbcodes.php
+++ b/phpBB/develop/check_flash_bbcodes.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2009, 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
index 7f37b94453..d44efb8870 100644
--- a/phpBB/develop/create_schema_files.php
+++ b/phpBB/develop/create_schema_files.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2006 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
* This file creates new schema files for every database.
* The filenames will be prefixed with an underscore to not overwrite the current schema files.
diff --git a/phpBB/develop/create_search_index.php b/phpBB/develop/create_search_index.php
index 374a4cf0a1..28001035f6 100644
--- a/phpBB/develop/create_search_index.php
+++ b/phpBB/develop/create_search_index.php
@@ -3,7 +3,7 @@
*
* @package phpBB3
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/phpBB/develop/create_variable_overview.php b/phpBB/develop/create_variable_overview.php
index fe7cacf0d1..a786fc6866 100644
--- a/phpBB/develop/create_variable_overview.php
+++ b/phpBB/develop/create_variable_overview.php
@@ -1,8 +1,6 @@
<?php
// -------------------------------------------------------------
//
-// $Id$
-//
// FILENAME : create_variable_overview.php
// STARTED : Fri Aug 15 2003
// COPYRIGHT : © 2003 phpBB Group
diff --git a/phpBB/develop/fill.php b/phpBB/develop/fill.php
index 336e510d06..c1e39fa4f3 100644
--- a/phpBB/develop/fill.php
+++ b/phpBB/develop/fill.php
@@ -1,8 +1,6 @@
<?php
// -------------------------------------------------------------
//
-// $Id$
-//
// FILENAME : fill.php
// STARTED : Mon Sep 15, 2003
// COPYRIGHT : © 2001, 2003 phpBB Group
diff --git a/phpBB/develop/generate_utf_casefold.php b/phpBB/develop/generate_utf_casefold.php
index 89c4aec01a..73951cb4dc 100644
--- a/phpBB/develop/generate_utf_casefold.php
+++ b/phpBB/develop/generate_utf_casefold.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/phpBB/develop/generate_utf_confusables.php b/phpBB/develop/generate_utf_confusables.php
index 0ffa9720c9..d2ffbcfc65 100644
--- a/phpBB/develop/generate_utf_confusables.php
+++ b/phpBB/develop/generate_utf_confusables.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/phpBB/develop/generate_utf_tables.php b/phpBB/develop/generate_utf_tables.php
index 3d5188163d..6fe5d68ffd 100644
--- a/phpBB/develop/generate_utf_tables.php
+++ b/phpBB/develop/generate_utf_tables.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/phpBB/develop/merge_post_tables.php b/phpBB/develop/merge_post_tables.php
index 3567a569c6..5ccfef84c3 100644
--- a/phpBB/develop/merge_post_tables.php
+++ b/phpBB/develop/merge_post_tables.php
@@ -6,7 +6,6 @@
* copyright : (C) 2003 The phpBB Group
* email : support@phpbb.com
*
- * $Id$
*
***************************************************************************/
diff --git a/phpBB/develop/mysql_upgrader.php b/phpBB/develop/mysql_upgrader.php
index dec8f8c210..49daab0962 100644
--- a/phpBB/develop/mysql_upgrader.php
+++ b/phpBB/develop/mysql_upgrader.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2006 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
* This file creates SQL statements to upgrade phpBB on MySQL 3.x/4.0.x to 4.1.x/5.x
*
diff --git a/phpBB/develop/utf_normalizer_test.php b/phpBB/develop/utf_normalizer_test.php
index 7705cd6851..71f24a716b 100644
--- a/phpBB/develop/utf_normalizer_test.php
+++ b/phpBB/develop/utf_normalizer_test.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/phpBB/docs/AUTHORS b/phpBB/docs/AUTHORS
index 81bc9f52e6..de599193d2 100644
--- a/phpBB/docs/AUTHORS
+++ b/phpBB/docs/AUTHORS
@@ -13,7 +13,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>.
+* along with this program. If not, see <http://opensource.org/licenses/gpl-2.0.php>
*
*/
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index a0690819d2..2d3b6a6809 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -2182,7 +2182,7 @@
<div class="content">
- <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
+ <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
</div>
diff --git a/phpBB/docs/FAQ.html b/phpBB/docs/FAQ.html
index 83d7a342e0..dbcefc44c1 100644
--- a/phpBB/docs/FAQ.html
+++ b/phpBB/docs/FAQ.html
@@ -110,7 +110,7 @@ I want to sue you because i think you host an illegal board!</h2>
<div class="content">
-<p>We provide the software, we have absolutely nothing to do with any board that runs it (beyond phpbb.com of course!) and we also do not host any site. The GPL grants the user an unlimited right of use subject to their adherence of that licence. Therefore we cannot prevent, dictate, control or otherwise limit the use of phpBB software. So please do not contact us for such matters.</p>
+<p>We provide the software, we have absolutely nothing to do with any board that runs it (beyond phpbb.com of course!) and we also do not host any site. The GPL grants the user an unlimited right of use subject to their adherence of that license. Therefore we cannot prevent, dictate, control or otherwise limit the use of phpBB software. So please do not contact us for such matters.</p>
<p>If you have a problem with a given board please take it up with them, not us. We are not and cannot be held legally responsible for any third party use of this software (much like Microsoft et al cannot be held responsible for the use of Windows in illegal activities, etc.). Additionally we do <strong>not</strong> track the use of phpBB software in any way. So please do not ask us for details on a &quot;given&quot; board we will not be able to help you. If any law firms or lawyers out there send us writs, cease and desist orders, etc. for third party website use of this software we reserve the right to charge for time wasted dealing with such issues...</p>
@@ -328,7 +328,7 @@ I want to sue you because i think you host an illegal board!</h2>
<div class="content">
- <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
+ <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
</div>
diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html
index e5ba479d9e..c54e408be2 100644
--- a/phpBB/docs/INSTALL.html
+++ b/phpBB/docs/INSTALL.html
@@ -82,7 +82,7 @@
<li><a href="#webserver_configuration">Webserver configuration</a></li>
</ol>
</li>
- <li><a href="#disclaimer">Disclaimer</a></li>
+ <li><a href="#disclaimer">Copyright and disclaimer</a></li>
</ol>
</div>
@@ -431,7 +431,7 @@
<div class="content">
- <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
+ <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
</div>
diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html
index 7ceb698ac4..aa60d7dd25 100644
--- a/phpBB/docs/README.html
+++ b/phpBB/docs/README.html
@@ -339,7 +339,7 @@
<div class="content">
- <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
+ <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
</div>
diff --git a/phpBB/docs/auth_api.html b/phpBB/docs/auth_api.html
index 88618fa640..29469c21ac 100644
--- a/phpBB/docs/auth_api.html
+++ b/phpBB/docs/auth_api.html
@@ -275,7 +275,7 @@ $auth_admin = new auth_admin();
<div class="content">
- <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
+ <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
</div>
diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html
index 7d51b26dca..cd113a7226 100644
--- a/phpBB/docs/coding-guidelines.html
+++ b/phpBB/docs/coding-guidelines.html
@@ -129,9 +129,8 @@
/**
*
* @package {PACKAGENAME}
-* @version &#36;Id: &#36;
* @copyright (c) 2007 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
</pre></div>
@@ -2322,7 +2321,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<div class="content">
- <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
+ <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
</div>
diff --git a/phpBB/docs/hook_system.html b/phpBB/docs/hook_system.html
index a5fad0d530..1b8131efaf 100644
--- a/phpBB/docs/hook_system.html
+++ b/phpBB/docs/hook_system.html
@@ -867,7 +867,7 @@ function phpbb_hook_register(&amp;$hook)
<div class="content">
- <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
+ <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
</div>
diff --git a/phpBB/download/file.php b/phpBB/download/file.php
index c17f0cf018..bf277c69fa 100644
--- a/phpBB/download/file.php
+++ b/phpBB/download/file.php
@@ -424,7 +424,7 @@ function send_file_to_browser($attachment, $upload_dir, $category)
if (!@file_exists($filename))
{
send_status_line(404, 'Not Found');
- trigger_error($user->lang['ERROR_NO_ATTACHMENT'] . '<br /><br />' . sprintf($user->lang['FILE_NOT_FOUND_404'], $filename));
+ trigger_error('ERROR_NO_ATTACHMENT');
}
// Correct the mime type - we force application/octetstream for all files, except images
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 8c761e51fe..f437dca8f9 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -383,6 +383,8 @@ class acp_board
'referer_validation' => array('lang' => 'REFERER_VALID', 'validate' => 'int:0:3','type' => 'custom', 'method' => 'select_ref_check', 'explain' => true),
'check_dnsbl' => array('lang' => 'CHECK_DNSBL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'email_check_mx' => array('lang' => 'EMAIL_CHECK_MX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'max_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:8:255', 'type' => false, 'method' => false, 'explain' => false,),
+ 'min_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:1', 'type' => 'custom', 'method' => 'password_length', 'explain' => true),
'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'validate' => 'string', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
'max_login_attempts' => array('lang' => 'MAX_LOGIN_ATTEMPTS', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true),
diff --git a/phpBB/includes/acp/acp_captcha.php b/phpBB/includes/acp/acp_captcha.php
index 1893eed14f..469a367bba 100644
--- a/phpBB/includes/acp/acp_captcha.php
+++ b/phpBB/includes/acp/acp_captcha.php
@@ -96,7 +96,7 @@ class acp_captcha
}
else if ($submit)
{
- trigger_error($user->lang['FORM_INVALID'] . adm_back_link(), E_USER_WARNING);
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
else
{
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index 2e43b0545a..a591474fce 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -504,11 +504,34 @@ class acp_profile
}
}
}
- /* else if ($field_type == FIELD_BOOL && $key == 'field_default_value')
+ else if ($field_type == FIELD_BOOL && $key == 'field_default_value')
{
- // Get the number of options if this key is 'field_maxlen'
- $var = request_var('field_default_value', 0);
- }*/
+ // 'field_length' == 1 defines radio buttons. Possible values are 1 or 2 only.
+ // 'field_length' == 2 defines checkbox. Possible values are 0 or 1 only.
+ // If we switch the type on step 2, we have to adjust field value.
+ // 1 is a common value for the checkbox and radio buttons.
+
+ // Adjust unchecked checkbox value.
+ // If we return or save settings from 2nd/3rd page
+ // and the checkbox is unchecked, set the value to 0.
+ if (isset($_REQUEST['step']) && !isset($_REQUEST[$key]))
+ {
+ $var = 0;
+ }
+
+ // If we switch to the checkbox type but former radio buttons value was 2,
+ // which is not the case for the checkbox, set it to 0 (unchecked).
+ if ($cp->vars['field_length'] == 2 && $var == 2)
+ {
+ $var = 0;
+ }
+ // If we switch to the radio buttons but the former checkbox value was 0,
+ // which is not the case for the radio buttons, set it to 0.
+ else if ($cp->vars['field_length'] == 1 && $var == 0)
+ {
+ $var = 2;
+ }
+ }
else if ($field_type == FIELD_INT && $key == 'field_default_value')
{
// Permit an empty string
@@ -676,6 +699,10 @@ class acp_profile
{
$_new_key_ary[$key] = utf8_normalize_nfc(request_var($key, array(array('')), true));
}
+ else if ($field_type == FIELD_BOOL && $key == 'field_default_value')
+ {
+ $_new_key_ary[$key] = request_var($key, $cp->vars[$key]);
+ }
else
{
if (!isset($_REQUEST[$key]))
diff --git a/phpBB/includes/acp/acp_ranks.php b/phpBB/includes/acp/acp_ranks.php
index dfd7511427..ea057cd84c 100644
--- a/phpBB/includes/acp/acp_ranks.php
+++ b/phpBB/includes/acp/acp_ranks.php
@@ -52,7 +52,7 @@ class acp_ranks
}
$rank_title = utf8_normalize_nfc(request_var('title', '', true));
$special_rank = request_var('special_rank', 0);
- $min_posts = ($special_rank) ? 0 : request_var('min_posts', 0);
+ $min_posts = ($special_rank) ? 0 : max(0, request_var('min_posts', 0));
$rank_image = request_var('rank_image', '');
// The rank image has to be a jpg, gif or png
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index 5300265686..d7b0484af8 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -99,11 +99,11 @@ parse_css_file = {PARSE_CSS_FILE}
$this->template_cfg .= '
# Some configuration options
-#
-# You can use this function to inherit templates from another template.
-# The template of the given name has to be installed.
-# Templates cannot inherit from inheriting templates.
-#';
+# Template inheritance
+# See http://blog.phpbb.com/2008/07/31/templating-just-got-easier/
+# Set value to empty or this template name to ignore template inheritance.
+inherit_from = {INHERIT_FROM}
+';
$this->imageset_keys = array(
'logos' => array(
@@ -540,12 +540,14 @@ parse_css_file = {PARSE_CSS_FILE}
global $user, $template, $db, $config, $phpbb_root_path, $phpEx;
$sql_from = '';
+ $sql_sort = 'LOWER(' . $mode . '_name)';
$style_count = array();
switch ($mode)
{
case 'style':
$sql_from = STYLES_TABLE;
+ $sql_sort = 'style_active DESC, ' . $sql_sort;
$sql = 'SELECT user_style, COUNT(user_style) AS style_count
FROM ' . USERS_TABLE . '
@@ -571,6 +573,9 @@ parse_css_file = {PARSE_CSS_FILE}
case 'imageset':
$sql_from = STYLES_IMAGESET_TABLE;
break;
+
+ default:
+ trigger_error($user->lang['NO_MODE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$l_prefix = strtoupper($mode);
@@ -594,7 +599,8 @@ parse_css_file = {PARSE_CSS_FILE}
);
$sql = "SELECT *
- FROM $sql_from";
+ FROM $sql_from
+ ORDER BY $sql_sort ASC";
$result = $db->sql_query($sql);
$installed = array();
@@ -630,6 +636,8 @@ parse_css_file = {PARSE_CSS_FILE}
'NAME' => $row[$mode . '_name'],
'STYLE_COUNT' => ($mode == 'style' && isset($style_count[$row['style_id']])) ? $style_count[$row['style_id']] : 0,
+
+ 'S_INACTIVE' => ($mode == 'style' && !$row['style_active']) ? true : false,
)
);
}
@@ -2039,9 +2047,7 @@ parse_css_file = {PARSE_CSS_FILE}
// Export template core code
if ($mode == 'template' || $inc_template)
{
- $template_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['template_name'], $style_row['template_copyright'], $config['version']), $this->template_cfg);
-
- $use_template_name = '';
+ $use_template_name = $style_row['template_name'];
// Add the inherit from variable, depending on it's use...
if ($style_row['template_inherits_id'])
@@ -2055,7 +2061,8 @@ parse_css_file = {PARSE_CSS_FILE}
$db->sql_freeresult($result);
}
- $template_cfg .= ($use_template_name) ? "\ninherit_from = $use_template_name" : "\n#inherit_from = ";
+ $template_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}', '{INHERIT_FROM}'), array($mode, $style_row['template_name'], $style_row['template_copyright'], $config['version'], $use_template_name), $this->template_cfg);
+
$template_cfg .= "\n\nbbcode_bitfield = {$style_row['bbcode_bitfield']}";
$data[] = array(
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 4f58434a43..363c900edc 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -2339,47 +2339,62 @@ class acp_users
}
/**
- * Optionset replacement for this module based on $user->optionset
+ * Set option bit field for user options in a user row array.
+ *
+ * Optionset replacement for this module based on $user->optionset.
+ *
+ * @param array $user_row Row from the users table.
+ * @param int $key Option key, as defined in $user->keyoptions property.
+ * @param bool $value True to set the option, false to clear the option.
+ * @param int $data Current bit field value, or false to use $user_row['user_options']
+ * @return int|bool If $data is false, the bit field is modified and
+ * written back to $user_row['user_options'], and
+ * return value is true if the bit field changed and
+ * false otherwise. If $data is not false, the new
+ * bitfield value is returned.
*/
function optionset(&$user_row, $key, $value, $data = false)
{
global $user;
- $var = ($data) ? $data : $user_row['user_options'];
+ $var = ($data !== false) ? $data : $user_row['user_options'];
- if ($value && !($var & 1 << $user->keyoptions[$key]))
- {
- $var += 1 << $user->keyoptions[$key];
- }
- else if (!$value && ($var & 1 << $user->keyoptions[$key]))
- {
- $var -= 1 << $user->keyoptions[$key];
- }
- else
- {
- return ($data) ? $var : false;
- }
+ $new_var = phpbb_optionset($user->keyoptions[$key], $value, $var);
- if (!$data)
+ if ($data === false)
{
- $user_row['user_options'] = $var;
- return true;
+ if ($new_var != $var)
+ {
+ $user_row['user_options'] = $new_var;
+ return true;
+ }
+ else
+ {
+ return false;
+ }
}
else
{
- return $var;
+ return $new_var;
}
}
/**
- * Optionget replacement for this module based on $user->optionget
+ * Get option bit field from user options in a user row array.
+ *
+ * Optionget replacement for this module based on $user->optionget.
+ *
+ * @param array $user_row Row from the users table.
+ * @param int $key option key, as defined in $user->keyoptions property.
+ * @param int $data bit field value to use, or false to use $user_row['user_options']
+ * @return bool true if the option is set in the bit field, false otherwise
*/
function optionget(&$user_row, $key, $data = false)
{
global $user;
- $var = ($data) ? $data : $user_row['user_options'];
- return ($var & 1 << $user->keyoptions[$key]) ? true : false;
+ $var = ($data !== false) ? $data : $user_row['user_options'];
+ return phpbb_optionget($user->keyoptions[$key], $var);
}
}
diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php
index b4c1a72e1c..5d456c2ff0 100644
--- a/phpBB/includes/db/dbal.php
+++ b/phpBB/includes/db/dbal.php
@@ -662,12 +662,7 @@ class dbal
// The DEBUG_EXTRA constant is for development only!
if ((isset($auth) && $auth->acl_get('a_')) || defined('IN_INSTALL') || defined('DEBUG_EXTRA'))
{
- // Print out a nice backtrace...
- $backtrace = get_backtrace();
-
$message .= ($sql) ? '<br /><br />SQL<br /><br />' . htmlspecialchars($sql) : '';
- $message .= ($backtrace) ? '<br /><br />BACKTRACE<br />' . $backtrace : '';
- $message .= '<br />';
}
else
{
@@ -905,6 +900,41 @@ class dbal
return true;
}
+
+ /**
+ * Gets the estimated number of rows in a specified table.
+ *
+ * @param string $table_name Table name
+ *
+ * @return string Number of rows in $table_name.
+ * Prefixed with ~ if estimated (otherwise exact).
+ *
+ * @access public
+ */
+ function get_estimated_row_count($table_name)
+ {
+ return $this->get_row_count($table_name);
+ }
+
+ /**
+ * Gets the exact number of rows in a specified table.
+ *
+ * @param string $table_name Table name
+ *
+ * @return string Exact number of rows in $table_name.
+ *
+ * @access public
+ */
+ function get_row_count($table_name)
+ {
+ $sql = 'SELECT COUNT(*) AS rows_total
+ FROM ' . $this->sql_escape($table_name);
+ $result = $this->sql_query($sql);
+ $rows_total = $this->sql_fetchfield('rows_total');
+ $this->sql_freeresult($result);
+
+ return $rows_total;
+ }
}
/**
diff --git a/phpBB/includes/db/mysql.php b/phpBB/includes/db/mysql.php
index 1e24c79577..1ccb785150 100644
--- a/phpBB/includes/db/mysql.php
+++ b/phpBB/includes/db/mysql.php
@@ -319,6 +319,76 @@ class dbal_mysql extends dbal
}
/**
+ * Gets the estimated number of rows in a specified table.
+ *
+ * @param string $table_name Table name
+ *
+ * @return string Number of rows in $table_name.
+ * Prefixed with ~ if estimated (otherwise exact).
+ *
+ * @access public
+ */
+ function get_estimated_row_count($table_name)
+ {
+ $table_status = $this->get_table_status($table_name);
+
+ if (isset($table_status['Engine']))
+ {
+ if ($table_status['Engine'] === 'MyISAM')
+ {
+ return $table_status['Rows'];
+ }
+ else if ($table_status['Engine'] === 'InnoDB' && $table_status['Rows'] > 100000)
+ {
+ return '~' . $table_status['Rows'];
+ }
+ }
+
+ return parent::get_row_count($table_name);
+ }
+
+ /**
+ * Gets the exact number of rows in a specified table.
+ *
+ * @param string $table_name Table name
+ *
+ * @return string Exact number of rows in $table_name.
+ *
+ * @access public
+ */
+ function get_row_count($table_name)
+ {
+ $table_status = $this->get_table_status($table_name);
+
+ if (isset($table_status['Engine']) && $table_status['Engine'] === 'MyISAM')
+ {
+ return $table_status['Rows'];
+ }
+
+ return parent::get_row_count($table_name);
+ }
+
+ /**
+ * Gets some information about the specified table.
+ *
+ * @param string $table_name Table name
+ *
+ * @return array
+ *
+ * @access protected
+ */
+ function get_table_status($table_name)
+ {
+ $sql = "SHOW TABLE STATUS
+ LIKE '" . $this->sql_escape($table_name) . "'";
+ $result = $this->sql_query($sql);
+ $table_status = $this->sql_fetchrow($result);
+ $this->sql_freeresult($result);
+
+ return $table_status;
+ }
+
+ /**
* Build LIKE expression
* @access private
*/
diff --git a/phpBB/includes/db/mysqli.php b/phpBB/includes/db/mysqli.php
index 456ce906d0..a311b8cda6 100644
--- a/phpBB/includes/db/mysqli.php
+++ b/phpBB/includes/db/mysqli.php
@@ -316,6 +316,76 @@ class dbal_mysqli extends dbal
}
/**
+ * Gets the estimated number of rows in a specified table.
+ *
+ * @param string $table_name Table name
+ *
+ * @return string Number of rows in $table_name.
+ * Prefixed with ~ if estimated (otherwise exact).
+ *
+ * @access public
+ */
+ function get_estimated_row_count($table_name)
+ {
+ $table_status = $this->get_table_status($table_name);
+
+ if (isset($table_status['Engine']))
+ {
+ if ($table_status['Engine'] === 'MyISAM')
+ {
+ return $table_status['Rows'];
+ }
+ else if ($table_status['Engine'] === 'InnoDB' && $table_status['Rows'] > 100000)
+ {
+ return '~' . $table_status['Rows'];
+ }
+ }
+
+ return parent::get_row_count($table_name);
+ }
+
+ /**
+ * Gets the exact number of rows in a specified table.
+ *
+ * @param string $table_name Table name
+ *
+ * @return string Exact number of rows in $table_name.
+ *
+ * @access public
+ */
+ function get_row_count($table_name)
+ {
+ $table_status = $this->get_table_status($table_name);
+
+ if (isset($table_status['Engine']) && $table_status['Engine'] === 'MyISAM')
+ {
+ return $table_status['Rows'];
+ }
+
+ return parent::get_row_count($table_name);
+ }
+
+ /**
+ * Gets some information about the specified table.
+ *
+ * @param string $table_name Table name
+ *
+ * @return array
+ *
+ * @access protected
+ */
+ function get_table_status($table_name)
+ {
+ $sql = "SHOW TABLE STATUS
+ LIKE '" . $this->sql_escape($table_name) . "'";
+ $result = $this->sql_query($sql);
+ $table_status = $this->sql_fetchrow($result);
+ $this->sql_freeresult($result);
+
+ return $table_status;
+ }
+
+ /**
* Build LIKE expression
* @access private
*/
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 852fc683f2..0320230a7d 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3322,6 +3322,11 @@ function parse_cfg_file($filename, $lines = false)
$parsed_items[$key] = $value;
}
+
+ if (isset($parsed_items['inherit_from']) && isset($parsed_items['name']) && $parsed_items['inherit_from'] == $parsed_items['name'])
+ {
+ unset($parsed_items['inherit_from']);
+ }
return $parsed_items;
}
@@ -3853,11 +3858,23 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
}
}
+ $log_text = $msg_text;
+ $backtrace = get_backtrace();
+ if ($backtrace)
+ {
+ $log_text .= '<br /><br />BACKTRACE<br />' . $backtrace;
+ }
+
+ if (defined('IN_INSTALL') || defined('DEBUG_EXTRA') || isset($auth) && $auth->acl_get('a_'))
+ {
+ $msg_text = $log_text;
+ }
+
if ((defined('DEBUG') || defined('IN_CRON') || defined('IMAGE_OUTPUT')) && isset($db))
{
// let's avoid loops
$db->sql_return_on_error(true);
- add_log('critical', 'LOG_GENERAL_ERROR', $msg_title, $msg_text);
+ add_log('critical', 'LOG_GENERAL_ERROR', $msg_title, $log_text);
$db->sql_return_on_error(false);
}
@@ -4536,7 +4553,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
foreach ($_EXTRA_URL as $url_param)
{
$url_param = explode('=', $url_param, 2);
- $s_hidden_fields[$url_param[0]] = $url_param[1];
+ $s_search_hidden_fields[$url_param[0]] = $url_param[1];
}
}
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
index 4a359dcade..3b26f417e9 100644
--- a/phpBB/includes/functions_convert.php
+++ b/phpBB/includes/functions_convert.php
@@ -424,7 +424,8 @@ function import_avatar_gallery($gallery_name = '', $subdirs_as_galleries = false
$relative_path = empty($convert->convertor['source_path_absolute']);
- if (empty($convert->convertor['avatar_gallery_path']))
+ // check for trailing slash
+ if (rtrim($convert->convertor['avatar_gallery_path'], '/') === '')
{
$convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_GALLERY_PATH'], 'import_avatar_gallery()'), __LINE__, __FILE__);
}
@@ -588,7 +589,8 @@ function import_attachment($source, $use_target = false)
global $convert, $phpbb_root_path, $config, $user;
- if (empty($convert->convertor['upload_path']))
+ // check for trailing slash
+ if (rtrim($convert->convertor['upload_path'], '/') === '')
{
$convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_UPLOAD_DIR'], 'import_attachment()'), __LINE__, __FILE__);
}
@@ -647,7 +649,8 @@ function import_smiley($source, $use_target = false)
global $convert, $phpbb_root_path, $config, $user;
- if (!isset($convert->convertor['smilies_path']))
+ // check for trailing slash
+ if (rtrim($convert->convertor['smilies_path'], '/') === '')
{
$convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_SMILIES_PATH'], 'import_smiley()'), __LINE__, __FILE__);
}
@@ -667,7 +670,8 @@ function import_avatar($source, $use_target = false, $user_id = false)
global $convert, $phpbb_root_path, $config, $user;
- if (!isset($convert->convertor['avatar_path']))
+ // check for trailing slash
+ if (rtrim($convert->convertor['avatar_path'], '/') === '')
{
$convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_AVATAR_PATH'], 'import_avatar()'), __LINE__, __FILE__);
}
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 91b361183c..6549693333 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -568,7 +568,7 @@ class messenger
if (!$use_queue)
{
include_once($phpbb_root_path . 'includes/functions_jabber.' . $phpEx);
- $this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], $config['jab_password'], $config['jab_use_ssl']);
+ $this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], htmlspecialchars_decode($config['jab_password']), $config['jab_use_ssl']);
if (!$this->jabber->connect())
{
@@ -769,7 +769,7 @@ class queue
}
include_once($phpbb_root_path . 'includes/functions_jabber.' . $phpEx);
- $this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], $config['jab_password'], $config['jab_use_ssl']);
+ $this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], htmlspecialchars_decode($config['jab_password']), $config['jab_use_ssl']);
if (!$this->jabber->connect())
{
@@ -1022,7 +1022,7 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = false)
}
// Let me in. This function handles the complete authentication process
- if ($err_msg = $smtp->log_into_server($config['smtp_host'], $config['smtp_username'], $config['smtp_password'], $config['smtp_auth_method']))
+ if ($err_msg = $smtp->log_into_server($config['smtp_host'], $config['smtp_username'], htmlspecialchars_decode($config['smtp_password']), $config['smtp_auth_method']))
{
$smtp->close_session($err_msg);
return false;
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 77d92e26e2..f920be9c4b 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1286,6 +1286,20 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
{
$msg_users[] = $row;
$update_notification[$row['notify_type']][] = $row['user_id'];
+
+ /*
+ * We also update the forums watch table for this user when we are
+ * sending out a topic notification to prevent sending out another
+ * notification in case this user is also subscribed to the forum
+ * this topic was posted in.
+ * Since an UPDATE query is used, this has no effect on users only
+ * subscribed to the topic (i.e. no row is created) and should not
+ * be a performance issue.
+ */
+ if ($row['notify_type'] === 'topic')
+ {
+ $update_notification['forum'][] = $row['user_id'];
+ }
}
}
unset($notify_rows);
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php
index 1eae2a9ad6..16c193c15a 100644
--- a/phpBB/includes/functions_profile_fields.php
+++ b/phpBB/includes/functions_profile_fields.php
@@ -571,7 +571,12 @@ class custom_profile
$this->get_option_lang($field_id, $lang_id, FIELD_DROPDOWN, false);
}
- if ($value == $ident_ary['data']['field_novalue'])
+ // If a dropdown field is required, users
+ // cannot choose the "no value" option.
+ // They must choose one of the other options.
+ // Therefore, here we treat a value equal to
+ // the "no value" as a lack of value, i.e. NULL.
+ if ($value == $ident_ary['data']['field_novalue'] && $ident_ary['data']['field_required'])
{
return NULL;
}
@@ -625,10 +630,10 @@ class custom_profile
$profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
$user_ident = $profile_row['field_ident'];
- // checkbox - only testing for isset
+ // checkbox - set the value to "true" if it has been set to 1
if ($profile_row['field_type'] == FIELD_BOOL && $profile_row['field_length'] == 2)
{
- $value = (isset($_REQUEST[$profile_row['field_ident']])) ? true : ((!isset($user->profile_fields[$user_ident]) || $preview) ? $default_value : $user->profile_fields[$user_ident]);
+ $value = (isset($_REQUEST[$profile_row['field_ident']]) && request_var($profile_row['field_ident'], $default_value) == 1) ? true : ((!isset($user->profile_fields[$user_ident]) || $preview) ? $default_value : $user->profile_fields[$user_ident]);
}
else if ($profile_row['field_type'] == FIELD_INT)
{
diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php
index 29cdd8ee9a..779ec1d216 100644
--- a/phpBB/includes/search/fulltext_mysql.php
+++ b/phpBB/includes/search/fulltext_mysql.php
@@ -707,7 +707,7 @@ class fulltext_mysql extends search_backend
*/
function index_remove($post_ids, $author_ids, $forum_ids)
{
- $this->destroy_cache(array(), $author_ids);
+ $this->destroy_cache(array(), array_unique($author_ids));
}
/**
@@ -896,11 +896,7 @@ class fulltext_mysql extends search_backend
}
$db->sql_freeresult($result);
- $sql = 'SELECT COUNT(post_id) as total_posts
- FROM ' . POSTS_TABLE;
- $result = $db->sql_query($sql);
- $this->stats['total_posts'] = (int) $db->sql_fetchfield('total_posts');
- $db->sql_freeresult($result);
+ $this->stats['total_posts'] = empty($this->stats) ? 0 : $db->get_estimated_row_count(POSTS_TABLE);
}
/**
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php
index 727e3aaffb..dc961f3c8a 100644
--- a/phpBB/includes/search/fulltext_native.php
+++ b/phpBB/includes/search/fulltext_native.php
@@ -1334,7 +1334,7 @@ class fulltext_native extends search_backend
$db->sql_query($sql);
}
- $this->destroy_cache(array_unique($word_texts), $author_ids);
+ $this->destroy_cache(array_unique($word_texts), array_unique($author_ids));
}
/**
@@ -1461,17 +1461,8 @@ class fulltext_native extends search_backend
{
global $db;
- $sql = 'SELECT COUNT(*) as total_words
- FROM ' . SEARCH_WORDLIST_TABLE;
- $result = $db->sql_query($sql);
- $this->stats['total_words'] = (int) $db->sql_fetchfield('total_words');
- $db->sql_freeresult($result);
-
- $sql = 'SELECT COUNT(*) as total_matches
- FROM ' . SEARCH_WORDMATCH_TABLE;
- $result = $db->sql_query($sql);
- $this->stats['total_matches'] = (int) $db->sql_fetchfield('total_matches');
- $db->sql_freeresult($result);
+ $this->stats['total_words'] = $db->get_estimated_row_count(SEARCH_WORDLIST_TABLE);
+ $this->stats['total_matches'] = $db->get_estimated_row_count(SEARCH_WORDMATCH_TABLE);
}
/**
diff --git a/phpBB/includes/search/search.php b/phpBB/includes/search/search.php
index 2f20d11495..df7c8a0892 100644
--- a/phpBB/includes/search/search.php
+++ b/phpBB/includes/search/search.php
@@ -295,7 +295,7 @@ class search_backend
$sql_where = '';
foreach ($authors as $author)
{
- $sql_where .= (($sql_where) ? ' OR ' : '') . 'search_authors LIKE \'% ' . (int) $author . ' %\'';
+ $sql_where .= (($sql_where) ? ' OR ' : '') . 'search_authors ' . $db->sql_like_expression($db->any_char . ' ' . (int) $author . ' ' . $db->any_char);
}
$sql = 'SELECT search_key
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index caadcbafaa..a894242a39 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -1507,7 +1507,6 @@ class user extends session
// Able to add new options (up to id 31)
var $keyoptions = array('viewimg' => 0, 'viewflash' => 1, 'viewsmilies' => 2, 'viewsigs' => 3, 'viewavatars' => 4, 'viewcensors' => 5, 'attachsig' => 6, 'bbcode' => 8, 'smilies' => 9, 'popuppm' => 10, 'sig_bbcode' => 15, 'sig_smilies' => 16, 'sig_links' => 17);
- var $keyvalues = array();
/**
* Constructor to set the lang path
@@ -2337,47 +2336,51 @@ class user extends session
}
/**
- * Get option bit field from user options
+ * Get option bit field from user options.
+ *
+ * @param int $key option key, as defined in $keyoptions property.
+ * @param int $data bit field value to use, or false to use $this->data['user_options']
+ * @return bool true if the option is set in the bit field, false otherwise
*/
function optionget($key, $data = false)
{
- if (!isset($this->keyvalues[$key]))
- {
- $var = ($data) ? $data : $this->data['user_options'];
- $this->keyvalues[$key] = ($var & 1 << $this->keyoptions[$key]) ? true : false;
- }
-
- return $this->keyvalues[$key];
+ $var = ($data !== false) ? $data : $this->data['user_options'];
+ return phpbb_optionget($this->keyoptions[$key], $var);
}
/**
- * Set option bit field for user options
+ * Set option bit field for user options.
+ *
+ * @param int $key Option key, as defined in $keyoptions property.
+ * @param bool $value True to set the option, false to clear the option.
+ * @param int $data Current bit field value, or false to use $this->data['user_options']
+ * @return int|bool If $data is false, the bit field is modified and
+ * written back to $this->data['user_options'], and
+ * return value is true if the bit field changed and
+ * false otherwise. If $data is not false, the new
+ * bitfield value is returned.
*/
function optionset($key, $value, $data = false)
{
- $var = ($data) ? $data : $this->data['user_options'];
+ $var = ($data !== false) ? $data : $this->data['user_options'];
- if ($value && !($var & 1 << $this->keyoptions[$key]))
- {
- $var += 1 << $this->keyoptions[$key];
- }
- else if (!$value && ($var & 1 << $this->keyoptions[$key]))
- {
- $var -= 1 << $this->keyoptions[$key];
- }
- else
- {
- return ($data) ? $var : false;
- }
+ $new_var = phpbb_optionset($this->keyoptions[$key], $value, $var);
- if (!$data)
+ if ($data === false)
{
- $this->data['user_options'] = $var;
- return true;
+ if ($new_var != $var)
+ {
+ $this->data['user_options'] = $new_var;
+ return true;
+ }
+ else
+ {
+ return false;
+ }
}
else
{
- return $var;
+ return $new_var;
}
}
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 4e8729db56..6ad3a55589 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -165,24 +165,8 @@ class ucp_register
$captcha->init(CONFIRM_REG);
}
- // Try to manually determine the timezone and adjust the dst if the server date/time complies with the default setting +/- 1
- $timezone = date('Z') / 3600;
- $is_dst = date('I');
-
- if ($config['board_timezone'] == $timezone || $config['board_timezone'] == ($timezone - 1))
- {
- $timezone = ($is_dst) ? $timezone - 1 : $timezone;
-
- if (!isset($user->lang['tz_zones'][(string) $timezone]))
- {
- $timezone = $config['board_timezone'];
- }
- }
- else
- {
- $is_dst = $config['board_dst'];
- $timezone = $config['board_timezone'];
- }
+ $is_dst = $config['board_dst'];
+ $timezone = $config['board_timezone'];
$data = array(
'username' => utf8_normalize_nfc(request_var('username', '', true)),
diff --git a/phpBB/index.php b/phpBB/index.php
index 0105a0a1bd..46694a6ec2 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -89,7 +89,7 @@ if ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets('
$leap_year_birthdays = '';
if ($now['mday'] == 28 && $now['mon'] == 2 && !$user->format_date(time(), 'L'))
{
- $leap_year_birthdays = " OR user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', 29, 2)) . "%'";
+ $leap_year_birthdays = " OR u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', 29, 2)) . "%'";
}
$sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_birthday
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 9c44350955..a1b7dcd47f 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -991,6 +991,8 @@ function database_update_info()
'3.0.10-RC1' => array(),
// No changes from 3.0.10-RC2 to 3.0.10-RC3
'3.0.10-RC2' => array(),
+ // No changes from 3.0.10-RC3 to 3.0.10
+ '3.0.10-RC3' => array(),
/** @todo DROP LOGIN_ATTEMPT_TABLE.attempt_id in 3.0.11-RC1 */
);
@@ -2018,6 +2020,10 @@ function change_database_data(&$no_updates, $version)
// No changes from 3.0.10-RC2 to 3.0.10-RC3
case '3.0.10-RC2':
break;
+
+ // No changes from 3.0.10-RC3 to 3.0.10
+ case '3.0.10-RC3':
+ break;
}
}
diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php
index 3c8c4a328f..3194a2ebd6 100644
--- a/phpBB/language/en/acp/styles.php
+++ b/phpBB/language/en/acp/styles.php
@@ -267,6 +267,7 @@ $lang = array_merge($lang, array(
'IMG_USER_ICON9' => 'User defined image 9',
'IMG_USER_ICON10' => 'User defined image 10',
+ 'INACTIVE_STYLES' => 'Inactive styles',
'INCLUDE_DIMENSIONS' => 'Include dimensions',
'INCLUDE_IMAGESET' => 'Include imageset',
'INCLUDE_TEMPLATE' => 'Include template',
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index f69ca40613..bbf407f1dc 100644
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -52,6 +52,7 @@ $lang = array_merge($lang, array(
'BLANK_PREFIX_FOUND' => 'A scan of your tables has shown a valid installation using no table prefix.',
'BOARD_NOT_INSTALLED' => 'No installation found',
'BOARD_NOT_INSTALLED_EXPLAIN' => 'The phpBB Unified Convertor Framework requires a default installation of phpBB3 to function, please <a href="%s">proceed by first installing phpBB3</a>.',
+ 'BACKUP_NOTICE' => 'Please backup your board before updating in case any problems arise during the update process.',
'CATEGORY' => 'Category',
'CACHE_STORE' => 'Cache type',
diff --git a/phpBB/search.php b/phpBB/search.php
index 2aa61401cf..8cb2020630 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -469,33 +469,60 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$per_page = ($show_results == 'posts') ? $config['posts_per_page'] : $config['topics_per_page'];
$total_match_count = 0;
+ // Set limit for the $total_match_count to reduce server load
+ $total_matches_limit = 1000;
+ $found_more_search_matches = false;
+
if ($search_id)
{
if ($sql)
{
- // only return up to 1000 ids (the last one will be removed later)
- $result = $db->sql_query_limit($sql, 1001 - $start, $start);
+ // Only return up to $total_matches_limit+1 ids (the last one will be removed later)
+ $result = $db->sql_query_limit($sql, $total_matches_limit + 1);
while ($row = $db->sql_fetchrow($result))
{
$id_ary[] = (int) $row[$field];
}
$db->sql_freeresult($result);
-
- $total_match_count = sizeof($id_ary) + $start;
- $id_ary = array_slice($id_ary, 0, $per_page);
}
else if ($search_id == 'unreadposts')
{
- $id_ary = array_keys(get_unread_topics($user->data['user_id'], $sql_where, $sql_sort, 1001 - $start, $start));
-
- $total_match_count = sizeof($id_ary) + $start;
- $id_ary = array_slice($id_ary, 0, $per_page);
+ // Only return up to $total_matches_limit+1 ids (the last one will be removed later)
+ $id_ary = array_keys(get_unread_topics($user->data['user_id'], $sql_where, $sql_sort, $total_matches_limit + 1));
}
else
{
$search_id = '';
}
+
+ $total_match_count = sizeof($id_ary);
+ if ($total_match_count)
+ {
+ // Limit the number to $total_matches_limit for pre-made searches
+ if ($total_match_count > $total_matches_limit)
+ {
+ $found_more_search_matches = true;
+ $total_match_count = $total_matches_limit;
+ }
+
+ // Make sure $start is set to the last page if it exceeds the amount
+ if ($start < 0)
+ {
+ $start = 0;
+ }
+ else if ($start >= $total_match_count)
+ {
+ $start = floor(($total_match_count - 1) / $per_page) * $per_page;
+ }
+
+ $id_ary = array_slice($id_ary, $start, $per_page);
+ }
+ else
+ {
+ // Set $start to 0 if no matches were found
+ $start = 0;
+ }
}
// make sure that some arrays are always in the same order
@@ -543,10 +570,8 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$icons = $cache->obtain_icons();
// Output header
- if ($search_id && ($total_match_count > 1000))
+ if ($found_more_search_matches)
{
- // limit the number to 1000 for pre-made searches
- $total_match_count--;
$l_search_matches = sprintf($user->lang['FOUND_MORE_SEARCH_MATCHES'], $total_match_count);
}
else
diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html
index 9e6f8c3aab..5ea774bf06 100644
--- a/phpBB/styles/prosilver/template/memberlist_body.html
+++ b/phpBB/styles/prosilver/template/memberlist_body.html
@@ -80,7 +80,7 @@
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF -->
-<div class="forumbg">
+<div class="forumbg forumbg-table">
<div class="inner"><span class="corners-top"><span></span></span>
<table class="table1" cellspacing="1">
diff --git a/phpBB/styles/prosilver/template/memberlist_leaders.html b/phpBB/styles/prosilver/template/memberlist_leaders.html
index 3917498050..26e299d261 100644
--- a/phpBB/styles/prosilver/template/memberlist_leaders.html
+++ b/phpBB/styles/prosilver/template/memberlist_leaders.html
@@ -4,7 +4,7 @@
<form method="post" action="{S_MODE_ACTION}">
-<div class="forumbg">
+<div class="forumbg forumbg-table">
<div class="inner"><span class="corners-top"><span></span></span>
<table class="table1" cellspacing="1">
@@ -37,7 +37,7 @@
<span class="corners-bottom"><span></span></span></div>
</div>
-<div class="forumbg">
+<div class="forumbg forumbg-table">
<div class="inner"><span class="corners-top"><span></span></span>
<table class="table1" cellspacing="1">
diff --git a/phpBB/styles/prosilver/template/search_body.html b/phpBB/styles/prosilver/template/search_body.html
index 6616b95a73..4b1d30d77d 100644
--- a/phpBB/styles/prosilver/template/search_body.html
+++ b/phpBB/styles/prosilver/template/search_body.html
@@ -98,7 +98,7 @@
</form>
<!-- IF .recentsearch -->
-<div class="forumbg">
+<div class="forumbg forumbg-table">
<div class="inner"><span class="corners-top"><span></span></span>
<table class="table1" cellspacing="1">
diff --git a/phpBB/styles/prosilver/template/template.cfg b/phpBB/styles/prosilver/template/template.cfg
index d31dcb7356..0b0533573a 100644
--- a/phpBB/styles/prosilver/template/template.cfg
+++ b/phpBB/styles/prosilver/template/template.cfg
@@ -23,3 +23,8 @@ version = 3.0.10
# Defining a different template bitfield
template_bitfield = lNg=
+
+# Template inheritance
+# See http://blog.phpbb.com/2008/07/31/templating-just-got-easier/
+# Set value to empty to ignore template inheritance
+inherit_from = prosilver
diff --git a/phpBB/styles/prosilver/template/ucp_main_front.html b/phpBB/styles/prosilver/template/ucp_main_front.html
index 39c5d4f396..4a6fa3bf86 100644
--- a/phpBB/styles/prosilver/template/ucp_main_front.html
+++ b/phpBB/styles/prosilver/template/ucp_main_front.html
@@ -34,8 +34,8 @@
<dt>{L_JOINED}:</dt> <dd>{JOINED}</dd>
<dt>{L_VISITED}:</dt> <dd>{LAST_VISIT_YOU}</dd>
<dt>{L_TOTAL_POSTS}:</dt> <dd><!-- IF POSTS_PCT -->{POSTS}<!-- IF S_DISPLAY_SEARCH --> | <strong><a href="{U_SEARCH_USER}">{L_SEARCH_YOUR_POSTS}</a></strong><!-- ENDIF --><br />({POSTS_DAY} / {POSTS_PCT})<!-- ELSE -->{POSTS}<!-- ENDIF --></dd>
- <!-- IF ACTIVE_FORUM --><dt>{L_ACTIVE_IN_FORUM}:</dt> <dd><strong><a href="{U_ACTIVE_FORUM}">{ACTIVE_FORUM}</a></strong><br />({ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT})</dd><!-- ENDIF -->
- <!-- IF ACTIVE_TOPIC --><dt>{L_ACTIVE_IN_TOPIC}:</dt> <dd><strong><a href="{U_ACTIVE_TOPIC}">{ACTIVE_TOPIC}</a></strong><br />({ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT})</dd><!-- ENDIF -->
+ <!-- IF ACTIVE_FORUM != '' --><dt>{L_ACTIVE_IN_FORUM}:</dt> <dd><strong><a href="{U_ACTIVE_FORUM}">{ACTIVE_FORUM}</a></strong><br />({ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT})</dd><!-- ENDIF -->
+ <!-- IF ACTIVE_TOPIC != '' --><dt>{L_ACTIVE_IN_TOPIC}:</dt> <dd><strong><a href="{U_ACTIVE_TOPIC}">{ACTIVE_TOPIC}</a></strong><br />({ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT})</dd><!-- ENDIF -->
<!-- IF WARNINGS --><dt>{L_YOUR_WARNINGS}:</dt> <dd class="error">{WARNING_IMG} [{WARNINGS}]</dd><!-- ENDIF -->
</dl>
diff --git a/phpBB/styles/prosilver/template/ucp_pm_message_header.html b/phpBB/styles/prosilver/template/ucp_pm_message_header.html
index fcebab0868..ae66dd0a36 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_message_header.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_message_header.html
@@ -1,25 +1,22 @@
<h2>{L_TITLE}<!-- IF CUR_FOLDER_NAME -->: {CUR_FOLDER_NAME}<!-- ENDIF --></h2>
-<div class="panel clearfix pm-panel-header<!-- IF S_VIEW_MESSAGE --> pm<!-- ENDIF -->">
+<form id="viewfolder" method="post" action="{S_PM_ACTION}">
+
+<div class="panel">
<div class="inner"><span class="corners-top"><span></span></span>
<!-- IF FOLDER_STATUS and FOLDER_MAX_MESSAGES neq 0 --><p>{FOLDER_STATUS}</p><!-- ENDIF -->
-
<!-- IF U_POST_REPLY_PM or U_POST_NEW_TOPIC or U_FORWARD_PM -->
<div class="buttons">
- <!-- IF U_POST_REPLY_PM --><div class="pmreply-icon clearfix"><a title="{L_POST_REPLY_PM}" href="{U_POST_REPLY_PM}"><span></span>{L_POST_REPLY_PM}</a></div>
+ <!-- IF U_POST_REPLY_PM --><div class="pmreply-icon"><a title="{L_POST_REPLY_PM}" href="{U_POST_REPLY_PM}"><span></span>{L_POST_REPLY_PM}</a></div>
<!-- ELSEIF U_POST_NEW_TOPIC --><div class="newpm-icon"><a href="{U_POST_NEW_TOPIC}" accesskey="n" title="{L_UCP_PM_COMPOSE}"><span></span>{L_UCP_PM_COMPOSE}</a></div><!-- ENDIF -->
<!-- IF U_FORWARD_PM --><div class="forwardpm-icon"><a title="{L_POST_FORWARD_PM}" href="{U_FORWARD_PM}"><span></span>{L_FORWARD_PM}</a></div><!-- ENDIF -->
+ <!-- IF U_POST_REPLY_PM and S_PM_RECIPIENTS gt 1 --><div class="reply-all"><a class="left" title="{L_REPLY_TO_ALL}" href="{U_POST_REPLY_ALL}">{L_REPLY_TO_ALL}</a></div><!-- ENDIF -->
</div>
-
- <!-- IF U_POST_REPLY_PM and S_PM_RECIPIENTS gt 1 -->
- <div class="reply-all"><a title="{L_REPLY_TO_ALL}" href="{U_POST_REPLY_ALL}">&raquo; {L_REPLY_TO_ALL}</a></div>
- <!-- ENDIF -->
-
<!-- ENDIF -->
- <!-- IF TOTAL_MESSAGES or S_VIEW_MESSAGE -->
- <ul class="linklist pm-return-to">
+ <!-- IF TOTAL_MESSAGES or S_VIEW_MESSAGE -->
+ <ul class="linklist">
<li class="rightside pagination">
<!-- IF S_VIEW_MESSAGE --><a class="{S_CONTENT_FLOW_BEGIN}" href="{U_CURRENT_FOLDER}">{L_RETURN_TO} {CUR_FOLDER_NAME}</a><!-- ENDIF -->
<!-- IF FOLDER_CUR_MESSAGES neq 0 -->
@@ -28,8 +25,4 @@
<!-- ENDIF -->
</li>
</ul>
- <!-- ENDIF -->
- </div>
-</div>
-
-<form id="viewfolder" method="post" action="{S_PM_ACTION}">
+ <!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html
index d7e02e405e..c9f28cec64 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html
@@ -2,7 +2,6 @@
<!-- IF not PROMPT -->
<!-- INCLUDE ucp_pm_message_header.html -->
- <div class="panel pm-panel-message"><div>
<!-- ENDIF -->
<!-- IF PROMPT -->
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
index df0cf25e82..1840732b64 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
@@ -1,18 +1,21 @@
- <!-- INCLUDE ucp_header.html -->
+<!-- INCLUDE ucp_header.html -->
<!-- INCLUDE ucp_pm_message_header.html -->
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
<!-- IF S_DISPLAY_HISTORY and (U_VIEW_PREVIOUS_HISTORY or U_VIEW_NEXT_HISTORY) -->
- <fieldset class="display-options clearfix bg1 pm-message-nav">
+ <fieldset class="display-options clearfix">
<!-- IF U_VIEW_PREVIOUS_HISTORY --><a href="{U_VIEW_PREVIOUS_HISTORY}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_VIEW_PREVIOUS_HISTORY}</a><!-- ENDIF -->
<!-- IF U_VIEW_NEXT_HISTORY --><a href="{U_VIEW_NEXT_HISTORY}" class="right-box {S_CONTENT_FLOW_END}">{L_VIEW_NEXT_HISTORY}</a><!-- ENDIF -->
</fieldset>
<!-- ENDIF -->
-<div id="post-{MESSAGE_ID}" class="panel clearfix post pm-panel-message pm<!-- IF S_POST_UNAPPROVED or S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF S_ONLINE --> online<!-- ENDIF -->">
-<div>
+<div id="post-{MESSAGE_ID}" class="post pm<!-- IF S_POST_UNAPPROVED or S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF S_ONLINE --> online<!-- ENDIF -->">
+<div class="inner"><span class="corners-top"><span></span></span>
<div class="postbody">
diff --git a/phpBB/styles/prosilver/template/viewonline_body.html b/phpBB/styles/prosilver/template/viewonline_body.html
index b111d743f9..3f1f0e64bf 100644
--- a/phpBB/styles/prosilver/template/viewonline_body.html
+++ b/phpBB/styles/prosilver/template/viewonline_body.html
@@ -7,7 +7,7 @@
<li class="rightside pagination"><!-- IF PAGINATION --><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE -->{PAGE_NUMBER}<!-- ENDIF --></li>
</ul>
-<div class="forumbg">
+<div class="forumbg forumbg-table">
<div class="inner"><span class="corners-top"><span></span></span>
<table class="table1" cellspacing="1">
diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css
index d1cff9c8be..c258ed1245 100644
--- a/phpBB/styles/prosilver/theme/bidi.css
+++ b/phpBB/styles/prosilver/theme/bidi.css
@@ -591,6 +591,19 @@
/* PM Styles
----------------------------------------*/
+/* PM panel adjustments */
+.rtl .reply-all a.right {
+ background-position: 5% 60%;
+}
+
+.rtl .reply-all a.right:hover {
+ background-position: 3% 60%;
+}
+
+.rtl .reply-all {
+ padding-left: 5px;
+}
+
/* Defined rules list for PM options */
.rtl ol.def-rules {
padding-right: 0;
diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css
index e98ce237bc..b9e4491feb 100644
--- a/phpBB/styles/prosilver/theme/colours.css
+++ b/phpBB/styles/prosilver/theme/colours.css
@@ -884,12 +884,6 @@ dl.mini dt {
color: #000000 !important;
}
-/* PM panel adjustments */
-.pm-panel-header,
-#cp-main .pm-message-nav {
- border-bottom-color: #A4B3BF;
-}
-
/* PM marking colours */
.pmlist li.pm_message_reported_colour, .pm_message_reported_colour {
border-left-color: #BC2A4D;
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index 8b5e09297e..7eb00bd808 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -418,7 +418,19 @@ table.info tbody th {
}
.forumbg table.table1 {
- margin: 0 -2px -1px -1px;
+ margin: 0;
+}
+
+.forumbg-table > .inner {
+ margin: 0 -1px;
+}
+
+.forumbg-table > .inner > span.corners-top {
+ margin: 0 -4px -1px -4px;
+}
+
+.forumbg-table > .inner > span.corners-bottom {
+ margin: -1px -4px 0 -4px;
}
/* Misc layout styles
diff --git a/phpBB/styles/prosilver/theme/cp.css b/phpBB/styles/prosilver/theme/cp.css
index 708bfbaf83..aed88831a8 100644
--- a/phpBB/styles/prosilver/theme/cp.css
+++ b/phpBB/styles/prosilver/theme/cp.css
@@ -349,31 +349,17 @@ dl.mini dd {
}
/* PM panel adjustments */
-.pm-panel-header {
- margin: 0;
- padding-bottom: 10px;
- border-bottom: 1px dashed #A4B3BF;
+.reply-all a.left {
+ background-position: 3px 60%;
}
-.reply-all {
- display: block;
- padding-top: 4px;
- clear: both;
- float: left;
-}
-
-.pm-panel-message {
- padding-top: 10px;
+.reply-all a.left:hover {
+ background-position: 0px 60%;
}
-.pm-return-to {
- padding-top: 23px;
-}
-
-#cp-main .pm-message-nav {
- margin: 0;
- padding: 2px 10px 5px 10px;
- border-bottom: 1px dashed #A4B3BF;
+.reply-all {
+ font-size: 11px;
+ padding-top: 5px;
}
/* PM Message history */
diff --git a/phpBB/styles/prosilver/theme/tweaks.css b/phpBB/styles/prosilver/theme/tweaks.css
index f7322c2cce..5e11b2122b 100644
--- a/phpBB/styles/prosilver/theme/tweaks.css
+++ b/phpBB/styles/prosilver/theme/tweaks.css
@@ -87,10 +87,6 @@ dl.icon {
float: none;
}
-* html .forumbg table.table1 {
- margin: 0 -2px 0px -1px;
-}
-
/* Headerbar height fix for IE7 and below */
* html #site-description p {
margin-bottom: 1.0em;
diff --git a/phpBB/styles/subsilver2/template/captcha_default.html b/phpBB/styles/subsilver2/template/captcha_default.html
index 4c65f81643..e2edf0b810 100644
--- a/phpBB/styles/subsilver2/template/captcha_default.html
+++ b/phpBB/styles/subsilver2/template/captcha_default.html
@@ -12,6 +12,6 @@
</tr>
<tr>
<td class="row1"><b class="genmed">{L_CONFIRM_CODE}:</b><br /><span class="gensmall">{L_CONFIRM_CODE_EXPLAIN}</span></td>
- <td class="row2"><input class="post" type="text" name="confirm_code" size="8" maxlength="8" />
+ <td class="row2"><input class="post" type="text" name="confirm_code" size="8" maxlength="8"<!-- IF $CAPTCHA_TAB_INDEX --> tabindex="{$CAPTCHA_TAB_INDEX}"<!-- ENDIF --> />
<!-- IF S_CONFIRM_REFRESH --><input type="submit" name="refresh_vc" id="refresh_vc" class="btnlite" value="{L_VC_REFRESH}" /><!-- ENDIF --></td>
</tr>
diff --git a/phpBB/styles/subsilver2/template/captcha_qa.html b/phpBB/styles/subsilver2/template/captcha_qa.html
index 23d2a92f68..acc9cdcdfb 100644
--- a/phpBB/styles/subsilver2/template/captcha_qa.html
+++ b/phpBB/styles/subsilver2/template/captcha_qa.html
@@ -3,6 +3,6 @@
</tr>
<tr>
<td class="row1"><b class="genmed">{QA_CONFIRM_QUESTION}:</b><br /><span class="gensmall">{L_CONFIRM_QUESTION_EXPLAIN}</span></td>
- <td class="row2"><input class="post" type="text" name="qa_answer" size="80" /></td>
+ <td class="row2"><input class="post" type="text" name="qa_answer" size="80"<!-- IF $CAPTCHA_TAB_INDEX --> tabindex="{$CAPTCHA_TAB_INDEX}"<!-- ENDIF --> /></td>
<input type="hidden" name="qa_confirm_id" id="confirm_id" value="{QA_CONFIRM_ID}" /></td>
</tr>
diff --git a/phpBB/styles/subsilver2/template/faq_body.html b/phpBB/styles/subsilver2/template/faq_body.html
index bbd9b82b19..6a4df3659c 100644
--- a/phpBB/styles/subsilver2/template/faq_body.html
+++ b/phpBB/styles/subsilver2/template/faq_body.html
@@ -13,7 +13,7 @@
<!-- BEGIN faq_block -->
<span class="gen"><b>{faq_block.BLOCK_TITLE}</b></span><br />
<!-- BEGIN faq_row -->
- <span class="gen"><a class="postlink" href="#f{faq_block.S_ROW_COUNT}r{faq_block.faq_row.S_ROW_COUNT}">{faq_block.faq_row.FAQ_QUESTION}</a></span><br />
+ <span class="gen"><a href="#f{faq_block.S_ROW_COUNT}r{faq_block.faq_row.S_ROW_COUNT}">{faq_block.faq_row.FAQ_QUESTION}</a></span><br />
<!-- END faq_row -->
<br />
<!-- END faq_block -->
diff --git a/phpBB/styles/subsilver2/template/login_body.html b/phpBB/styles/subsilver2/template/login_body.html
index 262341e0c0..ba316517a9 100644
--- a/phpBB/styles/subsilver2/template/login_body.html
+++ b/phpBB/styles/subsilver2/template/login_body.html
@@ -68,7 +68,7 @@
<!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_CODE -->
</table>
<table class="tablebg" width="100%" cellspacing="1">
-
+ <!-- DEFINE $CAPTCHA_TAB_INDEX = 4 -->
<!-- INCLUDE {CAPTCHA_TEMPLATE} -->
<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/posting_body.html b/phpBB/styles/subsilver2/template/posting_body.html
index fec6d7ff6c..d7947caf2f 100644
--- a/phpBB/styles/subsilver2/template/posting_body.html
+++ b/phpBB/styles/subsilver2/template/posting_body.html
@@ -333,6 +333,7 @@
<!-- ENDIF -->
<!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_CODE -->
+ <!-- DEFINE $CAPTCHA_TAB_INDEX = 4 -->
<!-- INCLUDE {CAPTCHA_TEMPLATE} -->
<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/template.cfg b/phpBB/styles/subsilver2/template/template.cfg
index 4e5c36af99..d557edba87 100644
--- a/phpBB/styles/subsilver2/template/template.cfg
+++ b/phpBB/styles/subsilver2/template/template.cfg
@@ -21,3 +21,7 @@ name = subsilver2
copyright = &copy; phpBB Group, 2003
version = 3.0.10
+# Template inheritance
+# See http://blog.phpbb.com/2008/07/31/templating-just-got-easier/
+# Set value to empty to ignore template inheritance
+inherit_from = subsilver2
diff --git a/phpBB/styles/subsilver2/template/ucp_main_front.html b/phpBB/styles/subsilver2/template/ucp_main_front.html
index fdef0bd949..dc945c83d6 100644
--- a/phpBB/styles/subsilver2/template/ucp_main_front.html
+++ b/phpBB/styles/subsilver2/template/ucp_main_front.html
@@ -48,11 +48,11 @@
<!-- IF S_SHOW_ACTIVITY -->
<tr>
<td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="genmed">{L_ACTIVE_IN_FORUM}: </b></td>
- <td><!-- IF ACTIVE_FORUM --><b><a class="gen" href="{U_ACTIVE_FORUM}">{ACTIVE_FORUM}</a></b><br /><span class="genmed">[ {ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT} ]</span><!-- ELSE --><span class="gen">-</span><!-- ENDIF --></td>
+ <td><!-- IF ACTIVE_FORUM != '' --><b><a class="gen" href="{U_ACTIVE_FORUM}">{ACTIVE_FORUM}</a></b><br /><span class="genmed">[ {ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT} ]</span><!-- ELSE --><span class="gen">-</span><!-- ENDIF --></td>
</tr>
<tr>
<td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="genmed">{L_ACTIVE_IN_TOPIC}: </b></td>
- <td><!-- IF ACTIVE_TOPIC --><b><a class="gen" href="{U_ACTIVE_TOPIC}">{ACTIVE_TOPIC}</a></b><br /><span class="genmed">[ {ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT} ]</span><!-- ELSE --><span class="gen">-</span><!-- ENDIF --></td>
+ <td><!-- IF ACTIVE_TOPIC != '' --><b><a class="gen" href="{U_ACTIVE_TOPIC}">{ACTIVE_TOPIC}</a></b><br /><span class="genmed">[ {ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT} ]</span><!-- ELSE --><span class="gen">-</span><!-- ENDIF --></td>
</tr>
<!-- ENDIF -->
<!-- IF WARNINGS -->
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 588f60b589..6fec662b02 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -278,7 +278,7 @@ if (!empty($_EXTRA_URL))
foreach ($_EXTRA_URL as $url_param)
{
$url_param = explode('=', $url_param, 2);
- $s_hidden_fields[$url_param[0]] = $url_param[1];
+ $s_search_hidden_fields[$url_param[0]] = $url_param[1];
}
}
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 01cd6a28a8..74420a25c7 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -607,7 +607,7 @@ if (!empty($_EXTRA_URL))
foreach ($_EXTRA_URL as $url_param)
{
$url_param = explode('=', $url_param, 2);
- $s_hidden_fields[$url_param[0]] = $url_param[1];
+ $s_search_hidden_fields[$url_param[0]] = $url_param[1];
}
}
diff --git a/tests/bbcode/url_bbcode_test.php b/tests/bbcode/url_bbcode_test.php
index cd85dbd0d9..15bdfc434f 100644
--- a/tests/bbcode/url_bbcode_test.php
+++ b/tests/bbcode/url_bbcode_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index 6f3c93a374..2fb805043e 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -3,32 +3,16 @@
*
* @package testing
* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
define('IN_PHPBB', true);
$phpbb_root_path = 'phpBB/';
$phpEx = 'php';
-$table_prefix = 'phpbb_';
-
-if (!defined('E_DEPRECATED'))
-{
- define('E_DEPRECATED', 8192);
-}
-error_reporting(E_ALL & ~E_DEPRECATED);
-
-// If we are on PHP >= 6.0.0 we do not need some code
-if (version_compare(PHP_VERSION, '6.0.0-dev', '>='))
-{
- define('STRIP', false);
-}
-else
-{
- @set_magic_quotes_runtime(0);
- define('STRIP', (get_magic_quotes_gpc()) ? true : false);
-}
+require_once $phpbb_root_path . 'includes/startup.php';
+$table_prefix = 'phpbb_';
require_once $phpbb_root_path . 'includes/constants.php';
require_once 'test_framework/phpbb_test_case_helpers.php';
diff --git a/tests/dbal/cross_join_test.php b/tests/dbal/cross_join_test.php
index 7110c7a2ea..6c6b8a8449 100644
--- a/tests/dbal/cross_join_test.php
+++ b/tests/dbal/cross_join_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/dbal/db_tools_test.php b/tests/dbal/db_tools_test.php
index c0c66b5be7..fbde636b58 100644
--- a/tests/dbal/db_tools_test.php
+++ b/tests/dbal/db_tools_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/dbal/fixtures/styles.xml b/tests/dbal/fixtures/styles.xml
new file mode 100644
index 0000000000..47b384c47f
--- /dev/null
+++ b/tests/dbal/fixtures/styles.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_styles">
+ <column>style_id</column>
+ <column>style_name</column>
+ <column>style_copyright</column>
+ <column>style_active</column>
+ <column>template_id</column>
+ <column>theme_id</column>
+ <column>imageset_id</column>
+ <row>
+ <value>1</value>
+ <value>prosilver</value>
+ <value>&amp;copy; phpBB Group</value>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>prosilver2</value>
+ <value>&amp;copy; phpBB Group</value>
+ <value>0</value>
+ <value>2</value>
+ <value>2</value>
+ <value>2</value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>Prosilver1</value>
+ <value>&amp;copy; phpBB Group</value>
+ <value>0</value>
+ <value>3</value>
+ <value>3</value>
+ <value>3</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/dbal/order_lower_test.php b/tests/dbal/order_lower_test.php
new file mode 100644
index 0000000000..b50494d506
--- /dev/null
+++ b/tests/dbal/order_lower_test.php
@@ -0,0 +1,62 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_dbal_order_lower_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/styles.xml');
+ }
+
+ public function test_cross_join()
+ {
+ $db = $this->new_dbal();
+
+ // http://tracker.phpbb.com/browse/PHPBB3-10507
+ // Test ORDER BY LOWER(style_name)
+ $db->sql_return_on_error(true);
+
+ $sql = 'SELECT * FROM phpbb_styles ORDER BY LOWER(style_name)';
+ $result = $db->sql_query($sql);
+
+ $db->sql_return_on_error(false);
+
+ $this->assertEquals(array(
+ array(
+ 'style_id' => 1,
+ 'style_name' => 'prosilver',
+ 'style_copyright' => '&copy; phpBB Group',
+ 'style_active' => 1,
+ 'template_id' => 1,
+ 'theme_id' => 1,
+ 'imageset_id' => 1
+ ),
+ array(
+ 'style_id' => 3,
+ 'style_name' => 'Prosilver1',
+ 'style_copyright' => '&copy; phpBB Group',
+ 'style_active' => 0,
+ 'template_id' => 3,
+ 'theme_id' => 3,
+ 'imageset_id' => 3
+ ),
+ array(
+ 'style_id' => 2,
+ 'style_name' => 'prosilver2',
+ 'style_copyright' => '&copy; phpBB Group',
+ 'style_active' => 0,
+ 'template_id' => 2,
+ 'theme_id' => 2,
+ 'imageset_id' => 2
+ )
+ ),
+ $db->sql_fetchrowset($result)
+ );
+ }
+}
diff --git a/tests/dbal/select_test.php b/tests/dbal/select_test.php
index 8ddd27465d..21b12777dc 100644
--- a/tests/dbal/select_test.php
+++ b/tests/dbal/select_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -357,4 +357,29 @@ class phpbb_dbal_select_test extends phpbb_database_test_case
$this->assertSame(false, $row);
}
+
+ public function test_get_row_count()
+ {
+ $this->assertSame(
+ 3,
+ (int) $this->new_dbal()->get_row_count('phpbb_users'),
+ "Failed asserting that user table has exactly 3 rows."
+ );
+ }
+
+ public function test_get_estimated_row_count()
+ {
+ $actual = $this->new_dbal()->get_estimated_row_count('phpbb_users');
+
+ if (is_string($actual) && isset($actual[0]) && $actual[0] === '~')
+ {
+ $actual = substr($actual, 1);
+ }
+
+ $this->assertGreaterThan(
+ 1,
+ $actual,
+ "Failed asserting that estimated row count of user table is greater than 1."
+ );
+ }
}
diff --git a/tests/dbal/write_test.php b/tests/dbal/write_test.php
index 4709d45fa5..596c50a220 100644
--- a/tests/dbal/write_test.php
+++ b/tests/dbal/write_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/error_collector_test.php b/tests/error_collector_test.php
index e1ac32f5ac..d67dea3719 100644
--- a/tests/error_collector_test.php
+++ b/tests/error_collector_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/mock/cache.php b/tests/mock/cache.php
index 020574b0bb..650545c3d6 100644
--- a/tests/mock/cache.php
+++ b/tests/mock/cache.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/mock/session_testable.php b/tests/mock/session_testable.php
index 47089cb94b..70a58fb6cc 100644
--- a/tests/mock/session_testable.php
+++ b/tests/mock/session_testable.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/mock_user.php b/tests/mock_user.php
index 5b89ea3e19..ec14ce430e 100644
--- a/tests/mock_user.php
+++ b/tests/mock_user.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/network/checkdnsrr_test.php b/tests/network/checkdnsrr_test.php
index 5a756dcef8..1942a50f06 100644
--- a/tests/network/checkdnsrr_test.php
+++ b/tests/network/checkdnsrr_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/network/ftp_fsock_pasv_epsv_test.php b/tests/network/ftp_fsock_pasv_epsv_test.php
index 6ad811e3ca..22f17785b8 100644
--- a/tests/network/ftp_fsock_pasv_epsv_test.php
+++ b/tests/network/ftp_fsock_pasv_epsv_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/profile/custom_test.php b/tests/profile/custom_test.php
index 585182e583..1f33b45ba9 100644
--- a/tests/profile/custom_test.php
+++ b/tests/profile/custom_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/random/gen_rand_string_test.php b/tests/random/gen_rand_string_test.php
index 115c55e4e2..3317c78ed9 100644
--- a/tests/random/gen_rand_string_test.php
+++ b/tests/random/gen_rand_string_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/regex/censor_test.php b/tests/regex/censor_test.php
index fa9104e71d..5929092e07 100644
--- a/tests/regex/censor_test.php
+++ b/tests/regex/censor_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/regex/email_test.php b/tests/regex/email_test.php
index 0695b801d5..17f93259c3 100644
--- a/tests/regex/email_test.php
+++ b/tests/regex/email_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/regex/ipv4_test.php b/tests/regex/ipv4_test.php
index 9829547508..38a3aa4a8e 100644
--- a/tests/regex/ipv4_test.php
+++ b/tests/regex/ipv4_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/regex/ipv6_test.php b/tests/regex/ipv6_test.php
index 1b2018403c..d24217b346 100644
--- a/tests/regex/ipv6_test.php
+++ b/tests/regex/ipv6_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/regex/password_complexity_test.php b/tests/regex/password_complexity_test.php
index 21e8d12a0a..07453555ee 100644
--- a/tests/regex/password_complexity_test.php
+++ b/tests/regex/password_complexity_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/regex/table_prefix_test.php b/tests/regex/table_prefix_test.php
index 67a18b4fbc..33bdd4ae2d 100644
--- a/tests/regex/table_prefix_test.php
+++ b/tests/regex/table_prefix_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/regex/url_test.php b/tests/regex/url_test.php
index c3a336063a..b395f5cae2 100644
--- a/tests/regex/url_test.php
+++ b/tests/regex/url_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/request/request_var_test.php b/tests/request/request_var_test.php
index fa17b1909f..8e609c00af 100644
--- a/tests/request/request_var_test.php
+++ b/tests/request/request_var_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/security/base.php b/tests/security/base.php
index db9c884cf4..2658798237 100644
--- a/tests/security/base.php
+++ b/tests/security/base.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/security/extract_current_page_test.php b/tests/security/extract_current_page_test.php
index 71c7a3a397..4911f7b452 100644
--- a/tests/security/extract_current_page_test.php
+++ b/tests/security/extract_current_page_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/security/hash_test.php b/tests/security/hash_test.php
index 19a3822145..0c2580c19b 100644
--- a/tests/security/hash_test.php
+++ b/tests/security/hash_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/security/redirect_test.php b/tests/security/redirect_test.php
index 70ba8527b1..4848a938c6 100644
--- a/tests/security/redirect_test.php
+++ b/tests/security/redirect_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/session/append_sid_test.php b/tests/session/append_sid_test.php
index 1a3ad633e3..88f6f0718e 100644
--- a/tests/session/append_sid_test.php
+++ b/tests/session/append_sid_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/session/continue_test.php b/tests/session/continue_test.php
index 6737562a0a..c4f7f8d75b 100644
--- a/tests/session/continue_test.php
+++ b/tests/session/continue_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/session/init_test.php b/tests/session/init_test.php
index 1181fab636..2ce6c4a4ac 100644
--- a/tests/session/init_test.php
+++ b/tests/session/init_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/session/testable_factory.php b/tests/session/testable_factory.php
index f3ef19a257..00f79738ef 100644
--- a/tests/session/testable_factory.php
+++ b/tests/session/testable_factory.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/template/template_test.php b/tests/template/template_test.php
index 5005710220..aaee7bb4a0 100644
--- a/tests/template/template_test.php
+++ b/tests/template/template_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/test_framework/phpbb_database_test_case.php b/tests/test_framework/phpbb_database_test_case.php
index e1b368dcea..fdb662b284 100644
--- a/tests/test_framework/phpbb_database_test_case.php
+++ b/tests/test_framework/phpbb_database_test_case.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/test_framework/phpbb_database_test_connection_manager.php b/tests/test_framework/phpbb_database_test_connection_manager.php
index 7a45d87583..c734c90a1a 100644
--- a/tests/test_framework/phpbb_database_test_connection_manager.php
+++ b/tests/test_framework/phpbb_database_test_connection_manager.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/test_framework/phpbb_test_case.php b/tests/test_framework/phpbb_test_case.php
index f189da3671..8b16f02638 100644
--- a/tests/test_framework/phpbb_test_case.php
+++ b/tests/test_framework/phpbb_test_case.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/test_framework/phpbb_test_case_helpers.php b/tests/test_framework/phpbb_test_case_helpers.php
index 0acdce32e0..9a7ab2d237 100644
--- a/tests/test_framework/phpbb_test_case_helpers.php
+++ b/tests/test_framework/phpbb_test_case_helpers.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/text_processing/censor_text_test.php b/tests/text_processing/censor_text_test.php
index 2843f0b20b..8fcdb7ef85 100644
--- a/tests/text_processing/censor_text_test.php
+++ b/tests/text_processing/censor_text_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/text_processing/make_clickable_test.php b/tests/text_processing/make_clickable_test.php
index 29b982d709..8697907311 100644
--- a/tests/text_processing/make_clickable_test.php
+++ b/tests/text_processing/make_clickable_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/user/lang_test.php b/tests/user/lang_test.php
index 6c60583a7b..d33f430955 100644
--- a/tests/user/lang_test.php
+++ b/tests/user/lang_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/utf/normalizer_test.php b/tests/utf/normalizer_test.php
index 1dc69e283e..92230cfcc9 100644
--- a/tests/utf/normalizer_test.php
+++ b/tests/utf/normalizer_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/utf/utf8_clean_string_test.php b/tests/utf/utf8_clean_string_test.php
index e5a771eafa..70bd549d5b 100644
--- a/tests/utf/utf8_clean_string_test.php
+++ b/tests/utf/utf8_clean_string_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/utf/utf8_wordwrap_test.php b/tests/utf/utf8_wordwrap_test.php
index 03fa9dc38c..39fdf73308 100644
--- a/tests/utf/utf8_wordwrap_test.php
+++ b/tests/utf/utf8_wordwrap_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/wrapper/gmgetdate_test.php b/tests/wrapper/gmgetdate_test.php
index 0b4c3378a9..a838cfdba9 100644
--- a/tests/wrapper/gmgetdate_test.php
+++ b/tests/wrapper/gmgetdate_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/wrapper/mt_rand_test.php b/tests/wrapper/mt_rand_test.php
index c8bcb3d14c..eba0bf2faa 100644
--- a/tests/wrapper/mt_rand_test.php
+++ b/tests/wrapper/mt_rand_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
diff --git a/tests/wrapper/version_compare_test.php b/tests/wrapper/version_compare_test.php
index f718cfd16b..8b42eb4bee 100644
--- a/tests/wrapper/version_compare_test.php
+++ b/tests/wrapper/version_compare_test.php
@@ -3,7 +3,7 @@
*
* @package testing
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/