aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--README.md20
-rw-r--r--build/build.xml160
-rwxr-xr-xbuild/build_diff.php31
-rw-r--r--build/build_helper.php175
-rwxr-xr-xbuild/package.php155
-rw-r--r--build/phpdoc-phpbb.ini145
-rw-r--r--build/webpi/parameters.xml112
-rw-r--r--phpBB/adm/style/acp_forums.html2
-rw-r--r--phpBB/adm/style/acp_styles.html2
-rw-r--r--phpBB/adm/style/acp_update.html6
-rw-r--r--phpBB/adm/style/captcha_recaptcha.html3
-rw-r--r--phpBB/develop/check_flash_bbcodes.php163
-rw-r--r--phpBB/docs/CHANGELOG.html521
-rw-r--r--phpBB/docs/INSTALL.html4
-rw-r--r--phpBB/docs/coding-guidelines.html4
-rw-r--r--phpBB/docs/hook_system.html2
-rw-r--r--phpBB/docs/lighttpd.sample.conf60
-rw-r--r--phpBB/docs/nginx.sample.conf (renamed from phpBB/docs/nginx.conf.sample)0
-rw-r--r--phpBB/includes/acm/acm_wincache.php84
-rw-r--r--phpBB/includes/acp/acp_update.php10
-rw-r--r--phpBB/includes/acp/acp_words.php3
-rw-r--r--phpBB/includes/cache.php19
-rw-r--r--phpBB/includes/constants.php4
-rw-r--r--phpBB/includes/db/mssqlnative.php26
-rw-r--r--phpBB/includes/functions.php48
-rw-r--r--phpBB/includes/functions_admin.php2
-rw-r--r--phpBB/includes/functions_convert.php1
-rw-r--r--phpBB/includes/functions_display.php2
-rw-r--r--phpBB/includes/functions_profile_fields.php5
-rw-r--r--phpBB/includes/message_parser.php9
-rw-r--r--phpBB/includes/template.php2
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php3
-rw-r--r--phpBB/install/convertors/convert_phpbb20.php4
-rw-r--r--phpBB/install/database_update.php193
-rw-r--r--phpBB/install/install_update.php4
-rw-r--r--phpBB/install/schemas/schema_data.sql8
-rw-r--r--phpBB/language/en/acp/board.php68
-rw-r--r--phpBB/language/en/acp/common.php6
-rw-r--r--phpBB/language/en/acp/groups.php2
-rw-r--r--phpBB/language/en/captcha_qa.php14
-rw-r--r--phpBB/language/en/common.php4
-rw-r--r--phpBB/language/en/install.php5
-rw-r--r--phpBB/language/en/memberlist.php2
-rw-r--r--phpBB/language/en/search.php1
-rw-r--r--phpBB/language/en/search_synonyms.php4
-rw-r--r--phpBB/posting.php9
-rw-r--r--phpBB/search.php56
-rw-r--r--phpBB/styles/prosilver/imageset/imageset.cfg2
-rw-r--r--phpBB/styles/prosilver/style.cfg2
-rw-r--r--phpBB/styles/prosilver/template/login_body.html2
-rw-r--r--phpBB/styles/prosilver/template/overall_footer.html2
-rw-r--r--phpBB/styles/prosilver/template/overall_header.html2
-rw-r--r--phpBB/styles/prosilver/template/template.cfg2
-rw-r--r--phpBB/styles/prosilver/theme/theme.cfg2
-rw-r--r--phpBB/styles/prosilver/theme/tweaks.css9
-rw-r--r--phpBB/styles/subsilver2/imageset/imageset.cfg2
-rw-r--r--phpBB/styles/subsilver2/style.cfg2
-rw-r--r--phpBB/styles/subsilver2/template/captcha_default.html2
-rw-r--r--phpBB/styles/subsilver2/template/login_body.html2
-rw-r--r--phpBB/styles/subsilver2/template/overall_footer.html2
-rw-r--r--phpBB/styles/subsilver2/template/overall_header.html2
-rw-r--r--phpBB/styles/subsilver2/template/template.cfg2
-rw-r--r--phpBB/styles/subsilver2/theme/theme.cfg2
-rw-r--r--phpunit.xml.dist25
-rw-r--r--tests/RUNNING_TESTS.txt42
-rw-r--r--tests/all_tests.php69
-rw-r--r--tests/bootstrap.php (renamed from tests/test_framework/framework.php)17
-rw-r--r--tests/dbal/all_tests.php40
-rw-r--r--tests/dbal/fixtures/config.xml18
-rw-r--r--tests/dbal/select_test.php (renamed from tests/dbal/dbal.php)175
-rw-r--r--tests/dbal/write_test.php171
-rw-r--r--tests/network/all_tests.php40
-rw-r--r--tests/network/checkdnsrr_test.php (renamed from tests/network/checkdnsrr.php)3
-rw-r--r--tests/random/all_tests.php40
-rw-r--r--tests/random/gen_rand_string_test.php (renamed from tests/random/gen_rand_string.php)3
-rw-r--r--tests/regex/all_tests.php46
-rw-r--r--tests/regex/censor_test.php40
-rw-r--r--tests/regex/email_test.php (renamed from tests/regex/email.php)3
-rw-r--r--tests/regex/ipv4_test.php (renamed from tests/regex/ipv4.php)3
-rw-r--r--tests/regex/ipv6_test.php (renamed from tests/regex/ipv6.php)3
-rw-r--r--tests/regex/url_test.php (renamed from tests/regex/url.php)3
-rw-r--r--tests/request/all_tests.php41
-rw-r--r--tests/request/request_var_test.php (renamed from tests/request/request_var.php)4
-rw-r--r--tests/security/base.php (renamed from tests/security/all_tests.php)34
-rw-r--r--tests/security/extract_current_page_test.php (renamed from tests/security/extract_current_page.php)8
-rw-r--r--tests/security/redirect_test.php (renamed from tests/security/redirect.php)12
-rw-r--r--tests/template/all_tests.php40
-rw-r--r--tests/template/template_test.php (renamed from tests/template/template.php)6
-rw-r--r--tests/template/templates/_dummy_include.php3
-rw-r--r--tests/template/templates/_dummy_include.php.inc3
-rw-r--r--tests/template/templates/includephp.html2
-rw-r--r--tests/test_framework/phpbb_database_test_case.php298
-rw-r--r--tests/test_framework/phpbb_test_case.php22
-rw-r--r--tests/test_framework/phpbb_test_case_helpers.php68
-rw-r--r--tests/text_processing/all_tests.php41
-rw-r--r--tests/text_processing/make_clickable_test.php (renamed from tests/text_processing/make_clickable.php)6
-rw-r--r--tests/utf/all_tests.php43
-rw-r--r--tests/utf/utf8_clean_string_test.php3
-rw-r--r--tests/utf/utf8_wordwrap_test.php3
100 files changed, 2170 insertions, 1411 deletions
diff --git a/.gitignore b/.gitignore
index 871d17b386..39b9e0a7f4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
*~
+phpunit.xml
phpBB/cache/*.php
phpBB/config.php
phpBB/files/*
diff --git a/README.md b/README.md
new file mode 100644
index 0000000000..6b94f898a3
--- /dev/null
+++ b/README.md
@@ -0,0 +1,20 @@
+[![phpBB](http://www.phpbb.com/theme/images/logos/blue/160x52.png)](http://www.phpbb.com)
+
+## ABOUT
+
+phpBB is a free bulletin board written in PHP.
+
+## COMMUNITY
+
+Find support and lots more on [phpBB.com](http://www.phpbb.com)! Discuss the development on [area51](http://area51.phpbb.com/phpBB/index.php).
+
+## CONTRIBUTE
+
+1. [Create an account on phpBB.com](http://www.phpbb.com/community/ucp.php?mode=register)
+2. [Create a ticket (unless there already is one)](http://tracker.phpbb.com/secure/CreateIssue!default.jspa)
+3. [Read our Git Contribution Guidelines](http://wiki.phpbb.com/Git); if you're new to git, also read [the introduction guide](http://wiki.phpbb.com/display/DEV/Working+with+Git)
+4. Send us a pull request
+
+## LICENSE
+
+[GNU General Public License v2](http://opensource.org/licenses/gpl-2.0.php)
diff --git a/build/build.xml b/build/build.xml
new file mode 100644
index 0000000000..724f201eb3
--- /dev/null
+++ b/build/build.xml
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
+ <!-- a few settings for the build -->
+ <property name="newversion" value="3.0.8" />
+ <property name="prevversion" value="3.0.8-RC1" />
+ <property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7-PL1" />
+ <!-- no configuration should be needed beyond this point -->
+
+ <property name="oldversions" value="${olderversions}, ${prevversion}" />
+ <property name="versions" value="${oldversions}, ${newversion}" />
+
+ <!-- These are the main targets which you will probably want to use -->
+ <target name="package" depends="clean,prepare,create-package" />
+ <target name="all" depends="clean,prepare,test,docs,create-package" />
+
+ <target name="prepare">
+ <mkdir dir="build/logs" />
+ <mkdir dir="build/api" />
+ <mkdir dir="build/codebrowser" />
+ <mkdir dir="build/coverage" />
+ <mkdir dir="build/cpd" />
+ <mkdir dir="build/dependencies" />
+ <mkdir dir="build/new_version" />
+ <mkdir dir="build/new_version/files" />
+ <mkdir dir="build/new_version/patches" />
+ <mkdir dir="build/new_version/release_files" />
+ <mkdir dir="build/new_version/update" />
+ <mkdir dir="build/old_versions" />
+ <mkdir dir="build/save" />
+ </target>
+
+ <target name="clean">
+ <delete dir="build/logs" />
+ <delete dir="build/api" />
+ <delete dir="build/codebrowser" />
+ <delete dir="build/coverage" />
+ <delete dir="build/cpd" />
+ <delete dir="build/dependencies" />
+ <delete dir="build/new_version" />
+ <delete dir="build/old_versions" />
+ <delete dir="build/save" />
+ </target>
+
+ <target name="test" depends="clean,prepare">
+ <exec dir="."
+ command="phpunit --log-junit build/logs/phpunit.xml
+ --coverage-clover build/logs/clover.xml
+ --coverage-html build/coverage"
+ passthru="true" />
+
+
+ <!-- Does not allow changing the working directory to tests/
+ so this approach does not work for us unfortunately
+ <phpunit codecoverage="true" haltonfailure="true">
+ <formatter todir="build/logs" type="xml"/>
+ <batchtest>
+ <fileset dir="tests">
+ <include name="all_tests.php"/>
+ </fileset>
+ </batchtest>
+ </phpunit>
+ -->
+ </target>
+
+ <target name="docs">
+ <!-- only works if you setup phpdoctor:
+ git clone https://github.com/peej/phpdoctor.git
+ and then create an executable phpdoctor in your path containing
+ #!/bin/sh
+ php -f /path/to/phpdoctor/phpdoc.php $@
+ -->
+ <exec dir="build"
+ command="phpdoctor phpdoc-phpbb.ini"
+ passthru="true" />
+ </target>
+
+ <target name="old-version-diffs">
+ <foreach list="${oldversions}" param="version" target="old-version-diff" />
+ </target>
+
+ <!-- This target retrieves an old version from the git tag release-${version}
+ and creates a diff between that release and the new one -->
+ <target name="old-version-diff">
+ <echo msg="Retrieving version ${version}" />
+ <mkdir dir="build/old_versions/release-${version}" />
+
+ <phingcall target="export">
+ <property name="revision" value="release-${version}" />
+ <property name="dir" value="build/old_versions/release-${version}" />
+ </phingcall>
+
+ <phingcall target="clean-diff-dir">
+ <property name="dir" value="build/old_versions/release-${version}" />
+ </phingcall>
+
+ <exec dir="build/old_versions" command="diff -crNEBwd release-${version} release-${newversion} >
+ ../new_version/patches/phpBB-${version}_to_${newversion}.patch" escape="false" />
+ </target>
+
+ <target name="prepare-new-version">
+ <!-- select the currently checked out commit (HEAD) for packaging -->
+ <mkdir dir="build/new_version/phpBB3" />
+ <phingcall target="export">
+ <property name="revision" value="HEAD" />
+ <property name="dir" value="build/new_version/phpBB3" />
+ </phingcall>
+
+ <!-- copy into directory for diffs -->
+ <exec dir="build" command="cp -rp new_version/phpBB3 old_versions/release-${newversion}" />
+ <!-- and clean up -->
+ <phingcall target="clean-diff-dir">
+ <property name="dir" value="build/old_versions/release-${newversion}" />
+ </phingcall>
+
+ <!-- create an empty config.php file (not for diffs) -->
+ <touch file="build/new_version/phpBB3/config.php" />
+
+ </target>
+
+ <target name="create-package" depends="prepare-new-version,old-version-diffs">
+ <exec dir="build" command="php -f package.php '${versions}' > logs/package.log" escape="false" />
+ <exec dir="build" command="php -f build_diff.php '${prevversion}' '${newversion}' > logs/build_diff.log" escape="false" />
+ </target>
+
+ <!--
+ This target can be called using phingcall to retrieve a clean
+ checkout of a commit from git. It will only export the phpBB directory.
+ The properties revision and dir are required.
+ This target will remove directories that are not needed in distribution
+ and set correct permissions.
+ -->
+ <target name="export">
+ <exec dir="phpBB"
+ command="git archive ${revision} | tar -x -C ../${dir}"
+ checkreturn="true" />
+ <delete file="${dir}/config.php" />
+ <delete dir="${dir}/develop" />
+ <delete dir="${dir}/install/data" />
+
+ <echo msg="Setting permissions for checkout of ${revision} in ${dir}" />
+ <!-- set permissions of all files to 644, directories to 755 -->
+ <exec dir="${dir}" command="find -type f|xargs chmod 644" escape="false" />
+ <exec dir="${dir}" command="find -type d|xargs chmod 755" escape="false" />
+ <!-- set permissions of some directories to 777 -->
+ <chmod mode="0777" file="${dir}/cache" />
+ <chmod mode="0777" file="${dir}/store" />
+ <chmod mode="0777" file="${dir}/files" />
+ <chmod mode="0777" file="${dir}/images/avatars/upload" />
+ </target>
+
+ <target name="clean-diff-dir">
+ <delete dir="${dir}/cache" />
+ <delete dir="${dir}/docs" />
+ <delete dir="${dir}/files" />
+ <delete dir="${dir}/install" />
+ <delete dir="${dir}/store" />
+ </target>
+
+</project>
diff --git a/build/build_diff.php b/build/build_diff.php
index ef815bc0c3..6a6070228f 100755
--- a/build/build_diff.php
+++ b/build/build_diff.php
@@ -9,16 +9,26 @@
*
*/
-// CONFIG - Begin
-$substitute_old = '3.0.6';
-$substitute_new = '3.0.7-PL1';
-$simple_name_old = 'phpbb306';
-$simple_name_new = 'phpbb307-PL1';
+if ($_SERVER['argc'] != 3)
+{
+ die("Please specify the previous and current version as arguments (e.g. build_diff.php '1.0.2' '1.0.3').");
+}
+
+$old_version = trim($_SERVER['argv'][1]);
+$new_version = trim($_SERVER['argv'][2]);
+
+$substitute_old = $old_version;
+$substitute_new = $new_version;
+$simple_name_old = 'release-' . $old_version;
+$simple_name_new = 'release-' . $new_version;
$echo_changes = false;
+
+// DO NOT EVER USE THE FOLLOWING! Fix the script to generate proper changes,
+// do NOT manually create them.
+
// Set this to true to just compress the changes and do not build them again
// This should be used for building custom modified txt file. ;)
$package_changed_files = false;
-// CONFIG - End
//$debug_file = 'includes/functions_user.php'; //'styles/prosilver/style.cfg';
$debug_file = false;
@@ -36,9 +46,6 @@ if (!$package_changed_files)
{
if (!$echo_changes)
{
- // Cleanup...
- run_command("rm -R $location/save/*");
-
// Create directory...
run_command("mkdir $location/save/{$s_name}");
run_command("mkdir $location/save/{$s_name}/language");
@@ -72,14 +79,14 @@ if (!$echo_changes)
foreach ($compress_programs as $extension => $compress_command)
{
echo "Packaging code changes for $extension\n";
- run_command("rm ./../../release_files/{$code_changes_filename}.{$extension}");
+ run_command("rm ./../../new_version/release_files/{$code_changes_filename}.{$extension}");
flush();
// Build Package
- run_command("$compress_command ./../../release_files/{$code_changes_filename}.{$extension} *");
+ run_command("$compress_command ./../../new_version/release_files/{$code_changes_filename}.{$extension} *");
// Build MD5 Sum
- run_command("md5sum ./../../release_files/{$code_changes_filename}.{$extension} > ./../../release_files/{$code_changes_filename}.{$extension}.md5");
+ run_command("md5sum ./../../new_version/release_files/{$code_changes_filename}.{$extension} > ./../../new_version/release_files/{$code_changes_filename}.{$extension}.md5");
flush();
}
}
diff --git a/build/build_helper.php b/build/build_helper.php
index 2bae32218b..94fc0ff3b5 100644
--- a/build/build_helper.php
+++ b/build/build_helper.php
@@ -14,10 +14,6 @@ class build_package
var $old_packages;
var $versions;
var $locations;
- var $clean_directory_structure;
- var $files_to_copy;
- var $files_to_remove;
- var $remove_from_diff_structure;
// -c - context diff
// -r - compare recursive
@@ -53,11 +49,11 @@ class build_package
$this->package_infos = array(
'package_name' => 'phpBB3',
'name_prefix' => 'phpbb',
- 'simple_name' => 'phpbb' . str_replace('.', '', $_latest),
+ 'simple_name' => 'release-' . $_latest,
'new_version_number' => $_latest,
'short_version_number' => str_replace('.', '', $_latest),
'release_filename' => 'phpBB-' . $_latest,
- 'last_version' => 'phpbb' . str_replace('.', '', $_before),
+ 'last_version' => 'release-' . $_before,
'last_version_number' => $_before,
);
@@ -78,112 +74,7 @@ class build_package
continue;
}
- $this->old_packages['phpbb' . str_replace('.', '', $package_version)] = $package_version . '_to_';
- }
-
- // We need to make sure this is up to date with the latest version
- $this->clean_directory_structure = array(
- 'adm' => array(
- 'images' => '',
- 'style' => '',
- ),
- 'cache' => '',
- 'docs' => '',
- 'download' => '',
- 'files' => '',
- 'images' => array(
- 'avatars' => array(
- 'gallery' => '',
- 'upload' => '',
- ),
- 'icons' => array(
- 'misc' => '',
- 'smile' => '',
- ),
- 'ranks' => '',
- 'smilies' => '',
- 'upload_icons' => '',
- ),
- 'includes' => array(
- 'acm' => '',
- 'acp' => array(
- 'info' => '',
- ),
- 'auth' => '',
- 'captcha' => array(
- 'plugins' => '',
- ),
- 'diff' => '',
- 'db' => '',
- 'hooks' => '',
- 'mcp' => array(
- 'info' => '',
- ),
- 'questionnaire' => '',
- 'search' => '',
- 'ucp' => array(
- 'info' => '',
- ),
- 'utf' => array(
- 'data' => '',
- ),
- ),
- 'install' => array(
- 'convertors'=> '',
- 'schemas' => '',
-// 'data' => '',
- ),
- 'language' => array(
- 'en' => array(
- 'acp' => '',
- 'email' => '',
- 'mods' => '',
- ),
- ),
- 'store' => '',
- 'styles' => array(
- 'subsilver2' => array(
- 'imageset' => array(
- 'en' => '',
- ),
- 'template' => '',
- 'theme' => array(
- 'images' => '',
- ),
- ),
- 'prosilver' => array(
- 'imageset' => array(
- 'en' => '',
- ),
- 'template' => '',
- 'theme' => array(
- 'images' => '',
- ),
- ),
- ),
- );
-
- // Files to remove (not include within package)
- $this->files_to_remove = array(); //array('includes/utf/data/recode_cjk.php');
-
- // Files within the main directory to copy - do not include config.php
- $this->files_to_copy = array(
- '.htaccess', 'common.php', 'cron.php', 'faq.php', 'feed.php', 'index.php', 'mcp.php', 'memberlist.php', 'posting.php', 'report.php',
- 'search.php', 'style.php', 'ucp.php', 'viewforum.php', 'viewonline.php', 'viewtopic.php'
- );
-
- // These files/directories will be removed and not used for creating the patch files
- $this->remove_from_diff_structure = array(
- 'config.php', 'cache', 'docs', 'files', 'install', 'store', 'develop'
- );
-
- // Writeable directories
- $this->writeable = array('cache', 'store', 'images/avatars/upload', 'files');
-
- // Fill the rest of the files_to_copy array
- foreach ($this->clean_directory_structure as $cur_dir => $dir_struct)
- {
- $this->_fill_files_to_copy($this->locations['new_version'] . $cur_dir, $cur_dir, $dir_struct);
+ $this->old_packages['release-' . $package_version] = $package_version . '_to_';
}
}
@@ -192,66 +83,6 @@ class build_package
return $this->package_infos[$var];
}
- function _fill_files_to_copy($directory, $cur_dir, $dir_struct)
- {
- $dh = opendir($directory);
-
- while ($file = readdir($dh))
- {
- if (is_file($directory . '/' . $file) && $file != '.' && $file != '..')
- {
- $_loc = str_replace($this->locations['new_version'], '', $directory . '/' . $file);
-
- if (in_array($_loc, $this->files_to_remove))
- {
- continue;
- }
-
- $this->files_to_copy[] = $cur_dir . '/' . $file;
- }
- }
- closedir($dh);
-
- if (is_array($dir_struct))
- {
- foreach ($dir_struct as $_cur_dir => $_dir_struct)
- {
- $this->_fill_files_to_copy($directory . '/' . $_cur_dir, $cur_dir . '/' . $_cur_dir, $_dir_struct);
- }
- }
- }
-
- function adjust_permissions($directory)
- {
- $dh = opendir($directory);
-
- while ($file = readdir($dh))
- {
- if ($file == '.' || $file == '..' || $file == '.svn')
- {
- continue;
- }
-
- // If file, then 644
- if (is_file($directory . '/' . $file))
- {
- chmod($directory . '/' . $file, 0644);
- }
- else if (is_dir($directory . '/' . $file))
- {
- $_loc = str_replace($this->package_infos['dest_dir'] . '/', '', $directory . '/' . $file);
-
- // If directory is within the writeable chmod to 777, else 755
- $mode = (in_array($_loc, $this->writeable)) ? 0777 : 0755;
- chmod($directory . '/' . $file, $mode);
-
- // Now traverse to the directory
- $this->adjust_permissions($directory . '/' . $file);
- }
- }
- closedir($dh);
- }
-
function begin_status($headline)
{
if ($this->status_begun)
diff --git a/build/package.php b/build/package.php
index a0da6404c6..4ce644e8ca 100755
--- a/build/package.php
+++ b/build/package.php
@@ -9,145 +9,24 @@
*
*/
-// The only thing i need to adjust. ;)
-// Please always add the latest version number to the end
-// Only have 5 releases here...
-// If RC8 drops remove the install/data directory
-//$versions = array('3.0.2', '3.0.3-RC1', '3.0.3', '3.0.4-RC1', '3.0.4', '3.0.5-RC1', '3.0.5', '3.0.6-RC1', '3.0.6-RC2', '3.0.6-RC3');
-//$versions = array('3.0.2', '3.0.3', '3.0.4', '3.0.5', '3.0.6', '3.0.7-RC1', '3.0.7');
-$versions = array('3.0.2', '3.0.3', '3.0.4', '3.0.5', '3.0.6', '3.0.7-RC1', '3.0.7-RC2', '3.0.7', '3.0.7-PL1');
-$verbose = false;
+//$versions = array('3.0.2', '3.0.3', '3.0.4', '3.0.5', '3.0.6', '3.0.7-RC1', '3.0.7-RC2', '3.0.7', '3.0.7-PL1');
-require('build_helper.php');
-
-$package = new build_package($versions, $verbose);
-
-echo "Building Release Packages\n";
-echo "Now all three package types (patch, files, release) are built as well as the update package (update).\n";
-
-$package->begin_status('Remove temporary files');
-
-// Cleanup...
-$package->run_command('rm -Rv ' . $package->get('dest_dir'));
-$package->run_command('rm -Rv ' . $package->get('diff_dir'));
-$package->run_command('rm -Rv ' . $package->get('patch_directory'));
-$package->run_command('rm -Rv ' . $package->get('files_directory'));
-$package->run_command('rm -Rv ' . $package->get('update_directory'));
-$package->run_command('rm -Rv ' . $package->get('release_directory'));
-
-$package->begin_status('Create new directories');
-
-// Make sure the directories got removed
-while (file_exists($package->get('update_directory')))
-{
- sleep(1);
-}
-
-if (!file_exists($package->get('dest_dir')))
-{
- $package->run_command('mkdir ' . $package->get('dest_dir'));
-}
-
-if (!file_exists($package->get('diff_dir')))
-{
- $package->run_command('mkdir ' . $package->get('diff_dir'));
-}
-
-if (!file_exists($package->get('patch_directory')))
-{
- $package->run_command('mkdir ' . $package->get('patch_directory'));
-}
-
-if (!file_exists($package->get('files_directory')))
-{
- $package->run_command('mkdir ' . $package->get('files_directory'));
-}
-
-if (!file_exists($package->get('update_directory')))
-{
- $package->run_command('mkdir ' . $package->get('update_directory'));
-}
-
-if (!file_exists($package->get('release_directory')))
-{
- $package->run_command('mkdir ' . $package->get('release_directory'));
-}
-
-$package->begin_status('Copy release files to clean release directory');
-
-// Create config.php file
-$package->run_command('touch ' . $package->get('dest_dir') . '/config.php');
-//$package->run_command('sudo chown www-data:www-data ' . $package->get('dest_dir') . '/config.php');
-
-// Create new directory structure
-foreach ($package->clean_directory_structure as $dir => $dir_struct)
-{
- $package->create_directory($package->get('dest_dir') . '/' . $dir, $dir_struct);
-}
-
-// First step is to copy the new version over (clean structure)
-foreach ($package->files_to_copy as $file)
-{
- $source_file = $package->locations['new_version'] . $file;
- $dest_file = $package->get('dest_dir') . '/' . $file;
-
- $package->run_command("cp -p $source_file $dest_file");
-}
-
-// fix line endings
-chdir($package->get('dest_dir'));
-$package->run_command($package->locations['new_version'] . 'develop/fix_files.sh');
-
-// Now clean up the permissions
-$package->begin_status('Adjust permissions');
-
-$package->adjust_permissions($package->get('dest_dir'));
-
-// Now create a version for diffing the version - copy the tree over to old_versions...
-$package->begin_status('Create diff directory for obtaining file differences');
-
-$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/* ' . $package->get('diff_dir'));
-$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/.htaccess ' . $package->get('diff_dir'));
-
-// Cleanup diff directory (only contents to diff)
-foreach ($package->remove_from_diff_structure as $remove_dir)
+if ($_SERVER['argc'] < 2)
{
- $package->run_command('rm -Rv ' . $package->get('diff_dir') . '/' . $remove_dir);
+ die("Please specify a list of versions as the first argument (e.g. package.php '1.0.0, 1.0.1, 1.0.2').");
}
-// Now, first of all we need to rebuild all old packages we want to support
-foreach ($package->old_packages as $package_name => $tag_name)
-{
- $package->begin_status('Create old packages directory for diffing to ' . $package_name);
-
- chdir($package->locations['old_versions']);
-
- if (is_dir($package->locations['old_versions'] . $package_name))
- {
- $package->run_command('rm -Rv ' . $package->locations['old_versions'] . $package_name);
- }
-
- // Now, create a new one...
- $tag_name = 'release_' . str_replace(array('.', '_to_'), array('_', ''), $tag_name);
+$versions = explode(',', $_SERVER['argv'][1]);
+$versions = array_map('trim', $versions);
- $package->run_command('svn export --non-interactive http://code.phpbb.com/svn/phpbb/tags/' . $tag_name . '/phpBB/ ' . $package_name);
+$verbose = true;
- $location = $package->locations['old_versions'] . $package_name;
- chdir($location . '/');
-
- $package->run_command($package->locations['new_version'] . 'develop/fix_files.sh');
-
- // Now clean up the permissions
- $package->begin_status('Adjust permissions for package ' . $package_name);
+require('build_helper.php');
- $package->adjust_permissions($location);
+$package = new build_package($versions, $verbose);
- // Cleanup diff directory (only contents to diff)
- foreach ($package->remove_from_diff_structure as $remove_dir)
- {
- $package->run_command('rm -Rv ' . $location . '/' . $remove_dir);
- }
-}
+echo "Building Release Packages\n";
+echo "Now all three package types (patch, files, release) are built as well as the update package (update).\n";
// Go trough all versions making a diff if we even have old versions
// For phpBB 3.0.x we might choose a different update method, rendering the things below useless...
@@ -160,13 +39,13 @@ if (sizeof($package->old_packages))
foreach ($package->old_packages as $_package_name => $dest_package_filename)
{
- $package->begin_status('Creating patch/diff files for phpBB-' . $dest_package_filename . $package->get('new_version_number'));
-
- $dest_package_filename = $package->get('patch_directory') . '/phpBB-' . $dest_package_filename . $package->get('new_version_number') . '.patch';
- $package->run_command('diff ' . $package->diff_options . ' ' . $_package_name . ' ' . $package->get('simple_name') . ' > ' . $dest_package_filename);
+ $package->begin_status('Parsing patch/diff files for phpBB-' . $dest_package_filename . $package->get('new_version_number'));
// Parse this diff to determine file changes from the checked versions and save them
- $diff_file_changes[$_package_name] = $package->collect_diff_files($dest_package_filename, $_package_name);
+ $diff_file_changes[$_package_name] = $package->collect_diff_files(
+ $package->get('patch_directory') . '/phpBB-' . $dest_package_filename . $package->get('new_version_number') . '.patch',
+ $_package_name
+ );
}
// Now put those files determined within the correct directories
@@ -404,7 +283,6 @@ if (sizeof($package->old_packages))
foreach ($compress_programs as $extension => $compress_command)
{
$package->begin_status('Packaging phpBB Patch Files for ' . $extension);
- $package->run_command('rm -v ../release_files/' . $package->get('release_filename') . '-patch.' . $extension);
// Build Package
$package->run_command($compress_command . ' ../release_files/' . $package->get('release_filename') . '-patch.' . $extension . ' *');
@@ -420,7 +298,6 @@ if (sizeof($package->old_packages))
{
$package->begin_status('Packaging phpBB Files for ' . $extension);
- $package->run_command('rm -v ../release_files/' . $package->get('release_filename') . '-files.' . $extension);
$package->run_command('mkdir ' . $package->get('files_directory') . '/release');
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/docs ' . $package->get('files_directory') . '/release');
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/install ' . $package->get('files_directory') . '/release');
@@ -457,7 +334,6 @@ if (sizeof($package->old_packages))
$package->begin_status('Packaging phpBB Update for ' . $extension);
- $package->run_command('rm -v ../release_files/' . $package->get('release_filename') . '-update.' . $extension);
$package->run_command('mkdir ' . $package->get('update_directory') . '/release');
// Pack update files
@@ -521,7 +397,6 @@ foreach ($compress_programs as $extension => $compress_command)
// Microsoft Web PI packaging
$package->begin_status('Packaging phpBB for Microsoft WebPI');
$file = './release_files/' . $package->get('release_filename') . '.webpi.zip';
-$package->run_command("rm -v $file");
$package->run_command('cp -p ./release_files/' . $package->get('release_filename') . ".zip $file");
$package->run_command('cd ./../webpi && ' . $compress_programs['zip'] . " ./../new_version/$file *");
$package->run_command("md5sum $file > $file.md5");
diff --git a/build/phpdoc-phpbb.ini b/build/phpdoc-phpbb.ini
new file mode 100644
index 0000000000..f1a7a4bee5
--- /dev/null
+++ b/build/phpdoc-phpbb.ini
@@ -0,0 +1,145 @@
+; Default configuration file for PHPDoctor
+
+; This config file will cause PHPDoctor to generate API documentation of
+; itself.
+
+
+; PHPDoctor settings
+; -----------------------------------------------------------------------------
+
+; Names of files to parse. This can be a single filename, or a comma separated
+; list of filenames. Wildcards are allowed.
+
+files = "*.php"
+
+; Names of files or directories to ignore. This can be a single filename, or a
+; comma separated list of filenames. Wildcards are NOT allowed.
+
+;ignore = "CVS, .svn, .git, _compiled"
+ignore = templates_c/,*HTML/default/*,spec/,*config.php*,*CVS/,test_chora.php,testupdate/,cache/,store/,*proSilver/,develop/,includes/utf/data/,includes/captcha/fonts/,install/update/,install/update.new/,files/,*phpinfo.php*,*update_script.php*,*upgrade.php*,*convert.php*,install/converter/,language/de/,script/,*swatch.php*,*test.php*,*test2.php*,*install.php*,*functions_diff.php*,*acp_update.php*,acm_xcache.php
+
+; The directory to look for files in, if not used the PHPDoctor will look in
+; the current directory (the directory it is run from).
+
+source_path = "../phpBB/"
+
+; If you do not want PHPDoctor to look in each sub directory for files
+; uncomment this line.
+
+;subdirs = off
+
+; Set how loud PHPDoctor is as it runs. Quiet mode suppresses all output other
+; than warnings and errors. Verbose mode outputs additional messages during
+; execution.
+
+quiet = on
+;verbose = on
+
+; Select the doclet to use for generating output.
+
+doclet = standard
+;doclet = debug
+
+; The directory to find the doclet in. Doclets control the HTML output of
+; phpDoctor and can be modified to suit your needs. They are expected to be
+; in a directory named after themselves at the location given.
+
+;doclet_path = ./doclets
+
+; Select the formatter to use for generating output.
+
+;formatter = htmlStandardFormatter
+
+; The directory to find the formatter in. Formatters convert textual markup
+; for use by the doclet.
+
+;formatter_path = ./formatters
+
+; The directory to find taglets in. Taglets allow you to make PHPDoctor handle
+; new tags and to alter the behavour of existing tags and their output.
+
+;taglet_path = ./taglets
+
+; If the code you are parsing does not use package tags or not all elements
+; have package tags, use this setting to place unbound elements into a
+; particular package.
+
+default_package = "phpBB"
+
+use_class_path_as_package = off
+
+ignore_package_tags = off
+
+; Specifies the name of a HTML file containing text for the overview
+; documentation to be placed on the overview page. The path is relative to
+; "source_path" unless an absolute path is given.
+
+overview = ../README.md
+
+; Package comments will be looked for in a file named package.html in the same
+; directory as the first source file parsed in that package or in the directory
+; given below. If package comments are placed in the directory given below then
+; they should be named "<packageName>.html".
+
+package_comment_dir = ./
+
+; Parse out global variables and/or global constants?
+
+;globals = off
+;constants = off
+
+; Generate documentation for all class members
+
+;private = on
+
+; Generate documentation for public and protected class members
+
+;protected = on
+
+; Generate documentation for only public class members
+
+;public = on
+
+; Use the PEAR compatible handling of the docblock first sentence
+
+;pear_compat = on
+
+; Standard doclet settings
+; -----------------------------------------------------------------------------
+
+; The directory to place generated documentation in. If the given path is
+; relative to it will be relative to "source_path".
+
+d = "../build/api/"
+
+; Specifies the title to be placed in the HTML <title> tag.
+
+windowtitle = "phpBB3"
+
+; Specifies the title to be placed near the top of the overview summary file.
+
+doctitle = "phpBB3 Sourcecode Documentation"
+
+; Specifies the header text to be placed at the top of each output file. The
+; header will be placed to the right of the upper navigation bar.
+
+header = "phpBB3"
+
+; Specifies the footer text to be placed at the bottom of each output file. The
+; footer will be placed to the right of the lower navigation bar.
+
+footer = "phpBB3"
+
+; Specifies the text to be placed at the bottom of each output file. The text
+; will be placed at the bottom of the page, below the lower navigation bar.
+
+;bottom = "This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a>"
+
+; Create a class tree?
+
+;tree = off
+
+; Use GeSHi to include formatted source files in the documentation. PHPDoctor will look in the current doclet directory for a /geshi subdirectory. Unpack the GeSHi archive from http://qbnz.com/highlighter to get this directory - it will contain a php script and a subdirectory with formatting files.
+
+include_source = off
+
diff --git a/build/webpi/parameters.xml b/build/webpi/parameters.xml
index 994247e48e..be4d374632 100644
--- a/build/webpi/parameters.xml
+++ b/build/webpi/parameters.xml
@@ -9,7 +9,7 @@
scope="iisapp"
match="phpBB3" />
</parameter>
-
+ <!--ACLs-->
<parameter
name="aclCache"
description="Sets the ACL on the cache/ folder"
@@ -19,7 +19,7 @@
<parameterEntry
type="ProviderPath"
scope="setAcl"
- match="phpBB3/cache" />
+ match="phpBB3/cache$" />
</parameter>
<parameter
@@ -31,7 +31,7 @@
<parameterEntry
type="ProviderPath"
scope="setAcl"
- match="phpBB3/files" />
+ match="phpBB3/files$" />
</parameter>
<parameter
@@ -43,7 +43,7 @@
<parameterEntry
type="ProviderPath"
scope="setAcl"
- match="phpBB3/store" />
+ match="phpBB3/store$" />
</parameter>
<parameter
@@ -55,7 +55,7 @@
<parameterEntry
type="ProviderPath"
scope="setAcl"
- match="phpBB3/images/avatars/upload" />
+ match="phpBB3/images/avatars/upload$" />
</parameter>
<parameter
@@ -67,43 +67,44 @@
<parameterEntry
type="ProviderPath"
scope="setAcl"
- match="phpBB3/config.php" />
+ match="phpBB3/config.php$" />
</parameter>
- <parameter
- name="DatabaseServer"
- description="Enter the database server"
- defaultValue=".\SQLExpress"
- tags="SQL, dbServer" >
+ <!-- SQL parameters -->
+ <parameter name="SQL Database Server" description="Enter the database server (usually machine name ) " defaultValue="." tags="SQL">
</parameter>
+ <parameter name="SQL DatabaseServer Instance" description="Enter the database instance name" defaultValue="SQLExpress" tags="SQL">
+ </parameter>
+ <!-- Read database server from config.php . Update 'dbhost' in config.php on publish -->
+ <parameter name="SQL Automatic DatabaseServer" defaultValue="dbhost = '{SQL Database Server}\\{SQL DatabaseServer Instance}';" tags="Hidden,SQL">
+ <parameterEntry kind="TextFile" scope="\\config\.php$" match="dbhost\s*=\s*'([^']*)'\s*;" />
+ </parameter>
<parameter
- name="DatabaseName"
- description="Database name for your application."
- defaultValue="phpbb"
- tags="SQL, dbName">
+ name="SQL DatabaseName" description="Database name for your application." defaultValue="phpbb" tags="SQL, dbName">
- <parameterEntry
- type="TextFile"
- scope="install/mssql.sql"
- match="PlaceHolderForDb" />
+ <parameterEntry type="TextFile" scope="install/mssql.sql" match="PlaceHolderForDb" />
+ </parameter>
+ <!-- Read database name from config.php . Update 'dbname' in config.php on publish -->
+ <parameter name="SQL Automatic DatabaseName" defaultValue="dbname = '{SQL DatabaseName}';" tags="Hidden,SQL">
+ <parameterEntry kind="TextFile" scope="\\config\.php$" match="dbname\s*=\s*'([^']*)'\s*;" />
</parameter>
<parameter
- name="DatabaseAdministrator"
+ name="SQL DatabaseAdministrator"
description="Database server administartor username."
defaultValue="sa"
tags="SQL, DbAdminUsername" >
</parameter>
<parameter
- name="DatabaseAdministratorPassword"
+ name="SQL DatabaseAdministratorPassword"
description="Database server administrator password."
tags="Password,SQL,DbAdminPassword">
</parameter>
<parameter
- name="Database Username"
+ name="SQL Database Username"
description="Username to access your database."
defaultValue="phpbb"
tags="SQL, DbUsername">
@@ -113,9 +114,13 @@
scope="install/mssql.sql"
match="PlaceHolderForUser" />
</parameter>
-
+ <!-- Read database user from config.php . Update 'dbuser' in config.php on publish -->
+ <parameter name="SQL Automatic Database User" defaultValue="dbuser = '{SQL Database Username}';" tags="Hidden,SQL">
+ <parameterEntry kind="TextFile" scope="\\config\.php$" match="dbuser\s*=\s*'([^']*)'\s*;" />
+ </parameter>
+
<parameter
- name="Database Password"
+ name="SQL Database Password"
description="Password for your phpBB database. (Must be at least 8 characters, contain at least one lower case letter, one upper case letter and one digit)"
tags="New, Password,SQL, DbUserPassword">
@@ -129,10 +134,16 @@
match="PlaceHolderForPassword" />
</parameter>
+ <!-- Read database user password from config.php . Update 'dbpasswd' in config.php on publish -->
+ <parameter name="SQL Automatic Database Password" defaultValue="dbpasswd = '{SQL Database Password}';" tags="Hidden,SQL">
+ <parameterEntry kind="TextFile" scope="\\config\.php$" match="dbpasswd\s*=\s*'([^']*)'\s*;" />
+ </parameter>
+
+ <!-- SQL Connection string -->
<parameter
- name="ConnectionString"
+ name="SQL ConnectionString"
description="Automatically sets the connection string for the connection request."
- defaultValue="Server={DatabaseServer};Database={DatabaseName};uid={DatabaseAdministrator};Pwd={DatabaseAdministratorPassword};"
+ defaultValue="Server={SQL Database Server}\{SQL DatabaseServer Instance};Database={SQL DatabaseName};uid={SQL DatabaseAdministrator};Pwd={SQL DatabaseAdministratorPassword};"
tags="Hidden,SQLConnectionString,Validate">
<parameterEntry
@@ -148,6 +159,7 @@
tags="SQL,Hidden">
</parameter>
+ <!-- MYSQL parameters -->
<parameter
name="MySQL Database Server"
description="Enter the hostname"
@@ -160,8 +172,13 @@
match="PlaceHolderForServer" />
</parameter>
+ <!-- Read database server from config.php . Update 'dbhost' in config.php on publish -->
+ <parameter name="Automatic MySQL DatabaseServer" defaultValue="dbhost = '{MySQL Database Server}';" tags="Hidden,MySQL">
+ <parameterEntry kind="TextFile" scope="\\config\.php$" match="dbhost\s*=\s*'([^']*)'\s*;" />
+ </parameter>
+
<parameter
- name="Application Database Name"
+ name="MySQL Database Name"
description="Database Name for your application."
defaultValue="phpbb"
tags="MySQL, dbName">
@@ -171,22 +188,13 @@
scope="install/mysql.sql"
match="PlaceHolderForDb" />
</parameter>
-
- <parameter
- name="MySQL Database Administrator"
- description="Database administrator username."
- defaultValue="root"
- tags="MySQL, DbAdminUsername" >
- </parameter>
-
- <parameter
- name="MySQL Database Administrator Password"
- description="Database administrator password."
- tags="Password,MySQL,DbAdminPassword" >
+ <!-- Read database name from config.php . Update 'dbname' in config.php on publish -->
+ <parameter name="Automatic MySQL Database Name" defaultValue="dbname = '{MySQL Database Name}';" tags="Hidden,MySQL">
+ <parameterEntry kind="TextFile" scope="\\config\.php$" match="dbname\s*=\s*'([^']*)'\s*;" />
</parameter>
<parameter
- name="phpBB Database Username"
+ name="MySQL Database Username"
description="Username to access your phpBB database."
defaultValue="phpbb"
tags="MySQL, DbUsername">
@@ -196,6 +204,10 @@
scope="install/mysql.sql"
match="PlaceHolderForUser" />
</parameter>
+ <!-- Read database user from config.php . Update 'dbuser' in config.php on publish -->
+ <parameter name="Automatic MySQL Database User" defaultValue="dbuser = '{MySQL Database Username}';" tags="Hidden,MySQL">
+ <parameterEntry kind="TextFile" scope="\\config\.php$" match="dbuser\s*=\s*'([^']*)'\s*;" />
+ </parameter>
<parameter
name="MySQL Database Password"
@@ -210,12 +222,30 @@
type="TextFile"
scope="install/mysql.sql"
match="PlaceHolderForPassword" />
+ </parameter>
+ <!-- Read database password from config.php . Update 'dbpasswd' in config.php on publish -->
+ <parameter name="MySQL Automatic Database Password" defaultValue="dbpasswd = '{MySQL Database Password}';" tags="Hidden,MySQL">
+ <parameterEntry kind="TextFile" scope="\\config\.php$" match="dbpasswd\s*=\s*'([^']*)'\s*;" />
+ </parameter>
+
+ <!-- MySQL admin credentials -->
+ <parameter
+ name="MySQL Database Administrator"
+ description="Database administrator username."
+ defaultValue="root"
+ tags="MySQL, DbAdminUsername" >
+ </parameter>
+ <parameter
+ name="MySQL Database Administrator Password"
+ description="Database administrator password."
+ tags="Password,MySQL,DbAdminPassword" >
</parameter>
+ <!-- MySQL Connectionstring -->
<parameter
name="MySQLConnectionString"
description="Automatically sets the connection string for the connection request."
- defaultValue="Server={MySQL Database Server};Database={Application Database Name};uid={MySQL Database Administrator};Pwd={MySQL Database Administrator Password};"
+ defaultValue="Server={MySQL Database Server};Database={MySQL Database Name};uid={MySQL Database Administrator};Pwd={MySQL Database Administrator Password};"
tags="Hidden,MySQLConnectionString,Validate">
<parameterEntry
diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html
index 9f9216a068..d27cea28f7 100644
--- a/phpBB/adm/style/acp_forums.html
+++ b/phpBB/adm/style/acp_forums.html
@@ -58,7 +58,7 @@
/**
* Init the wanted display functionality if javascript is enabled.
- * If javascript is not available, the user is still able to properly administrate.
+ * If javascript is not available, the user is still able to properly administer.
*/
onload = function()
{
diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html
index 5bde4008ad..cb4361dd6f 100644
--- a/phpBB/adm/style/acp_styles.html
+++ b/phpBB/adm/style/acp_styles.html
@@ -77,7 +77,7 @@
/**
* Init the wanted display functionality if javascript is enabled.
- * If javascript is not available, the user is still able to properly administrate.
+ * If javascript is not available, the user is still able to properly administer.
*/
onload = function()
{
diff --git a/phpBB/adm/style/acp_update.html b/phpBB/adm/style/acp_update.html
index 34d4f6934e..a87366a78b 100644
--- a/phpBB/adm/style/acp_update.html
+++ b/phpBB/adm/style/acp_update.html
@@ -18,6 +18,12 @@
</div>
<!-- ENDIF -->
+ <!-- IF NEXT_FEATURE_VERSION -->
+ <div class="errorbox">
+ <p>{UPGRADE_INSTRUCTIONS}</p>
+ </div>
+ <!-- ENDIF -->
+
<fieldset>
<legend></legend>
<dl>
diff --git a/phpBB/adm/style/captcha_recaptcha.html b/phpBB/adm/style/captcha_recaptcha.html
index 702a4a1099..d3038fd714 100644
--- a/phpBB/adm/style/captcha_recaptcha.html
+++ b/phpBB/adm/style/captcha_recaptcha.html
@@ -4,7 +4,8 @@
<script type="text/javascript">
// <![CDATA[
var RecaptchaOptions = {
- lang : '{LA_RECAPTCHA_LANG}'
+ lang : '{LA_RECAPTCHA_LANG}',
+ theme : 'clean'
};
// ]]>
</script>
diff --git a/phpBB/develop/check_flash_bbcodes.php b/phpBB/develop/check_flash_bbcodes.php
new file mode 100644
index 0000000000..b0fa399209
--- /dev/null
+++ b/phpBB/develop/check_flash_bbcodes.php
@@ -0,0 +1,163 @@
+<?php
+/**
+*
+* @package phpBB3
+* @version $Id$
+* @copyright (c) 2009, 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* This script will check your database for potentially dangerous flash BBCode tags
+*/
+
+//
+// Security message:
+//
+// This script is potentially dangerous.
+// Remove or comment the next line (die(".... ) to enable this script.
+// Do NOT FORGET to either remove this script or disable it after you have used it.
+//
+die("Please read the first lines of this script for instructions on how to enable it\n");
+
+/**
+*/
+define('IN_PHPBB', true);
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.' . $phpEx);
+
+if (php_sapi_name() != 'cli')
+{
+ header('Content-Type: text/plain');
+}
+
+check_table_flash_bbcodes(POSTS_TABLE, 'post_id', 'post_text', 'bbcode_uid', 'bbcode_bitfield');
+check_table_flash_bbcodes(PRIVMSGS_TABLE, 'msg_id', 'message_text', 'bbcode_uid', 'bbcode_bitfield');
+check_table_flash_bbcodes(USERS_TABLE, 'user_id', 'user_sig', 'user_sig_bbcode_uid', 'user_sig_bbcode_bitfield');
+check_table_flash_bbcodes(FORUMS_TABLE, 'forum_id', 'forum_desc', 'forum_desc_uid', 'forum_desc_bitfield');
+check_table_flash_bbcodes(FORUMS_TABLE, 'forum_id', 'forum_rules', 'forum_rules_uid', 'forum_rules_bitfield');
+check_table_flash_bbcodes(GROUPS_TABLE, 'group_id', 'group_desc', 'group_desc_uid', 'group_desc_bitfield');
+
+echo "If potentially dangerous flash bbcodes were found, please reparse the posts using the Support Toolkit (http://www.phpbb.com/support/stk/) and/or file a ticket in the Incident Tracker (http://www.phpbb.com/incidents/).\n";
+
+function check_table_flash_bbcodes($table_name, $id_field, $content_field, $uid_field, $bitfield_field)
+{
+ echo "Checking $content_field on $table_name\n";
+
+ $ids = get_table_flash_bbcode_pkids($table_name, $id_field, $content_field, $uid_field, $bitfield_field);
+
+ $size = sizeof($ids);
+ if ($size)
+ {
+ echo "Found $size potentially dangerous flash bbcodes.\n";
+ echo "$id_field: " . implode(', ', $ids) . "\n";
+ }
+ else
+ {
+ echo "No potentially dangerous flash bbcodes found.\n";
+ }
+
+ echo "\n";
+}
+
+function get_table_flash_bbcode_pkids($table_name, $id_field, $content_field, $uid_field, $bitfield_field)
+{
+ global $db;
+
+ $ids = array();
+
+ $sql = "SELECT $id_field, $content_field, $uid_field, $bitfield_field
+ FROM $table_name
+ WHERE $content_field LIKE '%[/flash:%'
+ AND $bitfield_field <> ''";
+
+ $result = $db->sql_query($sql);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $uid = $row[$uid_field];
+
+ // thanks support toolkit
+ $content = html_entity_decode_utf8($row[$content_field]);
+ set_var($content, $content, 'string', true);
+ $content = utf8_normalize_nfc($content);
+
+ $bitfield_data = $row[$bitfield_field];
+
+ if (!is_valid_flash_bbcode($content, $uid) && has_flash_enabled($bitfield_data))
+ {
+ $ids[] = (int) $row[$id_field];
+ }
+ }
+ $db->sql_freeresult($result);
+
+ return $ids;
+}
+
+function get_flash_regex($uid)
+{
+ return "#\[flash=([0-9]+),([0-9]+):$uid\](.*?)\[/flash:$uid\]#";
+}
+
+// extract all valid flash bbcodes
+// check if the bbcode content is a valid URL for each match
+function is_valid_flash_bbcode($cleaned_content, $uid)
+{
+ $regex = get_flash_regex($uid);
+
+ $url_regex = get_preg_expression('url');
+ $www_url_regex = get_preg_expression('www_url');
+
+ if (preg_match_all($regex, $cleaned_content, $matches))
+ {
+ foreach ($matches[3] as $flash_url)
+ {
+ if (!preg_match("#^($url_regex|$www_url_regex)$#i", $flash_url))
+ {
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+// check if a bitfield includes flash
+// 11 = flash bit
+function has_flash_enabled($bitfield_data)
+{
+ $bitfield = new bitfield($bitfield_data);
+ return $bitfield->get(11);
+}
+
+// taken from support toolkit
+function html_entity_decode_utf8($string)
+{
+ static $trans_tbl;
+
+ // replace numeric entities
+ $string = preg_replace('~&#x([0-9a-f]+);~ei', 'code2utf8(hexdec("\\1"))', $string);
+ $string = preg_replace('~&#([0-9]+);~e', 'code2utf8(\\1)', $string);
+
+ // replace literal entities
+ if (!isset($trans_tbl))
+ {
+ $trans_tbl = array();
+
+ foreach (get_html_translation_table(HTML_ENTITIES) as $val=>$key)
+ $trans_tbl[$key] = utf8_encode($val);
+ }
+ return strtr($string, $trans_tbl);
+}
+
+// taken from support toolkit
+// Returns the utf string corresponding to the unicode value (from php.net, courtesy - romans@void.lv)
+function code2utf8($num)
+{
+ if ($num < 128) return chr($num);
+ if ($num < 2048) return chr(($num >> 6) + 192) . chr(($num & 63) + 128);
+ if ($num < 65536) return chr(($num >> 12) + 224) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
+ if ($num < 2097152) return chr(($num >> 18) + 240) . chr((($num >> 12) & 63) + 128) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
+ return '';
+}
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 36dc3d037c..66915b18fa 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -53,7 +53,7 @@
<ol>
<li><a href="#changelog">Changelog</a>
<ol style="list-style-type: lower-roman;">
- <li><a href="#v307">Changes since 3.0.7-PL1</a></li>
+ <li><a href="#v307-PL1">Changes since 3.0.7-PL1</a></li>
<li><a href="#v307">Changes since 3.0.7</a></li>
<li><a href="#v306">Changes since 3.0.6</a></li>
<li><a href="#v305">Changes since 3.0.5</a></li>
@@ -89,42 +89,471 @@
<div class="content">
- <a name="v307-pl1"></a><h3>1.i. Changes since 3.0.7-PL1</h3>
-
- <ul>
- <li>[Fix] Correctly sort database backup file list by date on database restore page. (Bug #57385)</li>
- <li>[Fix] Take admin's time zone settings into account when listing database backup files. (Bug #57385)</li>
- <li>[Fix] Honor minimum and maximum password length in generated passwords as much as we can. (Bug #13181)</li>
- <li>[Fix] No longer return the character O in generated random strings and passwords. (Bug #57345)</li>
- <li>[Fix] Allow redirect() function to redirect across directories. (Bug #56965)</li>
- <li>[Fix] Add terminating semicolons to JavaScript code. (Bug #58085 - Patch by nn-)</li>
- <li>[Fix] Minor language fixes. (Bug #54855)</li>
- <li>[Fix] Parsing urls in signatures properly uses config settings. (Bug #57105)</li>
- <li>[Fix] Allow multibyte keys in request_var(). (Bug #51555)</li>
- <li>[Fix] Fix inclusion check for captcha garbage collection (Bug #59425)</li>
- <li>[Fix] Prevent wrong tar archive type detection. (Bug #12531)</li>
- <li>[Fix] Correct redirection after login to forum not in web root (Bug #58755)</li>
- <li>[Fix] Allow setting parent forums regardless of permission settings. (Bug #57415)</li>
- <li>[Fix] Redirect search engines that access pages with SIDs in the URL. (Bug #58025)</li>
- <li>[Fix] Fix incorrect ampersand encoding in redirect parameter. (Bug #58465)</li>
- <li>[Fix] Fix open_basedir issues when accessing styles- and language-management. (Bug #59135)</li>
- <li>[Fix] Fix table binding issues with PostgreSQL in board-wide feed. (Bug #58425)</li>
- <li>[Fix] Only show unapproved posts in ATOM Feeds for moderators (Bug #58695)</li>
- <li>[Fix] Various XHTML mistakes in ACP (Bug #58745)</li>
- <li>[Fix] Fix dead link in MCP on reports for global announcements in prosilver. (Bug #9512)</li>
- <li>[Fix] Fix broken links for reports on active topics, when the topic is in a subforum. (Bug #9047)</li>
- <li>[Feature] Support for Microsoft's Native SQL Server Driver for PHP (Bug #57055 - Patch by Chris Pucci at Microsoft)</li>
- <li>[Feature] The memcache acm plugin now supports multiple memcache servers.</li>
- <li>[Feature] Show note for moderators on unapproved posts/topics with unapproved posts in ATOM Feed (Bug #9511)</li>
- </ul>
-
- <a name="v307"></a><h3>1.i. Changes since 3.0.7</h3>
+ <a name="v307-PL1"></a><h3>1.i. Changes since 3.0.7-PL1</h3>
+<h4> Security
+</h4>
+<ul>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9903'>PHPBB3-9903</a>] - Execute javascript in [flash=] BBCode
+</li>
+</ul>
+
+<h4> Bug
+</h4>
+<ul>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-4923'>PHPBB3-4923</a>] - compress_tar incorrectly determines type
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-5164'>PHPBB3-5164</a>] - Honor minimum and maximum password length in generated passwords as much as possible.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-6726'>PHPBB3-6726</a>] - Connecting to PostgreSQL using &#39;localhost&#39; doesn&#39;t try to use a TCP connection
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-6747'>PHPBB3-6747</a>] - word censoring * does not handle space for two or more words
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-7260'>PHPBB3-7260</a>] - Do not delete polls if one exists and editing user lacks permissions
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-7296'>PHPBB3-7296</a>] - Style export to tar(.*) does not work
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-7369'>PHPBB3-7369</a>] - Custom Profile dates display incorrectly
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-7417'>PHPBB3-7417</a>] - Search keywords field does not initially get focus
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-7538'>PHPBB3-7538</a>] - Query exceeds maximum value for user_login_attempts
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-7716'>PHPBB3-7716</a>] - Data too long for column &#39;message_subject&#39;
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-7720'>PHPBB3-7720</a>] - Fix alternative image-description for unread posts.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-7782'>PHPBB3-7782</a>] - Send HTTP 404 if topic, forum or user do not exist
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-7972'>PHPBB3-7972</a>] - Copied topics are not indexed
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-8169'>PHPBB3-8169</a>] - Parse CSS Regex accepts invalid code
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-8792'>PHPBB3-8792</a>] - Misleading error message in auth_ldap.php, function init_ldap()
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-8894'>PHPBB3-8894</a>] - JavaScript error and visible quote button on topic review if BBCodes disallowed
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-8924'>PHPBB3-8924</a>] - spelling in admin_welcome_inactive.txt
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-8929'>PHPBB3-8929</a>] - MS SQL error on view all smilies after 3.0.6 upgrade
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-8935'>PHPBB3-8935</a>] - able to set minimal avatar size larger than maximum
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-8944'>PHPBB3-8944</a>] - Error on database update (must specify size of index on MySQL4)
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9012'>PHPBB3-9012</a>] - Retain original topic title in shadow topic when moving a topic and editing the title.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9034'>PHPBB3-9034</a>] - Redirect() fails with directory traversal
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9047'>PHPBB3-9047</a>] - Active topics and reported posts
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9049'>PHPBB3-9049</a>] - Password reminder system generates confusable passwords
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9053'>PHPBB3-9053</a>] - Correctly sort database backup file list by date on database restore page
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9061'>PHPBB3-9061</a>] - Race condition in queue locking
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9068'>PHPBB3-9068</a>] - Grammatical Error under Load Settings
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9075'>PHPBB3-9075</a>] - Missing / bad default values of CPFs result in SQL errors on registration of new users
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9091'>PHPBB3-9091</a>] - Wrong IP checking for IPv4 addresses mapped into IPv6
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9094'>PHPBB3-9094</a>] - Hide &quot;Copy permissions&quot; message, when permissions were copied.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9095'>PHPBB3-9095</a>] - Misleading setting text for CAPTCHA
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9099'>PHPBB3-9099</a>] - Missing comma in PASSWORD_EXPLAIN acp language strings
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9101'>PHPBB3-9101</a>] - Bad text placement for reCAPTCHA description
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9104'>PHPBB3-9104</a>] - Safari does not display box headers correctly in the ACP.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9107'>PHPBB3-9107</a>] - Can&#39;t Set Parent Forum
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9108'>PHPBB3-9108</a>] - RSS feeds does not work on Postgres
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9112'>PHPBB3-9112</a>] - Most active forum post count does not respect m_approve permission
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9114'>PHPBB3-9114</a>] - Recent bug fix for smilies causing problems on older MySQL versions
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9117'>PHPBB3-9117</a>] - Wrong redirection after login
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9119'>PHPBB3-9119</a>] - Language selection is disregarded in automatic update
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9120'>PHPBB3-9120</a>] - Typo fix in a comment in functions.php
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9121'>PHPBB3-9121</a>] - Forum feed shows posts that are currently on the moderation queue
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9125'>PHPBB3-9125</a>] - ACP User Overview: Unmatched &lt;/form&gt; tag when viewing own user
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9126'>PHPBB3-9126</a>] - Invalid redirection after login to forum not in web root
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9132'>PHPBB3-9132</a>] - Oracle CLOB support is broken, preventing storage of long strings
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9135'>PHPBB3-9135</a>] - Fix report-icon for moderators in PM folders.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9140'>PHPBB3-9140</a>] - Check current board version in incremental update packages
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9145'>PHPBB3-9145</a>] - Fix open_basedir issues when accessing styles- and language-management
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9146'>PHPBB3-9146</a>] - Quick-Reply tabindex=&quot;6&quot; set twice
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9147'>PHPBB3-9147</a>] - &quot;Change topic type&quot;-option &quot;Normal&quot; always selected.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9154'>PHPBB3-9154</a>] - Correctly check for double inclusion in captcha garbage collection
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9158'>PHPBB3-9158</a>] - viewforum/viewtopic pages unnecessarily duplicated with start=0
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9162'>PHPBB3-9162</a>] - BBCode in poll options is broken, when posting without question.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9167'>PHPBB3-9167</a>] - Remove shadow topics from remaining forums when deleting a forum including posts
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9170'>PHPBB3-9170</a>] - Unable to get image size in img bbcode when URL has multiple parameters.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9173'>PHPBB3-9173</a>] - sql_config_count() artificially limits number scope to 4byte-integer on PostgreSQL and Firebird
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9176'>PHPBB3-9176</a>] - When setting the board&#39;s date format the board&#39;s timezone settings aren&#39;t taken into account
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9451'>PHPBB3-9451</a>] - Unnecessary overhead in avatar_process_user function
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9478'>PHPBB3-9478</a>] - Validate maximum number of allowed recipients per PM value
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9495'>PHPBB3-9495</a>] - Loginbox &lt;input /&gt; redirect breaks xHTML
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9499'>PHPBB3-9499</a>] - Javascript function dE does not correctly detect element visibility
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9504'>PHPBB3-9504</a>] - Allow gallery avatars with whitespaces in the filename
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9509'>PHPBB3-9509</a>] - phpBB Coding Guidelines state subversion as the version control system for phpBB
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9510'>PHPBB3-9510</a>] - Unable to copy permissions from and to forums you cannot see
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9512'>PHPBB3-9512</a>] - Fix dead link in MCP on reports for global announcements in prosilver.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9514'>PHPBB3-9514</a>] - Correctly delete big datasets when deleting a forum including topics/posts on non-MySQL databases
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9518'>PHPBB3-9518</a>] - Postgres DBAL does not correctly create a new database connection when passing $new_link as true
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9519'>PHPBB3-9519</a>] - Replace remaining is_writable() calls with phpbb_is_writable().
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9521'>PHPBB3-9521</a>] - MSSQL error reporting returns String instead of an error
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9524'>PHPBB3-9524</a>] - IPv6 regular expression does not match addresses starting in ::
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9526'>PHPBB3-9526</a>] - User Preference to hide online status does not work for bots
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9528'>PHPBB3-9528</a>] - Quoting in a PM does not fall back to bbcode-less quotes using &quot;&gt; &quot; when bbcodes are disabled
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9529'>PHPBB3-9529</a>] - Topic review does not display all selected posts
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9530'>PHPBB3-9530</a>] - subsilver2 missing fallback option on quoting when bbcodes are disabled
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9531'>PHPBB3-9531</a>] - BBCode-less fall back option for quotes is missing &quot;Author wrote:&quot; line when quoting from topic-review.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9535'>PHPBB3-9535</a>] - Incorrect margins in RTL languages: signatures, permission ACP &amp; updater
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9545'>PHPBB3-9545</a>] - &#39;Your first forum&#39; should have &#39;Display active topics:&#39; set to &#39;Yes&#39;
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9546'>PHPBB3-9546</a>] - Moving all posts from one topic to another does not delete bookmarks
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9547'>PHPBB3-9547</a>] - Changing forum type applies FORUM_FLAG_ACTIVE_TOPICS to new forum type.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9548'>PHPBB3-9548</a>] - Delete user quicktool drop down should have an empty or invalid selection as the default
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9559'>PHPBB3-9559</a>] - Messenger Queue Batch Size configuration option is overridden
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9567'>PHPBB3-9567</a>] - Newly registered users group ACP wording
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9582'>PHPBB3-9582</a>] - Missing MSSQL native driver case statements
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9587'>PHPBB3-9587</a>] - Prosilver overrides reCaptcha class.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9592'>PHPBB3-9592</a>] - Test suite does not run on SQLite
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9593'>PHPBB3-9593</a>] - Missing documentation for running unit tests
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9599'>PHPBB3-9599</a>] - Windows workaround for checkdnsrr() returns wrong results
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9605'>PHPBB3-9605</a>] - Wrong class added to topiclist, when there&#39;s no announcement topic.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9615'>PHPBB3-9615</a>] - When attaching a file whose name contains quotes, filename before last quote is cut off in display
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9623'>PHPBB3-9623</a>] - Strings not properly normalized - acp_prune.php
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9626'>PHPBB3-9626</a>] - Regular expressions from get_preg_expression() are untested.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9628'>PHPBB3-9628</a>] - Add module function does not correctly insert a module after the specified one
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9633'>PHPBB3-9633</a>] - Newly registered users group color is not used in Our Newest Member
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9635'>PHPBB3-9635</a>] - Useless parameter $data[&#39;post_time&#39;] in function submit_post.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9637'>PHPBB3-9637</a>] - SET NAMES &#39;BINARY&#39; error in convertor
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9643'>PHPBB3-9643</a>] - DB connection error when $dbhost is an IPv6 address
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9644'>PHPBB3-9644</a>] - submit_post shows support for options that cause a trigger_error in the call to user_notification
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9646'>PHPBB3-9646</a>] - Cant hide/outcomment @import in stylesheet.css
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9650'>PHPBB3-9650</a>] - It should not be possible to ban Anonymous
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9653'>PHPBB3-9653</a>] - xhtml errors in subsilver2 when using the bbcodes code and quote in signatures
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9655'>PHPBB3-9655</a>] - Selecting an unavailable captcha plugin looks like a successful action
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9656'>PHPBB3-9656</a>] - PHP Information in ACP always lists error_reporting as 0
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9658'>PHPBB3-9658</a>] - Optimize topic splitting
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9662'>PHPBB3-9662</a>] - Search interval applied inconsistently
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9664'>PHPBB3-9664</a>] - Another duplicate accesskey: t = top and list item
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9665'>PHPBB3-9665</a>] - Signature &quot;0&quot; cannot be previewed
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9677'>PHPBB3-9677</a>] - Subsilver2 is missing the bbcode-helpline for inline-attachments.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9678'>PHPBB3-9678</a>] - Flash attachments are not displayed in subsilver2.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9679'>PHPBB3-9679</a>] - &quot;Notify User&quot; checkbox appears in MCP Queue even if no notification methods are enabled
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9686'>PHPBB3-9686</a>] - Unable to create data backup using the mssqlnative DBAL
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9694'>PHPBB3-9694</a>] - Calling download/file.php with empty avatar parameter can throw an E_NOTICE message
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9695'>PHPBB3-9695</a>] - Bad Display of User Input - mcp_ban
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9696'>PHPBB3-9696</a>] - Installation of phpBB with SQLite fails
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9697'>PHPBB3-9697</a>] - Backlink broken when the select parent forum does not exist.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9698'>PHPBB3-9698</a>] - Returning result of new by reference is deprecated in php 5.3
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9702'>PHPBB3-9702</a>] - &quot;Ban until (date)&quot; appears to be based on UTC time instead of local time
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9703'>PHPBB3-9703</a>] - Removing a user does not remove their private message folders or rules
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9704'>PHPBB3-9704</a>] - Coding guidelines typo
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9712'>PHPBB3-9712</a>] - Future dates display as &quot;less than one minute ago&quot;
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9714'>PHPBB3-9714</a>] - &quot;Undefined variable: email&quot; in email regular expression unit tests
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9715'>PHPBB3-9715</a>] - Fix email address regular expression or adjust email regular expression unit tests
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9722'>PHPBB3-9722</a>] - &quot;New Topic&quot; button title attribute mismatch in prosilver&#39;s viewforum
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9727'>PHPBB3-9727</a>] - Feed replaces ./ with board URL
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9743'>PHPBB3-9743</a>] - Fix background-position of top2-class in prosilver for RTL-languages.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9744'>PHPBB3-9744</a>] - Mistyped word &#39;then&#39; in FAQ. It should be &#39;than&#39;.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9748'>PHPBB3-9748</a>] - &lt;br /&gt; not being replaced in prepare_message
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9749'>PHPBB3-9749</a>] - fulltext_mysql.php overreacts on + and - characters in search words
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9752'>PHPBB3-9752</a>] - Misleading text when using Q&amp;A CAPTCHA
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9754'>PHPBB3-9754</a>] - Template variable S_USER_POSTED always set to false in search.php
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9757'>PHPBB3-9757</a>] - Empty template variable HISTORY_TITLE in ucp_pm_history
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9760'>PHPBB3-9760</a>] - Fulltext native search, wildcard * does not get escaped leading to long execution time
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9761'>PHPBB3-9761</a>] - Quote nesting depth explanation is misleading
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9771'>PHPBB3-9771</a>] - build_url() doesn&#39;t ignore empty parameters
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9772'>PHPBB3-9772</a>] - Under some circumstances, email addresses are shown to undesired users
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9780'>PHPBB3-9780</a>] - gen_rand_string() not respecting $num_chars parameter anymore.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9782'>PHPBB3-9782</a>] - Board disable radio in Board-Settings set on when server load high
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9793'>PHPBB3-9793</a>] - Undefined function send_status_line() in download/file.php when in avatar mode.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9807'>PHPBB3-9807</a>] - Avatar tab displays when avatars are disabled
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9810'>PHPBB3-9810</a>] - Clicking on &quot;Select All&quot; of code tag on print page results in a javascript error when using prosilver
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9820'>PHPBB3-9820</a>] - Fix undefined indexes when trying to post a new topic
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9822'>PHPBB3-9822</a>] - Can not delete style-components from the file-system as per explanation.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9829'>PHPBB3-9829</a>] - Recaptcha plugin result interpretation fault
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9835'>PHPBB3-9835</a>] - Login Confirm Explain Not Working
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9840'>PHPBB3-9840</a>] - Display view unread posts link for guests
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9841'>PHPBB3-9841</a>] - Change &quot;Save&quot; button to &quot;Save draft&quot;
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9847'>PHPBB3-9847</a>] - Language typo and written form (British/American)
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9854'>PHPBB3-9854</a>] - Auth API documentation is incomplete
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9855'>PHPBB3-9855</a>] - Tests don&#39;t run on PHPUnit 3.5
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9879'>PHPBB3-9879</a>] - captcha_qa.php spelling, punctuation and grammar errors
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9883'>PHPBB3-9883</a>] - CAPTCHA uses american english
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9884'>PHPBB3-9884</a>] - Massive email delays
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9885'>PHPBB3-9885</a>] - Default file extension groups not properly updated by database updater.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9886'>PHPBB3-9886</a>] - Database updater does not run on PostgreSQL because of an error in _add_module()
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9888'>PHPBB3-9888</a>] - Update fails when Bing [Bot] was already added to the users table
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9891'>PHPBB3-9891</a>] - Updater drops language-selection after database-update
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9509'>PHPBB3-9509</a>] - phpBB Coding Guidelines state subversion as the version control system for phpBB
+</li>
+</ul>
+
+<h4> Improvement
+</h4>
+<ul>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-7332'>PHPBB3-7332</a>] - MCP post details usability
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-7717'>PHPBB3-7717</a>] - Use user&#39;s language for standard-extensions-group name
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-8709'>PHPBB3-8709</a>] - Multibyte keys in request_var not possible
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-8936'>PHPBB3-8936</a>] - subsilver2 missing reply-to-all feature
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9088'>PHPBB3-9088</a>] - Add missing semicolons in js files
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9179'>PHPBB3-9179</a>] - improve quasi-documentation of notify_status values
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9503'>PHPBB3-9503</a>] - Posts with empty titles in moderation queue are not easily approved
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9534'>PHPBB3-9534</a>] - user_ipwhois() does not support IPv6 addresses
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9536'>PHPBB3-9536</a>] - Small improvement for query against sessions table in acp_users.php
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9553'>PHPBB3-9553</a>] - Make git hooks run with /bin/sh instead of bash
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9570'>PHPBB3-9570</a>] - Change &quot;system timezone&quot; to &quot;guest timezone&quot; in acp, add explanation
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9578'>PHPBB3-9578</a>] - ACP Posting tab is missing &quot;Post settings&quot; module.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9589'>PHPBB3-9589</a>] - Sample nginx configuration file
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9595'>PHPBB3-9595</a>] - Search settings in ACP: Add information on minimum word size indexed when using Fulltext MySQL backend
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9598'>PHPBB3-9598</a>] - Call checkdnsrr() on Windows with PHP 5.3
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9609'>PHPBB3-9609</a>] - Use send_status_line instead of calling header
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9611'>PHPBB3-9611</a>] - Increase entropy in activation keys
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9612'>PHPBB3-9612</a>] - Split gen_rand_string() into gen_rand_string() and gen_rand_string_friendly()
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9629'>PHPBB3-9629</a>] - sid parameter forced for style.php makes caching difficult
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9659'>PHPBB3-9659</a>] - Default phpBB signature user_options need to be set for convertors
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9690'>PHPBB3-9690</a>] - MSN Bot will become Bing Bot
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9777'>PHPBB3-9777</a>] - Print useful error message in pre-commit hook when php is not installed.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9785'>PHPBB3-9785</a>] - Not able to recover a password when board disabled
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9825'>PHPBB3-9825</a>] - Run tests on sqlite if available and no test db configured
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9827'>PHPBB3-9827</a>] - IE9 Beta fixes IE8 textarea bug
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9830'>PHPBB3-9830</a>] - Awkward message when config.php is missing
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9850'>PHPBB3-9850</a>] - Allow version checker to display information on multiple releases
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9853'>PHPBB3-9853</a>] - Change default reCAPTCHA theme in Prosilver &amp; Subsilver2 to better coordinate with style color scheme
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9880'>PHPBB3-9880</a>] - Rename all mentions of CAPTCHA or visual confirmation to anti-bot
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9899'>PHPBB3-9899</a>] - Change the style in the ACP for the recaptcha to match that displayed on prosilver
+</li>
+</ul>
+
+<h4> New Feature
+</h4>
+<ul>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9039'>PHPBB3-9039</a>] - Native SQL Server Support mssqlnative.php
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9511'>PHPBB3-9511</a>] - View note for moderators on unapproved posts/topics with unapproved posts in ATOM Feed.
+</li>
+</ul>
+
+<h4> Task
+</h4>
+<ul>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9520'>PHPBB3-9520</a>] - Add web.config files for IIS
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9625'>PHPBB3-9625</a>] - Update database UNIT-test
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9701'>PHPBB3-9701</a>] - Enable notices in unit tests
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9768'>PHPBB3-9768</a>] - Create git commit-msg hook that verifies the commit message conforms to our standards
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9769'>PHPBB3-9769</a>] - Add install and uninstall scripts for the git hooks
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9770'>PHPBB3-9770</a>] - Git commit message should be prefilled with branch and ticket information
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9800'>PHPBB3-9800</a>] - Update tracker URL in docs/README.html
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9804'>PHPBB3-9804</a>] - Update docs/AUTHORS (DavidMJ &amp; igorw)
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9808'>PHPBB3-9808</a>] - Git commit message hook depends on GNU wc
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9816'>PHPBB3-9816</a>] - Remove config.php from git repository
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9848'>PHPBB3-9848</a>] - Add phpBB data files to .gitignore.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9849'>PHPBB3-9849</a>] - Create build script using phing
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9857'>PHPBB3-9857</a>] - Remove visible $Id$ from docs files.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9868'>PHPBB3-9868</a>] - Make the test suite run and pass using the mssqlnative driver
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9904'>PHPBB3-9904</a>] - Update WebPI Parameters.xml
+</li>
+</ul>
+
+<h4> Sub-task
+</h4>
+<ul>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9517'>PHPBB3-9517</a>] - Remote avatar upload does not check the filesize before and during transfer.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9562'>PHPBB3-9562</a>] - Advanced Search is inaccessible using the mssqlnative DBAL
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9564'>PHPBB3-9564</a>] - Reported messages are not assigned the default report reason when a reason is removed from the ACP using the mssqlnative DBAL
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9565'>PHPBB3-9565</a>] - It is impossible to create a custom profile field using the mssqlnative DBAL
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9566'>PHPBB3-9566</a>] - Two debug notices are displayed when setting a custom profile field though the UCP using the mssqlnative DBAL
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9583'>PHPBB3-9583</a>] - MSSQL native backups cannot be restored
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9606'>PHPBB3-9606</a>] - Drop redundant SQL query for unreads fetching
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9613'>PHPBB3-9613</a>] - Implement a load switch for unreads search feature.
+</li>
+<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-9817'>PHPBB3-9817</a>] - Make build script create blank config.php
+</li>
+</ul>
+
+
+ <a name="v307"></a><h3>1.ii. Changes since 3.0.7</h3>
<ul>
<li>[Sec] Do not expose forum content of forums with ACL entries but no actual permission in ATOM Feeds. (Bug #58595)</li>
</ul>
- <a name="v306"></a><h3>1.ii. Changes since 3.0.6</h3>
+ <a name="v306"></a><h3>1.iii. Changes since 3.0.6</h3>
<ul>
<li>[Fix] Allow ban reason and length to be selected and copied in ACP and subsilver2 MCP. (Bug #51095)</li>
@@ -228,7 +657,7 @@
</ul>
- <a name="v305"></a><h3>1.iii. Changes since 3.0.5</h3>
+ <a name="v305"></a><h3>1.iv. Changes since 3.0.5</h3>
<ul>
<li>[Fix] Allow whitespaces in avatar gallery names. (Bug #44955)</li>
@@ -450,7 +879,7 @@
<li>[Feature] Send anonymous statistical information to phpBB on installation and update (optional).</li>
</ul>
- <a name="v304"></a><h3>1.iv. Changes since 3.0.4</h3>
+ <a name="v304"></a><h3>1.v. Changes since 3.0.4</h3>
<ul>
<li>[Fix] Delete user entry from ban list table upon user deletion (Bug #40015 - Patch by TerraFrost)</li>
@@ -539,7 +968,7 @@
<li>[Sec] Only use forum id supplied for posting if global announcement detected. (Reported by nickvergessen)</li>
</ul>
- <a name="v303"></a><h3>1.v. Changes since 3.0.3</h3>
+ <a name="v303"></a><h3>1.vi. Changes since 3.0.3</h3>
<ul>
<li>[Fix] Allow mixed-case template directories to be inherited (Bug #36725)</li>
@@ -571,7 +1000,7 @@
<li>[Sec] Ask for forum password if post within passworded forum quoted in private message. (Reported by nickvergessen)</li>
</ul>
- <a name="v302"></a><h3>1.vi. Changes since 3.0.2</h3>
+ <a name="v302"></a><h3>1.vii. Changes since 3.0.2</h3>
<ul>
<li>[Fix] Correctly set topic starter if first post in topic removed (Bug #30575 - Patch by blueray2048)</li>
@@ -670,7 +1099,7 @@
<li>[Sec Precaution] Stricter validation of the HTTP_HOST header (Thanks to Techie-Micheal et al for pointing out possible issues in derived code)</li>
</ul>
- <a name="v301"></a><h3>1.vii. Changes since 3.0.1</h3>
+ <a name="v301"></a><h3>1.viii. Changes since 3.0.1</h3>
<ul>
<li>[Fix] Ability to set permissions on non-mysql dbms (Bug #24955)</li>
@@ -718,7 +1147,7 @@
<li>[Sec] Only allow urls gone through redirect() being used within login_box(). (thanks nookieman)</li>
</ul>
- <a name="v300"></a><h3>1.viii Changes since 3.0.0</h3>
+ <a name="v300"></a><h3>1.ix Changes since 3.0.0</h3>
<ul>
<li>[Change] Validate birthdays (Bug #15004)</li>
@@ -789,7 +1218,7 @@
<li>[Fix] Find and display colliding usernames correctly when converting from one database to another (Bug #23925)</li>
</ul>
- <a name="v30rc8"></a><h3>1.ix. Changes since 3.0.RC8</h3>
+ <a name="v30rc8"></a><h3>1.x. Changes since 3.0.RC8</h3>
<ul>
<li>[Fix] Cleaned usernames contain only single spaces, so &quot;a_name&quot; and &quot;a__name&quot; are treated as the same name (Bug #15634)</li>
@@ -798,7 +1227,7 @@
<li>[Fix] Call garbage_collection() within database updater to correctly close connections (affects Oracle for example)</li>
</ul>
- <a name="v30rc7"></a><h3>1.x. Changes since 3.0.RC7</h3>
+ <a name="v30rc7"></a><h3>1.xi. Changes since 3.0.RC7</h3>
<ul>
<li>[Fix] Fixed MSSQL related bug in the update system</li>
@@ -833,7 +1262,7 @@
<li>[Fix] No duplication of active topics (Bug #15474)</li>
</ul>
- <a name="v30rc6"></a><h3>1.xi. Changes since 3.0.RC6</h3>
+ <a name="v30rc6"></a><h3>1.xii. Changes since 3.0.RC6</h3>
<ul>
<li>[Fix] Submitting language changes using acp_language (Bug #14736)</li>
@@ -843,7 +1272,7 @@
<li>[Fix] Able to request new password (Bug #14743)</li>
</ul>
- <a name="v30rc5"></a><h3>1.xii. Changes since 3.0.RC5</h3>
+ <a name="v30rc5"></a><h3>1.xiii. Changes since 3.0.RC5</h3>
<ul>
<li>[Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.</li>
@@ -906,7 +1335,7 @@
<li>[Sec] New password hashing mechanism for storing passwords (#i42)</li>
</ul>
- <a name="v30rc4"></a><h3>1.xiii. Changes since 3.0.RC4</h3>
+ <a name="v30rc4"></a><h3>1.xiv. Changes since 3.0.RC4</h3>
<ul>
<li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li>
@@ -957,7 +1386,7 @@
<li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li>
</ul>
- <a name="v30rc3"></a><h3>1.xiv. Changes since 3.0.RC3</h3>
+ <a name="v30rc3"></a><h3>1.xv. Changes since 3.0.RC3</h3>
<ul>
<li>[Fix] Fixing some subsilver2 and prosilver style issues</li>
@@ -1066,7 +1495,7 @@
</ul>
- <a name="v30rc2"></a><h3>1.xv. Changes since 3.0.RC2</h3>
+ <a name="v30rc2"></a><h3>1.xvi. Changes since 3.0.RC2</h3>
<ul>
<li>[Fix] Re-allow searching within the memberlist</li>
@@ -1112,7 +1541,7 @@
</ul>
- <a name="v30rc1"></a><h3>1.xvi. Changes since 3.0.RC1</h3>
+ <a name="v30rc1"></a><h3>1.xvii. Changes since 3.0.RC1</h3>
<ul>
<li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li>
diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html
index 982c28571e..5857163759 100644
--- a/phpBB/docs/INSTALL.html
+++ b/phpBB/docs/INSTALL.html
@@ -273,7 +273,7 @@
<p>This package is meant for those wanting to only replace changed files from a previous version to the latest version. This package normally contains the changed files from up to five previous versions.</p>
- <p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have <samp>3.0.6</samp> you should select the phpBB-3.0.6_to_3.0.7-PL1.zip/tar.gz file.</p>
+ <p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have <samp>3.0.7-PL1</samp> you should select the phpBB-3.0.7-PL1_to_3.0.8.zip/tar.gz file.</p>
<p>The directory structure has been preserved enabling you (if you wish) to simply upload the contents of the archive to the appropriate location on your server, i.e. simply overwrite the existing files with the new versions. Do not forget that if you have installed any MODs these files will overwrite the originals possibly destroying them in the process. You will need to re-add MODs to any affected file before uploading.</p>
@@ -285,7 +285,7 @@
<p>The patch file is one solution for those with many Modifications (MODs) or other changes who do not want to re-add them back to all the changed files if they use the method explained above. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application but still want to use this update approach, we strongly recommend the <a href="#update_auto">Automatic update package</a> explained below. It is also the recommended update method.</p>
- <p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is 3.0.5 you need the phpBB-3.0.6_to_3.0.7-PL1.patch file. Place the correct patch in the parent directory containing the phpBB3 core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <strong>patch -cl -d [PHPBB DIRECTORY] -p1 &lt; [PATCH NAME]</strong> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB3, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
+ <p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is 3.0.5 you need the phpBB-3.0.7-PL1_to_3.0.8.patch file. Place the correct patch in the parent directory containing the phpBB3 core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <strong>patch -cl -d [PHPBB DIRECTORY] -p1 &lt; [PATCH NAME]</strong> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB3, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
<p>If you do get failures you should look at using the <a href="#update_files">Changed files only</a> package to replace the files which failed to patch, please note that you will need to manually re-add any Modifications (MODs) to these particular files. Alternatively if you know how you can examine the .rej files to determine what failed where and make manual adjustments to the relevant source.</p>
diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html
index 76afc79f99..5a73554741 100644
--- a/phpBB/docs/coding-guidelines.html
+++ b/phpBB/docs/coding-guidelines.html
@@ -2349,9 +2349,9 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
</li>
</ul>
- <a name="commitmessage"></a><h3>7.ii. Commit Messages and Reposiory Rules</h3>
+ <a name="commitmessage"></a><h3>7.ii. Commit Messages and Repository Rules</h3>
- <p>Information on repository rules, such as commit messages can be found at <a href="http://wiki.phpbb.com/display/DEV/Git" title="phpBB Git Information">http://wiki.phpbb.com/display/DEV/Git</a></p>.
+ <p>Information on repository rules, such as commit messages can be found at <a href="http://wiki.phpbb.com/display/DEV/Git" title="phpBB Git Information">http://wiki.phpbb.com/display/DEV/Git</a>.</p>
</div>
diff --git a/phpBB/docs/hook_system.html b/phpBB/docs/hook_system.html
index 1bf4630a9f..34055c4661 100644
--- a/phpBB/docs/hook_system.html
+++ b/phpBB/docs/hook_system.html
@@ -380,6 +380,8 @@ a:active { color: #368AD2; }
<code>$template-&gt;display($handle, $include_once = true);</code> which is called directly before outputting the (not-yet-compiled) template.<br />
<code>exit_handler();</code> which is called at the very end of phpBB3's execution.</p>
+<p>Please note: The <code>$template-&gt;display</code> hook takes a third <code>$template</code> argument, which is the template instance being used, which should be used instead of the global.</p>
+
<p>There are also valid external constants you may want to use if you embed phpBB3 into your application:</p>
<div class="codebox"><pre>
diff --git a/phpBB/docs/lighttpd.sample.conf b/phpBB/docs/lighttpd.sample.conf
new file mode 100644
index 0000000000..5873d1c945
--- /dev/null
+++ b/phpBB/docs/lighttpd.sample.conf
@@ -0,0 +1,60 @@
+# Sample lighttpd configuration file for phpBB.
+# Global settings have been removed, copy them
+# from your system's lighttpd.conf.
+# Tested with lighttpd 1.4.26
+
+# Load moules
+server.modules += (
+ "mod_access",
+ "mod_fastcgi",
+ "mod_accesslog"
+)
+
+# If you have domains with and without www prefix,
+# redirect one to the other.
+$HTTP["host"] =~ "^(myforums\.com)$" {
+ url.redirect = (
+ ".*" => "http://www.%1$0"
+ )
+}
+
+$HTTP["host"] == "www.myforums.com" {
+ server.name = "www.myforums.com"
+ server.document-root = "/path/to/phpbb"
+ server.dir-listing = "disable"
+
+ index-file.names = ( "index.php", "index.htm", "index.html" )
+ accesslog.filename = "/var/log/lighttpd/access-www.myforums.com.log"
+
+ # Deny access to internal phpbb files.
+ $HTTP["url"] =~ "^/(config\.php|common\.php|includes|cache|files|store|images/avatars/upload)" {
+ url.access-deny = ( "" )
+ }
+
+ # Deny access to version control system directories.
+ $HTTP["url"] =~ "/\.svn|/\.git" {
+ url.access-deny = ( "" )
+ }
+
+ # Deny access to apache configuration files.
+ $HTTP["url"] =~ "/\.htaccess|/\.htpasswd|/\.htgroups" {
+ url.access-deny = ( "" )
+ }
+
+ fastcgi.server = ( ".php" =>
+ ((
+ "bin-path" => "/usr/bin/php-cgi",
+ "socket" => "/tmp/php.socket",
+ "max-procs" => 4,
+ "idle-timeout" => 30,
+ "bin-environment" => (
+ "PHP_FCGI_CHILDREN" => "10",
+ "PHP_FCGI_MAX_REQUESTS" => "10000"
+ ),
+ "bin-copy-environment" => (
+ "PATH", "SHELL", "USER"
+ ),
+ "broken-scriptfilename" => "enable"
+ ))
+ )
+}
diff --git a/phpBB/docs/nginx.conf.sample b/phpBB/docs/nginx.sample.conf
index a22a126ff4..a22a126ff4 100644
--- a/phpBB/docs/nginx.conf.sample
+++ b/phpBB/docs/nginx.sample.conf
diff --git a/phpBB/includes/acm/acm_wincache.php b/phpBB/includes/acm/acm_wincache.php
new file mode 100644
index 0000000000..0501ab74c5
--- /dev/null
+++ b/phpBB/includes/acm/acm_wincache.php
@@ -0,0 +1,84 @@
+<?php
+/**
+*
+* @package acm
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+// Include the abstract base
+if (!class_exists('acm_memory'))
+{
+ require("{$phpbb_root_path}includes/acm/acm_memory.$phpEx");
+}
+
+/**
+* ACM for WinCache
+* @package acm
+*/
+class acm extends acm_memory
+{
+ var $extension = 'wincache';
+
+ /**
+ * Purge cache data
+ *
+ * @return void
+ */
+ function purge()
+ {
+ wincache_ucache_clear();
+
+ parent::purge();
+ }
+
+ /**
+ * Fetch an item from the cache
+ *
+ * @access protected
+ * @param string $var Cache key
+ * @return mixed Cached data
+ */
+ function _read($var)
+ {
+ $success = false;
+ $result = wincache_ucache_get($this->key_prefix . $var, $success);
+
+ return ($success) ? $result : false;
+ }
+
+ /**
+ * Store data in the cache
+ *
+ * @access protected
+ * @param string $var Cache key
+ * @param mixed $data Data to store
+ * @param int $ttl Time-to-live of cached data
+ * @return bool True if the operation succeeded
+ */
+ function _write($var, $data, $ttl = 2592000)
+ {
+ return wincache_ucache_set($this->key_prefix . $var, $data, $ttl);
+ }
+
+ /**
+ * Remove an item from the cache
+ *
+ * @access protected
+ * @param string $var Cache key
+ * @return bool True if the operation succeeded
+ */
+ function _delete($var)
+ {
+ return wincache_ucache_delete($this->key_prefix . $var);
+ }
+}
diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php
index 3204e0204e..b0ce8f1084 100644
--- a/phpBB/includes/acp/acp_update.php
+++ b/phpBB/includes/acp/acp_update.php
@@ -51,6 +51,14 @@ class acp_update
$announcement_url = (strpos($announcement_url, '&amp;') === false) ? str_replace('&', '&amp;', $announcement_url) : $announcement_url;
$update_link = append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update');
+ // next feature release
+ $next_feature_version = $next_feature_announcement_url = false;
+ if (isset($info[2]) && trim($info[2]) !== '')
+ {
+ $next_feature_version = trim($info[2]);
+ $next_feature_announcement_url = trim($info[3]);
+ }
+
// Determine automatic update...
$sql = 'SELECT config_value
FROM ' . CONFIG_TABLE . "
@@ -74,8 +82,10 @@ class acp_update
'LATEST_VERSION' => $latest_version,
'CURRENT_VERSION' => $config['version'],
'AUTO_VERSION' => $version_update_from,
+ 'NEXT_FEATURE_VERSION' => $next_feature_version,
'UPDATE_INSTRUCTIONS' => sprintf($user->lang['UPDATE_INSTRUCTIONS'], $announcement_url, $update_link),
+ 'UPGRADE_INSTRUCTIONS' => $next_feature_version ? $user->lang('UPGRADE_INSTRUCTIONS', $next_feature_version, $next_feature_announcement_url) : false,
));
}
}
diff --git a/phpBB/includes/acp/acp_words.php b/phpBB/includes/acp/acp_words.php
index 1cb9545967..88c5bbe592 100644
--- a/phpBB/includes/acp/acp_words.php
+++ b/phpBB/includes/acp/acp_words.php
@@ -95,6 +95,9 @@ class acp_words
trigger_error($user->lang['ENTER_WORD'] . adm_back_link($this->u_action), E_USER_WARNING);
}
+ // Replace multiple consecutive asterisks with single one as those are not needed
+ $word = preg_replace('#\*{2,}#', '*', $word);
+
$sql_ary = array(
'word' => $word,
'replacement' => $replacement
diff --git a/phpBB/includes/cache.php b/phpBB/includes/cache.php
index b50fab4ca2..612adcca4f 100644
--- a/phpBB/includes/cache.php
+++ b/phpBB/includes/cache.php
@@ -82,26 +82,9 @@ class cache extends acm
$result = $db->sql_query($sql);
$censors = array();
- $unicode = ((version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) && @preg_match('/\p{L}/u', 'a') !== false) ? true : false;
-
while ($row = $db->sql_fetchrow($result))
{
- if ($unicode)
- {
- // Unescape the asterisk to simplify further conversions
- $row['word'] = str_replace('\*', '*', preg_quote($row['word'], '#'));
-
- // Replace the asterisk inside the pattern, at the start and at the end of it with regexes
- $row['word'] = preg_replace(array('#(?<=[\p{Nd}\p{L}_])\*(?=[\p{Nd}\p{L}_])#iu', '#^\*#', '#\*$#'), array('([\x20]*?|[\p{Nd}\p{L}_-]*?)', '[\p{Nd}\p{L}_-]*?', '[\p{Nd}\p{L}_-]*?'), $row['word']);
-
- // Generate the final substitution
- $censors['match'][] = '#(?<![\p{Nd}\p{L}_-])(' . $row['word'] . ')(?![\p{Nd}\p{L}_-])#iu';
- }
- else
- {
- $censors['match'][] = '#(?<!\S)(' . str_replace('\*', '\S*?', preg_quote($row['word'], '#')) . ')(?!\S)#iu';
- }
-
+ $censors['match'][] = get_censor_preg_expression($row['word']);
$censors['replace'][] = $row['replacement'];
}
$db->sql_freeresult($result);
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index ebaa342f54..90440f74b8 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
*/
// phpBB Version
-define('PHPBB_VERSION', '3.0.7-PL1');
+define('PHPBB_VERSION', '3.0.9-dev');
// QA-related
// define('PHPBB_QA', 1);
@@ -275,4 +275,4 @@ define('ZEBRA_TABLE', $table_prefix . 'zebra');
// Additional tables
-?> \ No newline at end of file
+?>
diff --git a/phpBB/includes/db/mssqlnative.php b/phpBB/includes/db/mssqlnative.php
index d6ac3b3acc..7ed4146f27 100644
--- a/phpBB/includes/db/mssqlnative.php
+++ b/phpBB/includes/db/mssqlnative.php
@@ -349,7 +349,8 @@ class dbal_mssqlnative extends dbal
{
$this->query_result = false;
- if ($offset === false || $offset == 0)
+ // total == 0 means all results - not zero results
+ if ($offset == 0 && $total !== 0)
{
if (strpos($query, "SELECT") === false)
{
@@ -360,13 +361,21 @@ class dbal_mssqlnative extends dbal
$query = preg_replace('/SELECT(\s*DISTINCT)?/Dsi', 'SELECT$1 TOP '.$total, $query);
}
}
- else
+ else if ($offset > 0)
{
$query = preg_replace('/SELECT(\s*DISTINCT)?/Dsi', 'SELECT$1 TOP(10000000) ', $query);
$query = 'SELECT *
FROM (SELECT sub2.*, ROW_NUMBER() OVER(ORDER BY sub2.line2) AS line3
- FROM (SELECT 1 AS line2, sub1.* FROM (' . $query . ') AS sub1) as sub2) AS sub3
- WHERE line3 BETWEEN ' . ($offset+1) . ' AND ' . ($offset + $total);
+ FROM (SELECT 1 AS line2, sub1.* FROM (' . $query . ') AS sub1) as sub2) AS sub3';
+
+ if ($total > 0)
+ {
+ $query .= ' WHERE line3 BETWEEN ' . ($offset+1) . ' AND ' . ($offset + $total);
+ }
+ else
+ {
+ $query .= ' WHERE line3 > ' . $offset;
+ }
}
$result = $this->sql_query($query, $cache_ttl);
@@ -406,13 +415,18 @@ class dbal_mssqlnative extends dbal
$row = @sqlsrv_fetch_array($query_id, SQLSRV_FETCH_ASSOC);
- // I hope i am able to remove this later... hopefully only a PHP or MSSQL bug
if ($row)
{
foreach ($row as $key => $value)
{
$row[$key] = ($value === ' ' || $value === NULL) ? '' : $value;
}
+
+ // remove helper values from LIMIT queries
+ if (isset($row['line2']))
+ {
+ unset($row['line2'], $row['line3']);
+ }
}
return $row;
}
@@ -624,4 +638,4 @@ class dbal_mssqlnative extends dbal
}
}
-?> \ No newline at end of file
+?>
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index e154aa44b0..69be1627cf 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1052,7 +1052,7 @@ function phpbb_own_realpath($path)
// @todo If the file exists fine and open_basedir only has one path we should be able to prepend it
// because we must be inside that basedir, the question is where...
// @internal The slash in is_dir() gets around an open_basedir restriction
- if (!@file_exists($resolved) || (!is_dir($resolved . '/') && !is_file($resolved)))
+ if (!@file_exists($resolved) || (!@is_dir($resolved . '/') && !is_file($resolved)))
{
return false;
}
@@ -2353,12 +2353,12 @@ function redirect($url, $return = false, $disable_cd_check = false)
// Relative uri
$pathinfo = pathinfo($url);
- if (!$disable_cd_check && !file_exists($pathinfo['dirname']))
+ if (!$disable_cd_check && !file_exists($pathinfo['dirname'] . '/'))
{
$url = str_replace('../', '', $url);
$pathinfo = pathinfo($url);
- if (!file_exists($pathinfo['dirname']))
+ if (!file_exists($pathinfo['dirname'] . '/'))
{
// fallback to "last known user page"
// at least this way we know the user does not leave the phpBB root
@@ -3429,6 +3429,48 @@ function get_preg_expression($mode)
}
/**
+* Generate regexp for naughty words censoring
+* Depends on whether installed PHP version supports unicode properties
+*
+* @param string $word word template to be replaced
+*
+* @return string $preg_expr regex to use with word censor
+*/
+function get_censor_preg_expression($word)
+{
+ static $unicode = null;
+
+ if (empty($word))
+ {
+ return '';
+ }
+
+ // Check whether PHP version supports unicode properties
+ if (is_null($unicode))
+ {
+ $unicode = ((version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) && @preg_match('/\p{L}/u', 'a') !== false) ? true : false;
+ }
+
+ if ($unicode)
+ {
+ // Unescape the asterisk to simplify further conversions
+ $word = str_replace('\*', '*', preg_quote($word, '#'));
+
+ // Replace asterisk(s) inside the pattern, at the start and at the end of it with regexes
+ $word = preg_replace(array('#(?<=[\p{Nd}\p{L}_])\*+(?=[\p{Nd}\p{L}_])#iu', '#^\*+#', '#\*+$#'), array('([\x20]*?|[\p{Nd}\p{L}_-]*?)', '[\p{Nd}\p{L}_-]*?', '[\p{Nd}\p{L}_-]*?'), $word);
+
+ // Generate the final substitution
+ $preg_expr = '#(?<![\p{Nd}\p{L}_-])(' . $word . ')(?![\p{Nd}\p{L}_-])#iu';
+ }
+ else
+ {
+ $preg_expr = '#(?<!\S)(' . str_replace('\*', '\S*?', preg_quote($word, '#')) . ')(?!\S)#iu';
+ }
+
+ return $preg_expr;
+}
+
+/**
* Returns the first block of the specified IPv6 address and as many additional
* ones as specified in the length paramater.
* If length is zero, then an empty string is returned.
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 3178d35c34..2aa12adb2e 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -3299,7 +3299,7 @@ function obtain_latest_version_info($force_update = false, $warn_fail = false, $
$errstr = '';
$errno = 0;
- $info = get_remote_file('www.phpbb.com', '/updatecheck',
+ $info = get_remote_file('version.phpbb.com', '/phpbb',
((defined('PHPBB_QA')) ? '30x_qa.txt' : '30x.txt'), $errstr, $errno);
if ($info === false)
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
index 9e26043b39..4a359dcade 100644
--- a/phpBB/includes/functions_convert.php
+++ b/phpBB/includes/functions_convert.php
@@ -1816,6 +1816,7 @@ function add_bots()
'Alta Vista [Bot]' => array('Scooter/', ''),
'Ask Jeeves [Bot]' => array('Ask Jeeves', ''),
'Baidu [Spider]' => array('Baiduspider+(', ''),
+ 'Bing [Bot]' => array('bingbot/', ''),
'Exabot [Bot]' => array('Exabot/', ''),
'FAST Enterprise [Crawler]' => array('FAST Enterprise Crawler', ''),
'FAST WebCrawler [Crawler]' => array('FAST-WebCrawler/', ''),
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 2de7e1b169..acaef49fe8 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -456,7 +456,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'S_LOCKED_FORUM' => ($row['forum_status'] == ITEM_LOCKED) ? true : false,
'S_LIST_SUBFORUMS' => ($row['display_subforum_list']) ? true : false,
'S_SUBFORUMS' => (sizeof($subforums_list)) ? true : false,
- 'S_FEED_ENABLED' => ($config['feed_forum'] && !phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $row['forum_options'])) ? true : false,
+ 'S_FEED_ENABLED' => ($config['feed_forum'] && !phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $row['forum_options']) && $row['forum_type'] == FORUM_POST) ? true : false,
'FORUM_ID' => $row['forum_id'],
'FORUM_NAME' => $row['forum_name'],
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php
index 3937cf9c21..78fe049f40 100644
--- a/phpBB/includes/functions_profile_fields.php
+++ b/phpBB/includes/functions_profile_fields.php
@@ -878,6 +878,11 @@ class custom_profile
$now = getdate();
$row['field_default_value'] = sprintf('%2d-%2d-%4d', $now['mday'], $now['mon'], $now['year']);
}
+ else if ($row['field_default_value'] === '' && $row['field_type'] == FIELD_INT)
+ {
+ // We cannot insert an empty string into an integer column.
+ $row['field_default_value'] = NULL;
+ }
$cp_data['pf_' . $row['field_ident']] = (in_array($row['field_type'], array(FIELD_TEXT, FIELD_STRING))) ? $row['lang_default_value'] : $row['field_default_value'];
}
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 952b55cc8c..b2d0b6c566 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -352,6 +352,15 @@ class bbcode_firstpass extends bbcode
return '[flash=' . $width . ',' . $height . ']' . $in . '[/flash]';
}
+ $in = str_replace(' ', '%20', $in);
+
+ // Make sure $in is a URL.
+ if (!preg_match('#^' . get_preg_expression('url') . '$#i', $in) &&
+ !preg_match('#^' . get_preg_expression('www_url') . '$#i', $in))
+ {
+ return '[flash=' . $width . ',' . $height . ']' . $in . '[/flash]';
+ }
+
// Apply the same size checks on flash files as on images
if ($config['max_' . $this->mode . '_img_height'] || $config['max_' . $this->mode . '_img_width'])
{
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php
index f1c8094a9b..6347633b14 100644
--- a/phpBB/includes/template.php
+++ b/phpBB/includes/template.php
@@ -205,7 +205,7 @@ class template
{
global $user, $phpbb_hook;
- if (!empty($phpbb_hook) && $phpbb_hook->call_hook(array(__CLASS__, __FUNCTION__), $handle, $include_once))
+ if (!empty($phpbb_hook) && $phpbb_hook->call_hook(array(__CLASS__, __FUNCTION__), $handle, $include_once, $this))
{
if ($phpbb_hook->hook_return(array(__CLASS__, __FUNCTION__)))
{
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index 16700c490c..b91636a9c8 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -172,6 +172,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
// Number of "to" recipients
$num_recipients = (int) preg_match_all('/:?(u|g)_([0-9]+):?/', $message_row['to_address'], $match);
+ $bbcode_status = ($config['allow_bbcode'] && $config['auth_bbcode_pm'] && $auth->acl_get('u_pm_bbcode')) ? true : false;
+
$template->assign_vars(array(
'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
@@ -229,6 +231,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'S_AUTHOR_DELETED' => ($author_id == ANONYMOUS) ? true : false,
'S_SPECIAL_FOLDER' => in_array($folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX)),
'S_PM_RECIPIENTS' => $num_recipients,
+ 'S_BBCODE_ALLOWED' => ($bbcode_status) ? 1 : 0,
'U_PRINT_PM' => ($config['print_pm'] && $auth->acl_get('u_pm_printpm')) ? "$url&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] . "&amp;view=print" : '',
'U_FORWARD_PM' => ($config['forward_pm'] && $auth->acl_get('u_sendpm') && $auth->acl_get('u_pm_forward')) ? "$url&amp;mode=compose&amp;action=forward&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '')
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php
index dfade990d2..b6eee8d621 100644
--- a/phpBB/install/convertors/convert_phpbb20.php
+++ b/phpBB/install/convertors/convert_phpbb20.php
@@ -32,7 +32,7 @@ unset($dbpasswd);
$convertor_data = array(
'forum_name' => 'phpBB 2.0.x',
'version' => '1.0.3',
- 'phpbb_version' => '3.0.7-PL1',
+ 'phpbb_version' => '3.0.8',
'author' => '<a href="http://www.phpbb.com/">phpBB Group</a>',
'dbms' => $dbms,
'dbhost' => $dbhost,
@@ -134,7 +134,7 @@ $config_schema = array(
'avatar_filesize' => 'avatar_filesize',
'avatar_max_width' => 'avatar_max_width',
'avatar_max_height' => 'avatar_max_height',
- 'default_dateformat' => 'default_dateformat',
+ 'default_dateformat' => 'phpbb_set_encoding(default_dateformat)',
'board_timezone' => 'board_timezone',
'allow_privmsg' => 'not(privmsg_disable)',
'gzip_compress' => 'gzip_compress',
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index e65237266b..10308826e0 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -8,7 +8,7 @@
*
*/
-$updates_to_version = '3.0.8-dev';
+$updates_to_version = '3.0.9-dev';
// Enter any version to update from to test updates. The version within the db will not be updated.
$debug_from_version = false;
@@ -477,7 +477,7 @@ else
<p><?php echo ((isset($lang['INLINE_UPDATE_SUCCESSFUL'])) ? $lang['INLINE_UPDATE_SUCCESSFUL'] : 'The database update was successful. Now you need to continue the update process.'); ?></p>
- <p><a href="<?php echo append_sid("{$phpbb_root_path}install/index.{$phpEx}", "mode=update&amp;sub=file_check&amp;lang=$language"); ?>" class="button1"><?php echo (isset($lang['CONTINUE_UPDATE_NOW'])) ? $lang['CONTINUE_UPDATE_NOW'] : 'Continue the update process now'; ?></a></p>
+ <p><a href="<?php echo append_sid("{$phpbb_root_path}install/index.{$phpEx}", "mode=update&amp;sub=file_check&amp;language=$language"); ?>" class="button1"><?php echo (isset($lang['CONTINUE_UPDATE_NOW'])) ? $lang['CONTINUE_UPDATE_NOW'] : 'Continue the update process now'; ?></a></p>
<?php
}
@@ -685,8 +685,7 @@ function _add_modules($modules_to_install)
FROM ' . MODULES_TABLE . "
WHERE module_class = '" . $db->sql_escape($module_data['class']) . "'
AND parent_id = {$parent_id}
- AND left_id BETWEEN {$first_left_id} AND {$module_row['left_id']}
- ORDER BY left_id";
+ AND left_id BETWEEN {$first_left_id} AND {$module_row['left_id']}";
$result = $db->sql_query($sql);
$steps = (int) $db->sql_fetchfield('num_modules');
$db->sql_freeresult($result);
@@ -915,6 +914,8 @@ function database_update_info()
'3.0.7' => array(),
// No changes from 3.0.7-PL1 to 3.0.8-RC1
'3.0.7-PL1' => array(),
+ // No changes from 3.0.8-RC1 to 3.0.8
+ '3.0.8-RC1' => array(),
);
}
@@ -925,7 +926,7 @@ function database_update_info()
*****************************************************************************/
function change_database_data(&$no_updates, $version)
{
- global $db, $errored, $error_ary, $config, $phpbb_root_path, $phpEx, $user;
+ global $db, $errored, $error_ary, $config, $phpbb_root_path, $phpEx;
switch ($version)
{
@@ -1653,33 +1654,55 @@ function change_database_data(&$no_updates, $version)
// Changes from 3.0.7-PL1 to 3.0.8-RC1
case '3.0.7-PL1':
- $user->add_lang('acp/attachments');
- $extension_groups = array(
- $user->lang['EXT_GROUP_ARCHIVES'] => 'ARCHIVES',
- $user->lang['EXT_GROUP_DOCUMENTS'] => 'DOCUMENTS',
- $user->lang['EXT_GROUP_DOWNLOADABLE_FILES'] => 'DOWNLOADABLE_FILES',
- $user->lang['EXT_GROUP_FLASH_FILES'] => 'FLASH_FILES',
- $user->lang['EXT_GROUP_IMAGES'] => 'IMAGES',
- $user->lang['EXT_GROUP_PLAIN_TEXT'] => 'PLAIN_TEXT',
- $user->lang['EXT_GROUP_QUICKTIME_MEDIA'] => 'QUICKTIME_MEDIA',
- $user->lang['EXT_GROUP_REAL_MEDIA'] => 'REAL_MEDIA',
- $user->lang['EXT_GROUP_WINDOWS_MEDIA'] => 'WINDOWS_MEDIA',
- );
-
- $sql = 'SELECT group_id, group_name
- FROM ' . EXTENSION_GROUPS_TABLE;
+ // Update file extension group names to use language strings.
+ $sql = 'SELECT lang_dir
+ FROM ' . LANG_TABLE;
$result = $db->sql_query($sql);
- while ($row = $db->sql_fetchrow($result))
+ $extension_groups_updated = array();
+ while ($lang_dir = $db->sql_fetchfield('lang_dir'))
{
- if (isset($extension_groups[$row['group_name']]))
+ $lang_dir = basename($lang_dir);
+
+ // The language strings we need are either in language/.../acp/attachments.php
+ // in the update package if we're updating to 3.0.8-RC1 or later,
+ // or they are in language/.../install.php when we're updating from 3.0.7-PL1 or earlier.
+ // On an already updated board, they can also already be in language/.../acp/attachments.php
+ // in the board root.
+ $lang_files = array(
+ "{$phpbb_root_path}install/update/new/language/$lang_dir/acp/attachments.$phpEx",
+ "{$phpbb_root_path}language/$lang_dir/install.$phpEx",
+ "{$phpbb_root_path}language/$lang_dir/acp/attachments.$phpEx",
+ );
+
+ foreach ($lang_files as $lang_file)
{
- $sql_ary = array(
- 'group_name' => $extension_groups[$row['group_name']],
- );
- $sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
- WHERE group_id = ' . (int) $row['group_id'];
- _sql($sql, $errored, $error_ary);
+ if (!file_exists($lang_file))
+ {
+ continue;
+ }
+
+ $lang = array();
+ include($lang_file);
+
+ foreach($lang as $lang_key => $lang_val)
+ {
+ if (isset($extension_groups_updated[$lang_key]) || strpos($lang_key, 'EXT_GROUP_') !== 0)
+ {
+ continue;
+ }
+
+ $sql_ary = array(
+ 'group_name' => substr($lang_key, 10), // Strip off 'EXT_GROUP_'
+ );
+
+ $sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE group_name = '" . $db->sql_escape($lang_val) . "'";
+ _sql($sql, $errored, $error_ary);
+
+ $extension_groups_updated[$lang_key] = true;
+ }
}
}
$db->sql_freeresult($result);
@@ -1707,55 +1730,66 @@ function change_database_data(&$no_updates, $version)
_sql($sql, $errored, $error_ary);
// add Bing Bot
- $sql = 'SELECT group_id, group_colour
- FROM ' . GROUPS_TABLE . "
- WHERE group_name = 'BOTS'";
+ $bot_name = 'Bing [Bot]';
+ $bot_name_clean = utf8_clean_string($bot_name);
+
+ $sql = 'SELECT user_id
+ FROM ' . USERS_TABLE . "
+ WHERE username_clean = '" . $db->sql_escape($bot_name_clean) . "'";
$result = $db->sql_query($sql);
- $group_row = $db->sql_fetchrow($result);
+ $bing_already_added = (bool) $db->sql_fetchfield('user_id');
$db->sql_freeresult($result);
- if (!$group_row)
+ if (!$bing_already_added)
{
- // default fallback, should never get here
- $group_row['group_id'] = 6;
- $group_row['group_colour'] = '9E8DA7';
- }
+ $bot_agent = 'bingbot/';
+ $bot_ip = '';
+ $sql = 'SELECT group_id, group_colour
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = 'BOTS'";
+ $result = $db->sql_query($sql);
+ $group_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
- if (!function_exists('user_add'))
- {
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
- }
+ if (!$group_row)
+ {
+ // default fallback, should never get here
+ $group_row['group_id'] = 6;
+ $group_row['group_colour'] = '9E8DA7';
+ }
- $bot_name = 'Bing [Bot]';
- $bot_agent = 'bingbot/';
- $bot_ip = '';
-
- $user_row = array(
- 'user_type' => USER_IGNORE,
- 'group_id' => $group_row['group_id'],
- 'username' => $bot_name,
- 'user_regdate' => time(),
- 'user_password' => '',
- 'user_colour' => $group_row['group_colour'],
- 'user_email' => '',
- 'user_lang' => $config['default_lang'],
- 'user_style' => $config['default_style'],
- 'user_timezone' => 0,
- 'user_dateformat' => $config['default_dateformat'],
- 'user_allow_massemail' => 0,
- );
+ if (!function_exists('user_add'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
+
+ $user_row = array(
+ 'user_type' => USER_IGNORE,
+ 'group_id' => $group_row['group_id'],
+ 'username' => $bot_name,
+ 'user_regdate' => time(),
+ 'user_password' => '',
+ 'user_colour' => $group_row['group_colour'],
+ 'user_email' => '',
+ 'user_lang' => $config['default_lang'],
+ 'user_style' => $config['default_style'],
+ 'user_timezone' => 0,
+ 'user_dateformat' => $config['default_dateformat'],
+ 'user_allow_massemail' => 0,
+ );
- $user_id = user_add($user_row);
+ $user_id = user_add($user_row);
- $sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
- 'bot_active' => 1,
- 'bot_name' => (string) $bot_name,
- 'user_id' => (int) $user_id,
- 'bot_agent' => (string) $bot_agent,
- 'bot_ip' => (string) $bot_ip,
- ));
+ $sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'bot_active' => 1,
+ 'bot_name' => (string) $bot_name,
+ 'user_id' => (int) $user_id,
+ 'bot_agent' => (string) $bot_agent,
+ 'bot_ip' => (string) $bot_ip,
+ ));
- _sql($sql, $errored, $error_ary);
+ _sql($sql, $errored, $error_ary);
+ }
// end Bing Bot addition
// Delete shadow topics pointing to not existing topics
@@ -1807,8 +1841,23 @@ function change_database_data(&$no_updates, $version)
// Unread posts search load switch
set_config('load_unreads_search', '1');
+ // Reduce queue interval to 60 seconds, email package size to 20
+ if ($config['queue_interval'] == 600)
+ {
+ set_config('queue_interval', '60');
+ }
+
+ if ($config['email_package_size'] == 50)
+ {
+ set_config('email_package_size', '20');
+ }
+
$no_updates = false;
break;
+
+ // No changes from 3.0.8-RC1 to 3.0.8
+ case '3.0.8-RC1':
+ break;
}
}
@@ -1955,7 +2004,7 @@ class updater_db_tools
'VCHAR_CI' => '[varchar] (255)',
'VARBINARY' => '[varchar] (255)',
),
-
+
'mssqlnative' => array(
'INT:' => '[int]',
'BINT' => '[float]',
@@ -1985,7 +2034,7 @@ class updater_db_tools
'VCHAR_CI' => '[varchar] (255)',
'VARBINARY' => '[varchar] (255)',
),
-
+
'oracle' => array(
'INT:' => 'number(%d)',
'BINT' => 'number(20)',
@@ -2132,7 +2181,7 @@ class updater_db_tools
case 'mssql_odbc':
$this->sql_layer = 'mssql';
break;
-
+
case 'mssqlnative':
$this->sql_layer = 'mssqlnative';
break;
@@ -3754,4 +3803,4 @@ class updater_db_tools
}
}
-?> \ No newline at end of file
+?>
diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php
index 6184cbbc33..ec76f2a407 100644
--- a/phpBB/install/install_update.php
+++ b/phpBB/install/install_update.php
@@ -193,13 +193,13 @@ class install_update extends module
}
// Check if the update files are actually meant to update from the current version
- if ($config['version'] != $this->update_info['version']['from'])
+ if ($this->current_version != $this->update_info['version']['from'])
{
$this->unequal_version = true;
$template->assign_vars(array(
'S_ERROR' => true,
- 'ERROR_MSG' => sprintf($user->lang['INCOMPATIBLE_UPDATE_FILES'], $config['version'], $this->update_info['version']['from'], $this->update_info['version']['to']),
+ 'ERROR_MSG' => sprintf($user->lang['INCOMPATIBLE_UPDATE_FILES'], $this->current_version, $this->update_info['version']['from'], $this->update_info['version']['to']),
));
}
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index a25b68ba39..355af802ef 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -94,7 +94,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('delete_time', '0')
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_check_mx', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_enable', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_function_name', 'mail');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_package_size', '50');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_package_size', '20');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_pm_icons', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_post_confirm', '1');
@@ -209,7 +209,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_max_msgs', '50'
INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_max_recipients', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page', '10');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('print_pm', '1');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('queue_interval', '600');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('queue_interval', '60');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ranks_path', 'images/ranks');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('referer_validation', '1');
@@ -242,7 +242,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page',
INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.8-dev');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.9-dev');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');
@@ -829,4 +829,4 @@ INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'mp3');
INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogg');
INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogm');
-# POSTGRES COMMIT # \ No newline at end of file
+# POSTGRES COMMIT #
diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php
index 77deba6e19..5293b835d6 100644
--- a/phpBB/language/en/acp/board.php
+++ b/phpBB/language/en/acp/board.php
@@ -51,7 +51,7 @@ $lang = array_merge($lang, array(
'SITE_NAME' => 'Site name',
'SYSTEM_DST' => 'Enable Summer Time/<abbr title="Daylight Saving Time">DST</abbr>',
'SYSTEM_TIMEZONE' => 'Guest timezone',
- 'SYSTEM_TIMEZONE_EXPLAIN' => 'Timezone to use for displaying times to users who are not logged in (guests, bots). Logged in users set their timezone during registration and can change it in user control panel.',
+ 'SYSTEM_TIMEZONE_EXPLAIN' => 'Timezone to use for displaying times to users who are not logged in (guests, bots). Logged in users set their timezone during registration and can change it in their user control panel.',
'WARNINGS_EXPIRE' => 'Warning duration',
'WARNINGS_EXPIRE_EXPLAIN' => 'Number of days that will elapse before the warning will automatically expire from a user’s record.',
));
@@ -233,7 +233,7 @@ $lang = array_merge($lang, array(
'PASSWORD_LENGTH' => 'Password length',
'PASSWORD_LENGTH_EXPLAIN' => 'Minimum and maximum number of characters in passwords.',
'REG_LIMIT' => 'Registration attempts',
- 'REG_LIMIT_EXPLAIN' => 'Number of attempts users can make at the confirmation code before being locked out that session.',
+ 'REG_LIMIT_EXPLAIN' => 'Number of attempts users can make at solving the anti-spambot task before being locked out of that session.',
'USERNAME_ALPHA_ONLY' => 'Alphanumeric only',
'USERNAME_ALPHA_SPACERS' => 'Alphanumeric and spacers',
'USERNAME_ASCII' => 'ASCII (no international unicode)',
@@ -288,44 +288,44 @@ $lang = array_merge($lang, array(
// Visual Confirmation Settings
$lang = array_merge($lang, array(
- 'ACP_VC_SETTINGS_EXPLAIN' => 'Here you can select and configure CAPTCHA plugins, which implement various ways to reject registration attempts from so-called spambots.',
+ 'ACP_VC_SETTINGS_EXPLAIN' => 'Here you can select and configure plugins, which are designed to block automated form submissions by spambots. These plugins typically work by challenging the user with a <em>CAPTCHA</em>, a test which is designed to be difficult for computers to solve.',
'AVAILABLE_CAPTCHAS' => 'Available plugins',
- 'CAPTCHA_UNAVAILABLE' => 'The CAPTCHA cannot be selected as its requirements are not met.',
- 'CAPTCHA_GD' => 'GD CAPTCHA',
- 'CAPTCHA_GD_3D' => 'GD 3D Captcha',
- 'CAPTCHA_GD_FOREGROUND_NOISE' => 'GD CAPTCHA foreground noise',
- 'CAPTCHA_GD_EXPLAIN' => 'Use GD to make a more advanced CAPTCHA.',
- 'CAPTCHA_GD_FOREGROUND_NOISE_EXPLAIN' => 'Use foreground noise to make the GD based CAPTCHA harder.',
- 'CAPTCHA_GD_X_GRID' => 'GD CAPTCHA background noise x-axis',
- 'CAPTCHA_GD_X_GRID_EXPLAIN' => 'Use lower settings of this to make the GD based CAPTCHA harder. 0 will disable x-axis background noise.',
- 'CAPTCHA_GD_Y_GRID' => 'GD CAPTCHA background noise y-axis',
- 'CAPTCHA_GD_Y_GRID_EXPLAIN' => 'Use lower settings of this to make the GD based CAPTCHA harder. 0 will disable y-axis background noise.',
- 'CAPTCHA_GD_WAVE' => 'GD CAPTCHA wave distortion',
- 'CAPTCHA_GD_WAVE_EXPLAIN' => 'This applies a wave distortion to the CAPTCHA.',
+ 'CAPTCHA_UNAVAILABLE' => 'The plugin cannot be selected as its requirements are not met.',
+ 'CAPTCHA_GD' => 'GD image',
+ 'CAPTCHA_GD_3D' => 'GD 3D image',
+ 'CAPTCHA_GD_FOREGROUND_NOISE' => 'Foreground noise',
+ 'CAPTCHA_GD_EXPLAIN' => 'Uses GD to make a more advanced anti-spambot image.',
+ 'CAPTCHA_GD_FOREGROUND_NOISE_EXPLAIN' => 'Use foreground noise to make the image harder to read.',
+ 'CAPTCHA_GD_X_GRID' => 'Background noise x-axis',
+ 'CAPTCHA_GD_X_GRID_EXPLAIN' => 'Use lower settings of this to make the image harder to read. 0 will disable x-axis background noise.',
+ 'CAPTCHA_GD_Y_GRID' => 'Background noise y-axis',
+ 'CAPTCHA_GD_Y_GRID_EXPLAIN' => 'Use lower settings of this to make the image harder to read. 0 will disable y-axis background noise.',
+ 'CAPTCHA_GD_WAVE' => 'Wave distortion',
+ 'CAPTCHA_GD_WAVE_EXPLAIN' => 'This applies a wave distortion to the image.',
'CAPTCHA_GD_3D_NOISE' => 'Add 3D-noise objects',
- 'CAPTCHA_GD_3D_NOISE_EXPLAIN' => 'This adds additional objects to the CAPTCHA, over the letters.',
+ 'CAPTCHA_GD_3D_NOISE_EXPLAIN' => 'This adds additional objects to the image, over the letters.',
'CAPTCHA_GD_FONTS' => 'Use different fonts',
'CAPTCHA_GD_FONTS_EXPLAIN' => 'This setting controls how many different letter shapes are used. You can just use the default shapes or introduce altered letters. Adding lowercase letters is also possible.',
'CAPTCHA_FONT_DEFAULT' => 'Default',
'CAPTCHA_FONT_NEW' => 'New Shapes',
'CAPTCHA_FONT_LOWER' => 'Also use lowercase',
- 'CAPTCHA_NO_GD' => 'CAPTCHA without GD',
- 'CAPTCHA_PREVIEW_MSG' => 'Your changes to the visual confirmation setting were not saved. This is just a preview.',
- 'CAPTCHA_PREVIEW_EXPLAIN' => 'The CAPTCHA as it would look like using the current selection.',
-
- 'CAPTCHA_SELECT' => 'Installed CAPTCHA plugins',
- 'CAPTCHA_SELECT_EXPLAIN' => 'The dropdown holds the CAPTCHA plugins recognized by the board. Gray entries are not available right now and might need configuration prior to use.',
- 'CAPTCHA_CONFIGURE' => 'Configure CAPTCHAs',
- 'CAPTCHA_CONFIGURE_EXPLAIN' => 'Change the settings for the selected CAPTCHA.',
+ 'CAPTCHA_NO_GD' => 'Simple image',
+ 'CAPTCHA_PREVIEW_MSG' => 'Your changes have not been saved, this is just a preview.',
+ 'CAPTCHA_PREVIEW_EXPLAIN' => 'The plugin as it would look like using the current selection.',
+
+ 'CAPTCHA_SELECT' => 'Installed plugins',
+ 'CAPTCHA_SELECT_EXPLAIN' => 'The dropdown holds the plugins recognised by the board. Grey entries are not available right now and might need configuration prior to use.',
+ 'CAPTCHA_CONFIGURE' => 'Configure plugins',
+ 'CAPTCHA_CONFIGURE_EXPLAIN' => 'Change the settings for the selected plugin.',
'CONFIGURE' => 'Configure',
- 'CAPTCHA_NO_OPTIONS' => 'This CAPTCHA has no configuration options.',
-
- 'VISUAL_CONFIRM_POST' => 'Enable visual confirmation for guest postings',
- 'VISUAL_CONFIRM_POST_EXPLAIN' => 'Requires anonymous users to enter a random code matching an image to help prevent mass postings.',
- 'VISUAL_CONFIRM_REG' => 'Enable visual confirmation for registrations',
- 'VISUAL_CONFIRM_REG_EXPLAIN' => 'Requires new users to enter a random code matching an image to help prevent mass registrations.',
- 'VISUAL_CONFIRM_REFRESH' => 'Enable users to refresh the confirmation image',
- 'VISUAL_CONFIRM_REFRESH_EXPLAIN' => 'Allows users to request new confirmation codes, if they are unable to solve the VC during registration. Some plugins might not support this option.',
+ 'CAPTCHA_NO_OPTIONS' => 'This plugin has no configuration options.',
+
+ 'VISUAL_CONFIRM_POST' => 'Enable spambot countermeasures for guest postings',
+ 'VISUAL_CONFIRM_POST_EXPLAIN' => 'Requires guest users to pass the anti-spambot task to help prevent automated postings.',
+ 'VISUAL_CONFIRM_REG' => 'Enable spambot countermeasures for registrations',
+ 'VISUAL_CONFIRM_REG_EXPLAIN' => 'Requires new users to pass the anti-spambot task to help prevent automated registrations.',
+ 'VISUAL_CONFIRM_REFRESH' => 'Allow users to refresh the anti-spambot task',
+ 'VISUAL_CONFIRM_REFRESH_EXPLAIN' => 'Allows users to request a new anti-spambot task if they are unable to solve the current task during registration. Some plugins might not support this option.',
));
// Cookie Settings
@@ -394,7 +394,7 @@ $lang = array_merge($lang, array(
'LDAP_NO_EMAIL' => 'The specified e-mail attribute does not exist.',
'LDAP_NO_IDENTITY' => 'Could not find a login identity for %s.',
'LDAP_PASSWORD' => 'LDAP password',
- 'LDAP_PASSWORD_EXPLAIN' => 'Leave blank to use anonymous binding. Else fill in the password for the above user. Required for Active Directory Servers.<br /><em><strong>Warning:</strong> This password will be stored as plain text in the database, visible to everybody who can access your database or who can view this configuration page.</em>',
+ 'LDAP_PASSWORD_EXPLAIN' => 'Leave blank to use anonymous binding, otherwise fill in the password for the above user. Required for Active Directory Servers.<br /><em><strong>Warning:</strong> This password will be stored as plain text in the database, visible to everybody who can access your database or who can view this configuration page.</em>',
'LDAP_PORT' => 'LDAP server port',
'LDAP_PORT_EXPLAIN' => 'Optionally you can specify a port which should be used to connect to the LDAP server instead of the default port 389.',
'LDAP_SERVER' => 'LDAP server name',
@@ -463,7 +463,7 @@ $lang = array_merge($lang, array(
'IP_VALID' => 'Session IP validation',
'IP_VALID_EXPLAIN' => 'Determines how much of the users IP is used to validate a session; <samp>All</samp> compares the complete address, <samp>A.B.C</samp> the first x.x.x, <samp>A.B</samp> the first x.x, <samp>None</samp> disables checking. On IPv6 addresses <samp>A.B.C</samp> compares the first 4 blocks and <samp>A.B</samp> the first 3 blocks.',
'MAX_LOGIN_ATTEMPTS' => 'Maximum number of login attempts',
- 'MAX_LOGIN_ATTEMPTS_EXPLAIN' => 'After this number of failed logins the user needs to additionally confirm his login visually (visual confirmation).',
+ 'MAX_LOGIN_ATTEMPTS_EXPLAIN' => 'After this number of failed logins the user needs to additionally solve the anti-spambot task.',
'NO_IP_VALIDATION' => 'None',
'NO_REF_VALIDATION' => 'None',
'PASSWORD_TYPE' => 'Password complexity',
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index bca19c7f12..8c71e936b3 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -190,7 +190,7 @@ $lang = array_merge($lang, array(
'ACP_USER_SIG' => 'Signature',
'ACP_USER_WARNINGS' => 'Warnings',
- 'ACP_VC_SETTINGS' => 'CAPTCHA module settings',
+ 'ACP_VC_SETTINGS' => 'Spambot countermeasures',
'ACP_VC_CAPTCHA_DISPLAY' => 'CAPTCHA image preview',
'ACP_VERSION_CHECK' => 'Check for updates',
'ACP_VIEW_ADMIN_PERMISSIONS' => 'View administrative permissions',
@@ -255,7 +255,7 @@ $lang = array_merge($lang, array(
'MOVE_UP' => 'Move up',
'NOTIFY' => 'Notification',
- 'NO_ADMIN' => 'You are not authorised to administrate this board.',
+ 'NO_ADMIN' => 'You are not authorised to administer this board.',
'NO_EMAILS_DEFINED' => 'No valid e-mail addresses found.',
'NO_PASSWORD_SUPPLIED' => 'You need to enter your password to access the Administration Control Panel.',
@@ -503,7 +503,7 @@ $lang = array_merge($lang, array(
'LOG_CONFIG_SERVER' => '<strong>Altered server settings</strong>',
'LOG_CONFIG_SETTINGS' => '<strong>Altered board settings</strong>',
'LOG_CONFIG_SIGNATURE' => '<strong>Altered signature settings</strong>',
- 'LOG_CONFIG_VISUAL' => '<strong>Altered antibot settings</strong>',
+ 'LOG_CONFIG_VISUAL' => '<strong>Altered anti-spambot settings</strong>',
'LOG_APPROVE_TOPIC' => '<strong>Approved topic</strong><br />» %s',
'LOG_BUMP_TOPIC' => '<strong>User bumped topic</strong><br />» %s',
diff --git a/phpBB/language/en/acp/groups.php b/phpBB/language/en/acp/groups.php
index e8c1a3c494..3444b98303 100644
--- a/phpBB/language/en/acp/groups.php
+++ b/phpBB/language/en/acp/groups.php
@@ -36,7 +36,7 @@ if (empty($lang) || !is_array($lang))
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
$lang = array_merge($lang, array(
- 'ACP_GROUPS_MANAGE_EXPLAIN' => 'From this panel you can administrate all your usergroups. You can delete, create and edit existing groups. Furthermore, you may choose group leaders, toggle open/hidden/closed group status and set the group name and description.',
+ 'ACP_GROUPS_MANAGE_EXPLAIN' => 'From this panel you can administer all your usergroups. You can delete, create and edit existing groups. Furthermore, you may choose group leaders, toggle open/hidden/closed group status and set the group name and description.',
'ADD_USERS' => 'Add users',
'ADD_USERS_EXPLAIN' => 'Here you can add new users to the group. You may select whether this group becomes the new default for the selected users. Additionally you can define them as group leaders. Please enter each username on a separate line.',
diff --git a/phpBB/language/en/captcha_qa.php b/phpBB/language/en/captcha_qa.php
index 5cd822b3c4..42c8df2d6d 100644
--- a/phpBB/language/en/captcha_qa.php
+++ b/phpBB/language/en/captcha_qa.php
@@ -36,9 +36,9 @@ if (empty($lang) || !is_array($lang))
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
$lang = array_merge($lang, array(
- 'CAPTCHA_QA' => 'Q&amp;A CAPTCHA',
- 'CONFIRM_QUESTION_EXPLAIN' => 'This question is a means of identifying and preventing automated submissions.',
- 'CONFIRM_QUESTION_WRONG' => 'You have provided an invalid answer to the confirmation question.',
+ 'CAPTCHA_QA' => 'Q&amp;A',
+ 'CONFIRM_QUESTION_EXPLAIN' => 'This question is a means of preventing automated form submissions by spambots.',
+ 'CONFIRM_QUESTION_WRONG' => 'You have provided an invalid answer to the question.',
'QUESTION_ANSWERS' => 'Answers',
'ANSWERS_EXPLAIN' => 'Please enter valid answers to the question, one per line.',
@@ -47,15 +47,15 @@ $lang = array_merge($lang, array(
'ANSWER' => 'Answer',
'EDIT_QUESTION' => 'Edit Question',
'QUESTIONS' => 'Questions',
- 'QUESTIONS_EXPLAIN' => 'During registration, users will be asked one of the questions specified here. To use this plugin, at least one question must be set in the default language. These questions should be easy for your target audience to answer, but beyond the ability of a bot capable of running a Google™ search. Using a large and regulary changed set of questions will yield the best results. Enable the strict setting if your question relies on punctuation or capitalisation.',
+ 'QUESTIONS_EXPLAIN' => 'For every form submission where you have enabled the Q&amp;A plugin, users will be asked one of the questions specified here. To use this plugin at least one question must be set in the default language. These questions should be easy for your target audience to answer but beyond the ability of a bot capable of running a Google™ search. Using a large and regularly changed set of questions will yield the best results. Enable the strict setting if your question relies on mixed case, punctuation or whitespace.',
'QUESTION_DELETED' => 'Question deleted',
'QUESTION_LANG' => 'Language',
- 'QUESTION_LANG_EXPLAIN' => 'The language that this question and its answers are written in.',
+ 'QUESTION_LANG_EXPLAIN' => 'The language this question and its answers are written in.',
'QUESTION_STRICT' => 'Strict check',
- 'QUESTION_STRICT_EXPLAIN' => 'If enabled, capitalisation and whitespace will also be enforced.',
+ 'QUESTION_STRICT_EXPLAIN' => 'Enable to enforce mixed case, punctuation and whitespace.',
'QUESTION_TEXT' => 'Question',
- 'QUESTION_TEXT_EXPLAIN' => 'The question that will be asked on registration.',
+ 'QUESTION_TEXT_EXPLAIN' => 'The question presented to the user.',
'QA_ERROR_MSG' => 'Please fill in all fields and enter at least one answer.',
'QA_LAST_QUESTION' => 'You cannot delete all questions while the plugin is active.',
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index e79e5a6de3..db60cbf227 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -304,8 +304,8 @@ $lang = array_merge($lang, array(
'LOGIN' => 'Login',
'LOGIN_CHECK_PM' => 'Log in to check your private messages.',
'LOGIN_CONFIRMATION' => 'Confirmation of login',
- 'LOGIN_CONFIRM_EXPLAIN' => 'To prevent brute forcing accounts the board requires you to enter a confirmation code after a maximum amount of failed logins. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.',
- 'LOGIN_ERROR_ATTEMPTS' => 'You exceeded the maximum allowed number of login attempts. In addition to your username and password you now also have to enter the confirm code from the image you see below.',
+ 'LOGIN_CONFIRM_EXPLAIN' => 'To prevent brute forcing accounts the board requires you to enter a confirmation code after a maximum amount of failed logins. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.', // unused
+ 'LOGIN_ERROR_ATTEMPTS' => 'You exceeded the maximum allowed number of login attempts. In addition to your username and password you now also have to solve the CAPTCHA below.',
'LOGIN_ERROR_EXTERNAL_AUTH_APACHE' => 'You have not been authenticated by Apache.',
'LOGIN_ERROR_PASSWORD' => 'You have specified an incorrect password. Please check your password and try again. If you continue to have problems please contact the %sBoard Administrator%s.',
'LOGIN_ERROR_PASSWORD_CONVERT' => 'It was not possible to convert your password when updating this bulletin board’s software. Please %srequest a new password%s. If you continue to have problems please contact the %sBoard Administrator%s.',
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 4e58de8d90..11c5d78359 100644
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -128,7 +128,7 @@ $lang = array_merge($lang, array(
'DB_ERR_QUERY_FIRST_TABLE' => 'Error while executing <var>query_first</var>, %s (“%s”).',
'DB_ERR_SELECT' => 'Error while running <code>SELECT</code> query.',
'DB_HOST' => 'Database server hostname or DSN',
- 'DB_HOST_EXPLAIN' => 'DSN stands for Data Source Name and is relevant only for ODBC installs. On PostgreSQL, use localhost to connect to the local server via UNIX domain socket and 127.0.0.1 to connect via TCP.',
+ 'DB_HOST_EXPLAIN' => 'DSN stands for Data Source Name and is relevant only for ODBC installs. On PostgreSQL, use localhost to connect to the local server via UNIX domain socket and 127.0.0.1 to connect via TCP. For SQLite, enter the full path to your database file.',
'DB_NAME' => 'Database name',
'DB_PASSWORD' => 'Database password',
'DB_PORT' => 'Database server port',
@@ -370,7 +370,7 @@ $lang = array_merge($lang, array(
// Updater
$lang = array_merge($lang, array(
- 'ALL_FILES_UP_TO_DATE' => 'All files are up to date with the latest phpBB version. You should now <a href="../ucp.php?mode=login&amp;redirect=adm/index.php%3Fi=send_statistics%26mode=send_statistics">login to your board</a> and check if everything is working fine. Do not forget to delete, rename or move your install directory! Please send us updated information about your server and board configurations from the <a href="../ucp.php?mode=login&amp;redirect=adm/index.php%3Fi=send_statistics%26mode=send_statistics">Send statistics</a> module in your ACP.',
+ 'ALL_FILES_UP_TO_DATE' => 'All files are up to date with the latest phpBB version. You should now <a href="../ucp.php?mode=login">login to your board</a> and check if everything is working fine. Do not forget to delete, rename or move your install directory! Please send us updated information about your server and board configurations from the <a href="../ucp.php?mode=login&amp;redirect=adm/index.php%3Fi=send_statistics%26mode=send_statistics">Send statistics</a> module in your ACP.',
'ARCHIVE_FILE' => 'Source file within archive',
'BACK' => 'Back',
@@ -559,6 +559,7 @@ $lang = array_merge($lang, array(
'UPDATING_DATA' => 'Updating data',
'UPDATING_TO_LATEST_STABLE' => 'Updating database to latest stable release',
'UPDATED_VERSION' => 'Updated version',
+ 'UPGRADE_INSTRUCTIONS' => 'A new feature release <strong>%1$s</strong> is available. Please read <a href="%2$s" title="%2$s"><strong>the release announcement</strong></a> to learn about what it has to offer, and how to upgrade.',
'UPLOAD_METHOD' => 'Upload method',
'UPDATE_DB_SUCCESS' => 'Database update was successful.',
diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php
index e7a9c6b88d..213f766610 100644
--- a/phpBB/language/en/memberlist.php
+++ b/phpBB/language/en/memberlist.php
@@ -131,7 +131,7 @@ $lang = array_merge($lang, array(
'SORT_POST_COUNT' => 'Post count',
'USERNAME_BEGINS_WITH' => 'Username begins with',
- 'USER_ADMIN' => 'Administrate user',
+ 'USER_ADMIN' => 'Administer user',
'USER_BAN' => 'Banning',
'USER_FORUM' => 'User statistics',
'USER_LAST_REMINDED' => array(
diff --git a/phpBB/language/en/search.php b/phpBB/language/en/search.php
index d93fe6b56a..cd38cd615f 100644
--- a/phpBB/language/en/search.php
+++ b/phpBB/language/en/search.php
@@ -54,6 +54,7 @@ $lang = array_merge($lang, array(
'LOGIN_EXPLAIN_EGOSEARCH' => 'The board requires you to be registered and logged in to view your own posts.',
'LOGIN_EXPLAIN_UNREADSEARCH'=> 'The board requires you to be registered and logged in to view your unread posts.',
+ 'LOGIN_EXPLAIN_NEWPOSTS' => 'The board requires you to be registered and logged in to view new posts since your last visit.',
'MAX_NUM_SEARCH_KEYWORDS_REFINE' => 'You specified too many words to search for. Please do not enter more than %1$d words.',
diff --git a/phpBB/language/en/search_synonyms.php b/phpBB/language/en/search_synonyms.php
index 1618c292d3..e544456226 100644
--- a/phpBB/language/en/search_synonyms.php
+++ b/phpBB/language/en/search_synonyms.php
@@ -77,7 +77,7 @@ $synonyms = array(
'foriegn' => 'foreign',
'fourty' => 'forty',
- 'gage' => 'guage',
+ 'gage' => 'gauge',
'geneology' => 'genealogy',
'grammer' => 'grammar',
'gray' => 'grey',
@@ -98,7 +98,7 @@ $synonyms = array(
'irrevelant' => 'irrelevant',
'jeweler' => 'jeweller',
- 'judgement' => 'judgment',
+ 'judgment' => 'judgement',
'labeled' => 'labelled',
'labor' => 'labour',
diff --git a/phpBB/posting.php b/phpBB/posting.php
index f775699cee..7368026136 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -861,11 +861,18 @@ if ($submit || $preview || $refresh)
{
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ $user->add_lang('ucp');
+
if (($result = validate_username($post_data['username'], (!empty($post_data['post_username'])) ? $post_data['post_username'] : '')) !== false)
{
- $user->add_lang('ucp');
$error[] = $user->lang[$result . '_USERNAME'];
}
+
+ if (($result = validate_string($post_data['username'], false, $config['min_name_chars'], $config['max_name_chars'])) !== false)
+ {
+ $min_max_amount = ($result == 'TOO_SHORT') ? $config['min_name_chars'] : $config['max_name_chars'];
+ $error[] = sprintf($user->lang['FIELD_' . $result], $user->lang['USERNAME'], $min_max_amount);
+ }
}
if ($config['enable_post_confirm'] && !$user->data['is_registered'] && in_array($mode, array('quote', 'post', 'reply')))
diff --git a/phpBB/search.php b/phpBB/search.php
index 2a13e20477..2aa61401cf 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -47,32 +47,44 @@ $sort_dir = request_var('sd', 'd');
$return_chars = request_var('ch', ($topic_id) ? -1 : 300);
$search_forum = request_var('fid', array(0));
-// We put login boxes for the case if search_id is egosearch or unreadposts
+// We put login boxes for the case if search_id is newposts, egosearch or unreadposts
// because a guest should be able to log in even if guests search is not permitted
-// Egosearch is an author search
-if ($search_id == 'egosearch')
+switch ($search_id)
{
- $author_id = $user->data['user_id'];
-
- if ($user->data['user_id'] == ANONYMOUS)
- {
- login_box('', $user->lang['LOGIN_EXPLAIN_EGOSEARCH']);
- }
-}
+ // Egosearch is an author search
+ case 'egosearch':
+ $author_id = $user->data['user_id'];
+ if ($user->data['user_id'] == ANONYMOUS)
+ {
+ login_box('', $user->lang['LOGIN_EXPLAIN_EGOSEARCH']);
+ }
+ break;
-// Search for unread posts needs to be allowed and user to be logged in if topics tracking for guests is disabled
-if ($search_id == 'unreadposts')
-{
- if (!$config['load_unreads_search'])
- {
- $template->assign_var('S_NO_SEARCH', true);
- trigger_error('NO_SEARCH_UNREADS');
- }
- else if (!$config['load_anon_lastread'] && !$user->data['is_registered'])
- {
- login_box('', $user->lang['LOGIN_EXPLAIN_UNREADSEARCH']);
- }
+ // Search for unread posts needs to be allowed and user to be logged in if topics tracking for guests is disabled
+ case 'unreadposts':
+ if (!$config['load_unreads_search'])
+ {
+ $template->assign_var('S_NO_SEARCH', true);
+ trigger_error('NO_SEARCH_UNREADS');
+ }
+ else if (!$config['load_anon_lastread'] && !$user->data['is_registered'])
+ {
+ login_box('', $user->lang['LOGIN_EXPLAIN_UNREADSEARCH']);
+ }
+ break;
+
+ // The "new posts" search uses user_lastvisit which is user based, so it should require user to log in.
+ case 'newposts':
+ if ($user->data['user_id'] == ANONYMOUS)
+ {
+ login_box('', $user->lang['LOGIN_EXPLAIN_NEWPOSTS']);
+ }
+ break;
+
+ default:
+ // There's nothing to do here for now ;)
+ break;
}
// Is user able to search? Has search been disabled?
diff --git a/phpBB/styles/prosilver/imageset/imageset.cfg b/phpBB/styles/prosilver/imageset/imageset.cfg
index 7fc8274ad2..bbafe5e26d 100644
--- a/phpBB/styles/prosilver/imageset/imageset.cfg
+++ b/phpBB/styles/prosilver/imageset/imageset.cfg
@@ -19,7 +19,7 @@
# General Information about this style
name = prosilver
copyright = &copy; phpBB Group, 2007
-version = 3.0.7
+version = 3.0.8
# Images
img_site_logo = site_logo.gif*52*139
diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg
index 8b660c969e..7f7e677993 100644
--- a/phpBB/styles/prosilver/style.cfg
+++ b/phpBB/styles/prosilver/style.cfg
@@ -19,4 +19,4 @@
# General Information about this style
name = prosilver
copyright = &copy; phpBB Group, 2007
-version = 3.0.7 \ No newline at end of file
+version = 3.0.8 \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/login_body.html b/phpBB/styles/prosilver/template/login_body.html
index 26e425a1d0..36c2eae349 100644
--- a/phpBB/styles/prosilver/template/login_body.html
+++ b/phpBB/styles/prosilver/template/login_body.html
@@ -2,7 +2,7 @@
<script type="text/javascript">
// <![CDATA[
- onload_functions.push('document.getElementById("{USERNAME_CREDENTIAL}").focus();');
+ onload_functions.push('document.getElementById("<!-- IF S_ADMIN_AUTH -->{PASSWORD_CREDENTIAL}<!-- ELSE -->{USERNAME_CREDENTIAL}<!-- ENDIF -->").focus();');
// ]]>
</script>
diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html
index 4da1308e14..aeb6dc9ba3 100644
--- a/phpBB/styles/prosilver/template/overall_footer.html
+++ b/phpBB/styles/prosilver/template/overall_footer.html
@@ -30,7 +30,7 @@
The phpBB Group : 2006
//-->
- <div class="copyright">Powered by <a href="http://www.phpbb.com/">phpBB</a> &copy; 2000, 2002, 2005, 2007 phpBB Group
+ <div class="copyright">Powered by <a href="http://www.phpbb.com/">phpBB</a> &copy; phpBB Group
<!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
<!-- IF DEBUG_OUTPUT --><br />{DEBUG_OUTPUT}<!-- ENDIF -->
<!-- IF U_ACP --><br /><strong><a href="{U_ACP}">{L_ACP}</a></strong><!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html
index 8f4ac19fb8..44857dbc41 100644
--- a/phpBB/styles/prosilver/template/overall_header.html
+++ b/phpBB/styles/prosilver/template/overall_header.html
@@ -11,7 +11,7 @@
<meta name="copyright" content="2000, 2002, 2005, 2007 phpBB Group" />
<meta name="keywords" content="" />
<meta name="description" content="" />
-<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
+<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9" />
{META}
<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>
diff --git a/phpBB/styles/prosilver/template/template.cfg b/phpBB/styles/prosilver/template/template.cfg
index 03b61e1003..0dd4150266 100644
--- a/phpBB/styles/prosilver/template/template.cfg
+++ b/phpBB/styles/prosilver/template/template.cfg
@@ -19,7 +19,7 @@
# General Information about this template
name = prosilver
copyright = &copy; phpBB Group, 2007
-version = 3.0.7
+version = 3.0.8
# Defining a different template bitfield
template_bitfield = lNg=
diff --git a/phpBB/styles/prosilver/theme/theme.cfg b/phpBB/styles/prosilver/theme/theme.cfg
index 8b7916a144..83f3120829 100644
--- a/phpBB/styles/prosilver/theme/theme.cfg
+++ b/phpBB/styles/prosilver/theme/theme.cfg
@@ -21,7 +21,7 @@
# General Information about this theme
name = prosilver
copyright = &copy; phpBB Group, 2007
-version = 3.0.7
+version = 3.0.8
# Some configuration options
diff --git a/phpBB/styles/prosilver/theme/tweaks.css b/phpBB/styles/prosilver/theme/tweaks.css
index 782e682b9d..30fe5fb986 100644
--- a/phpBB/styles/prosilver/theme/tweaks.css
+++ b/phpBB/styles/prosilver/theme/tweaks.css
@@ -90,3 +90,12 @@ dl.icon {
* html .forumbg table.table1 {
margin: 0 -2px 0px -1px;
}
+
+/* Headerbar height fix for IE7 and below */
+* html #site-description p {
+ margin-bottom: 1.0em;
+}
+
+*:first-child+html #site-description p {
+ margin-bottom: 1.0em;
+} \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/imageset/imageset.cfg b/phpBB/styles/subsilver2/imageset/imageset.cfg
index 7709070734..ce0c859193 100644
--- a/phpBB/styles/subsilver2/imageset/imageset.cfg
+++ b/phpBB/styles/subsilver2/imageset/imageset.cfg
@@ -19,7 +19,7 @@
# General Information about this style
name = subsilver2
copyright = &copy; phpBB Group, 2003
-version = 3.0.7
+version = 3.0.8
# Images
img_site_logo = site_logo.gif*94*170
diff --git a/phpBB/styles/subsilver2/style.cfg b/phpBB/styles/subsilver2/style.cfg
index 86b5b8a4e8..b8ddd6deec 100644
--- a/phpBB/styles/subsilver2/style.cfg
+++ b/phpBB/styles/subsilver2/style.cfg
@@ -19,4 +19,4 @@
# General Information about this style
name = subsilver2
copyright = &copy; 2005 phpBB Group
-version = 3.0.7
+version = 3.0.8
diff --git a/phpBB/styles/subsilver2/template/captcha_default.html b/phpBB/styles/subsilver2/template/captcha_default.html
index e0116ae42c..4c65f81643 100644
--- a/phpBB/styles/subsilver2/template/captcha_default.html
+++ b/phpBB/styles/subsilver2/template/captcha_default.html
@@ -1,9 +1,11 @@
<tr>
<th colspan="2" valign="middle">{L_CONFIRM_CODE}</th>
</tr>
+ <!-- IF S_TYPE == 1 -->
<tr>
<td class="row3" colspan="2"><span class="gensmall">{L_CONFIRM_EXPLAIN}</span></td>
</tr>
+ <!-- ENDIF -->
<tr>
<td class="row1" colspan="2" align="center"><img src="{CONFIRM_IMAGE_LINK}" alt="{L_CONFIRM_CODE}" />
<input type="hidden" name="confirm_id" id="confirm_id" value="{CONFIRM_ID}" /></td>
diff --git a/phpBB/styles/subsilver2/template/login_body.html b/phpBB/styles/subsilver2/template/login_body.html
index 90bbf8c139..262341e0c0 100644
--- a/phpBB/styles/subsilver2/template/login_body.html
+++ b/phpBB/styles/subsilver2/template/login_body.html
@@ -92,7 +92,7 @@
// <![CDATA[
(function()
{
- var elements = document.getElementsByName("{USERNAME_CREDENTIAL}");
+ var elements = document.getElementsByName("<!-- IF S_ADMIN_AUTH -->{PASSWORD_CREDENTIAL}<!-- ELSE -->{USERNAME_CREDENTIAL}<!-- ENDIF -->");
for (var i = 0; i < elements.length; ++i)
{
if (elements[i].tagName.toLowerCase() == 'input')
diff --git a/phpBB/styles/subsilver2/template/overall_footer.html b/phpBB/styles/subsilver2/template/overall_footer.html
index 64201ff2b9..187d0f4366 100644
--- a/phpBB/styles/subsilver2/template/overall_footer.html
+++ b/phpBB/styles/subsilver2/template/overall_footer.html
@@ -14,7 +14,7 @@
<div id="wrapfooter">
<!-- IF U_ACP --><span class="gensmall">[ <a href="{U_ACP}">{L_ACP}</a> ]</span><br /><br /><!-- ENDIF -->
- <span class="copyright">Powered by <a href="http://www.phpbb.com/">phpBB</a> &copy; 2000, 2002, 2005, 2007 phpBB Group
+ <span class="copyright">Powered by <a href="http://www.phpbb.com/">phpBB</a> &copy; phpBB Group
<!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
<!-- IF DEBUG_OUTPUT --><br /><bdo dir="ltr">[ {DEBUG_OUTPUT} ]</bdo><!-- ENDIF --></span>
</div>
diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html
index a8a53abd24..874beb8e2b 100644
--- a/phpBB/styles/subsilver2/template/overall_header.html
+++ b/phpBB/styles/subsilver2/template/overall_header.html
@@ -11,7 +11,7 @@
<meta name="copyright" content="2000, 2002, 2005, 2007 phpBB Group" />
<meta name="keywords" content="" />
<meta name="description" content="" />
-<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
+<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9" />
{META}
<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>
diff --git a/phpBB/styles/subsilver2/template/template.cfg b/phpBB/styles/subsilver2/template/template.cfg
index b6765268bc..edfc2d43f2 100644
--- a/phpBB/styles/subsilver2/template/template.cfg
+++ b/phpBB/styles/subsilver2/template/template.cfg
@@ -19,5 +19,5 @@
# General Information about this template
name = subsilver2
copyright = &copy; phpBB Group, 2003
-version = 3.0.7
+version = 3.0.8
diff --git a/phpBB/styles/subsilver2/theme/theme.cfg b/phpBB/styles/subsilver2/theme/theme.cfg
index 7f6bfd9a12..a6ac5f337c 100644
--- a/phpBB/styles/subsilver2/theme/theme.cfg
+++ b/phpBB/styles/subsilver2/theme/theme.cfg
@@ -21,7 +21,7 @@
# General Information about this theme
name = subsilver2
copyright = &copy; phpBB Group, 2003
-version = 3.0.7
+version = 3.0.8
# Some configuration options
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
new file mode 100644
index 0000000000..78c7fdd93a
--- /dev/null
+++ b/phpunit.xml.dist
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<phpunit backupGlobals="true"
+ backupStaticAttributes="true"
+ colors="false"
+ convertErrorsToExceptions="true"
+ convertNoticesToExceptions="true"
+ convertWarningsToExceptions="true"
+ processIsolation="false"
+ stopOnFailure="false"
+ syntaxCheck="false"
+ bootstrap="tests/bootstrap.php"
+>
+ <testsuites>
+ <testsuite name="phpBB Test Suite">
+ <directory suffix="_test.php">./tests/</directory>
+ </testsuite>
+ </testsuites>
+
+ <filter>
+ <blacklist>
+ <directory>./tests/</directory>
+ </blacklist>
+ </filter>
+</phpunit>
diff --git a/tests/RUNNING_TESTS.txt b/tests/RUNNING_TESTS.txt
index f1b40f71ad..ac07978d3e 100644
--- a/tests/RUNNING_TESTS.txt
+++ b/tests/RUNNING_TESTS.txt
@@ -1,33 +1,57 @@
Running Tests
--------------
+=============
Prerequisites
--------------
+=============
PHPUnit
-=======
+-------
-phpBB unit tests use PHPUnit framework. Version 3.3 or better is required
+phpBB unit tests use PHPUnit framework. Version 3.5 or better is required
to run the tests. PHPUnit prefers to be installed via PEAR; refer to
http://www.phpunit.de/ for more information.
PHP extensions
-==============
+--------------
Unit tests use several PHP extensions that board code does not use. Currently
the following PHP extensions must be installed and enabled to run unit tests:
- ctype
+Database Tests
+--------------
+By default all tests requiring a database connection will use sqlite. If you
+do not have sqlite installed the tests will be skipped. If you wish to run the
+tests on a different database you have to create a test_config.php file within
+your tests directory following the same format as phpBB's config.php. An example
+for mysqli can be found below. More information on configuration options can be
+found on the wiki (see below).
+
+ <?php
+ $dbms = 'mysqli';
+ $dbhost = 'localhost';
+ $dbport = '';
+ $dbname = 'database';
+ $dbuser = 'user';
+ $dbpasswd = 'password';
+
+Alternatively you can specify parameters in the environment, so e.g. the following
+will run phpunit with the same parameters as in the shown test_config.php file:
+
+ $ PHPBB_TEST_DBMS='mysqli' PHPBB_TEST_DBHOST='localhost' \
+ PHPBB_TEST_DBNAME='database' PHPBB_TEST_DBUSER='user' \
+ PHPBB_TEST_DBPASSWD='password' phpunit
+
Running
--------
+=======
-Once the prerequisites are installed, run the tests from tests directory:
+Once the prerequisites are installed, run the tests from the project root directory (above phpBB):
-$ phpunit all_tests.php
+ $ phpunit
More Information
-----------------
+================
Further information is available on phpbb wiki:
http://wiki.phpbb.com/display/DEV/Unit+Tests
diff --git a/tests/all_tests.php b/tests/all_tests.php
deleted file mode 100644
index d1d711c4d7..0000000000
--- a/tests/all_tests.php
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-/**
-*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-error_reporting(E_ALL);
-
-if (!defined('PHPUnit_MAIN_METHOD'))
-{
- define('PHPUnit_MAIN_METHOD', 'phpbb_all_tests::main');
-}
-
-require_once 'test_framework/framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-
-require_once 'utf/all_tests.php';
-require_once 'request/all_tests.php';
-require_once 'security/all_tests.php';
-require_once 'template/all_tests.php';
-require_once 'text_processing/all_tests.php';
-require_once 'dbal/all_tests.php';
-require_once 'regex/all_tests.php';
-require_once 'network/all_tests.php';
-require_once 'random/all_tests.php';
-
-// exclude the test directory from code coverage reports
-if (version_compare(PHPUnit_Runner_Version::id(), '3.5.0') >= 0)
-{
- PHP_CodeCoverage_Filter::getInstance()->addDirectoryToBlacklist('./');
-}
-else
-{
- PHPUnit_Util_Filter::addDirectoryToFilter('./');
-}
-
-class phpbb_all_tests
-{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('phpBB');
-
- $suite->addTest(phpbb_utf_all_tests::suite());
- $suite->addTest(phpbb_request_all_tests::suite());
- $suite->addTest(phpbb_security_all_tests::suite());
- $suite->addTest(phpbb_template_all_tests::suite());
- $suite->addTest(phpbb_text_processing_all_tests::suite());
- $suite->addTest(phpbb_dbal_all_tests::suite());
- $suite->addTest(phpbb_regex_all_tests::suite());
- $suite->addTest(phpbb_network_all_tests::suite());
- $suite->addTest(phpbb_random_all_tests::suite());
-
- return $suite;
- }
-}
-
-if (PHPUnit_MAIN_METHOD == 'phpbb_all_tests::main')
-{
- phpbb_all_tests::main();
-}
-
diff --git a/tests/test_framework/framework.php b/tests/bootstrap.php
index 3a11cc6df9..99f145e427 100644
--- a/tests/test_framework/framework.php
+++ b/tests/bootstrap.php
@@ -8,10 +8,12 @@
*/
define('IN_PHPBB', true);
-$phpbb_root_path = '../phpBB/';
+$phpbb_root_path = 'phpBB/';
$phpEx = 'php';
$table_prefix = '';
+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', '>='))
{
@@ -25,19 +27,6 @@ else
require_once $phpbb_root_path . 'includes/constants.php';
-// require at least PHPUnit 3.3.0
-require_once 'PHPUnit/Runner/Version.php';
-if (version_compare(PHPUnit_Runner_Version::id(), '3.3.0', '<'))
-{
- trigger_error('PHPUnit >= 3.3.0 required');
-}
-
-if (version_compare(PHPUnit_Runner_Version::id(), '3.5.0', '<'))
-{
- require_once 'PHPUnit/Framework.php';
- require_once 'PHPUnit/Extensions/Database/TestCase.php';
-}
-
require_once 'test_framework/phpbb_test_case_helpers.php';
require_once 'test_framework/phpbb_test_case.php';
require_once 'test_framework/phpbb_database_test_case.php';
diff --git a/tests/dbal/all_tests.php b/tests/dbal/all_tests.php
deleted file mode 100644
index 7aee0f6b16..0000000000
--- a/tests/dbal/all_tests.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/**
-*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-if (!defined('PHPUnit_MAIN_METHOD'))
-{
- define('PHPUnit_MAIN_METHOD', 'phpbb_dbal_all_tests::main');
-}
-
-require_once 'test_framework/framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-
-require_once 'dbal/dbal.php';
-
-class phpbb_dbal_all_tests
-{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('phpBB Database Abstraction Layer');
-
- $suite->addTestSuite('phpbb_dbal_test');
-
- return $suite;
- }
-}
-
-if (PHPUnit_MAIN_METHOD == 'phpbb_dbal_all_tests::main')
-{
- phpbb_dbal_all_tests::main();
-}
diff --git a/tests/dbal/fixtures/config.xml b/tests/dbal/fixtures/config.xml
new file mode 100644
index 0000000000..019f582a91
--- /dev/null
+++ b/tests/dbal/fixtures/config.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_config">
+ <column>config_name</column>
+ <column>config_value</column>
+ <column>is_dynamic</column>
+ <row>
+ <value>config1</value>
+ <value>foo</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>config2</value>
+ <value>bar</value>
+ <value>1</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/dbal/dbal.php b/tests/dbal/select_test.php
index 663323ad61..987de5cbff 100644
--- a/tests/dbal/dbal.php
+++ b/tests/dbal/select_test.php
@@ -7,10 +7,9 @@
*
*/
-require_once 'test_framework/framework.php';
-require_once '../phpBB/includes/functions.php';
+require_once __DIR__ . '/../../phpBB/includes/functions.php';
-class phpbb_dbal_test extends phpbb_database_test_case
+class phpbb_dbal_select_test extends phpbb_database_test_case
{
public function getDataSet()
{
@@ -318,174 +317,4 @@ class phpbb_dbal_test extends phpbb_database_test_case
$db->sql_freeresult($result);
}
-
- public static function build_array_insert_data()
- {
- return array(
- array(array(
- 'config_name' => 'test_version',
- 'config_value' => '0.0.0',
- 'is_dynamic' => 1,
- )),
- array(array(
- 'config_name' => 'second config',
- 'config_value' => '10',
- 'is_dynamic' => 0,
- )),
- );
- }
-
- /**
- * @dataProvider build_array_insert_data
- */
- public function test_build_array_insert($sql_ary)
- {
- $db = $this->new_dbal();
-
- $sql = 'INSERT INTO phpbb_config ' . $db->sql_build_array('INSERT', $sql_ary);
- $result = $db->sql_query($sql);
-
- $sql = "SELECT *
- FROM phpbb_config
- WHERE config_name = '" . $sql_ary['config_name'] . "'";
- $result = $db->sql_query_limit($sql, 1);
-
- $this->assertEquals($sql_ary, $db->sql_fetchrow($result));
-
- $db->sql_freeresult($result);
- }
-
- public static function delete_data()
- {
- return array(
- array(
- "WHERE config_name = 'test_version'",
- array(
- array(
- 'config_name' => 'second config',
- 'config_value' => '10',
- 'is_dynamic' => 0,
- ),
- ),
- ),
- array(
- '',
- array(),
- ),
- );
- }
-
- /**
- * @dataProvider delete_data
- */
- public function test_delete($where, $expected)
- {
- $db = $this->new_dbal();
-
- $sql = 'DELETE FROM phpbb_config
- ' . $where;
- $result = $db->sql_query($sql);
-
- $sql = 'SELECT *
- FROM phpbb_config';
- $result = $db->sql_query($sql);
-
- $this->assertEquals($expected, $db->sql_fetchrowset($result));
-
- $db->sql_freeresult($result);
- }
-
- public function test_multiple_insert()
- {
- $db = $this->new_dbal();
-
- $batch_ary = array(
- array(
- 'config_name' => 'batch one',
- 'config_value' => 'b1',
- 'is_dynamic' => 0,
- ),
- array(
- 'config_name' => 'batch two',
- 'config_value' => 'b2',
- 'is_dynamic' => 1,
- ),
- );
-
- $result = $db->sql_multi_insert('phpbb_config', $batch_ary);
-
- $sql = 'SELECT *
- FROM phpbb_config
- ORDER BY config_name ASC';
- $result = $db->sql_query($sql);
-
- $this->assertEquals($batch_ary, $db->sql_fetchrowset($result));
-
- $db->sql_freeresult($result);
- }
-
- public static function update_data()
- {
- return array(
- array(
- array(
- 'config_value' => '20',
- 'is_dynamic' => 0,
- ),
- " WHERE config_name = 'batch one'",
- array(
- array(
- 'config_name' => 'batch one',
- 'config_value' => '20',
- 'is_dynamic' => 0,
- ),
- array(
- 'config_name' => 'batch two',
- 'config_value' => 'b2',
- 'is_dynamic' => 1,
- ),
- ),
- ),
- array(
- array(
- 'config_value' => '0',
- 'is_dynamic' => 1,
- ),
- '',
- array(
- array(
- 'config_name' => 'batch one',
- 'config_value' => '0',
- 'is_dynamic' => 1,
- ),
- array(
- 'config_name' => 'batch two',
- 'config_value' => '0',
- 'is_dynamic' => 1,
- ),
- ),
- ),
- );
- }
-
- /**
- * @dataProvider update_data
- */
- public function test_update($sql_ary, $where, $expected)
- {
- $db = $this->new_dbal();
-
- $sql = 'UPDATE phpbb_config
- SET ' . $db->sql_build_array('UPDATE', $sql_ary) . $where;
- $result = $db->sql_query($sql);
-
- $sql = 'SELECT *
- FROM phpbb_config
- ORDER BY config_name ASC';
- $result = $db->sql_query($sql);
-
- $this->assertEquals($expected, $db->sql_fetchrowset($result));
-
- $db->sql_freeresult($result);
- }
}
diff --git a/tests/dbal/write_test.php b/tests/dbal/write_test.php
new file mode 100644
index 0000000000..a24b6efcc4
--- /dev/null
+++ b/tests/dbal/write_test.php
@@ -0,0 +1,171 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2008 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+require_once __DIR__ . '/../../phpBB/includes/functions.php';
+
+class phpbb_dbal_write_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/config.xml');
+ }
+
+ public static function build_array_insert_data()
+ {
+ return array(
+ array(array(
+ 'config_name' => 'test_version',
+ 'config_value' => '0.0.0',
+ 'is_dynamic' => 1,
+ )),
+ array(array(
+ 'config_name' => 'second config',
+ 'config_value' => '10',
+ 'is_dynamic' => 0,
+ )),
+ );
+ }
+
+ /**
+ * @dataProvider build_array_insert_data
+ */
+ public function test_build_array_insert($sql_ary)
+ {
+ $db = $this->new_dbal();
+
+ $sql = 'INSERT INTO phpbb_config ' . $db->sql_build_array('INSERT', $sql_ary);
+ $result = $db->sql_query($sql);
+
+ $sql = "SELECT *
+ FROM phpbb_config
+ WHERE config_name = '" . $sql_ary['config_name'] . "'";
+ $result = $db->sql_query_limit($sql, 1);
+
+ $this->assertEquals($sql_ary, $db->sql_fetchrow($result));
+
+ $db->sql_freeresult($result);
+ }
+
+ public function test_delete()
+ {
+ $db = $this->new_dbal();
+
+ $sql = "DELETE FROM phpbb_config
+ WHERE config_name = 'config1'";
+ $result = $db->sql_query($sql);
+
+ $sql = 'SELECT *
+ FROM phpbb_config';
+ $result = $db->sql_query($sql);
+ $rows = $db->sql_fetchrowset($result);
+
+ $this->assertEquals(1, sizeof($rows));
+ $this->assertEquals('config2', $rows[0]['config_name']);
+
+ $db->sql_freeresult($result);
+ }
+
+ public function test_multiple_insert()
+ {
+ $db = $this->new_dbal();
+
+ // empty the table
+ $sql = 'DELETE FROM phpbb_config';
+ $db->sql_query($sql);
+
+ $batch_ary = array(
+ array(
+ 'config_name' => 'batch one',
+ 'config_value' => 'b1',
+ 'is_dynamic' => 0,
+ ),
+ array(
+ 'config_name' => 'batch two',
+ 'config_value' => 'b2',
+ 'is_dynamic' => 1,
+ ),
+ );
+
+ $result = $db->sql_multi_insert('phpbb_config', $batch_ary);
+
+ $sql = 'SELECT *
+ FROM phpbb_config
+ ORDER BY config_name ASC';
+ $result = $db->sql_query($sql);
+
+ $this->assertEquals($batch_ary, $db->sql_fetchrowset($result));
+
+ $db->sql_freeresult($result);
+ }
+
+ public static function update_data()
+ {
+ return array(
+ array(
+ array(
+ 'config_value' => '23',
+ 'is_dynamic' => 0,
+ ),
+ " WHERE config_name = 'config1'",
+ array(
+ array(
+ 'config_name' => 'config1',
+ 'config_value' => '23',
+ 'is_dynamic' => 0,
+ ),
+ array(
+ 'config_name' => 'config2',
+ 'config_value' => 'bar',
+ 'is_dynamic' => 1,
+ ),
+ ),
+ ),
+ array(
+ array(
+ 'config_value' => '0',
+ 'is_dynamic' => 1,
+ ),
+ '',
+ array(
+ array(
+ 'config_name' => 'config1',
+ 'config_value' => '0',
+ 'is_dynamic' => 1,
+ ),
+ array(
+ 'config_name' => 'config2',
+ 'config_value' => '0',
+ 'is_dynamic' => 1,
+ ),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider update_data
+ */
+ public function test_update($sql_ary, $where, $expected)
+ {
+ $db = $this->new_dbal();
+
+ $sql = 'UPDATE phpbb_config
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . $where;
+ $result = $db->sql_query($sql);
+
+ $sql = 'SELECT *
+ FROM phpbb_config
+ ORDER BY config_name ASC';
+ $result = $db->sql_query($sql);
+
+ $this->assertEquals($expected, $db->sql_fetchrowset($result));
+
+ $db->sql_freeresult($result);
+ }
+}
diff --git a/tests/network/all_tests.php b/tests/network/all_tests.php
deleted file mode 100644
index b500647f81..0000000000
--- a/tests/network/all_tests.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/**
-*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-if (!defined('PHPUnit_MAIN_METHOD'))
-{
- define('PHPUnit_MAIN_METHOD', 'phpbb_network_all_tests::main');
-}
-
-require_once 'test_framework/framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-
-require_once 'network/checkdnsrr.php';
-
-class phpbb_network_all_tests
-{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('phpBB Network Functions');
-
- $suite->addTestSuite('phpbb_network_checkdnsrr_test');
-
- return $suite;
- }
-}
-
-if (PHPUnit_MAIN_METHOD == 'phpbb_network_all_tests::main')
-{
- phpbb_network_all_tests::main();
-}
diff --git a/tests/network/checkdnsrr.php b/tests/network/checkdnsrr_test.php
index 57fe2761cc..427132e508 100644
--- a/tests/network/checkdnsrr.php
+++ b/tests/network/checkdnsrr_test.php
@@ -7,8 +7,7 @@
*
*/
-require_once 'test_framework/framework.php';
-require_once '../phpBB/includes/functions.php';
+require_once __DIR__ . '/../../phpBB/includes/functions.php';
class phpbb_network_checkdnsrr_test extends phpbb_test_case
{
diff --git a/tests/random/all_tests.php b/tests/random/all_tests.php
deleted file mode 100644
index c6ffe78024..0000000000
--- a/tests/random/all_tests.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/**
-*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-if (!defined('PHPUnit_MAIN_METHOD'))
-{
- define('PHPUnit_MAIN_METHOD', 'phpbb_random_all_tests::main');
-}
-
-require_once 'test_framework/framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-
-require_once 'random/gen_rand_string.php';
-
-class phpbb_random_all_tests
-{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('phpBB Random Functions');
-
- $suite->addTestSuite('phpbb_random_gen_rand_string_test');
-
- return $suite;
- }
-}
-
-if (PHPUnit_MAIN_METHOD == 'phpbb_random_all_tests::main')
-{
- phpbb_random_all_tests::main();
-}
diff --git a/tests/random/gen_rand_string.php b/tests/random/gen_rand_string_test.php
index cd58d14ed3..fa519f134c 100644
--- a/tests/random/gen_rand_string.php
+++ b/tests/random/gen_rand_string_test.php
@@ -7,8 +7,7 @@
*
*/
-require_once 'test_framework/framework.php';
-require_once '../phpBB/includes/functions.php';
+require_once __DIR__ . '/../../phpBB/includes/functions.php';
class phpbb_random_gen_rand_string_test extends phpbb_test_case
{
diff --git a/tests/regex/all_tests.php b/tests/regex/all_tests.php
deleted file mode 100644
index 316a9d4a58..0000000000
--- a/tests/regex/all_tests.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/**
-*
-* @package testing
-* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-if (!defined('PHPUnit_MAIN_METHOD'))
-{
- define('PHPUnit_MAIN_METHOD', 'phpbb_regex_all_tests::main');
-}
-
-require_once 'test_framework/framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-
-require_once 'regex/email.php';
-require_once 'regex/ipv4.php';
-require_once 'regex/ipv6.php';
-require_once 'regex/url.php';
-
-class phpbb_regex_all_tests
-{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('phpBB Regular Expressions');
-
- $suite->addTestSuite('phpbb_regex_email_test');
- $suite->addTestSuite('phpbb_regex_ipv4_test');
- $suite->addTestSuite('phpbb_regex_ipv6_test');
- $suite->addTestSuite('phpbb_regex_url_test');
-
- return $suite;
- }
-}
-
-if (PHPUnit_MAIN_METHOD == 'phpbb_regex_all_tests::main')
-{
- phpbb_regex_all_tests::main();
-}
diff --git a/tests/regex/censor_test.php b/tests/regex/censor_test.php
new file mode 100644
index 0000000000..ae2d86e07e
--- /dev/null
+++ b/tests/regex/censor_test.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+require_once __DIR__ . '/../../phpBB/includes/functions.php';
+
+class phpbb_regex_censor_test extends phpbb_test_case
+{
+ public function censor_test_data()
+ {
+ return array(
+ array('bad*word', 'bad word'),
+ array('bad***word', 'bad word'),
+ array('bad**word', 'bad word'),
+ array('*bad*word*', 'bad word'),
+ array('b*d', 'bad'),
+ array('*bad*', 'bad'),
+ array('*b*d*', 'bad'),
+ array('*b*d*', 'b d'),
+ array('b*d*word', 'bad word'),
+ array('**b**d**word**', 'bad word'),
+ array('**b**d**word**', 'the bad word catched'),
+ );
+ }
+
+ /**
+ * @dataProvider censor_test_data
+ */
+ public function test_censor($pattern, $subject)
+ {
+ $regex = get_censor_preg_expression($pattern);
+
+ $this->assertRegExp($regex, $subject);
+ }
+} \ No newline at end of file
diff --git a/tests/regex/email.php b/tests/regex/email_test.php
index 8658b8af36..5d6e207cbb 100644
--- a/tests/regex/email.php
+++ b/tests/regex/email_test.php
@@ -7,8 +7,7 @@
*
*/
-require_once 'test_framework/framework.php';
-require_once '../phpBB/includes/functions.php';
+require_once __DIR__ . '/../../phpBB/includes/functions.php';
class phpbb_regex_email_test extends phpbb_test_case
{
diff --git a/tests/regex/ipv4.php b/tests/regex/ipv4_test.php
index 9d131ad0ca..735a2c4384 100644
--- a/tests/regex/ipv4.php
+++ b/tests/regex/ipv4_test.php
@@ -7,8 +7,7 @@
*
*/
-require_once 'test_framework/framework.php';
-require_once '../phpBB/includes/functions.php';
+require_once __DIR__ . '/../../phpBB/includes/functions.php';
class phpbb_regex_ipv4_test extends phpbb_test_case
{
diff --git a/tests/regex/ipv6.php b/tests/regex/ipv6_test.php
index 3d7a72e492..187588f861 100644
--- a/tests/regex/ipv6.php
+++ b/tests/regex/ipv6_test.php
@@ -7,8 +7,7 @@
*
*/
-require_once 'test_framework/framework.php';
-require_once '../phpBB/includes/functions.php';
+require_once __DIR__ . '/../../phpBB/includes/functions.php';
class phpbb_regex_ipv6_test extends phpbb_test_case
{
diff --git a/tests/regex/url.php b/tests/regex/url_test.php
index 678b7d108f..246cbf549c 100644
--- a/tests/regex/url.php
+++ b/tests/regex/url_test.php
@@ -7,8 +7,7 @@
*
*/
-require_once 'test_framework/framework.php';
-require_once '../phpBB/includes/functions.php';
+require_once __DIR__ . '/../../phpBB/includes/functions.php';
class phpbb_regex_url_test extends phpbb_test_case
{
diff --git a/tests/request/all_tests.php b/tests/request/all_tests.php
deleted file mode 100644
index 1ee3029b36..0000000000
--- a/tests/request/all_tests.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-/**
-*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-if (!defined('PHPUnit_MAIN_METHOD'))
-{
- define('PHPUnit_MAIN_METHOD', 'phpbb_request_all_tests::main');
-}
-
-require_once 'test_framework/framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-
-require_once 'request/request_var.php';
-
-class phpbb_request_all_tests
-{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('phpBB Request Parameter Handling');
-
- $suite->addTestSuite('phpbb_request_request_var_test');
-
- return $suite;
- }
-}
-
-if (PHPUnit_MAIN_METHOD == 'phpbb_request_all_tests::main')
-{
- phpbb_request_all_tests::main();
-}
-
diff --git a/tests/request/request_var.php b/tests/request/request_var_test.php
index b1dacef3fd..0901b43920 100644
--- a/tests/request/request_var.php
+++ b/tests/request/request_var_test.php
@@ -7,8 +7,8 @@
*
*/
-require_once 'test_framework/framework.php';
-require_once '../phpBB/includes/functions.php';
+require_once __DIR__ . '/../../phpBB/includes/functions.php';
+require_once __DIR__ . '/../../phpBB/includes/utf/utf_tools.php';
class phpbb_request_request_var_test extends phpbb_test_case
{
diff --git a/tests/security/all_tests.php b/tests/security/base.php
index 8e3916733f..db9c884cf4 100644
--- a/tests/security/all_tests.php
+++ b/tests/security/base.php
@@ -7,18 +7,7 @@
*
*/
-if (!defined('PHPUnit_MAIN_METHOD'))
-{
- define('PHPUnit_MAIN_METHOD', 'phpbb_security_all_tests::main');
-}
-
-require_once 'test_framework/framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-
-require_once 'security/extract_current_page.php';
-require_once 'security/redirect.php';
-
-class phpbb_security_all_tests extends PHPUnit_Framework_TestSuite
+abstract class phpbb_security_test_base extends phpbb_test_case
{
/**
* Set up the required user object and server variables for the suites
@@ -62,25 +51,4 @@ class phpbb_security_all_tests extends PHPUnit_Framework_TestSuite
global $user;
$user = NULL;
}
-
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- // I bet there is a better method calling this... :)
- $suite = new phpbb_security_all_tests('phpBB Security Fixes');
-
- $suite->addTestSuite('phpbb_security_extract_current_page_test');
- $suite->addTestSuite('phpbb_security_redirect_test');
-
- return $suite;
- }
-}
-
-if (PHPUnit_MAIN_METHOD == 'phpbb_security_all_tests::main')
-{
- phpbb_security_all_tests::main();
}
diff --git a/tests/security/extract_current_page.php b/tests/security/extract_current_page_test.php
index 8c72fe1440..ff0ab4d1bb 100644
--- a/tests/security/extract_current_page.php
+++ b/tests/security/extract_current_page_test.php
@@ -7,12 +7,12 @@
*
*/
-require_once 'test_framework/framework.php';
+require_once __DIR__ . '/base.php';
-require_once '../phpBB/includes/functions.php';
-require_once '../phpBB/includes/session.php';
+require_once __DIR__ . '/../../phpBB/includes/functions.php';
+require_once __DIR__ . '/../../phpBB/includes/session.php';
-class phpbb_security_extract_current_page_test extends phpbb_test_case
+class phpbb_security_extract_current_page_test extends phpbb_security_test_base
{
public static function security_variables()
{
diff --git a/tests/security/redirect.php b/tests/security/redirect_test.php
index 37b0a5bb41..c53414e7df 100644
--- a/tests/security/redirect.php
+++ b/tests/security/redirect_test.php
@@ -7,12 +7,12 @@
*
*/
-require_once 'test_framework/framework.php';
+require_once __DIR__ . '/base.php';
-require_once '../phpBB/includes/functions.php';
-require_once '../phpBB/includes/session.php';
+require_once __DIR__ . '/../../phpBB/includes/functions.php';
+require_once __DIR__ . '/../../phpBB/includes/session.php';
-class phpbb_security_redirect_test extends phpbb_test_case
+class phpbb_security_redirect_test extends phpbb_security_test_base
{
public static function provider()
{
@@ -22,13 +22,15 @@ class phpbb_security_redirect_test extends phpbb_test_case
array('bad://localhost/phpBB/index.php', 'Tried to redirect to potentially insecure url.', false),
array('http://www.otherdomain.com/somescript.php', false, 'http://localhost/phpBB'),
array("http://localhost/phpBB/memberlist.php\n\rConnection: close", 'Tried to redirect to potentially insecure url.', false),
- array('javascript:test', false, 'http://localhost/phpBB/../tests/javascript:test'),
+ array('javascript:test', false, 'http://localhost/phpBB/../javascript:test'),
array('http://localhost/phpBB/index.php;url=', 'Tried to redirect to potentially insecure url.', false),
);
}
protected function setUp()
{
+ parent::setUp();
+
$GLOBALS['config'] = array(
'force_server_vars' => '0',
);
diff --git a/tests/template/all_tests.php b/tests/template/all_tests.php
deleted file mode 100644
index ea258c1680..0000000000
--- a/tests/template/all_tests.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/**
-*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-if (!defined('PHPUnit_MAIN_METHOD'))
-{
- define('PHPUnit_MAIN_METHOD', 'phpbb_template_all_tests::main');
-}
-
-require_once 'test_framework/framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-
-require_once 'template/template.php';
-
-class phpbb_template_all_tests
-{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('phpBB Template Engine');
-
- $suite->addTestSuite('phpbb_template_template_test');
-
- return $suite;
- }
-}
-
-if (PHPUnit_MAIN_METHOD == 'phpbb_template_all_tests::main')
-{
- phpbb_template_all_tests::main();
-}
diff --git a/tests/template/template.php b/tests/template/template_test.php
index 024d3712f7..35df17e4c6 100644
--- a/tests/template/template.php
+++ b/tests/template/template_test.php
@@ -7,9 +7,8 @@
*
*/
-require_once 'test_framework/framework.php';
-
-require_once '../phpBB/includes/template.php';
+require_once __DIR__ . '/../../phpBB/includes/functions.php';
+require_once __DIR__ . '/../../phpBB/includes/template.php';
class phpbb_template_template_test extends phpbb_test_case
{
@@ -36,6 +35,7 @@ class phpbb_template_template_test extends phpbb_test_case
// reset the error level even when an error occured
// PHPUnit turns trigger_error into exceptions as well
error_reporting($error_level);
+ ob_end_clean();
throw $exception;
}
diff --git a/tests/template/templates/_dummy_include.php b/tests/template/templates/_dummy_include.php
deleted file mode 100644
index 1de5dddf59..0000000000
--- a/tests/template/templates/_dummy_include.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-
-echo "testing included php";
diff --git a/tests/template/templates/_dummy_include.php.inc b/tests/template/templates/_dummy_include.php.inc
new file mode 100644
index 0000000000..aacb6b2045
--- /dev/null
+++ b/tests/template/templates/_dummy_include.php.inc
@@ -0,0 +1,3 @@
+<?php
+// extension is .php.inc so PHPUnit ignores it
+echo "testing included php";
diff --git a/tests/template/templates/includephp.html b/tests/template/templates/includephp.html
index 3e13fa33fa..117d4273f0 100644
--- a/tests/template/templates/includephp.html
+++ b/tests/template/templates/includephp.html
@@ -1 +1 @@
-<!-- INCLUDEPHP ../templates/_dummy_include.php -->
+<!-- INCLUDEPHP ../templates/_dummy_include.php.inc -->
diff --git a/tests/test_framework/phpbb_database_test_case.php b/tests/test_framework/phpbb_database_test_case.php
index f6bf420ebc..9752ec2fe6 100644
--- a/tests/test_framework/phpbb_database_test_case.php
+++ b/tests/test_framework/phpbb_database_test_case.php
@@ -9,14 +9,33 @@
abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_TestCase
{
+ private static $already_connected;
+
protected $test_case_helpers;
- public function init_test_case_helpers()
+ public function __construct($name = NULL, array $data = array(), $dataName = '')
+ {
+ parent::__construct($name, $data, $dataName);
+ $this->backupStaticAttributesBlacklist += array(
+ 'PHP_CodeCoverage' => array('instance'),
+ 'PHP_CodeCoverage_Filter' => array('instance'),
+ 'PHP_CodeCoverage_Util' => array('ignoredLines', 'templateMethods'),
+ 'PHP_Timer' => array('startTimes',),
+ 'PHP_Token_Stream' => array('customTokens'),
+ 'PHP_Token_Stream_CachingFactory' => array('cache'),
+
+ 'phpbb_database_test_case' => array('already_connected'),
+ );
+ }
+
+ public function get_test_case_helpers()
{
if (!$this->test_case_helpers)
{
$this->test_case_helpers = new phpbb_test_case_helpers($this);
}
+
+ return $this->test_case_helpers;
}
public function get_dbms_data($dbms)
@@ -50,7 +69,7 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
'mssqlnative' => array(
'SCHEMA' => 'mssql',
'DELIM' => 'GO',
- 'PDO' => 'odbc',
+ 'PDO' => 'sqlsrv',
),
'oracle' => array(
'SCHEMA' => 'oracle',
@@ -79,6 +98,50 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
}
}
+ public function get_database_config()
+ {
+ if (isset($_SERVER['PHPBB_TEST_DBMS']))
+ {
+ return array(
+ 'dbms' => isset($_SERVER['PHPBB_TEST_DBMS']) ? $_SERVER['PHPBB_TEST_DBMS'] : '',
+ 'dbhost' => isset($_SERVER['PHPBB_TEST_DBHOST']) ? $_SERVER['PHPBB_TEST_DBHOST'] : '',
+ 'dbport' => isset($_SERVER['PHPBB_TEST_DBPORT']) ? $_SERVER['PHPBB_TEST_DBPORT'] : '',
+ 'dbname' => isset($_SERVER['PHPBB_TEST_DBNAME']) ? $_SERVER['PHPBB_TEST_DBNAME'] : '',
+ 'dbuser' => isset($_SERVER['PHPBB_TEST_DBUSER']) ? $_SERVER['PHPBB_TEST_DBUSER'] : '',
+ 'dbpasswd' => isset($_SERVER['PHPBB_TEST_DBPASSWD']) ? $_SERVER['PHPBB_TEST_DBPASSWD'] : '',
+ );
+ }
+ else if (file_exists(__DIR__ . '/../test_config.php'))
+ {
+ include(__DIR__ . '/../test_config.php');
+
+ return array(
+ 'dbms' => $dbms,
+ 'dbhost' => $dbhost,
+ 'dbport' => $dbport,
+ 'dbname' => $dbname,
+ 'dbuser' => $dbuser,
+ 'dbpasswd' => $dbpasswd,
+ );
+ }
+ else if (extension_loaded('sqlite') && version_compare(PHPUnit_Runner_Version::id(), '3.4.15', '>='))
+ {
+ // Silently use sqlite
+ return array(
+ 'dbms' => 'sqlite',
+ 'dbhost' => __DIR__ . '/../phpbb_unit_tests.sqlite2', // filename
+ 'dbport' => '',
+ 'dbname' => '',
+ 'dbuser' => '',
+ 'dbpasswd' => '',
+ );
+ }
+ else
+ {
+ $this->markTestSkipped('Missing test_config.php: See first error.');
+ }
+ }
+
// NOTE: This function is not the same as split_sql_file from functions_install
public function split_sql_file($sql, $dbms)
{
@@ -99,7 +162,8 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
if ($dbms == 'sqlite')
{
- // trim # off query to satisfy sqlite
+ // remove comment lines starting with # - they are not proper sqlite
+ // syntax and break sqlite2
foreach ($data as $i => $query)
{
$data[$i] = preg_replace('/^#.*$/m', "\n", $query);
@@ -109,79 +173,198 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
return $data;
}
- public function getConnection()
+ /**
+ * Retrieves a list of all tables from the database.
+ *
+ * @param PDO $pdo
+ * @param string $dbms
+ * @return array(string)
+ */
+ function get_tables($pdo, $dbms)
{
- static $already_connected;
+ switch ($pdo)
+ {
+ case 'mysql':
+ case 'mysql4':
+ case 'mysqli':
+ $sql = 'SHOW TABLES';
+ break;
+
+ case 'sqlite':
+ $sql = 'SELECT name
+ FROM sqlite_master
+ WHERE type = "table"';
+ break;
+
+ case 'mssql':
+ case 'mssql_odbc':
+ case 'mssqlnative':
+ $sql = "SELECT name
+ FROM sysobjects
+ WHERE type='U'";
+ break;
+
+ case 'postgres':
+ $sql = 'SELECT relname
+ FROM pg_stat_user_tables';
+ break;
- $this->init_test_case_helpers();
- $database_config = $this->test_case_helpers->get_database_config();
+ case 'firebird':
+ $sql = 'SELECT rdb$relation_name
+ FROM rdb$relations
+ WHERE rdb$view_source is null
+ AND rdb$system_flag = 0';
+ break;
- $dbms_data = $this->get_dbms_data($database_config['dbms']);
+ case 'oracle':
+ $sql = 'SELECT table_name
+ FROM USER_TABLES';
+ break;
+ }
+
+ $result = $pdo->query($sql);
- if ($already_connected)
+ $tables = array();
+ while ($row = $result->fetch(PDO::FETCH_NUM))
{
- if ($database_config['dbms'] == 'sqlite')
- {
- $pdo = new PDO($dbms_data['PDO'] . ':' . $database_config['dbhost']);
- }
- else
- {
- $pdo = new PDO($dbms_data['PDO'] . ':host=' . $database_config['dbhost'] . ';dbname=' . $database_config['dbname'], $database_config['dbuser'], $database_config['dbpasswd']);
- }
+ $tables[] = current($row);
}
- else
+
+ return $tables;
+ }
+
+ /**
+ * Returns a PDO connection for the configured database.
+ *
+ * @param array $config The database configuration
+ * @param array $dbms Information on the used DBMS.
+ * @param bool $use_db Whether the DSN should be tied to a
+ * particular database making it impossible
+ * to delete that database.
+ * @return PDO The PDO database connection.
+ */
+ public function new_pdo($config, $dbms, $use_db)
+ {
+ $dsn = $dbms['PDO'] . ':';
+
+ switch ($dbms['PDO'])
{
- if ($database_config['dbms'] == 'sqlite')
- {
- // delete existing database
- if (file_exists($database_config['dbhost']))
+ case 'sqlite2':
+ $dsn .= $config['dbhost'];
+ break;
+
+ case 'sqlsrv':
+ // prefix the hostname (or DSN) with Server= so using just (local)\SQLExpress
+ // works for example, further parameters can still be appended using ;x=y
+ $dsn .= 'Server=';
+ // no break -> rest like ODBC
+ case 'odbc':
+ // for ODBC assume dbhost is a suitable DSN
+ // e.g. Driver={SQL Server Native Client 10.0};Server=(local)\SQLExpress;
+ $dsn .= $config['dbhost'];
+
+ if ($use_db)
{
- unlink($database_config['dbhost']);
+ $dsn .= ';Database=' . $config['dbname'];
}
+ break;
- $pdo = new PDO($dbms_data['PDO'] . ':' . $database_config['dbhost']);
- }
- else
- {
- $pdo = new PDO($dbms_data['PDO'] . ':host=' . $database_config['dbhost'] . ';', $database_config['dbuser'], $database_config['dbpasswd']);try
+ default:
+ $dsn .= 'host=' . $config['dbhost'];
+
+ if ($use_db)
{
- $pdo->exec('DROP DATABASE ' . $database_config['dbname']);
+ $dsn .= ';dbname=' . $config['dbname'];
}
- catch (PDOException $e){} // ignore non existent db
-
- $pdo->exec('CREATE DATABASE ' . $database_config['dbname']);
+ break;
+ }
- $pdo = new PDO($dbms_data['PDO'] . ':host=' . $database_config['dbhost'] . ';dbname=' . $database_config['dbname'], $database_config['dbuser'], $database_config['dbpasswd']);
- }
+ $pdo = new PDO($dsn, $config['dbuser'], $config['dbpasswd']);;
- // good for debug
- // $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+ // good for debug
+ // $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- if ($database_config['dbms'] == 'mysql')
- {
- $sth = $pdo->query('SELECT VERSION() AS version');
- $row = $sth->fetch(PDO::FETCH_ASSOC);
+ return $pdo;
+ }
- if (version_compare($row['version'], '4.1.3', '>='))
+ private function recreate_db($config, $dbms)
+ {
+ switch ($config['dbms'])
+ {
+ case 'sqlite':
+ if (file_exists($config['dbhost']))
{
- $dbms_data['SCHEMA'] .= '_41';
+ unlink($config['dbhost']);
}
- else
+ break;
+
+ default:
+ $pdo = $this->new_pdo($config, $dbms, false);
+
+ try
{
- $dbms_data['SCHEMA'] .= '_40';
+ $pdo->exec('DROP DATABASE ' . $config['dbname']);
}
+ catch (PDOException $e)
+ {
+ // try to delete all tables if dropping the database was not possible.
+ foreach ($this->get_tables() as $table)
+ {
+ try
+ {
+ $pdo->exec('DROP TABLE ' . $table);
+ }
+ catch (PDOException $e){} // ignore non-existent tables
+ }
+ }
- unset($row, $sth);
- }
+ $pdo->exec('CREATE DATABASE ' . $config['dbname']);
+ break;
+ }
+ }
- $sql_query = $this->split_sql_file(file_get_contents("../phpBB/install/schemas/{$dbms_data['SCHEMA']}_schema.sql"), $database_config['dbms']);
+ private function load_schema($pdo, $config, $dbms)
+ {
+ if ($config['dbms'] == 'mysql')
+ {
+ $sth = $pdo->query('SELECT VERSION() AS version');
+ $row = $sth->fetch(PDO::FETCH_ASSOC);
- foreach ($sql_query as $sql)
+ if (version_compare($row['version'], '4.1.3', '>='))
+ {
+ $dbms['SCHEMA'] .= '_41';
+ }
+ else
{
- $pdo->exec($sql);
+ $dbms['SCHEMA'] .= '_40';
}
+ }
+
+ $sql = $this->split_sql_file(file_get_contents(__DIR__ . "/../../phpBB/install/schemas/{$dbms['SCHEMA']}_schema.sql"), $config['dbms']);
+
+ foreach ($sql as $query)
+ {
+ $pdo->exec($query);
+ }
+ }
+
+ public function getConnection()
+ {
+ $config = $this->get_database_config();
+ $dbms = $this->get_dbms_data($config['dbms']);
+
+ if (!self::$already_connected)
+ {
+ $this->recreate_db($config, $dbms);
+ }
+
+ $pdo = $this->new_pdo($config, $dbms, true);
- $already_connected = true;
+ if (!self::$already_connected)
+ {
+ $this->load_schema($pdo, $config, $dbms);
+
+ self::$already_connected = true;
}
return $this->createDefaultDBConnection($pdo, 'testdb');
@@ -189,13 +372,20 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
public function new_dbal()
{
- $this->init_test_case_helpers();
- return $this->test_case_helpers->new_dbal();
+ global $phpbb_root_path, $phpEx;
+
+ $config = $this->get_database_config();
+
+ require_once __DIR__ . '/../../phpBB/includes/db/' . $config['dbms'] . '.php';
+ $dbal = 'dbal_' . $config['dbms'];
+ $db = new $dbal();
+ $db->sql_connect($config['dbhost'], $config['dbuser'], $config['dbpasswd'], $config['dbname'], $config['dbport']);
+
+ return $db;
}
public function setExpectedTriggerError($errno, $message = '')
{
- $this->init_test_case_helpers();
- $this->test_case_helpers->setExpectedTriggerError($errno, $message);
+ $this->get_test_case_helpers()->setExpectedTriggerError($errno, $message);
}
}
diff --git a/tests/test_framework/phpbb_test_case.php b/tests/test_framework/phpbb_test_case.php
index af867b29ff..f189da3671 100644
--- a/tests/test_framework/phpbb_test_case.php
+++ b/tests/test_framework/phpbb_test_case.php
@@ -11,17 +11,33 @@ class phpbb_test_case extends PHPUnit_Framework_TestCase
{
protected $test_case_helpers;
- public function init_test_case_helpers()
+ public function __construct($name = NULL, array $data = array(), $dataName = '')
+ {
+ parent::__construct($name, $data, $dataName);
+ $this->backupStaticAttributesBlacklist += array(
+ 'PHP_CodeCoverage' => array('instance'),
+ 'PHP_CodeCoverage_Filter' => array('instance'),
+ 'PHP_CodeCoverage_Util' => array('ignoredLines', 'templateMethods'),
+ 'PHP_Timer' => array('startTimes',),
+ 'PHP_Token_Stream' => array('customTokens'),
+ 'PHP_Token_Stream_CachingFactory' => array('cache'),
+
+ 'phpbb_database_test_case' => array('already_connected'),
+ );
+ }
+
+ public function get_test_case_helpers()
{
if (!$this->test_case_helpers)
{
$this->test_case_helpers = new phpbb_test_case_helpers($this);
}
+
+ return $this->test_case_helpers;
}
public function setExpectedTriggerError($errno, $message = '')
{
- $this->init_test_case_helpers();
- $this->test_case_helpers->setExpectedTriggerError($errno, $message);
+ $this->get_test_case_helpers()->setExpectedTriggerError($errno, $message);
}
}
diff --git a/tests/test_framework/phpbb_test_case_helpers.php b/tests/test_framework/phpbb_test_case_helpers.php
index 7c026e496e..0acdce32e0 100644
--- a/tests/test_framework/phpbb_test_case_helpers.php
+++ b/tests/test_framework/phpbb_test_case_helpers.php
@@ -18,74 +18,6 @@ class phpbb_test_case_helpers
$this->test_case = $test_case;
}
- public function get_database_config()
- {
- static $show_error = true;
-
- if (file_exists('test_config.php'))
- {
- include('test_config.php');
-
- return array(
- 'dbms' => $dbms,
- 'dbhost' => $dbhost,
- 'dbport' => $dbport,
- 'dbname' => $dbname,
- 'dbuser' => $dbuser,
- 'dbpasswd' => $dbpasswd,
- );
- }
- else if (extension_loaded('sqlite') && version_compare(PHPUnit_Runner_Version::id(), '3.4.15', '>='))
- {
- // Silently use sqlite
- return array(
- 'dbms' => 'sqlite',
- 'dbhost' => 'phpbb_unit_tests.sqlite2', // filename
- 'dbport' => '',
- 'dbname' => '',
- 'dbuser' => '',
- 'dbpasswd' => '',
- );
- }
- else
- {
- if ($show_error)
- {
- $show_error = false;
- }
- else
- {
- $this->test_case->markTestSkipped('Missing test_config.php: See first error.');
- return;
- }
-
- trigger_error("You have to create a test_config.php like this:
-\"<?php
-\$dbms = 'mysqli';
-\$dbhost = 'localhost';
-\$dbport = '';
-\$dbname = 'database';
-\$dbuser = 'user';
-\$dbpasswd = 'password';
-\"
-
-NOTE: The database is dropped and recreated with the phpbb-db-schema! Do NOT specify a database with important data.", E_USER_ERROR);
- }
- }
-
- public function new_dbal()
- {
- global $phpbb_root_path, $phpEx;
- $config = $this->get_database_config();
-
- require_once '../phpBB/includes/db/' . $config['dbms'] . '.php';
- $dbal = 'dbal_' . $config['dbms'];
- $db = new $dbal();
- $db->sql_connect($config['dbhost'], $config['dbuser'], $config['dbpasswd'], $config['dbname'], $config['dbport']);
-
- return $db;
- }
-
public function setExpectedTriggerError($errno, $message = '')
{
$exceptionName = '';
diff --git a/tests/text_processing/all_tests.php b/tests/text_processing/all_tests.php
deleted file mode 100644
index 5e759c72ee..0000000000
--- a/tests/text_processing/all_tests.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-/**
-*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-if (!defined('PHPUnit_MAIN_METHOD'))
-{
- define('PHPUnit_MAIN_METHOD', 'phpbb_text_processing_all_tests::main');
-}
-
-require_once 'test_framework/framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-
-require_once 'text_processing/make_clickable.php';
-
-class phpbb_text_processing_all_tests
-{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('phpBB Text Processing Tools');
-
- $suite->addTestSuite('phpbb_text_processing_make_clickable_test');
-
- return $suite;
- }
-}
-
-if (PHPUnit_MAIN_METHOD == 'phpbb_text_processing_all_tests::main')
-{
- phpbb_text_processing_all_tests::main();
-}
-
diff --git a/tests/text_processing/make_clickable.php b/tests/text_processing/make_clickable_test.php
index a667dd705e..75a35daf82 100644
--- a/tests/text_processing/make_clickable.php
+++ b/tests/text_processing/make_clickable_test.php
@@ -7,10 +7,8 @@
*
*/
-require_once 'test_framework/framework.php';
-
-require_once '../phpBB/includes/functions.php';
-require_once '../phpBB/includes/functions_content.php';
+require_once __DIR__ . '/../../phpBB/includes/functions.php';
+require_once __DIR__ . '/../../phpBB/includes/functions_content.php';
class phpbb_text_processing_make_clickable_test extends phpbb_test_case
{
diff --git a/tests/utf/all_tests.php b/tests/utf/all_tests.php
deleted file mode 100644
index 0d5d44d695..0000000000
--- a/tests/utf/all_tests.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-/**
-*
-* @package testing
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-if (!defined('PHPUnit_MAIN_METHOD'))
-{
- define('PHPUnit_MAIN_METHOD', 'phpbb_utf_all_tests::main');
-}
-
-require_once 'test_framework/framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-
-require_once 'utf/utf8_wordwrap_test.php';
-require_once 'utf/utf8_clean_string_test.php';
-
-class phpbb_utf_all_tests
-{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('phpBB Unicode Transformation Format');
-
- $suite->addTestSuite('phpbb_utf_utf8_wordwrap_test');
- $suite->addTestSuite('phpbb_utf_utf8_clean_string_test');
-
- return $suite;
- }
-}
-
-if (PHPUnit_MAIN_METHOD == 'phpbb_utf_all_tests::main')
-{
- phpbb_utf_all_tests::main();
-}
-
diff --git a/tests/utf/utf8_clean_string_test.php b/tests/utf/utf8_clean_string_test.php
index 870ad76fc4..148297ad4b 100644
--- a/tests/utf/utf8_clean_string_test.php
+++ b/tests/utf/utf8_clean_string_test.php
@@ -7,8 +7,7 @@
*
*/
-require_once 'test_framework/framework.php';
-require_once '../phpBB/includes/utf/utf_tools.php';
+require_once __DIR__ . '/../../phpBB/includes/utf/utf_tools.php';
class phpbb_utf_utf8_clean_string_test extends phpbb_test_case
{
diff --git a/tests/utf/utf8_wordwrap_test.php b/tests/utf/utf8_wordwrap_test.php
index ef1165a897..fbc947b92a 100644
--- a/tests/utf/utf8_wordwrap_test.php
+++ b/tests/utf/utf8_wordwrap_test.php
@@ -7,8 +7,7 @@
*
*/
-require_once 'test_framework/framework.php';
-require_once '../phpBB/includes/utf/utf_tools.php';
+require_once __DIR__ . '/../../phpBB/includes/utf/utf_tools.php';
class phpbb_utf_utf8_wordwrap_test extends phpbb_test_case
{