diff --git a/phpBB/adm/style/acp_board.html b/phpBB/adm/style/acp_board.html
index 6b8ceb3ef6..1a09c4eee6 100644
--- a/phpBB/adm/style/acp_board.html
+++ b/phpBB/adm/style/acp_board.html
@@ -34,7 +34,7 @@
- {auth_tpl.TPL}
+
diff --git a/phpBB/adm/style/auth_provider_ldap.html b/phpBB/adm/style/auth_provider_ldap.html
new file mode 100644
index 0000000000..81afa44373
--- /dev/null
+++ b/phpBB/adm/style/auth_provider_ldap.html
@@ -0,0 +1,32 @@
+
+ {L_LDAP_SERVER}{L_COLON} {L_LDAP_SERVER_EXPLAIN}
+
+
+
+ {L_LDAP_PORT}{L_COLON} {L_LDAP_PORT_EXPLAIN}
+
+
+
+ {L_LDAP_DN}{L_COLON} {L_LDAP_DN_EXPLAIN}
+
+
+
+ {L_LDAP_UID}{L_COLON} {L_LDAP_UID_EXPLAIN}
+
+
+
+ {L_LDAP_USER_FILTER}{L_COLON} {L_LDAP_USER_FILTER_EXPLAIN}
+
+
+
+ {L_LDAP_EMAIL}{L_COLON} {L_LDAP_EMAIL_EXPLAIN}
+
+
+
+ {L_LDAP_USER}{L_COLON} {L_LDAP_USER_EXPLAIN}
+
+
+
+ {L_LDAP_PASSWORD}{L_COLON} {L_LDAP_PASSWORD_EXPLAIN}
+
+
diff --git a/phpBB/composer.json b/phpBB/composer.json
index a114d5c0e0..bf693d1950 100644
--- a/phpBB/composer.json
+++ b/phpBB/composer.json
@@ -12,6 +12,7 @@
"require-dev": {
"fabpot/goutte": "v0.1.0",
"phpunit/dbunit": "1.2.*",
- "phpunit/phpunit": "3.7.*"
+ "phpunit/phpunit": "3.7.*",
+ "phing/phing": "2.4.*"
}
}
diff --git a/phpBB/composer.lock b/phpBB/composer.lock
index a20c6303ee..1ba6cb6f83 100644
--- a/phpBB/composer.lock
+++ b/phpBB/composer.lock
@@ -3,7 +3,7 @@
"This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
],
- "hash": "e4a4f4848a7201d7e044446001afda29",
+ "hash": "6e6125b88160e28568edcb9fd007abed",
"packages": [
{
"name": "symfony/config",
@@ -29,6 +29,7 @@
"Symfony\\Component\\Config": ""
}
},
+ "notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
@@ -78,6 +79,7 @@
"Symfony\\Component\\DependencyInjection": ""
}
},
+ "notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
@@ -126,6 +128,7 @@
"Symfony\\Component\\EventDispatcher": ""
}
},
+ "notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
@@ -168,6 +171,7 @@
"SessionHandlerInterface": "Symfony/Component/HttpFoundation/Resources/stubs"
}
},
+ "notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
@@ -229,6 +233,7 @@
"Symfony\\Component\\HttpKernel": ""
}
},
+ "notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
@@ -281,6 +286,7 @@
"Symfony\\Component\\Routing": ""
}
},
+ "notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
@@ -322,6 +328,7 @@
"Symfony\\Component\\Yaml": ""
}
},
+ "notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
@@ -367,6 +374,7 @@
"Twig_": "lib/"
}
},
+ "notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3"
],
@@ -533,6 +541,58 @@
],
"time": "2012-12-19 23:06:35"
},
+ {
+ "name": "phing/phing",
+ "version": "2.4.14",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phingofficial/phing",
+ "reference": "2.4.14"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/phingofficial/phing/archive/2.4.14.zip",
+ "reference": "2.4.14",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.2.0"
+ },
+ "bin": [
+ "bin/phing"
+ ],
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "classes/phing/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "include-path": [
+ "classes"
+ ],
+ "license": [
+ "LGPL3"
+ ],
+ "authors": [
+ {
+ "name": "Michiel Rook",
+ "email": "mrook@php.net"
+ },
+ {
+ "name": "Phing Community",
+ "homepage": "http://www.phing.info/trac/wiki/Development/Contributors"
+ }
+ ],
+ "description": "PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.",
+ "homepage": "http://www.phing.info/",
+ "keywords": [
+ "build",
+ "task",
+ "tool"
+ ],
+ "time": "2012-11-29 21:23:47"
+ },
{
"name": "phpunit/dbunit",
"version": "1.2.3",
@@ -593,16 +653,16 @@
},
{
"name": "phpunit/php-code-coverage",
- "version": "1.2.11",
+ "version": "1.2.12",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "1.2.11"
+ "reference": "1.2.12"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/1.2.11",
- "reference": "1.2.11",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/1.2.12",
+ "reference": "1.2.12",
"shasum": ""
},
"require": {
@@ -612,13 +672,18 @@
"phpunit/php-token-stream": ">=1.1.3@stable"
},
"require-dev": {
- "phpunit/phpunit": "3.7.*"
+ "phpunit/phpunit": "3.7.*@dev"
},
"suggest": {
"ext-dom": "*",
"ext-xdebug": ">=2.0.5"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.2.x-dev"
+ }
+ },
"autoload": {
"classmap": [
"PHP/"
@@ -645,7 +710,7 @@
"testing",
"xunit"
],
- "time": "2013-05-23 18:23:24"
+ "time": "2013-07-06 06:26:16"
},
{
"name": "phpunit/php-file-iterator",
@@ -827,16 +892,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "3.7.21",
+ "version": "3.7.22",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "3.7.21"
+ "reference": "3.7.22"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3.7.21",
- "reference": "3.7.21",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3.7.22",
+ "reference": "3.7.22",
"shasum": ""
},
"require": {
@@ -845,12 +910,12 @@
"ext-reflection": "*",
"ext-spl": "*",
"php": ">=5.3.3",
- "phpunit/php-code-coverage": ">=1.2.1,<1.3.0",
+ "phpunit/php-code-coverage": "~1.2.1",
"phpunit/php-file-iterator": ">=1.3.1",
"phpunit/php-text-template": ">=1.1.1",
- "phpunit/php-timer": ">=1.0.2,<1.1.0",
- "phpunit/phpunit-mock-objects": ">=1.2.0,<1.3.0",
- "symfony/yaml": ">=2.0,<3.0"
+ "phpunit/php-timer": "~1.0.2",
+ "phpunit/phpunit-mock-objects": "~1.2.0",
+ "symfony/yaml": "~2.0"
},
"require-dev": {
"pear-pear/pear": "1.9.4"
@@ -897,7 +962,7 @@
"testing",
"xunit"
],
- "time": "2013-05-23 18:54:29"
+ "time": "2013-07-06 06:29:15"
},
{
"name": "phpunit/phpunit-mock-objects",
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 942912a593..7625276f44 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -46,6 +46,7 @@
Changelog
+ Changes since 3.0.11
Changes since 3.0.10
Changes since 3.0.9
Changes since 3.0.8
@@ -85,7 +86,151 @@
-
1.i. Changes since 3.0.10
+
1.i. Changes since 3.0.11
+
+
Bug
+
+[PHPBB3-6723 ] - Empty message in deleted messages in PM history
+[PHPBB3-7262 ] - Clarify docs about is_dynamic not being updated by set_config()
+[PHPBB3-8319 ] - LOCAL_URL not enforced in bbcodes
+[PHPBB3-9551 ] - Mysql fulltext index creation fails due to partial collation change
+[PHPBB3-9975 ] - Hard coded language in sessions.php
+[PHPBB3-10184 ] - Bots can be sent private messages
+[PHPBB3-10491 ] - Fatal error in functional tests when server returns 404
+[PHPBB3-10568 ] - Modify the trigger language when you edit a PM
+[PHPBB3-10602 ] - A bug in mail queue processing
+[PHPBB3-10661 ] - UCP > PM > Compose > enumerated recipients > BCC group misses a (prosilver)
+[PHPBB3-10678 ] - Provide Firebird, Oracle, and increased MSSQL support in unit tests
+[PHPBB3-10772 ] - trigger_error is using the default style
+[PHPBB3-10789 ] - PM print template (prosilver) with unnecessary variables
+[PHPBB3-10820 ] - Display images directly in IE9 and 10 instead of download
+[PHPBB3-10828 ] - PostgreSQL dbal tests try to connect to the database named as user specified in configuration
+[PHPBB3-10838 ] - Functional tests are not mentioned in RUNNING_TESTS.txt
+[PHPBB3-10840 ] - If you add a member to a group, the form_token can be set to 0 if the creation_time is 0 too. Maybe even if creation_time is unchanged.
+[PHPBB3-10848 ] - Wrong redirect to installer from acp
+[PHPBB3-10850 ] - create_schema_files.php is not creating the oracle or postgres' schema file properly
+[PHPBB3-10879 ] - prosilver: attachment-link will be displayed wrong, when filename is too long
+[PHPBB3-10880 ] - m_approve should not imply f_noapprove
+[PHPBB3-10896 ] - board_email & board_contact are not validated as email addresses in ACP
+[PHPBB3-10897 ] - Bot Definitions are outdated
+[PHPBB3-10918 ] - docs/INSTALL.html claims there are tar.gz packages
+[PHPBB3-10943 ] - Search Box should display keywords entered by the user
+[PHPBB3-10967 ] - PHPBB_USE_BOARD_URL_PATH not implemented in posting_gen_topic_icons
+[PHPBB3-10986 ] - Invalid email message ids because config variable server_name is used even when force server URL settings is disabled
+[PHPBB3-10995 ] - Return value of $db->sql_fetchrow() on empty tables is not consistent on mssqlnative
+[PHPBB3-10996 ] - Travis tests fail on Postgres because database does not exist
+[PHPBB3-11034 ] - The functional test case framework does not install a full board each time
+[PHPBB3-11066 ] - MSSQLnative driver contains debug code error_reporting(E_ALL)
+[PHPBB3-11069 ] - missing closing span in subsilver2 simple_footer.html
+[PHPBB3-11081 ] - Duplicated /TD in styles/subsilver2/template/catpcha_qa.html
+[PHPBB3-11093 ] - acp_users_overview.html has a wrongly placed </dd>
+[PHPBB3-11094 ] - prosilver: searching for users: no textbox for Jabber
+[PHPBB3-11105 ] - Missing mandatory space in meta http-equiv=refresh
+[PHPBB3-11112 ] - phpBB Footer Link should be SSL
+[PHPBB3-11122 ] - Update docs/AUTHORS for 3.0.12-RC1
+[PHPBB3-11144 ] - {FORUM_NAME} is not filled in login mask when logging into a password protected forum
+[PHPBB3-11145 ] - ATTACHED_IMAGE_NOT_IMAGE thrown because of file limit in php.ini
+[PHPBB3-11158 ] - modules table lacks acl_u_sig for signature module
+[PHPBB3-11159 ] - Coding guidelines: static public
+[PHPBB3-11164 ] - Composer not finding symfony/config in PHP 5.3.3
+[PHPBB3-11178 ] - database_update.php should not set error_reporting to E_ALL
+[PHPBB3-11186 ] - Database unit tests fail on windows using sqlite2
+[PHPBB3-11190 ] - Functional tests do not clear the cache between each test
+[PHPBB3-11196 ] - /includes/session.php sends 401 HTTP status with "Not authorized" instead of "Unauthorized"
+[PHPBB3-11219 ] - Database sequences are not updated for tests using fixtures with auto_incremented columns
+[PHPBB3-11227 ] - @return void -> @return null
+[PHPBB3-11233 ] - Anonymous can be selected as a PM recipient
+[PHPBB3-11248 ] - CRLF line endings
+[PHPBB3-11262 ] - .lock files are not in .gitignore
+[PHPBB3-11265 ] - Functional tests do not assert that board installation succeeded
+[PHPBB3-11269 ] - Travis functional test case errors
+[PHPBB3-11278 ] - Firebird tables are not removed correctly on 3.0.9-rc1 update
+[PHPBB3-11288 ] - Search fooled by hyphens
+[PHPBB3-11291 ] - "Could not open input file: ../composer.phar" error during phing's create-package
+[PHPBB3-11292 ] - Newlines removed in display of PM reports, no clickable links in PM reports
+[PHPBB3-11301 ] - "String offset cast occured" error on PHP 5.4
+[PHPBB3-11304 ] - check_form_key breaks in tests when form is submitted in the same second it is retrieved
+[PHPBB3-11343 ] - Loose string comparison during new password activation
+[PHPBB3-11355 ] - Incorrect error message when no user selected for action on group membership management page
+[PHPBB3-11358 ] - Success message even withot selecting a user and performing a group operation
+[PHPBB3-11361 ] - "Array to string conversion" error in $user->format_date()
+[PHPBB3-11493 ] - Functional tests should fail if any debug output is made
+[PHPBB3-11517 ] - Numbering is wrong in coding guidelines
+[PHPBB3-11536 ] - Installer incorrectly removes /install from script_path
+[PHPBB3-11537 ] - UCP group manage page's error box differs heavily from the rest of the UCP
+[PHPBB3-11538 ] - SQL error on UCP groups manage page caused by setting color to 7 characters long string
+[PHPBB3-11544 ] - Add admin_login() to 3.0 functional test case
+[PHPBB3-11545 ] - is_absolute() should not depend on DIRECTORY_SEPARATOR
+[PHPBB3-11546 ] - is_absolute() throws E_NOTICE for empty string
+[PHPBB3-11547 ] - Test fixtures do not support utf8 characters
+[PHPBB3-11548 ] - Untranslated TOO_SHORT in UCP "Manage Groups"
+[PHPBB3-11566 ] - Reporting a post should require a captcha to be solved by guests
+[PHPBB3-11568 ] - Functional tests fail with retrieving install pages using file_get_contents
+[PHPBB3-11575 ] - phpbb_dbal_order_lower_test::test_cross_join should be called test_order_lower
+[PHPBB3-11578 ] - Missing underscore after function prefix in validate_data()
+[PHPBB3-11579 ] - Add unit tests for validate_data()
+[PHPBB3-11580 ] - Avoid API Limit from composer downloads on github
+[PHPBB3-11588 ] - install/install_update.php should use version.phpbb.com instead of www
+[PHPBB3-11590 ] - Close database connections from tests whenever possible
+[PHPBB3-11601 ] - Allow manual resync of database columns in unit tests not only on fixture load
+[PHPBB3-11603 ] - git-tools use invalid api urls
+[PHPBB3-11604 ] - Functional tests fail when phpBB can not create the config file
+[PHPBB3-11617 ] - Missing U_ACTION in acp_captcha.php
+[PHPBB3-11618 ] - Template tests fail on some systems due to a PHP error in glob()
+[PHPBB3-11619 ] - get_remote_file() should use HTTP 1.0
+[PHPBB3-11630 ] - Improvements to the PHP lint pre-commit hook
+[PHPBB3-11644 ] - Skip phpbb_dbal_order_lower_test on MySQL 5.6
+[PHPBB3-11662 ] - "occured" should be "occurred"
+
+
Improvement
+
+[PHPBB3-8743 ] - New topic / reply notifications do not contain author's name.
+[PHPBB3-10050 ] - subsilver2: Do not show "Mark topics as read" when there are no topics
+[PHPBB3-10205 ] - More informative reporting of errors when database connection fails (MySQL and others)
+[PHPBB3-10716 ] - PHP-parse all php files as part of the test suite
+[PHPBB3-10841 ] - Disable style and language selectors if there's only one installed.
+[PHPBB3-10854 ] - sql server drop default constraint when dropping column
+[PHPBB3-10865 ] - Updated and Added to docs/INSTALL.html
+[PHPBB3-10873 ] - Change language entry for deleted PMs
+[PHPBB3-10981 ] - Upgrade Goutte and use Composer for Installation
+[PHPBB3-11131 ] - Phrasing & semantics of Board settings
+[PHPBB3-11162 ] - Get rid of $db->sql_return_on_error(true) trickery when splitting/merging topics
+[PHPBB3-11192 ] - Add Tebibyte to get_formatted_filesize()
+[PHPBB3-11202 ] - Add response status checks to functional tests
+[PHPBB3-11220 ] - Improve tooltip explaining the [list=] - BBcode
+[PHPBB3-11238 ] - Specify goutte version
+[PHPBB3-11285 ] - Use more granularity in dependency checks in compress test
+[PHPBB3-11293 ] - Prefer mysqli over mysql due to php 5.5 alpha 2 deprecating mysql
+[PHPBB3-11294 ] - Update extension list in running tests doc
+[PHPBB3-11368 ] - Latest pm reports row count
+[PHPBB3-11583 ] - InnoDB supports FULLTEXT index since MySQL 5.6.4.
+
+
Sub-task
+
+[PHPBB3-10974 ] - Move tests/mock_user.php to tests/mock/user.php
+[PHPBB3-11009 ] - Backport phing build.xml from develop to develop-olympus so it uses composer.
+[PHPBB3-11540 ] - Add unit tests for (phpbb_)is_absolute()
+[PHPBB3-11541 ] - Add unit tests for style_select() in functions.php
+[PHPBB3-11542 ] - Add unit tests for language_select() in functions.php
+[PHPBB3-11543 ] - Add unit tests for obtain online functions in functions.php
+
+
Task
+
+[PHPBB3-10877 ] - Have bamboo generate and publish a phpBB package for every build.
+[PHPBB3-11045 ] - Add unit tests for the compress class
+[PHPBB3-11059 ] - Fix README logo
+[PHPBB3-11060 ] - Fix travis.yml pyrus config
+[PHPBB3-11240 ] - Turn on PHPUnit's verbose mode on Travis
+[PHPBB3-11324 ] - Add PHP 5.5 environment on Travis-CI
+[PHPBB3-11337 ] - Run functional tests on Travis CI
+[PHPBB3-11513 ] - Install PHPUnit via Composer's require-dev to simplify test running (no need for pear)
+[PHPBB3-11526 ] - Increase composer minimum-stability from beta to stable
+[PHPBB3-11527 ] - Upgrade composer.phar to 1.0.0-alpha7
+[PHPBB3-11529 ] - Rename RUNNING_TESTS file to .md file to render it on GitHub
+[PHPBB3-11576 ] - Make phpBB Test Suite MySQL behave at least as strict as phpBB MySQL driver
+
+
+
1.ii. Changes since 3.0.10
Bug
@@ -210,7 +355,7 @@
[PHPBB3-10909 ] - Update Travis Test Configuration: Travis no longer supports PHP 5.3.2
-
1.ii. Changes since 3.0.9
+
1.iii. Changes since 3.0.9
Bug
@@ -346,7 +491,7 @@
[PHPBB3-10480 ] - Automate changelog building
-
1.iii. Changes since 3.0.8
+
1.iv. Changes since 3.0.8
Bug
@@ -714,7 +859,7 @@
-
1.iv. Changes since 3.0.7-PL1
+
1.v. Changes since 3.0.7-PL1
Security
-
1.iv. Changes since 3.0.7
+
1.vi. Changes since 3.0.7
[Sec] Do not expose forum content of forums with ACL entries but no actual permission in ATOM Feeds. (Bug #58595)
-
1.vi. Changes since 3.0.6
+
1.vii. Changes since 3.0.6
[Fix] Allow ban reason and length to be selected and copied in ACP and subsilver2 MCP. (Bug #51095)
@@ -1282,7 +1427,7 @@
-
1.vii. Changes since 3.0.5
+
1.viii. Changes since 3.0.5
[Fix] Allow whitespaces in avatar gallery names. (Bug #44955)
@@ -1504,7 +1649,7 @@
[Feature] Send anonymous statistical information to phpBB on installation and update (optional).
-
1.viii. Changes since 3.0.4
+
1.ix. Changes since 3.0.4
[Fix] Delete user entry from ban list table upon user deletion (Bug #40015 - Patch by TerraFrost)
@@ -1593,7 +1738,7 @@
[Sec] Only use forum id supplied for posting if global announcement detected. (Reported by nickvergessen)
-
1.ix. Changes since 3.0.3
+
1.x. Changes since 3.0.3
[Fix] Allow mixed-case template directories to be inherited (Bug #36725)
@@ -1625,7 +1770,7 @@
[Sec] Ask for forum password if post within passworded forum quoted in private message. (Reported by nickvergessen)
-
1.x. Changes since 3.0.2
+
1.xi. Changes since 3.0.2
[Fix] Correctly set topic starter if first post in topic removed (Bug #30575 - Patch by blueray2048)
@@ -1724,7 +1869,7 @@
[Sec Precaution] Stricter validation of the HTTP_HOST header (Thanks to Techie-Micheal et al for pointing out possible issues in derived code)
-
1.xi. Changes since 3.0.1
+
1.xii. Changes since 3.0.1
[Fix] Ability to set permissions on non-mysql dbms (Bug #24955)
@@ -1772,7 +1917,7 @@
[Sec] Only allow urls gone through redirect() being used within login_box(). (thanks nookieman)
-
1.xii Changes since 3.0.0
+
1.xiii Changes since 3.0.0
[Change] Validate birthdays (Bug #15004)
@@ -1843,7 +1988,7 @@
[Fix] Find and display colliding usernames correctly when converting from one database to another (Bug #23925)
-
1.xiii. Changes since 3.0.RC8
+
1.xiv. Changes since 3.0.RC8
[Fix] Cleaned usernames contain only single spaces, so "a_name" and "a__name" are treated as the same name (Bug #15634)
@@ -1852,7 +1997,7 @@
[Fix] Call garbage_collection() within database updater to correctly close connections (affects Oracle for example)
-
1.xiv. Changes since 3.0.RC7
+
1.xv. Changes since 3.0.RC7
[Fix] Fixed MSSQL related bug in the update system
@@ -1887,7 +2032,7 @@
[Fix] No duplication of active topics (Bug #15474)
-
1.xv. Changes since 3.0.RC6
+
1.xvi. Changes since 3.0.RC6
[Fix] Submitting language changes using acp_language (Bug #14736)
@@ -1897,7 +2042,7 @@
[Fix] Able to request new password (Bug #14743)
-
1.xvi. Changes since 3.0.RC5
+
1.xvii. Changes since 3.0.RC5
[Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.
@@ -1960,7 +2105,7 @@
[Sec] New password hashing mechanism for storing passwords (#i42)
-
1.xvii. Changes since 3.0.RC4
+
1.xviii. Changes since 3.0.RC4
[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)
@@ -2011,7 +2156,7 @@
[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)
-
1.xviii. Changes since 3.0.RC3
+
1.xix. Changes since 3.0.RC3
[Fix] Fixing some subsilver2 and prosilver style issues
@@ -2120,7 +2265,7 @@
-
1.xviv. Changes since 3.0.RC2
+
1.xx. Changes since 3.0.RC2
[Fix] Re-allow searching within the memberlist
@@ -2166,7 +2311,7 @@
-
1.xx. Changes since 3.0.RC1
+
1.xxi. Changes since 3.0.RC1
[Fix] (X)HTML issues within the templates (Bug #11255, #11255)
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 24b913260b..12e2a1bf72 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -528,10 +528,10 @@ class acp_board
$old_auth_config = array();
foreach ($auth_providers as $provider)
{
- if ($fields = $provider->acp($this->new_config))
+ if ($fields = $provider->acp())
{
// Check if we need to create config fields for this plugin and save config when submit was pressed
- foreach ($fields['config'] as $field)
+ foreach ($fields as $field)
{
if (!isset($config[$field]))
{
@@ -655,15 +655,14 @@ class acp_board
foreach ($auth_providers as $provider)
{
- $fields = $provider->acp($this->new_config);
-
- if ($fields['tpl'])
+ $auth_tpl = $provider->get_acp_template($this->new_config);
+ if ($auth_tpl)
{
+ $template->assign_vars($auth_tpl['TEMPLATE_VARS']);
$template->assign_block_vars('auth_tpl', array(
- 'TPL' => $fields['tpl'],
+ 'TEMPLATE_FILE' => $auth_tpl['TEMPLATE_FILE'],
));
}
- unset($fields);
}
}
}
@@ -678,8 +677,12 @@ class acp_board
$auth_plugins = array();
$auth_providers = $phpbb_container->get('auth.provider_collection');
- foreach($auth_providers as $key => $value)
+ foreach ($auth_providers as $key => $value)
{
+ if (!($value instanceof phpbb_auth_provider_interface))
+ {
+ continue;
+ }
$auth_plugins[] = str_replace('auth.provider.', '', $key);
}
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php
index c79699d465..e6a36c97a8 100644
--- a/phpBB/includes/acp/acp_groups.php
+++ b/phpBB/includes/acp/acp_groups.php
@@ -410,7 +410,7 @@ class acp_groups
if ($validation_error = validate_data($submit_ary, $validation_checks))
{
// Replace "error" string with its real, localised form
- $error = array_merge($error, array_map(array(&$user, 'lang'), $validation_error));
+ $error = array_merge($error, $validation_error);
}
if (!sizeof($error))
@@ -507,6 +507,7 @@ class acp_groups
if (sizeof($error))
{
+ $error = array_map(array(&$user, 'lang'), $error);
$group_rank = $submit_ary['rank'];
$group_desc_data = array(
diff --git a/phpBB/includes/auth/provider/apache.php b/phpBB/includes/auth/provider/apache.php
index 5f6f2862b6..2e80436f78 100644
--- a/phpBB/includes/auth/provider/apache.php
+++ b/phpBB/includes/auth/provider/apache.php
@@ -20,7 +20,7 @@ if (!defined('IN_PHPBB'))
*
* @package auth
*/
-class phpbb_auth_provider_apache implements phpbb_auth_provider_interface
+class phpbb_auth_provider_apache extends phpbb_auth_provider_base
{
/**
* Apache Authentication Constructor
@@ -256,20 +256,4 @@ class phpbb_auth_provider_apache implements phpbb_auth_provider_interface
return false;
}
-
- /**
- * {@inheritdoc}
- */
- public function acp($new)
- {
- return;
- }
-
- /**
- * {@inheritdoc}
- */
- public function logout($data, $new_session)
- {
- return;
- }
}
diff --git a/phpBB/includes/auth/provider/base.php b/phpBB/includes/auth/provider/base.php
new file mode 100644
index 0000000000..7eaf8bb2d3
--- /dev/null
+++ b/phpBB/includes/auth/provider/base.php
@@ -0,0 +1,72 @@
+php_ext = $php_ext;
}
- /**
- * {@inheritdoc}
- */
- public function init()
- {
- return;
- }
-
/**
* {@inheritdoc}
*/
@@ -302,36 +294,4 @@ class phpbb_auth_provider_db implements phpbb_auth_provider_interface
'user_row' => $row,
);
}
-
- /**
- * {@inheritdoc}
- */
- public function autologin()
- {
- return;
- }
-
- /**
- * {@inheritdoc}
- */
- public function acp($new)
- {
- return;
- }
-
- /**
- * {@inheritdoc}
- */
- public function logout($data, $new_session)
- {
- return;
- }
-
- /**
- * {@inheritdoc}
- */
- public function validate_session($user)
- {
- return;
- }
}
diff --git a/phpBB/includes/auth/provider/interface.php b/phpBB/includes/auth/provider/interface.php
index 2d1935f8f0..47043bc107 100644
--- a/phpBB/includes/auth/provider/interface.php
+++ b/phpBB/includes/auth/provider/interface.php
@@ -60,16 +60,28 @@ interface phpbb_auth_provider_interface
* This function is used to output any required fields in the authentication
* admin panel. It also defines any required configuration table fields.
*
- * @param array $new Contains the new configuration values that have
- * been set in acp_board.
* @return array|null Returns null if not implemented or an array of the
- * form:
+ * configuration fields of the provider.
+ */
+ public function acp();
+
+ /**
+ * This function updates the template with variables related to the acp
+ * options with whatever configuraton values are passed to it as an array.
+ * It then returns the name of the acp file related to this authentication
+ * provider.
+ * @param array $new_config Contains the new configuration values that
+ * have been set in acp_board.
+ * @return array|null Returns null if not implemented or an array with
+ * the template file name and an array of the vars
+ * that the template needs that must conform to the
+ * following example:
* array(
- * 'tpl' => string
- * 'config' => array
+ * 'TEMPLATE_FILE' => string,
+ * 'TEMPLATE_VARS' => array(...),
* )
*/
- public function acp($new);
+ public function get_acp_template($new_config);
/**
* Performs additional actions during logout.
diff --git a/phpBB/includes/auth/provider/ldap.php b/phpBB/includes/auth/provider/ldap.php
index f67c1e9247..0196529408 100644
--- a/phpBB/includes/auth/provider/ldap.php
+++ b/phpBB/includes/auth/provider/ldap.php
@@ -22,7 +22,7 @@ if (!defined('IN_PHPBB'))
*
* @package auth
*/
-class phpbb_auth_provider_ldap implements phpbb_auth_provider_interface
+class phpbb_auth_provider_ldap extends phpbb_auth_provider_base
{
/**
* LDAP Authentication Constructor
@@ -286,56 +286,32 @@ class phpbb_auth_provider_ldap implements phpbb_auth_provider_interface
/**
* {@inheritdoc}
*/
- public function autologin()
+
+ public function acp()
{
- return;
+ // These are fields required in the config table
+ return array(
+ 'ldap_server', 'ldap_port', 'ldap_base_dn', 'ldap_uid', 'ldap_user_filter', 'ldap_email', 'ldap_user', 'ldap_password',
+ );
}
/**
* {@inheritdoc}
*/
- public function acp($new)
+ public function get_acp_template($new_config)
{
- $tpl = '
-
-
- ' . $this->user->lang['LDAP_SERVER'] . $this->user->lang['COLON'] . ' ' . $this->user->lang['LDAP_SERVER_EXPLAIN'] . '
-
-
-
- ' . $this->user->lang['LDAP_PORT'] . $this->user->lang['COLON'] . ' ' . $this->user->lang['LDAP_PORT_EXPLAIN'] . '
-
-
-
- ' . $this->user->lang['LDAP_DN'] . $this->user->lang['COLON'] . ' ' . $this->user->lang['LDAP_DN_EXPLAIN'] . '
-
-
-
- ' . $this->user->lang['LDAP_UID'] . $this->user->lang['COLON'] . ' ' . $this->user->lang['LDAP_UID_EXPLAIN'] . '
-
-
-
- ' . $this->user->lang['LDAP_USER_FILTER'] . $this->user->lang['COLON'] . ' ' . $this->user->lang['LDAP_USER_FILTER_EXPLAIN'] . '
-
-
-
- ' . $this->user->lang['LDAP_EMAIL'] . $this->user->lang['COLON'] . ' ' . $this->user->lang['LDAP_EMAIL_EXPLAIN'] . '
-
-
-
- ' . $this->user->lang['LDAP_USER'] . $this->user->lang['COLON'] . ' ' . $this->user->lang['LDAP_USER_EXPLAIN'] . '
-
-
-
- ' . $this->user->lang['LDAP_PASSWORD'] . $this->user->lang['COLON'] . ' ' . $this->user->lang['LDAP_PASSWORD_EXPLAIN'] . '
-
-
- ';
-
- // These are fields required in the config table
return array(
- 'tpl' => $tpl,
- 'config' => array('ldap_server', 'ldap_port', 'ldap_base_dn', 'ldap_uid', 'ldap_user_filter', 'ldap_email', 'ldap_user', 'ldap_password')
+ 'TEMPLATE_FILE' => 'auth_provider_ldap.html',
+ 'TEMPLATE_VARS' => array(
+ 'AUTH_LDAP_DN' => $new_config['ldap_base_dn'],
+ 'AUTH_LDAP_EMAIL' => $new_config['ldap_email'],
+ 'AUTH_LDAP_PASSORD' => $new_config['ldap_password'],
+ 'AUTH_LDAP_PORT' => $new_config['ldap_port'],
+ 'AUTH_LDAP_SERVER' => $new_config['ldap_server'],
+ 'AUTH_LDAP_UID' => $new_config['ldap_uid'],
+ 'AUTH_LDAP_USER' => $new_config['ldap_user'],
+ 'AUTH_LDAP_USER_FILTER' => $new_config['ldap_user_filter'],
+ ),
);
}
@@ -367,20 +343,4 @@ class phpbb_auth_provider_ldap implements phpbb_auth_provider_interface
{
return str_replace(array('*', '\\', '(', ')'), array('\\*', '\\\\', '\\(', '\\)'), $string);
}
-
- /**
- * {@inheritdoc}
- */
- public function logout($data, $new_session)
- {
- return;
- }
-
- /**
- * {@inheritdoc}
- */
- public function validate_session($user)
- {
- return;
- }
}
diff --git a/phpBB/includes/avatar/driver/upload.php b/phpBB/includes/avatar/driver/upload.php
index baf51f61c1..685ac4f349 100644
--- a/phpBB/includes/avatar/driver/upload.php
+++ b/phpBB/includes/avatar/driver/upload.php
@@ -77,6 +77,32 @@ class phpbb_avatar_driver_upload extends phpbb_avatar_driver
}
elseif (!empty($this->config['allow_avatar_remote_upload']) && !empty($url))
{
+ if (!preg_match('#^(http|https|ftp)://#i', $url))
+ {
+ $url = 'http://' . $url;
+ }
+
+ if (!function_exists('validate_data'))
+ {
+ require($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
+ }
+
+ $validate_array = validate_data(
+ array(
+ 'url' => $url,
+ ),
+ array(
+ 'url' => array('string', true, 5, 255),
+ )
+ );
+
+ $error = array_merge($error, $validate_array);
+
+ if (!empty($error))
+ {
+ return false;
+ }
+
$file = $upload->remote_upload($url);
}
else
diff --git a/phpBB/includes/db/migration/data/30x/3_0_9_rc1.php b/phpBB/includes/db/migration/data/30x/3_0_9_rc1.php
index 1f8622798e..4c345b429b 100644
--- a/phpBB/includes/db/migration/data/30x/3_0_9_rc1.php
+++ b/phpBB/includes/db/migration/data/30x/3_0_9_rc1.php
@@ -27,8 +27,8 @@ class phpbb_db_migration_data_30x_3_0_9_rc1 extends phpbb_db_migration
'COLUMNS' => array(
// this column was removed from the database updater
// after 3.0.9-RC3 was released. It might still exist
- // in 3.0.9-RCX installations and has to be dropped in
- // 3.0.12 after the db_tools class is capable of properly
+ // in 3.0.9-RCX installations and has to be dropped as
+ // soon as the db_tools class is capable of properly
// removing a primary key.
// 'attempt_id' => array('UINT', NULL, 'auto_increment'),
'attempt_ip' => array('VCHAR:40', ''),
diff --git a/phpBB/includes/db/migration/data/310/notification_options_reconvert.php b/phpBB/includes/db/migration/data/310/notification_options_reconvert.php
new file mode 100644
index 0000000000..d994d7ec5f
--- /dev/null
+++ b/phpBB/includes/db/migration/data/310/notification_options_reconvert.php
@@ -0,0 +1,118 @@
+table_prefix . 'user_notifications';
+ $insert_buffer = new phpbb_db_sql_insert_buffer($this->db, $insert_table);
+
+ $this->perform_conversion($insert_buffer, $insert_table);
+ }
+
+ /**
+ * Perform the conversion (separate for testability)
+ *
+ * @param phpbb_db_sql_insert_buffer $insert_buffer
+ * @param string $insert_table
+ */
+ public function perform_conversion(phpbb_db_sql_insert_buffer $insert_buffer, $insert_table)
+ {
+ $sql = 'DELETE FROM ' . $insert_table;
+ $this->db->sql_query($sql);
+
+ $sql = 'SELECT user_id, user_notify_type, user_notify_pm
+ FROM ' . USERS_TABLE;
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $notification_methods = array();
+
+ // In-board notification
+ $notification_methods[] = '';
+
+ if ($row['user_notify_type'] == NOTIFY_EMAIL || $row['user_notify_type'] == NOTIFY_BOTH)
+ {
+ $notification_methods[] = 'email';
+ }
+
+ if ($row['user_notify_type'] == NOTIFY_IM || $row['user_notify_type'] == NOTIFY_BOTH)
+ {
+ $notification_methods[] = 'jabber';
+ }
+
+ // Notifications for posts
+ foreach (array('post', 'topic') as $item_type)
+ {
+ $this->add_method_rows(
+ $insert_buffer,
+ $item_type,
+ 0,
+ $row['user_id'],
+ $notification_methods
+ );
+ }
+
+ if ($row['user_notify_pm'])
+ {
+ // Notifications for private messages
+ // User either gets all methods or no method
+ $this->add_method_rows(
+ $insert_buffer,
+ 'pm',
+ 0,
+ $row['user_id'],
+ $notification_methods
+ );
+ }
+ }
+ $this->db->sql_freeresult($result);
+
+ $insert_buffer->flush();
+ }
+
+ /**
+ * Insert method rows to DB
+ *
+ * @param phpbb_db_sql_insert_buffer $insert_buffer
+ * @param string $item_type
+ * @param int $item_id
+ * @param int $user_id
+ * @param string $methods
+ */
+ protected function add_method_rows(phpbb_db_sql_insert_buffer $insert_buffer, $item_type, $item_id, $user_id, array $methods)
+ {
+ $row_base = array(
+ 'item_type' => $item_type,
+ 'item_id' => (int) $item_id,
+ 'user_id' => (int) $user_id,
+ 'notify' => 1
+ );
+
+ foreach ($methods as $method)
+ {
+ $row_base['method'] = $method;
+ $insert_buffer->insert($row_base);
+ }
+ }
+}
diff --git a/phpBB/includes/db/migration/data/310/notifications.php b/phpBB/includes/db/migration/data/310/notifications.php
index 82bfd4cb2d..17c939d95a 100644
--- a/phpBB/includes/db/migration/data/310/notifications.php
+++ b/phpBB/includes/db/migration/data/310/notifications.php
@@ -91,70 +91,6 @@ class phpbb_db_migration_data_310_notifications extends phpbb_db_migration
),
)),
array('config.add', array('load_notifications', 1)),
- array('custom', array(array($this, 'convert_notifications'))),
);
}
-
- public function convert_notifications()
- {
- $convert_notifications = array(
- array(
- 'check' => ($this->config['allow_topic_notify']),
- 'item_type' => 'post',
- ),
- array(
- 'check' => ($this->config['allow_forum_notify']),
- 'item_type' => 'topic',
- ),
- array(
- 'check' => ($this->config['allow_bookmarks']),
- 'item_type' => 'bookmark',
- ),
- array(
- 'check' => ($this->config['allow_privmsg']),
- 'item_type' => 'pm',
- ),
- );
-
- foreach ($convert_notifications as $convert_data)
- {
- if ($convert_data['check'])
- {
- $sql = 'SELECT user_id, user_notify_type
- FROM ' . USERS_TABLE . '
- WHERE user_notify = 1';
- $result = $this->db->sql_query($sql);
- while ($row = $this->db->sql_fetchrow($result))
- {
- $this->sql_query('INSERT INTO ' . $this->table_prefix . 'user_notifications ' . $this->db->sql_build_array('INSERT', array(
- 'item_type' => $convert_data['item_type'],
- 'item_id' => 0,
- 'user_id' => $row['user_id'],
- 'method' => '',
- )));
-
- if ($row['user_notify_type'] == NOTIFY_EMAIL || $row['user_notify_type'] == NOTIFY_BOTH)
- {
- $this->sql_query('INSERT INTO ' . $this->table_prefix . 'user_notifications ' . $this->db->sql_build_array('INSERT', array(
- 'item_type' => $convert_data['item_type'],
- 'item_id' => 0,
- 'user_id' => $row['user_id'],
- 'method' => 'email',
- )));
- }
-
- if ($row['user_notify_type'] == NOTIFY_IM || $row['user_notify_type'] == NOTIFY_BOTH)
- {
- $this->sql_query('INSERT INTO ' . $this->table_prefix . 'user_notifications ' . $this->db->sql_build_array('INSERT', array(
- 'item_type' => $convert_data['item_type'],
- 'item_id' => 0,
- 'user_id' => $row['user_id'],
- 'method' => 'jabber',
- )));
- }
- }
- $this->db->sql_freeresult($result);
- }
- }
- }
}
diff --git a/phpBB/includes/db/migration/migration.php b/phpBB/includes/db/migration/migration.php
index 5f14a6953c..0ffa96fd14 100644
--- a/phpBB/includes/db/migration/migration.php
+++ b/phpBB/includes/db/migration/migration.php
@@ -44,7 +44,7 @@ abstract class phpbb_db_migration
/** @var string */
protected $php_ext;
- /** @var array Errors, if any occured */
+ /** @var array Errors, if any occurred */
protected $errors;
/** @var array List of queries executed through $this->sql_query() */
diff --git a/phpBB/includes/functions_container.php b/phpBB/includes/functions_container.php
index 0575f00a0b..f63dde0614 100644
--- a/phpBB/includes/functions_container.php
+++ b/phpBB/includes/functions_container.php
@@ -33,7 +33,10 @@ function phpbb_bootstrap_db_connection($config_file)
require($config_file);
$dbal_driver_class = phpbb_convert_30_dbms_to_31($dbms);
- return new $dbal_driver_class($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, defined('PHPBB_DB_NEW_LINK'));
+ $db = new $dbal_driver_class();
+ $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, defined('PHPBB_DB_NEW_LINK'));
+
+ return $db;
}
/**
@@ -56,9 +59,10 @@ function phpbb_bootstrap_table_prefix($config_file)
* Used to bootstrap the container.
*
* @param string $config_file
+* @param string $phpbb_root_path
* @return array enabled extensions
*/
-function phpbb_bootstrap_enabled_exts($config_file)
+function phpbb_bootstrap_enabled_exts($config_file, $phpbb_root_path)
{
$db = phpbb_bootstrap_db_connection($config_file);
$table_prefix = phpbb_bootstrap_table_prefix($config_file);
@@ -142,7 +146,7 @@ function phpbb_create_install_container($phpbb_root_path, $php_ext)
*/
function phpbb_create_compiled_container($config_file, array $extensions, array $passes, $phpbb_root_path, $php_ext)
{
- $installed_exts = phpbb_bootstrap_enabled_exts($config_file);
+ $installed_exts = phpbb_bootstrap_enabled_exts($config_file, $phpbb_root_path);
// Now pass the enabled extension paths into the ext compiler extension
$extensions[] = new phpbb_di_extension_ext($installed_exts);
@@ -179,7 +183,7 @@ function phpbb_create_dumped_container($config_file, array $extensions, array $p
return new phpbb_cache_container();
}
- $container = phpbb_create_compiled_container($extensions, $passes, $phpbb_root_path, $php_ext);
+ $container = phpbb_create_compiled_container($config_file, $extensions, $passes, $phpbb_root_path, $php_ext);
// Lastly, we create our cached container class
$dumper = new PhpDumper($container);
@@ -212,7 +216,7 @@ function phpbb_create_dumped_container($config_file, array $extensions, array $p
function phpbb_create_dumped_container_unless_debug($config_file, array $extensions, array $passes, $phpbb_root_path, $php_ext)
{
$container_factory = defined('DEBUG') ? 'phpbb_create_compiled_container' : 'phpbb_create_dumped_container';
- return $container_factory($extensions, $passes, $phpbb_root_path, $php_ext);
+ return $container_factory($config_file, $extensions, $passes, $phpbb_root_path, $php_ext);
}
/**
diff --git a/phpBB/includes/functions_jabber.php b/phpBB/includes/functions_jabber.php
index 3d8e403f4b..b260ffad6e 100644
--- a/phpBB/includes/functions_jabber.php
+++ b/phpBB/includes/functions_jabber.php
@@ -249,7 +249,7 @@ class jabber
return true;
}
- // Apparently an error occured...
+ // Apparently an error occurred...
$this->add_to_log('Error: open_socket() - ' . $errorstr);
return false;
}
diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php
index aa493c3281..b16a7df606 100644
--- a/phpBB/includes/search/fulltext_mysql.php
+++ b/phpBB/includes/search/fulltext_mysql.php
@@ -140,7 +140,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base
/**
* Checks for correct MySQL version and stores min/max word length in the config
*
- * @return string|bool Language key of the error/incompatiblity occured
+ * @return string|bool Language key of the error/incompatiblity occurred
*/
public function init()
{
diff --git a/phpBB/includes/search/fulltext_postgres.php b/phpBB/includes/search/fulltext_postgres.php
index 496a29f5a3..758c3ba061 100644
--- a/phpBB/includes/search/fulltext_postgres.php
+++ b/phpBB/includes/search/fulltext_postgres.php
@@ -185,7 +185,7 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base
/**
* Checks for correct PostgreSQL version and stores min/max word length in the config
*
- * @return string|bool Language key of the error/incompatiblity occured
+ * @return string|bool Language key of the error/incompatiblity occurred
*/
public function init()
{
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 66bf053f7d..e0585b1523 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -404,6 +404,12 @@ class phpbb_session
$method = basename(trim($config['auth_method']));
$provider = $phpbb_container->get('auth.provider.' . $method);
+
+ if (!($provider instanceof phpbb_auth_provider_interface))
+ {
+ throw new \RuntimeException($provider . ' must implement phpbb_auth_provider_interface');
+ }
+
$ret = $provider->validate_session($this->data);
if ($ret !== null && !$ret)
{
diff --git a/phpBB/includes/template/twig/twig.php b/phpBB/includes/template/twig/twig.php
index f5638972a3..92a37d1634 100644
--- a/phpBB/includes/template/twig/twig.php
+++ b/phpBB/includes/template/twig/twig.php
@@ -172,7 +172,7 @@ class phpbb_template_twig implements phpbb_template
*/
public function set_filenames(array $filename_array)
{
- $this->filenames = array_merge($filename_array, $this->filenames);
+ $this->filenames = array_merge($this->filenames, $filename_array);
return $this;
}
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index 93f163364b..4c2002754f 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -601,7 +601,7 @@ $lang = array_merge($lang, array(
'LOG_FORUM_MOVE_UP' => 'Moved forum %1$s above %2$s',
'LOG_FORUM_SYNC' => 'Re-synchronised forum » %s',
- 'LOG_GENERAL_ERROR' => 'A general error occured : %1$s » %2$s',
+ 'LOG_GENERAL_ERROR' => 'A general error occurred : %1$s » %2$s',
'LOG_GROUP_CREATED' => 'New usergroup created » %s',
'LOG_GROUP_DEFAULTS' => 'Group “%1$s” made default for members » %2$s',
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index cdfd3416f5..7c7afd83f4 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -204,8 +204,8 @@ $lang = array_merge($lang, array(
'ERR_TEMPLATE_EVENT_LOCATION' => 'The specified template event location [%s] is improperly formatted.',
'ERR_TEMPLATE_COMPILATION' => 'The file could not be compiled: %s',
'ERR_UNABLE_TO_LOGIN' => 'The specified username or password is incorrect.',
- 'ERR_UNWATCHING' => 'An error occured while trying to unsubscribe.',
- 'ERR_WATCHING' => 'An error occured while trying to subscribe.',
+ 'ERR_UNWATCHING' => 'An error occurred while trying to unsubscribe.',
+ 'ERR_WATCHING' => 'An error occurred while trying to subscribe.',
'ERR_WRONG_PATH_TO_PHPBB' => 'The phpBB path specified appears to be invalid.',
'ERROR' => 'Error',
'EXPAND_VIEW' => 'Expand view',
@@ -338,7 +338,7 @@ $lang = array_merge($lang, array(
'LAST_VISIT' => 'Last visit',
'LDAP_NO_LDAP_EXTENSION' => 'LDAP extension not available.',
'LDAP_NO_SERVER_CONNECTION' => 'Could not connect to LDAP server.',
- 'LDAP_SEARCH_FAILED' => 'An error occured while searching the LDAP directory.',
+ 'LDAP_SEARCH_FAILED' => 'An error occurred while searching the LDAP directory.',
'LEGEND' => 'Legend',
'LOADING' => 'Loading',
'LOCATION' => 'Location',
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 7607512eab..7b2a1138e9 100644
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -364,7 +364,7 @@ $lang = array_merge($lang, array(
'UNAVAILABLE' => 'Unavailable',
'UNWRITABLE' => 'Unwritable',
'UPDATE_TOPICS_POSTED' => 'Generating topics posted information',
- 'UPDATE_TOPICS_POSTED_ERR' => 'An error occured while generating topics posted information. You can retry this step in the ACP after the conversion process is completed.',
+ 'UPDATE_TOPICS_POSTED_ERR' => 'An error occurred while generating topics posted information. You can retry this step in the ACP after the conversion process is completed.',
'VERIFY_OPTIONS' => 'Verifying conversion options',
'VERSION' => 'Version',
diff --git a/phpBB/language/en/migrator.php b/phpBB/language/en/migrator.php
index f94c27be8c..34dcbf4c52 100644
--- a/phpBB/language/en/migrator.php
+++ b/phpBB/language/en/migrator.php
@@ -45,7 +45,7 @@ $lang = array_merge($lang, array(
'MIGRATION_NOT_FULFILLABLE' => 'The migration "%1$s" is not fulfillable, missing migration "%2$s".',
'MIGRATION_SCHEMA_DONE' => 'Installed Schema: %s',
- 'MODULE_ERROR' => 'An error occured while creating a module: %s',
+ 'MODULE_ERROR' => 'An error occurred while creating a module: %s',
'MODULE_INFO_FILE_NOT_EXIST' => 'A required module info file is missing: %2$s',
'MODULE_NOT_EXIST' => 'A required module does not exist: %s',
diff --git a/phpunit.xml.all b/phpunit.xml.all
index 3639843771..d47864e104 100644
--- a/phpunit.xml.all
+++ b/phpunit.xml.all
@@ -14,6 +14,10 @@
./tests/
+ tests/lint_test.php
+
+
+ tests/lint_test.php
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index f1cb4b9d09..ac45597b45 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -14,6 +14,10 @@
./tests/
+ tests/lint_test.php
+
+
+ tests/lint_test.php
diff --git a/phpunit.xml.functional b/phpunit.xml.functional
index 99f11477aa..3a3d653b47 100644
--- a/phpunit.xml.functional
+++ b/phpunit.xml.functional
@@ -14,6 +14,10 @@
./tests/
+ tests/lint_test.php
+
+
+ tests/lint_test.php
diff --git a/tests/acp_board/auth_provider/invalid.php b/tests/acp_board/auth_provider/invalid.php
new file mode 100644
index 0000000000..c12851afe6
--- /dev/null
+++ b/tests/acp_board/auth_provider/invalid.php
@@ -0,0 +1,13 @@
+Acp_board_valid'),
+ array('acp_board_invalid', 'Acp_board_valid '),
+ );
+ }
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ global $phpbb_container;
+ $phpbb_container = new phpbb_mock_container_builder();
+
+ $phpbb_container->set('auth.provider_collection', array(
+ 'auth.provider.acp_board_valid' => new phpbb_auth_provider_acp_board_valid,
+ 'auth.provider.acp_board_invalid' => new phpbb_auth_provider_acp_board_invalid,
+ ));
+
+ $this->acp_board = new acp_board();
+ }
+
+ /**
+ * @dataProvider select_auth_method_data
+ */
+ public function test_select_auth_method($selected, $expected)
+ {
+ $this->assertEquals($expected, $this->acp_board->select_auth_method($selected));
+ }
+}
diff --git a/tests/functional/common_groups_test.php b/tests/functional/common_groups_test.php
index 8c014aebed..6c6572af62 100644
--- a/tests/functional/common_groups_test.php
+++ b/tests/functional/common_groups_test.php
@@ -36,6 +36,26 @@ abstract class phpbb_functional_common_groups_test extends phpbb_functional_test
$this->add_lang(array('ucp', 'acp/groups'));
}
+ // Enable all avatars in the ACP
+ protected function enable_all_avatars()
+ {
+ $this->add_lang('acp/board');
+
+ $crawler = self::request('GET', 'adm/index.php?i=board&mode=avatar&sid=' . $this->sid);
+ // Check the default entries we should have
+ $this->assertContains($this->lang('ALLOW_REMOTE'), $crawler->text());
+ $this->assertContains($this->lang('ALLOW_AVATARS'), $crawler->text());
+ $this->assertContains($this->lang('ALLOW_LOCAL'), $crawler->text());
+
+ // Now start setting the needed settings
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form['config[allow_avatar_local]']->select(1);
+ $form['config[allow_avatar_remote]']->select(1);
+ $form['config[allow_avatar_remote_upload]']->select(1);
+ $crawler = self::submit($form);
+ $this->assertContains($this->lang('CONFIG_UPDATED'), $crawler->text());
+ }
+
public function groups_manage_test_data()
{
return array(
@@ -60,4 +80,34 @@ abstract class phpbb_functional_common_groups_test extends phpbb_functional_test
$crawler = self::submit($form);
$this->assertContains($this->lang($expected), $crawler->text());
}
+
+ public function group_avatar_min_max_data()
+ {
+ return array(
+ array('avatar_driver_upload', 'avatar_upload_url', 'foo', 'AVATAR_URL_INVALID'),
+ array('avatar_driver_upload', 'avatar_upload_url', 'foobar', 'AVATAR_URL_INVALID'),
+ array('avatar_driver_upload', 'avatar_upload_url', 'http://www.phpbb.com/' . str_repeat('f', 240) . '.png', 'TOO_LONG'),
+ array('avatar_driver_remote', 'avatar_remote_url', 'foo', 'AVATAR_URL_INVALID'),
+ array('avatar_driver_remote', 'avatar_remote_url', 'foobar', 'AVATAR_URL_INVALID'),
+ array('avatar_driver_remote', 'avatar_remote_url', 'http://www.phpbb.com/' . str_repeat('f', 240) . '.png', 'TOO_LONG'),
+ );
+ }
+
+ /**
+ * @dataProvider group_avatar_min_max_data
+ */
+ public function test_group_avatar_min_max($avatar_type, $form_name, $input, $expected)
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang(array('ucp', 'acp/groups'));
+ $this->enable_all_avatars();
+
+ $crawler = self::request('GET', $this->get_url() . '&g=5&sid=' . $this->sid);
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form['avatar_driver']->setValue($avatar_type);
+ $form[$form_name]->setValue($input);
+ $crawler = self::submit($form);
+ $this->assertContains($this->lang($expected), $crawler->text());
+ }
}
diff --git a/tests/functional/ucp_groups_test.php b/tests/functional/ucp_groups_test.php
index 1f9749ec15..f48c793ea1 100644
--- a/tests/functional/ucp_groups_test.php
+++ b/tests/functional/ucp_groups_test.php
@@ -50,53 +50,4 @@ class phpbb_functional_ucp_groups_test extends phpbb_functional_common_groups_te
$this->assertContains($this->lang('GROUP_UPDATED'), $crawler->text());
$this->assertEquals($teampage_settings, $this->get_teampage_settings());
}
-
- // Enable all avatars in the ACP
- private function enable_all_avatars()
- {
- $this->add_lang('acp/board');
-
- $crawler = self::request('GET', 'adm/index.php?i=board&mode=avatar&sid=' . $this->sid);
- // Check the default entries we should have
- $this->assertContains($this->lang('ALLOW_REMOTE'), $crawler->text());
- $this->assertContains($this->lang('ALLOW_AVATARS'), $crawler->text());
- $this->assertContains($this->lang('ALLOW_LOCAL'), $crawler->text());
-
- // Now start setting the needed settings
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $form['config[allow_avatar_local]']->select(1);
- $form['config[allow_avatar_remote]']->select(1);
- $form['config[allow_avatar_remote_upload]']->select(1);
- $crawler = self::submit($form);
- $this->assertContains($this->lang('CONFIG_UPDATED'), $crawler->text());
- }
-
- public function group_avatar_min_max_data()
- {
- return array(
- array('uploadurl', 'foo', 'TOO_SHORT'),
- array('uploadurl', 'foobar', 'AVATAR_URL_INVALID'),
- array('uploadurl', str_repeat('f', 256), 'TOO_LONG'),
- array('remotelink', 'foo', 'TOO_SHORT'),
- array('remotelink', 'foobar', 'AVATAR_URL_INVALID'),
- array('remotelink', str_repeat('f', 256), 'TOO_LONG'),
- );
- }
-
- /**
- * @dataProvider group_avatar_min_max_data
- */
- public function test_group_avatar_min_max($form_name, $input, $expected)
- {
- $this->login();
- $this->admin_login();
- $this->add_lang(array('ucp', 'acp/groups'));
- $this->enable_all_avatars();
-
- $crawler = self::request('GET', $this->get_url() . '&g=5&sid=' . $this->sid);
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
- $form[$form_name]->setValue($input);
- $crawler = self::submit($form);
- $this->assertContains($this->lang($expected), $crawler->text());
- }
}
diff --git a/tests/mock/sql_insert_buffer.php b/tests/mock/sql_insert_buffer.php
new file mode 100644
index 0000000000..ba09aa8d7f
--- /dev/null
+++ b/tests/mock/sql_insert_buffer.php
@@ -0,0 +1,21 @@
+buffer)) ? true : false;
+ }
+
+ public function get_buffer()
+ {
+ return $this->buffer;
+ }
+}
diff --git a/tests/notification/convert_test.php b/tests/notification/convert_test.php
new file mode 100644
index 0000000000..4d00fa0a1e
--- /dev/null
+++ b/tests/notification/convert_test.php
@@ -0,0 +1,110 @@
+createXMLDataSet(dirname(__FILE__) . '/fixtures/convert.xml');
+ }
+
+ protected function setUp()
+ {
+ parent::setUp();
+
+ global $phpbb_root_path, $phpEx;
+
+ $this->db = $this->new_dbal();
+
+ $this->migration = new phpbb_db_migration_data_310_notification_options_reconvert(
+ new phpbb_config(array()),
+ $this->db,
+ new phpbb_db_tools($this->db),
+ $phpbb_root_path,
+ $phpEx,
+ 'phpbb_'
+ );
+ }
+
+ public function test_convert()
+ {
+ $buffer = new phpbb_mock_sql_insert_buffer($this->db, 'phpbb_user_notifications');
+ $this->migration->perform_conversion($buffer, 'phpbb_user_notifications');
+
+ $expected = array_merge(
+ $this->create_expected('post', 1, 'email'),
+ $this->create_expected('topic', 1, 'email'),
+
+ $this->create_expected('post', 2, 'email'),
+ $this->create_expected('topic', 2, 'email'),
+ $this->create_expected('pm', 2, 'email'),
+
+ $this->create_expected('post', 3, 'jabber'),
+ $this->create_expected('topic', 3, 'jabber'),
+
+ $this->create_expected('post', 4, 'jabber'),
+ $this->create_expected('topic', 4, 'jabber'),
+ $this->create_expected('pm', 4, 'jabber'),
+
+ $this->create_expected('post', 5, 'both'),
+ $this->create_expected('topic', 5, 'both'),
+
+ $this->create_expected('post', 6, 'both'),
+ $this->create_expected('topic', 6, 'both'),
+ $this->create_expected('pm', 6, 'both')
+ );
+
+ $this->assertEquals($expected, $buffer->get_buffer());
+ }
+
+ protected function create_expected($type, $user_id, $method = '')
+ {
+ $return = array();
+
+ if ($method !== '')
+ {
+ $return[] = array(
+ 'item_type' => $type,
+ 'item_id' => 0,
+ 'user_id' => $user_id,
+ 'method' => '',
+ 'notify' => 1,
+ );
+ }
+
+ if ($method === 'email' || $method === 'both')
+ {
+ $return[] = array(
+ 'item_type' => $type,
+ 'item_id' => 0,
+ 'user_id' => $user_id,
+ 'method' => 'email',
+ 'notify' => 1,
+ );
+ }
+
+ if ($method === 'jabber' || $method === 'both')
+ {
+ $return[] = array(
+ 'item_type' => $type,
+ 'item_id' => 0,
+ 'user_id' => $user_id,
+ 'method' => 'jabber',
+ 'notify' => 1,
+ );
+ }
+
+ return $return;
+ }
+}
diff --git a/tests/notification/fixtures/convert.xml b/tests/notification/fixtures/convert.xml
new file mode 100644
index 0000000000..3f0a065cc4
--- /dev/null
+++ b/tests/notification/fixtures/convert.xml
@@ -0,0 +1,80 @@
+
+
+
+ user_id
+ username
+ username_clean
+ user_notify_type
+ user_notify_pm
+ user_permissions
+ user_sig
+ user_occ
+ user_interests
+
+ 1
+ 1
+ 1
+ 0
+ 0
+
+
+
+
+
+
+ 2
+ 2
+ 2
+ 0
+ 1
+
+
+
+
+
+
+ 3
+ 3
+ 3
+ 1
+ 0
+
+
+
+
+
+
+ 4
+ 4
+ 4
+ 1
+ 1
+
+
+
+
+
+
+ 5
+ 5
+ 5
+ 2
+ 0
+
+
+
+
+
+
+ 6
+ 6
+ 6
+ 2
+ 1
+
+
+
+
+
+
+
diff --git a/tests/template/includephp_test.php b/tests/template/includephp_test.php
index a3dc9bd5c5..ff7b890d11 100644
--- a/tests/template/includephp_test.php
+++ b/tests/template/includephp_test.php
@@ -39,7 +39,7 @@ class phpbb_template_includephp_test extends phpbb_template_template_test_case
$this->assertTrue(phpbb_is_absolute($path_to_php));
$template_text = "Path is absolute.\n";
- $cache_dir = dirname($phpbb_root_path . 'cache') . '/';
+ $cache_dir = $phpbb_root_path . 'cache/';
$fp = fopen($cache_dir . 'includephp_absolute.html', 'w');
fputs($fp, $template_text);
fclose($fp);
diff --git a/tests/template/template_parser_test.php b/tests/template/template_parser_test.php
new file mode 100644
index 0000000000..c200770adf
--- /dev/null
+++ b/tests/template/template_parser_test.php
@@ -0,0 +1,29 @@
+template->set_filenames(array(
+ 'basic' => 'basic.html',
+ ));
+
+ $this->assertEquals("passpasspass", str_replace(array("\n", "\r", "\t"), '', $this->template->assign_display('basic')));
+
+ $this->template->set_filenames(array(
+ 'basic' => 'if.html',
+ ));
+
+ $this->assertEquals("03!false", str_replace(array("\n", "\r", "\t"), '', $this->template->assign_display('basic')));
+ }
+}
diff --git a/tests/template/template_test.php b/tests/template/template_test.php
index fedfeba33a..802f0c19ba 100644
--- a/tests/template/template_test.php
+++ b/tests/template/template_test.php
@@ -403,7 +403,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
$template_text = 'echo "test";';
- $cache_dir = dirname($phpbb_root_path . 'cache') . '/';
+ $cache_dir = $phpbb_root_path . 'cache/';
$fp = fopen($cache_dir . 'php.html', 'w');
fputs($fp, $template_text);
fclose($fp);
diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php
index 4a7bf8d168..6d87e5ebc0 100644
--- a/tests/template/template_test_case.php
+++ b/tests/template/template_test_case.php
@@ -33,7 +33,7 @@ class phpbb_template_template_test_case extends phpbb_test_case
}
catch (Exception $exception)
{
- // reset output buffering even when an error occured
+ // reset output buffering even when an error occurred
// PHPUnit turns trigger_error into exceptions as well
ob_end_clean();
throw $exception;
diff --git a/tests/test_framework/phpbb_test_case_helpers.php b/tests/test_framework/phpbb_test_case_helpers.php
index 50b2bf03ec..3d9cd10f32 100644
--- a/tests/test_framework/phpbb_test_case_helpers.php
+++ b/tests/test_framework/phpbb_test_case_helpers.php
@@ -94,6 +94,9 @@ class phpbb_test_case_helpers
public function makedirs($path)
{
+ // PHP bug #55124 (fixed in 5.4.0)
+ $path = str_replace('/./', '/', $path);
+
mkdir($path, 0777, true);
}
diff --git a/travis/phpunit-mysql-travis.xml b/travis/phpunit-mysql-travis.xml
index 2d6af0e2ac..715e66c223 100644
--- a/travis/phpunit-mysql-travis.xml
+++ b/travis/phpunit-mysql-travis.xml
@@ -15,6 +15,10 @@
../tests/
tests/functional
+ tests/lint_test.php
+
+
+ tests/lint_test.php
../tests/functional
diff --git a/travis/phpunit-postgres-travis.xml b/travis/phpunit-postgres-travis.xml
index a9062efafb..9f281b4c21 100644
--- a/travis/phpunit-postgres-travis.xml
+++ b/travis/phpunit-postgres-travis.xml
@@ -15,6 +15,10 @@
../tests/
tests/functional
+ tests/lint_test.php
+
+
+ tests/lint_test.php
../tests/functional