1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-09-14 10:02:07 +02:00

Compare commits

...

326 Commits

Author SHA1 Message Date
Marc Alexander
524156de78 [prep-release-3.3.3] Update CREDITS.txt 2021-01-13 20:45:52 +01:00
Marc Alexander
3865bf48ff [prep-release-3.3.3] Add changelog for 3.3.3-RC1 2021-01-11 21:28:42 +01:00
Marc Alexander
89b215f681 [prep-release-3.3.3] Add migration for 3.3.3-RC1 2021-01-11 21:24:19 +01:00
Marc Alexander
f315d887bb [prep-release-3.3.3] Update stylesheet query strings 2021-01-11 21:23:08 +01:00
Marc Alexander
3d162e88c3 [prep-release-3.3.3] Update version numbers to 3.3.3 2021-01-11 21:22:23 +01:00
Marc Alexander
7d3ff8c7f2 [prep-release-3.3.3] Update version numbers to 3.3.3-RC1 2021-01-11 21:21:43 +01:00
Marc Alexander
e75a19c099 [prep-release-3.3.3] Upgrade composer dependencies to latest versions
Also removed the workaround for polyfill-intl-idn as patchwork/utf8 has been
fixed.
2021-01-11 21:19:01 +01:00
Marc Alexander
7925512bda [prep-release-3.3.3] Update composer to 2.0.8 2021-01-11 21:14:07 +01:00
Marc Alexander
b83538e4c5 Merge pull request #6116 from CHItA/ticket/16679
[ticket/16679] Respect "allow password reset" setting on login
2021-01-11 17:29:43 +01:00
Marc Alexander
d9dd8cfecf Merge pull request #6117 from rxu/ticket/16675-1
[ticket/16675] Adjust checking commit messages
2021-01-10 14:39:13 +01:00
rxu
0d45825016 [ticket/16675] Check commit messages on pull_request event only
PHPBB3-16675
2021-01-10 15:27:54 +07:00
rxu
f6c6b13fcb [ticket/16675] Adjust checking commit messages
Check commit messages on both 'push' and 'pull_request' events.

PHPBB3-16675
2021-01-10 12:54:42 +07:00
Marc Alexander
0171263d8e Merge pull request #6113 from marc1706/ticket/16666
[ticket/16666] Exclude PGDATA directory in Windows Defender
2021-01-07 20:32:30 +01:00
Máté Bartus
c76fef342d [ticket/16679] Hide password reset link if disabled on the index page
PHPBB3-16679
2021-01-07 19:40:39 +01:00
Billy Noah
2f245faee4 [ticket/16679] Respect "allow password reset" setting on login
PHPBB3-16679
2021-01-07 18:52:32 +01:00
Marc Alexander
9c39ad3ff4 [ticket/16666] Exclude PGDATA directory in Windows Defender
PHPBB3-16666
2021-01-06 17:40:13 +01:00
Marc Alexander
53d966cd64 Merge pull request #6093 from 3D-I/ticket/16656
[ticket/16656] Fix ACP check-in for mbstring http_input & output
2021-01-05 22:53:37 +01:00
Marc Alexander
bec46db5b9 Merge pull request #6110 from CHItA/ticket/16673
[ticket/16673] Update feed.xml.twig
2021-01-05 22:52:37 +01:00
Marc Alexander
3cddd9b58e Merge pull request #6111 from rxu/ticket/16675
[ticket/16675] Restore commit message checks
2021-01-05 22:38:36 +01:00
Marc Alexander
a757904e8f Merge pull request #6112 from CHItA/ticket/16678
[ticket/16678] Allow using traits
2021-01-05 22:12:21 +01:00
rxu
937305bc41 [ticket/16675] Restore commit message checks
PHPBB3-16675
2021-01-06 00:26:08 +07:00
Máté Bartus
7e1529c7df [ticket/16678] Allow using traits
PHPBB3-16678
2021-01-05 18:21:30 +01:00
Máté Bartus
82da2e133b Merge pull request #6106 from iMattPro/ticket/16674
[ticket/16674] Update text-formatter
2021-01-04 23:46:42 +01:00
teokolo
e7160c92f0 [ticket/16673] Update feed.xml.twig
removed whitespace causing feed to be refused by w3c atom validator
and google search console

PHPBB3-16673
2021-01-04 22:56:29 +01:00
Marc Alexander
cbc51bc8e8 Merge pull request #6109 from CHItA/ticket/16676
[ticket/16676] Cache composer dependencies for github actions
2021-01-04 22:21:39 +01:00
3D-I
6738076f72 [ticket/16656] Fix ACP check-in for mbstring http_input & output
PHPBB3-16656
2021-01-04 22:16:05 +01:00
Marc Alexander
8afcaaddab Merge pull request #6101 from 3D-I/ticket/16670
[ticket/16670] Fix ACP check-in for OAuth provider keys - PHP 8
2021-01-04 21:43:58 +01:00
Máté Bartus
a298411fa1 Merge pull request #6108 from kasimi/ticket/16677
[ticket/16677] Copy event listeners and element data when populating dropdown
2021-01-04 21:38:12 +01:00
Máté Bartus
e0967e89a7 [ticket/16676] Cache composer dependencies for github actions
PHPBB3-16676
2021-01-04 21:02:16 +01:00
kasimi
a0feca9711 [ticket/16677] Copy event listeners and element data when populating dropdown
PHPBB3-16677
2021-01-04 18:45:36 +01:00
Matt Friedman
c9a4f2a01a [ticket/16674] Update text-formatter
PHPBB3-16674
2021-01-03 12:44:31 -08:00
Marc Alexander
144dc69370 Merge pull request #6090 from 3D-I/ticket/16653
[ticket/16653] Fix Recaptcha-v3 default request method
2021-01-03 20:51:07 +01:00
Marc Alexander
5e52ada169 Merge pull request #6086 from rxu/ticket/16648
[ticket/16648] Fix possible Access to undeclared static property error in tests
2021-01-03 17:48:25 +01:00
Marc Alexander
2108029812 Merge pull request #6085 from rxu/ticket/16646
[ticket/16646] Fix PHP fatal error on installation
2021-01-03 17:46:18 +01:00
Marc Alexander
bcea90c896 Merge pull request #6084 from JoshyPHP/ticket/16645
[ticket/16645] Simplified text_reparser.poll_option
2021-01-03 17:43:03 +01:00
Máté Bartus
6e56b79e8a Merge pull request #6103 from CHItA/ticket/16671
Fix code sniffer bugs
2021-01-03 00:03:15 +01:00
JoshyPHP
be4afc49ff [ticket/16645] Simplified text_reparser.poll_option
PHPBB3-16645
2021-01-01 22:21:00 +01:00
Marc Alexander
dba60740f6 Merge pull request #6082 from 3D-I/ticket/16641
[ticket/16641] Fix config.php validation in ACP - PHP 8
2021-01-01 16:55:52 +01:00
Máté Bartus
0208dbf985 [ticket/16671] Allow importing functions through use statements
PHPBB3-16671
2021-01-01 11:46:23 +01:00
3D-I
2d548a026f [ticket/16641] Fix config.php validation in ACP - PHP 8
PHPBB3-16641
2020-12-31 22:30:32 +01:00
3D-I
0bfb746991 Merge branch '3.3.x' into ticket/16641 2020-12-31 22:27:12 +01:00
Máté Bartus
fd8cb2a0e8 [ticket/16671] Allow using objects from the global namespace
PHPBB3-16671
2020-12-31 15:22:50 +01:00
Máté Bartus
b3e7c01ab6 [ticket/16671] Fix coding style
PHPBB3-166671
2020-12-31 14:50:28 +01:00
Máté Bartus
3d8f7ee33b [ticket/16671] Do not allow leading backslashes in use statements
PHPBB3-16671
2020-12-31 14:49:49 +01:00
Máté Bartus
8830354555 [ticket/16671] Fix coding style
PHPBB3-16671
2020-12-31 14:40:14 +01:00
Máté Bartus
cb894cee42 [ticket/16671] Match fully qualified names correctly
PHPBB3-16671
2020-12-31 14:39:11 +01:00
3D-I
8382b36823 [ticket/16670] Fix ACP check-in for OAuth provider keys - PHP 8
PHPBB3-16670
2020-12-31 10:20:24 +01:00
Marc Alexander
91e0e84387 Merge pull request #6097 from 3D-I/ticket/16665
[ticket/16665] Fix Emoji for strings in board settings + new event
2020-12-30 22:54:51 +01:00
3D-I
7ceb436021 [ticket/16641] Fix config.php validation in ACP - PHP 8
PHPBB3-16641
2020-12-30 03:02:31 +01:00
3D-I
2c2ee90d58 [ticket/16641] Fix config.php validation in ACP - PHP 8
PHPBB3-16641
2020-12-29 22:05:21 +01:00
3D-I
f95802c211 [ticket/16665] Fix Emoji for strings in board settings
PHPBB3-16665
2020-12-29 20:54:35 +01:00
Marc Alexander
e9851c14f8 Merge pull request #6098 from CHItA/ticket/16667
[ticket/16667] Remove unused installer task
2020-12-29 20:10:50 +01:00
Máté Bartus
94f9a5342a [ticket/16667] Remove unused installer task
PHPBB3-16667
2020-12-29 17:48:06 +01:00
Marc Alexander
63a0a6516c Merge pull request #6096 from marc1706/ticket/16661
[ticket/16661] Clean up github actions tasks after merge
2020-12-28 17:28:25 +01:00
Marc Alexander
9db70086dd [ticket/16661] Add test for phpBB on Windows
PHPBB3-16661
2020-12-27 19:37:38 +01:00
3D-I
c37e8ae8b9 [ticket/16665] Fix Emoji for strings in board settings
Add event

PHPBB3-16665
2020-12-24 05:27:43 +01:00
3D-I
d6427e777c [ticket/16665] Fix Emoji for strings in board settings
PHPBB3-16665
2020-12-24 00:06:44 +01:00
Marc Alexander
3f97a557a6 Merge pull request #6083 from rxu/ticket/16582
[ticket/16582] Fix SQL error on registration with Numbers CPF with no default value set
2020-12-22 21:35:10 +01:00
Marc Alexander
dfbde48dcf Merge pull request #6081 from otseng/otseng/ticket/16640
[ticket/16640] Show MCP link in menu
2020-12-22 21:30:20 +01:00
Marc Alexander
e769ac7941 Merge pull request #6052 from rxu/ticket/16607
[ticket/16607] Update Oracle DBAL driver OCI8 aliases and functions
2020-12-22 21:25:47 +01:00
Marc Alexander
8992277ce8 [ticket/16661] Exclude extension .git directory in executable check
PHPBB3-16661
2020-12-22 21:17:24 +01:00
Marc Alexander
1b2819065a [ticket/16661] Remove Appveyor builds
PHPBB3-16661
2020-12-22 21:13:58 +01:00
Marc Alexander
97ddf7e008 [ticket/16661] Add check executable files for extensions
Also added some minor code adjustments.

PHPBB3-16661
2020-12-20 22:26:53 +01:00
Marc Alexander
f67e2b9fe0 [ticket/16661] Stop building on travis CI
PHPBB3-16661
2020-12-20 22:23:23 +01:00
Marc Alexander
23caeec1cf [ticket/16661] Add build badge and remove PR branch from builds
PHPBB3-16661
2020-12-20 22:23:07 +01:00
Marc Alexander
202a453282 Merge pull request #6095 from marc1706/ticket/16659
[ticket/16659] Use Github Actions for continuous integration
2020-12-20 21:29:32 +01:00
Marc Alexander
8013bb369a [ticket/16659] Build PR branch to show that CI is working
PHPBB3-16659
2020-12-19 21:43:36 +01:00
Marc Alexander
8536c437c4 [ticket/16659] Undo changes to travis folder
Github actions are using their own scripts etc.

PHPBB3-16659
2020-12-19 21:41:54 +01:00
Marc Alexander
9762cbf94f [ticket/16659] Remove test branch from build branches
PHPBB3-16659
2020-12-19 21:32:38 +01:00
Marc Alexander
a1b994a8cd [ticket/16659] Add scripts for ext preparation and sniffing
PHPBB3-16659
2020-12-19 21:30:36 +01:00
Marc Alexander
ef22a029b2 [ticket/16659] Split up tests for each database type
PHPBB3-16659
2020-12-19 21:30:27 +01:00
Marc Alexander
b3e3d9642e [ticket/16659] Add missing postgres test and improve naming
PHPBB3-16659
2020-12-19 21:30:16 +01:00
Marc Alexander
452f2cd086 [ticket/16659] Enable all items in build matrix
PHPBB3-16659
2020-12-19 21:30:06 +01:00
Marc Alexander
e0c5c0047d [ticket/16659] Enable notests tests with commit message check
PHPBB3-16659
2020-12-19 21:29:58 +01:00
Marc Alexander
2a1a22dffe [ticket/16659] Adjust slapd setup for apparmor configuration
PHPBB3-16659
2020-12-19 21:29:49 +01:00
Marc Alexander
67da9e0e85 [ticket/16659] Add setup script for LDAP
PHPBB3-16659
2020-12-19 21:29:39 +01:00
Marc Alexander
c2c2c3f62b [ticket/16659] Add commit message check
PHPBB3-16659
2020-12-19 21:29:29 +01:00
Marc Alexander
bff3c7c7af [ticket/16659] Add slow tests
PHPBB3-16659
2020-12-19 21:29:20 +01:00
Marc Alexander
e2f21b3dd3 [ticket/16659] Use matrix db alias for MSSQL builds
PHPBB3-16659
2020-12-19 21:29:12 +01:00
Marc Alexander
6c9ecf1cc8 [ticket/16659] Add tests for MSSQL
PHPBB3-16659
2020-12-19 21:29:02 +01:00
Marc Alexander
4f282db6e2 [ticket/16659] Resolve issues with fulltext search in mariadb
PHPBB3-16659
2020-12-19 21:28:52 +01:00
Marc Alexander
d6e1989e1f [ticket/16659] First test run with all current tests
PHPBB3-16659
2020-12-19 21:28:43 +01:00
Marc Alexander
4729be9e96 [ticket/16659] Add builds for MySQL 8 and PHP 8.1
PHPBB3-16659
2020-12-19 21:28:34 +01:00
Marc Alexander
bb020c3e6b [ticket/16659] Make sure php-fpm is installed
PHPBB3-16659
2020-12-19 21:28:23 +01:00
Marc Alexander
c22cacf9bd [ticket/16659] Test with PHP 8
PHPBB3-16659
2020-12-19 21:28:14 +01:00
Marc Alexander
0907087ee3 [ticket/16659] Add steps for notests run
PHPBB3-16659
2020-12-19 21:28:04 +01:00
Marc Alexander
1e985dc4f0 [ticket/16659] Add PHP 8.0 and notests run
PHPBB3-16659
2020-12-19 21:27:52 +01:00
Marc Alexander
5b82ca23d3 [ticket/16659] Remove special definitions for mariadb setup
PHPBB3-16659
2020-12-19 21:27:40 +01:00
Marc Alexander
2cdebe57af [ticket/16659] Use volume for /var/run/mysqld
PHPBB3-16659
2020-12-19 21:26:39 +01:00
Marc Alexander
5cbe25d415 [ticket/16659] Enable mariadb tests
PHPBB3-16659
2020-12-19 21:26:15 +01:00
Marc Alexander
d764888393 [ticket/16659] Enable sqlite3 tests
PHPBB3-16659
2020-12-19 21:26:03 +01:00
Marc Alexander
1710a38ced [ticket/16659] Add postgres tests
PHPBB3-16659
2020-12-19 21:25:44 +01:00
Marc Alexander
ba75aa9d0c [ticket/16659] Limit tests to mysql for now
PHPBB3-16659
2020-12-19 21:25:07 +01:00
Marc Alexander
cbf98a2d7d [ticket/16659] Start setting up test workflow on github actions
PHPBB3-16659
2020-12-19 21:24:43 +01:00
3D-I
7210cb8e99 [ticket/16653] Fix Recaptcha-v3 default request method
PHPBB3-16653
2020-12-10 07:26:16 +01:00
rxu
ee3a3ef5fa [ticket/16648] Fix possible Access to undeclared static property error in tests
PHPBB3-16648
2020-12-05 15:19:45 +07:00
rxu
888bc86608 [ticket/16646] Fix PHP fatal error on installation
PHPBB3-16646
2020-12-01 15:32:22 +07:00
3D-I
b9b50a108b [ticket/16641] Fix config.php validation in ACP - PHP 8
PHPBB3-16641
2020-11-28 18:28:26 +01:00
rxu
022b58f986 [ticket/16582] Fix SQL error on registration with Numbers CPF with no default
PHPBB3-16582
2020-11-28 19:01:25 +07:00
3D-I
557160f158 [ticket/16641] Fix config.php validation in ACP - PHP 8
PHPBB3-16641
2020-11-28 06:26:00 +01:00
3D-I
ea5028cf2a [ticket/16641] Fix config.php validation in ACP - PHP 8
PHPBB3-16641
2020-11-28 05:39:15 +01:00
3D-I
4e8b104543 [ticket/16641] Fix config.php validation in ACP - PHP 8
PHPBB3-16641
2020-11-27 20:50:40 +01:00
3D-I
146d72468f [ticket/16641] Fix config.php validation in ACP - PHP 8
PHPBB3-16641
2020-11-26 23:58:41 +01:00
3D-I
f711133580 [ticket/16641] Fix config.php validation in ACP - PHP 8
PHPBB3-16641
2020-11-26 23:51:54 +01:00
3D-I
cd42c0e306 [ticket/16641] Fix config.php validation in ACP - PHP 8
PHPBB3-16641
2020-11-26 23:45:22 +01:00
3D-I
c0511d54fd [ticket/16641] Fix CHMOD validation for config.php - PHP 8
PHPBB3-16641
2020-11-25 22:43:34 +01:00
Tseng, Oliver
ec3a2fa063 [ticket/16640] Show MCP link in menu
PHPBB3-16640
2020-11-23 23:35:10 -05:00
Marc Alexander
5a55891d06 Merge pull request #6080 from rxu/ticket/16178
[ticket/16178] Make container_builder use same cache directory as Container
2020-11-22 22:02:45 +01:00
Marc Alexander
f602f99b1a Merge pull request #6079 from rxu/ticket/16606
[ticket/16606] Add template events to ucp_pm_viewmessage.html
2020-11-22 21:44:56 +01:00
Marc Alexander
80708022e6 Merge pull request #6078 from rxu/ticket/16617
[ticket/16617] Add events to override message/PM BBCode status indications
2020-11-22 21:40:02 +01:00
rxu
01cb8b3a9b [ticket/16178] Fix test
PHPBB3-16178
2020-11-22 13:43:55 +07:00
Joshua Angnoe
c6fe6d49bc [ticket/16178] Make container_builder use same cache directory as Container
Both should be using the same core.cache_dir directory.

PHPBB3-16178
2020-11-22 12:03:05 +07:00
G-T-I
1d398ee2c3 [ticket/16606] Add template events to ucp_pm_viewmessage.html
PHPBB3-16606
2020-11-21 21:23:18 +07:00
rxu
812ba990ac [ticket/16617] Shorten event names
PHPBB3-16617
2020-11-21 13:33:04 +07:00
rxu
5d270319e5 [ticket/16617] Add events to override message/PM BBCode status indications
PHPBB3-16617
2020-11-21 12:56:57 +07:00
pasha
5d66d4c91f [ticket/16617] Events for posting/pm statuses
PHPBB3-16617
2020-11-21 12:56:52 +07:00
Marc Alexander
eefd3c0197 Merge pull request #5523 from toxyy/ticket/15951
[ticket/15951] Add core events to mcp
2020-11-20 22:49:46 +01:00
Marc Alexander
cdd9600c60 Merge pull request #6077 from rxu/ticket/16636
[ticket/16636] Add PHP 8.0 builds to TravisCI
2020-11-20 17:54:32 +01:00
Marc Alexander
9ff962e86d Merge pull request #6076 from 3D-I/ticket/16629
[ticket/16629] Fix ACP get_database_size() for MySql 8
2020-11-20 17:53:26 +01:00
rxu
5a5236760e [ticket/16636] Add PHP 8.0 builds to TravisCI
PHPBB3-16636
2020-11-20 21:14:34 +07:00
3D-I
62115f378a [ticket/16629] Fix ACP get_database_size() for MySql 8
PHPBB3-16629
2020-11-20 09:19:55 +01:00
Marc Alexander
d88dff51fb [ticket/15951] Adjust event docblock and update since version
PHPBB3-15951
2020-11-19 22:42:14 +01:00
Marc Alexander
3d1874adcc Merge pull request #6075 from marc1706/ticket/16633
[ticket/16633] Update pull request template to remove 3.2.x
2020-11-19 17:27:49 +01:00
Marc Alexander
5197883379 Merge pull request #6070 from 3D-I/ticket/16629
[ticket/16629] Fix ACP get_database_size() for MySql 8
2020-11-19 17:25:19 +01:00
3D-I
cd235dfd42 [ticket/16629] Fix ACP get_database_size() for MySql 8
PHPBB3-16629
2020-11-15 23:00:22 +01:00
Marc Alexander
67f1c63926 [ticket/16633] Update pull request template to remove 3.2.x
PHPBB3-16633
2020-11-15 21:18:58 +01:00
Marc Alexander
fb525f7cdc Merge pull request #6022 from rxu/ticket/16549
[3.3.x][ticket/16549] Use PHPUnit 9.3+ for PHP 8.0+ tests
2020-11-15 20:48:54 +01:00
rxu
f1c178b544 [ticket/16549] Rewrite at() calls
See https://github.com/sebastianbergmann/phpunit/issues/4297

PHPBB3-16549
2020-11-15 18:56:22 +07:00
rxu
eb754e3a84 [ticket/16549] Fix database testcase transactions handling, fix indentations
PHPBB3-16549
2020-11-15 00:27:58 +07:00
Marc Alexander
0fe7972d0d Merge pull request #6072 from marc1706/ticket/16632
[ticket/16632] Update to composer version 2
2020-11-14 11:56:32 +01:00
Marc Alexander
6d55fec093 [ticket/16632] Modify packge-version-deprecated version specifier
PHPBB3-16632
2020-11-13 22:30:33 +01:00
Marc Alexander
5a66012c6c [ticket/16632] Update to composer version 2
PHPBB3-16632
2020-11-13 22:20:25 +01:00
3D-I
3521d2e9fa [ticket/16629] Fix ACP get_database_size() for MySql 8
Add functional test (thanks rxu)

PHPBB3-16629
2020-11-12 08:18:05 +01:00
Marc Alexander
597f001e42 Merge pull request #6071 from JoshyPHP/ticket/16630
[ticket/16630] Restore clean_formatting()'s behaviour
2020-11-11 21:50:05 +01:00
JoshyPHP
8a8893fbd3 [ticket/16630] Restore clean_formatting()'s behaviour
PHPBB3-16630
2020-11-06 23:07:30 +01:00
Marc Alexander
39c3a6c3e5 Merge branch 'prep-release-3.3.2' into 3.3.x 2020-11-06 17:06:22 +01:00
3D-I
4b2c253427 [ticket/16629] Fix ACP get_database_size() for MySql 8
PHPBB3-16629
2020-11-05 05:08:09 +01:00
Marc Alexander
f98653d2c9 [prep-release-3.3.2] Add migration for 3.3.2 2020-11-04 22:11:34 +01:00
Marc Alexander
c521f1d6a7 [prep-release-3.3.2] Update version numbers for 3.3.2 2020-11-04 22:09:55 +01:00
Marc Alexander
17104fde04 Merge branch 'prep-release-3.2.11' into prep-release-3.3.2 2020-11-04 22:08:26 +01:00
Marc Alexander
2f14cc832c Merge branch '3.2.x' into 3.3.x 2020-11-04 22:05:11 +01:00
Marc Alexander
585728bc23 Merge branch 'prep-release-3.2.11' into 3.2.x 2020-11-04 22:00:12 +01:00
Marc Alexander
22c3b7edd6 [prep-release-3.2.11] Update changelog for 3.2.11 2020-11-04 20:00:56 +01:00
Marc Alexander
fa73b0b250 Merge pull request #63 from phpbb/ticket/security-265
[ticket/security-265] Reduce verbosity of jabber error return
2020-11-04 20:00:45 +01:00
Marc Alexander
d82715372b [ticket/security-265] Add better checks for empty or not set data
SECURITY-265
2020-11-04 16:36:53 +01:00
Marc Alexander
084675c4f3 [ticket/security-265] Reduce verbosity of jabber error return
SECURITY-265
2020-11-04 16:36:53 +01:00
Marc Alexander
0a6421939b [prep-release-3.2.11] Update changelog for 3.2.11 2020-11-04 16:35:34 +01:00
Marc Alexander
d5ca3dc132 [prep-release-3.2.11] Add migration for 3.2.11 2020-11-04 16:35:27 +01:00
Marc Alexander
adcbe0a2b1 [prep-release-3.2.11] Update versions for 3.2.11 2020-11-04 16:35:22 +01:00
Marc Alexander
556f7adab1 Merge pull request #62 from phpbb/ticket/security-264
[ticket/security-264] Ensure HTML entity state after removing formatting
2020-11-04 16:35:05 +01:00
3D-I
d3afd6ec68 [ticket/16629] Fix ACP get_database_size() for MySql 8
PHPBB3-16629
2020-11-02 17:42:23 +01:00
Marc Alexander
fe9f5e3386 Merge pull request #6069 from Noxwizard/ticket/16625
[ticket/16625] Add mbstring to install docs
2020-10-27 20:54:57 +01:00
Noxwizard
743d83ef71 [ticket/16625] Add mbstring to install docs
PHPBB3-16625
2020-10-26 21:03:39 +01:00
Marc Alexander
76c18255b6 Merge pull request #6014 from rxu/ticket/16538
[ticket/16538] Add MySQL 8 tests
2020-10-25 16:21:01 +01:00
Marc Alexander
a6b1c27a5d Merge pull request #6068 from marc1706/ticket/16619
[ticket/16619] Corrected spelling of non-existant
2020-10-25 10:33:50 +01:00
Marc Alexander
783cea8d52 Merge pull request #5291 from toxyy/ticket/15722
[ticket/15722] Allow forum topicrow pagination to use topicrow values
2020-10-24 17:31:16 +02:00
Mark D. Hamill
a7810bc279 [ticket/16619] Corrected spelling of non-existant
PHPBB3-16619
2020-10-24 15:06:35 +02:00
Marc Alexander
dd7a184926 [3.3.x] Update version numbers to 3.3.3-dev 2020-10-24 10:39:11 +02:00
Marc Alexander
7cbcf4351b Merge branch 'prep-release-3.3.2' into 3.3.x 2020-10-24 10:37:32 +02:00
Marc Alexander
3957161124 [ticket/security-264] Ensure HTML entity state after removing formatting
SECURITY-264
2020-10-23 20:38:51 +02:00
Marc Alexander
840173a21e [prep-release-3.3.2] Update Changelog for 3.3.2-RC1 2020-10-19 21:20:20 +02:00
Marc Alexander
66e9832f5e [prep-release-3.3.2] Add migration for 3.3.2-RC1 2020-10-19 20:48:53 +02:00
Marc Alexander
67ad602041 [prep-release-3.3.2] Update version numbers to 3.3.2 2020-10-18 13:54:44 +02:00
Marc Alexander
7716961f07 [prep-release-3.3.2] Update version number to 3.3.2-RC1 2020-10-18 13:54:02 +02:00
Marc Alexander
6876559ceb [prep-release-3.3.2] Add 2020 to CREDITS.txt 2020-10-18 13:53:00 +02:00
rxu
fe38280a1a [ticket/16549] Fix tests
1. If $service array is empty, $service[0] call will throw fatal error in PHP 8.
2. Division by zero was promoted to fatal error
and throws DivisionByZeroError exception in PHP 8+
3. Adjust make_clickable() logic to avoid 'Undefined array key 3' error.

PHPBB3-16549
2020-10-18 14:59:11 +07:00
rxu
fff200b1d8 [ticket/16549] Rename class phpbb_lint_test rather than the test file
PHPBB3-16549
2020-10-18 11:26:44 +07:00
rxu
cc753db132 [ticket/16549] Fix new tests
PHPBB3-16549
2020-10-18 10:37:17 +07:00
rxu
ec565de6cb [ticket/16549] Fix tests
PHPBB3-16549
2020-10-18 10:37:16 +07:00
rxu
fc631040fd [ticket/16549] Fix composer dependencies
PHPBB3-16549
2020-10-18 10:37:16 +07:00
rxu
615d5eaa77 [ticket/16549] Fix select auth method test
PHPBB3-16549
2020-10-18 10:36:43 +07:00
rxu
72c4c18364 [ticket/16549] Require stable versions as PHPUnit 9.3 has been released
PHPBB3-16549
2020-10-18 10:36:42 +07:00
rxu
4c4debf004 [ticket/16549] PHPUnit function declarations tiny cleanup
PHPBB3-16549
2020-10-18 10:36:42 +07:00
rxu
7323e4467b [ticket/16549] rename lint_test.php
As of PHPUnit 9.1, test filename should match test class name.

PHPBB3-16549
2020-10-18 10:36:41 +07:00
rxu
c954249dfa [ticket/16549] Avoid deprecated properties/methods in newer PHPUnit versions
PHPBB3-16549
2020-10-18 10:36:41 +07:00
rxu
f6a7fe168a [ticket/16549] update dependencies for nightly tests
PHPBB3-16549
2020-10-18 10:36:41 +07:00
rxu
659e1e4a26 [ticket/16549] Fix wrong exception message function names
PHPBB3-16549
2020-10-18 10:36:40 +07:00
rxu
632bcdd2da [ticket/16549] Remove exception expectation annotations
PHPBB3-16549
2020-10-18 10:36:40 +07:00
rxu
fb62d22013 [ticket/16549] Add void return type of template methods
PHPBB3-16549
2020-10-18 10:36:39 +07:00
rxu
58ea656fd8 [ticket/16549] Move from assert[Not]Contains to assertString[Not]ContainsString
PHPBB3-16549
2020-10-18 10:36:39 +07:00
Marc Alexander
16d8698e1b Merge pull request #6062 from marc1706/ticket/16616
[ticket/16616] Update composer dependencies to latest versions
2020-10-17 16:59:39 +02:00
Marc Alexander
d8ae6cea75 [ticket/16616] Update composer to 1.10.6
PHPBB3-16616
2020-10-17 10:59:18 +02:00
Marc Alexander
dc40572312 [ticket/16616] Do not use latest polyfill-intl-idn
It has a declaration conflict with patchwork/utf8.

PHPBB3-16616
2020-10-17 10:57:42 +02:00
Marc Alexander
3c014ccb2b Merge pull request #6058 from Crizz0/ticket/16612
[ticket/16612] Restructure HTML of Terms PP COPPA
2020-10-14 21:21:19 +02:00
Christian Schnegelberger
bd22a92d68 [ticket/16612] Add <br> to ToU and PP
PHPBB3-16612
2020-10-13 20:00:29 +02:00
Christian Schnegelberger
40c2fa7e5e [ticket/16612] Remove html from lang key instead of 1 br per paragraph
PHPBB3-16612
2020-10-13 19:20:48 +02:00
Christian Schnegelberger
604b3f49b7 [ticket/16612] Change class names from agreement text
PHPBB3-16612
2020-10-09 19:13:24 +02:00
Marc Alexander
f6cbc7e80b [ticket/16616] Update composer dependencies to latest versions
PHPBB3-16616
2020-10-08 21:38:03 +02:00
Marc Alexander
0417599344 Merge pull request #6002 from rxu/ticket/16512
[ticket/16512] Fix make_clickable() to make use of custom link classes
2020-10-08 21:26:10 +02:00
Marc Alexander
c694e86422 Merge pull request #6054 from senky/ticket/16593
[ticket/16593] Define params in the constructor
2020-10-08 21:18:47 +02:00
Christian Schnegelberger
794ad66896 [ticket/16612] Get back to <br> and add <p> for coppa in template
PHPBB3-16612
2020-10-08 09:07:26 +02:00
Marc Alexander
857cec0509 Merge pull request #6053 from senky/ticket/16562
[ticket/16562] Add password requirements to reset
2020-10-07 21:30:55 +02:00
Christian Schnegelberger
d3472cd4a1 [ticket/16612] Use px instead of em for css properties
PHPBB3-16612
2020-10-07 19:23:51 +02:00
rxu
d6078821c5 [ticket/16512] Minor code adjustments
PHPBB3-16512
2020-10-06 07:31:29 +07:00
Marc Alexander
1f98477c22 Merge pull request #6049 from rxu/ticket/16604
[ticket/16604] Display warning messages on avatar upload setting issues
2020-10-05 18:12:38 +02:00
Marc Alexander
c8351d6d20 Merge pull request #6051 from rxu/ticket/16605
[ticket/16605] Fix possible SQL error on user registration
2020-10-05 18:08:48 +02:00
Marc Alexander
54eef1153f Merge pull request #6055 from senky/ticket/16532
[ticket/16532] Store example post in XML
2020-10-04 21:15:42 +02:00
Marc Alexander
88d257f04b Merge pull request #6057 from iMattPro/ticket/16608
[ticket/16608] Modernize readme
2020-10-04 21:11:46 +02:00
Christian Schnegelberger
14d96d0086 [ticket/16612] Restructure HTML of Terms PP COPPA
PHPBB3-16612
2020-10-03 23:36:16 +02:00
Matt Friedman
8ad14af39c [ticket/16608] Add documentation info
PHPBB3-16608
2020-10-02 09:42:07 -07:00
Matt Friedman
52217bd4e4 [ticket/16608] Cosmic Logo
PHPBB3-16608
2020-10-02 00:15:22 -07:00
Matt Friedman
dfdb92d3ab [ticket/16608] Update images again
PHPBB3-16608
2020-10-02 00:00:13 -07:00
Matt Friedman
358a5d8b46 [ticket/16608] Adjust the blueness of the logo
PHPBB3-16608
2020-10-01 23:36:25 -07:00
Matt Friedman
dcfddb8445 [ticket/16608] Modernize readme
PHPBB3-16608
2020-10-01 17:57:12 -07:00
Jakub Senko
fa14375a65 [ticket/16562] Add password requirements to reset
Credits to thecoalman:
https://www.phpbb.com/community/viewtopic.php?p=15560491#p15560491

PHPBB3-16562
2020-09-30 13:35:15 +02:00
Jakub Senko
b494e6b043 [ticket/16593] Define params in the constructor
PHPBB3-16593
2020-09-30 13:17:16 +02:00
rxu
46d0cf7bb4 [ticket/16607] Update Oracle DBAL driver OCI8 aliases and functions
PHPBB3-16607
2020-09-29 22:13:19 +07:00
rxu
00849941c3 [ticket/16605] Fix possible SQL error on user registration
mysqli_insert_id() returns 0 if there was no previous query on the connection
or if the query did not update an AUTO_INCREMENT value for some reason.

PHPBB3-16605
2020-09-29 21:10:06 +07:00
rxu
36554f3ce8 [ticket/16604] Adjust code logic
PHPBB3-16604
2020-09-25 22:08:18 +07:00
Jakub Senko
2cb7e510dc [ticket/16532] Store example post in XML
PHPBB3-16532
2020-09-25 15:03:10 +02:00
rxu
d80367c5fc [ticket/16604] Adjust filesystem service dependency injection placement
PHPBB3-16604
2020-09-24 23:48:57 +07:00
Marc Alexander
6b92f23c81 Merge pull request #5944 from mrgoldy/ticket/16436
[ticket/16436] Display correct "no topics" message when filtering by time
2020-09-23 18:53:38 +02:00
rxu
4698d20fb4 [ticket/16604] Do not test avatar upload directory permissions on Windows
PHPBB3-16604
2020-09-22 18:59:04 +07:00
rxu
f4287e1f56 [ticket/16604] Add test
PHPBB3-16604
2020-09-22 01:27:28 +07:00
rxu
0d68cebea8 [ticket/16604] Improve code readability
PHPBB3-16604
2020-09-21 22:30:42 +07:00
rxu
5e351dad53 [ticket/16604] Display warning messages on avatar upload setting issues
PHPBB3-16604
2020-09-20 23:29:58 +07:00
Marc Alexander
2db4dc8c96 Merge pull request #6020 from rxu/ticket/16208
[ticket/16208] Fix posts/PM report notifications
2020-09-19 13:48:11 +02:00
rxu
856fcf7554 [ticket/16208] Code adjustments
PHPBB3-16208
2020-09-19 18:15:13 +07:00
rxu
242476c290 [ticket/16208] Fix closed post report notifications
PHPBB3-16208
2020-09-19 18:12:12 +07:00
rxu
3caa31bf58 [ticket/16208] Fix posts/PM report notifications
PHPBB3-16208
2020-09-19 18:11:59 +07:00
Marc Alexander
9c5f338d3c Merge pull request #6037 from kasimi/ticket/16565
[ticket/16565] Lazy-load cron.task_collection
2020-09-19 11:12:41 +02:00
Marc Alexander
43eeb008fa Merge pull request #6048 from JoshyPHP/ticket/16602
[ticket/16602] Check for mbstring extension support on install
2020-09-19 10:50:07 +02:00
Marc Alexander
0be63a81c7 Merge pull request #6046 from 3D-I/ticket/16569
[ticket/16569] Fix massive margin between zoomed posts
2020-09-17 22:06:16 +02:00
JoshyPHP
5b0406cfdc [ticket/16602] Added mbstring to Composer requirements
PHPBB3-16602
2020-09-16 00:42:34 +02:00
JoshyPHP
ca62538ce3 [ticket/16602] Check for mbstring extension support on install
PHPBB3-16602
2020-09-16 00:21:17 +02:00
3D-I
fb3f811cf3 [ticket/16569] Fix massive margin between zoomed posts
PHPBB3-16569
2020-09-15 02:34:46 +02:00
Marc Alexander
192c1d81b8 Merge branch '3.2.x' into 3.3.x 2020-09-13 20:34:59 +02:00
Marc Alexander
d451f4180e Merge pull request #6044 from marc1706/ticket/16597
[ticket/16597] Remove not supported branches from doctum-all.conf.php
2020-09-13 20:34:55 +02:00
Marc Alexander
5df37895d8 Merge pull request #6045 from marc1706/ticket/16597-3.2
[ticket/16597] Stop building docs with sami for 3.3 and above
2020-09-13 20:34:04 +02:00
Marc Alexander
d83eefaf14 Merge branch 'ticket/16597-3.2' into ticket/16597 2020-09-11 19:33:15 +02:00
Marc Alexander
0d2e9455aa [ticket/16597] Stop building docs with sami for 3.3 and above
PHPBB3-16597
2020-09-11 19:31:43 +02:00
Marc Alexander
8bd35d47ad [ticket/16597] Remove not supported branches from doctum-all.conf.php
PHPBB3-16597
2020-09-11 10:43:57 +02:00
Marc Alexander
c728889e0e Merge pull request #5168 from juanse254/ticket/15594
[ticket/15594] Removed references to AOL and AIM as it is discontinued.
2020-09-11 10:10:20 +02:00
Marc Alexander
4de62a3712 [ticket/15594] Use correct v33x namespace for migration
PHPBB3-15594
2020-09-10 12:52:11 +02:00
Marc Alexander
c141962dc8 Merge pull request #6018 from rxu/ticket/16544
[ticket/16544] Use forum_notify.txt for forum subscription email notifications
2020-09-10 12:43:40 +02:00
Marc Alexander
93796bb474 Merge pull request #5327 from rubencm/ticket/15300
[ticket/15300] Show maximum attachment filesize
2020-09-09 09:24:25 +02:00
Marc Alexander
619820a059 Merge pull request #6043 from code-lts/3.3.x
[ticket/16587] Replace Sami by Doctum
2020-09-08 20:33:58 +02:00
William Desportes
3be5ab3a5c [ticket/16587] Restore the Doctum config script and document the process
PHPBB3-16587
2020-09-08 11:08:35 +02:00
William Desportes
7f29daf0d4 [ticket/16587] Improve the wording of the update script
PHPBB3-16587
2020-09-08 11:00:46 +02:00
Marc Alexander
9a23f187ce [ticket/16587] Adjust composer.lock to reflect all changes for sami removal
PHPBB3-16587
2020-09-08 10:40:35 +02:00
William Desportes
8b21096919 [ticket/16587] Add Doctum phar file
PHPBB3-16587
2020-09-07 12:11:31 +02:00
William Desportes
4dada87d32 [ticket/16587] Clean the TravisCI Doctum script and update build file
PHPBB3-16587
2020-09-07 12:11:31 +02:00
William Desportes
322f8eabd6 [ticket/16587] Replace Sami by Doctum
PHPBB3-16587
2020-09-07 12:11:31 +02:00
William Desportes
2b17ecf196 [ticket/16587] Use Doctum phar
PHPBB3-16587
2020-09-07 12:11:31 +02:00
William Desportes
1484f8ce91 [ticket/16587] Replace Sami by Doctum
PHPBB3-16587
2020-09-07 12:11:31 +02:00
Marc Alexander
52cb565eef [ticket/16587] Remove Doctum from composer.json
PHPBB3-16587

[ticket/16587] Adjust composer.lock changes to only removal of sami

PHPBB3-16587
2020-09-07 12:11:31 +02:00
William Desportes
a755103350 [ticket/16587] Clean the TravisCI Doctum script
PHPBB3-16587
2020-09-07 12:11:31 +02:00
William Desportes
414e17a089 [ticket/16587] Fix phpdoc errors reported by Doctum on @todo blocks
PHPBB3-16587
2020-09-07 12:11:31 +02:00
William Desportes
fedfc330ef [ticket/16587] Fix phpdoc errors reported by Doctum
PHPBB3-16587
2020-09-07 12:11:31 +02:00
Marc Alexander
8a8a05e31c Merge pull request #6029 from MichaIng/ticket/16556
[ticket/16556] Remove purposeless <Files "*"> from .htaccess
2020-09-07 11:51:05 +02:00
rxu
8e2dd65c6e [ticket/16544] Correctly mark notification read
PHPBB3-16544
2020-09-02 22:11:52 +07:00
rxu
02f54ef219 [ticket/16544] Fix notifications tests
PHPBB3-16544
2020-09-02 22:11:51 +07:00
rxu
aa76f6b9f2 [ticket/16544] Use forum_notify.txt for forum subscription email notifications
PHPBB3-16544
2020-09-02 22:11:51 +07:00
MichaIng
eff277a872 [ticket/16556] Remove purposeless <Files "*"> from .htaccess
Wrapping access permissions into <Files "*"> at best has zero effect
and implies unnecessary code and parsing for the web server. At least
it does not block access to files only, but still denies auto indexing
and access to sub directories effectively as well. But removing this
directive is still the cleaner and safer way to deny access to any
kind of resource that is provided within the directory in question.

To deny access to migration data, a single .htaccess file can be used.
This reduces the effort for future changes and it is not required
anymore to create new .htaccess files for every new migration
directory.

Additionally this corrects the fact the "Require" is part of
"mod_authz_core", not "mod_authz_host".

PHPBB3-16556

Signed-off-by: MichaIng <micha@dietpi.com>
2020-09-01 18:19:13 +02:00
Marc Alexander
e56088f921 [ticket/15594] Adjust depends_on and add effectively_installed check
PHPBB3-15594
2020-08-30 22:14:56 +02:00
Marc Alexander
269f9251a2 [ticket/15594] Convert to short array syntax
PHPBB3-15594
2020-08-30 22:12:16 +02:00
Marc Alexander
ca2a380d03 [ticket/15594] Move remove_profilefield_aol migration to v33x
PHPBB3-15594
2020-08-30 22:08:44 +02:00
juanse254
a2ab14d9d5 [ticket/15594] Removed references to AOL and AIM as it is discontinued.
Since AIM is not available anymore,
AOL fields must be removed and redirected to profile.
Also, a migration file was created for current users
updating to 3.2.x.

PHPBB3-15594
2020-08-30 22:08:24 +02:00
Marc Alexander
0d3dd61ad4 Merge pull request #6007 from rxu/ticket/16526
[ticket/16526] Correctly handle ACP CSV settings
2020-08-30 14:47:20 +02:00
rxu
13aa1ff760 [ticket/16526] Get rid of goto operator
PHPBB3-16526
2020-08-30 18:04:04 +07:00
Marc Alexander
7870c48ced [ticket/15300] Only display max filesize if it's not zero
PHPBB3-15300
2020-08-29 13:56:25 +02:00
Marc Alexander
5d0f7229e3 Merge pull request #6019 from rxu/ticket/16488
[ticket/16488] Fix not displaying min input element attribute when 0
2020-08-28 21:14:12 +02:00
Marc Alexander
bd407fd866 [ticket/16488] Add test for min value 0 as min number
PHPBB3-16488
2020-08-27 20:41:38 +02:00
Marc Alexander
98515e7c7d Merge pull request #6041 from Crizz0/ticket/16588
[ticket/16588] Updates link to plural rules from 3.2.x to 3.3.x
2020-08-25 21:04:49 +02:00
Christian Schnegelberger
34d415a6b3 [ticket/16588] Updates link to plural rules from 3.2.x to 3.3.x
PHPBB3-16588
2020-08-25 12:11:56 +02:00
Marc Alexander
c1ce0153ea Merge pull request #5981 from ansavin/ticket/16366
[ticket/16366] Make viewtopic lang vars available in feed pages
2020-08-23 16:49:36 +02:00
Marc Alexander
9de41ce44c Merge pull request #6038 from JoshyPHP/ticket/16580
[ticket/16580] Update rendering tests to match actual Prosilver
2020-08-23 16:46:40 +02:00
JoshyPHP
9efa7c1a8c [ticket/16580] Fixed email template in bbcode.html
Relates to #4976

PHPBB3-16580
2020-08-20 14:36:29 +02:00
JoshyPHP
762d9fcf7b [ticket/16580] Updated email-related test
This ensures that re-activating email fields does not introduce any exploit

PHPBB3-16580
2020-08-20 14:35:38 +02:00
JoshyPHP
62333f0ca2 [ticket/16580] Updated regression tests
PHPBB3-16580
2020-08-20 14:35:38 +02:00
JoshyPHP
1ac142347e [ticket/16580] Update rendering tests to match actual Prosilver
PHPBB3-16580
2020-08-20 14:35:38 +02:00
Marc Alexander
1d54d60f04 Merge pull request #6039 from rubencm/ticket/16583
[ticket/16583] Fix cancel button
2020-08-19 21:08:45 +02:00
rubencm
fef1996b3d [ticket/16583] Fix cancel button
PHPBB3-16583
2020-08-19 05:04:28 +00:00
rxu
0bc9d87891 [ticket/16538] Add identifiers quoting
If reserved word is used as identifier, it must be quoted.
If alias is used elsewhere in SQL statement, it must be quoted.

PHPBB3-16535
PHPBB3-16538
2020-08-14 04:51:11 +07:00
rxu
3bbe0f1d4e [ticket/16538] Move script execution to setip-phpbb.sh
PHPBB3-16538
2020-08-14 04:44:06 +07:00
rxu
55d9154b01 [ticket/16538] Add MySQL 8 tests
PHPBB3-16538
2020-08-14 04:43:55 +07:00
rxu
6cd54639b5 [ticket/16526] Adjust test to use better assertions
PHPBB3-16526
2020-08-14 04:30:20 +07:00
rxu
7ef87e3fbd [ticket/16512] Adjust test to use better assertions
PHPBB3-16512
2020-08-14 04:24:57 +07:00
rxu
68122fca27 [ticket/16512] Add user_ipwhois() test which internally uses make_clickable()
PHPBB3-16512
2020-08-14 04:24:55 +07:00
rxu
f340e8ca04 [ticket/16512] Docblock and code adjustments
PHPBB3-16512
2020-08-14 04:24:52 +07:00
rxu
da4b446ac6 [ticket/16512] Fix make_clickable() to make use of custom link classes
PHPBB3-16512
2020-08-14 04:24:49 +07:00
Marc Alexander
7d18ecd1bf Merge pull request #6012 from rxu/ticket/16533
[ticket/16533] Add autologin keys management UCP module events
2020-08-13 21:15:59 +02:00
ansavin
b3199265a2 [ticket/16366] Make viewtopic lang vars available in feed pages
We call add_lang('viewtopic') in feed controller and configure_user(...)
in generate_content() in order to make viewtopic language constants
avaliable for message parser when it is called from feed controller

PHPBB3-16366
2020-08-13 16:46:23 +02:00
Marc Alexander
05a58e8942 Merge pull request #6005 from AlfredoRamos/ticket/16525
[ticket/16525] Remove usage of pg_constraint.consrc for PostgreSQL 12
2020-08-12 22:00:16 +02:00
Marc Alexander
1c724d0860 Merge pull request #6009 from iMattPro/ticket/16527
[ticket/16527] Add a role_exists method to permissions migrator tool
2020-08-12 21:46:50 +02:00
kasimi
76f2305b84 [ticket/16565] Inject service container
PHPBB3-16565
2020-08-12 13:03:23 +02:00
kasimi
0daf6ccbcb [ticket/16565] Fixed cron.manager tests
PHPBB3-16565
2020-08-12 12:51:59 +02:00
Alec
c903381154 [ticket/15951] Add requested changes
Revert changes with $topic_info
Add $quickmod to the event
Change since versions to latest

PHPBB3-15951
2020-08-11 08:08:17 -04:00
Toxyy
0ae8710132 [ticket/15722] Allow forum topicrow pagination to use topicrow values
Changes topicrow pagination to use values from topicrow

This allows pagination to reflect values from core.viewforum_modify_row

PHPBB3-15722
2020-08-11 07:46:59 -04:00
Alec
ebc4912ada [ticket/15951] Add core.mcp_modify_permissions
Allow non staff to access mcp functions
This event would allow normal users to delete topics, for example
If extensions need normal users to access this file they will need this event

PHPBB3-15951
2020-08-11 07:44:00 -04:00
Alec
663e611fae [ticket/15951] Add core.mcp_delete_topic_modify_hidden_fields
Allow modification of the hidden fields when deleting topics
This lets you control the permissions for permanently deleting topics
Template variables can also be modified at this point

PHPBB3-15951
2020-08-11 07:44:00 -04:00
Alec
f4a1d4ef02 [ticket/15951] Add core.mcp_delete_topic_modify_permissions
Allow modification to permissions when deleting topics
This allows $check_permission to be false in the phpbb_check_ids function call

PHPBB3-15951
2020-08-11 07:44:00 -04:00
kasimi
fe97d19c66 [ticket/16565] Lazy-load cron.task_collection
PHPBB3-16565
2020-08-11 07:59:10 +02:00
Marc Alexander
d7ccd22383 Merge pull request #6034 from 3D-I/ticket/16559
[ticket/16569] Fix massive margin between zoomed posts
2020-08-10 20:51:32 +02:00
Marc Alexander
bda6b55047 Merge pull request #6033 from 3D-I/ticket/16568
[ticket/16568] Fix responsive tabs
2020-08-10 20:41:59 +02:00
Marc Alexander
15e1d87527 Merge pull request #6035 from Crizz0/ticket/16571
[ticket/16571] Update s9e/text-formatter to 2.7.3
2020-08-10 17:33:44 +02:00
Marc Alexander
922f75b004 Merge pull request #6030 from marc1706/ticket/16557
[ticket/16557] Support piping tracker XML to build_changelog.php
2020-08-10 17:31:14 +02:00
Marc Alexander
f729887320 Merge pull request #5969 from mrgoldy/ticket/16472
[ticket/16472] [3.3.x] Remove UI tests
2020-08-10 17:27:27 +02:00
Christian Schnegelberger
fc75ca40c3 [ticket/16571] Update s9e/text-formatter to 2.7.3
PHPBB3-16571
2020-08-10 09:31:24 +02:00
3D-I
3e97ed915a [ticket/16569] Fix massive margin between zoomed posts
PHPBB3-16569
2020-08-10 01:36:40 +02:00
3D-I
ecfd198c3f [ticket/16568] Fix responsive tabs
PHPBB3-16568
2020-08-09 21:46:39 +02:00
Marc Alexander
7a1231a32f Merge pull request #5938 from mrgoldy/ticket/16430
[ticket/16430] Sort permissions
2020-08-09 14:16:12 +02:00
Marc Alexander
e10ea1fcf3 Merge branch 'prep-release-3.3.1' into 3.3.x 2020-08-06 17:26:47 +02:00
Marc Alexander
2a8239075e Merge branch '3.2.x' into 3.3.x 2020-08-06 17:21:58 +02:00
Marc Alexander
f28b1fd178 Merge branch 'prep-release-3.2.10' into 3.2.x 2020-08-06 17:19:21 +02:00
Marc Alexander
58ef28e914 [ticket/16557] Generate https instead of http links to tracker
PHPBB3-16557
2020-07-27 21:12:20 +02:00
Marc Alexander
1a029a71e5 [ticket/16557] Support piping tracker XML to build_changelog.php
PHPBB3-16557
2020-07-27 20:35:12 +02:00
rxu
fabb5bc7e6 [ticket/16488] Fix not displaying min input element attribute when 0
PHPBB3-16488
2020-07-02 13:21:01 +07:00
Marc Alexander
65065bf315 [3.3.x] Update version numbers to 3.3.2-dev 2020-06-21 21:29:51 +02:00
Marc Alexander
868c5bd114 Merge branch 'prep-release-3.3.1' into 3.3.x 2020-06-21 21:28:26 +02:00
rxu
946da08304 [ticket/16533] Add set_login_key() event
PHPBB3-16533
2020-06-21 18:09:28 +07:00
rxu
5a33a141af [ticket/16533] Add autologin keys management UCP module events
PHPBB3-16533
2020-06-21 15:39:15 +07:00
Matt Friedman
b69507be8a [ticket/16527] Add a role_exists method to permissions migrator tool
PHPBB3-16527
2020-06-14 11:02:40 -07:00
rxu
59900357a7 [ticket/16526] Revert unneeded s9e/factory change
PHPBB3-16526
2020-06-12 10:31:24 +07:00
rxu
8c79e9a61e [ticket/16526] Add test
PHPBB3-16526
2020-06-12 01:28:14 +07:00
rxu
bb20f3966f [ticket/16526] Correctly handle ACP CSV settings
PHPBB3-16526
2020-06-11 21:54:15 +07:00
Alfredo Ramos
201a5b6e06 [ticket/16525] Remove usage of pg_constraint.consrc for PostgreSQL 12
The column pg_constraint.consrc has been deprecated for a long time,
and it was finally removed in PostgreSQL 12.0

PHPBB3-16525
2020-06-10 04:41:00 -05:00
mrgoldy
38c26c8c44 [ticket/16472] Remove UI test suite
PHPBB3-16472
2020-05-08 14:20:28 +02:00
mrgoldy
6c0e17480c [ticket/16472] Remove UI tests
PHPBB3-16472
2020-05-08 14:09:53 +02:00
mrgoldy
45a00f1a93 [ticket/16430] Sort permissions for roles as well
PHPBB3-16430
2020-05-02 15:29:24 +02:00
mrgoldy
a2a199b48e [ticket/16430] Filter the correct permissions array
PHPBB3-16430
2020-05-02 15:09:22 +02:00
mrgoldy
6326b6b631 [ticket/16430] Ensure permissions are defined
PHPBB3-16430
2020-05-02 15:09:22 +02:00
mrgoldy
dbdbf23bea [ticket/16430] Fix empty lines issue in permissions
PHPBB3-16430
2020-05-02 15:09:22 +02:00
mrgoldy
00f5732a0d [ticket/16430] Sort permissions
PHPBB3-16430
2020-05-02 15:09:22 +02:00
Rubén Calvo
d16b240749 [ticket/15300] Show maximum attachment filesize
PHPBB3-15300
2020-04-14 21:03:24 +00:00
mrgoldy
07bf18168f [ticket/16436] Display correct "no topics" message when filtering by time
PHPBB3-16436
2020-04-12 14:15:48 +02:00
428 changed files with 6795 additions and 4238 deletions

View File

@@ -1,148 +0,0 @@
build: false
clone_folder: c:\projects\phpbb
version: '{build}'
services:
- iis
environment:
COMPOSER_AUTH:
secure: '{"github-oauth": {"github.com": "zvq38wk7sRe87Y9W2OCYXcK7WKQDsig7GRIUDHGmxm6ZQRK8JswPbi8JoJQbFhM+"}}'
matrix:
- db: mssql
db_version: sql2012sp1
php: 7.1
- db: mssql
db_version: sql2014
php: 7.1
- db: mssql
db_version: sql2016
php: 7.2
# - db: mssql
# db_version: sql2017
# php: 7.1
# - db: mariadb
# php: 7.1
# - db: mysqli
# php: 7.1
# - db: sqlite
# php: 7.1
# - db: postgresql
# php: 7.1
hosts:
phpbb.test: 127.0.0.1
init:
- SET PATH=%systemroot%\system32\inetsrv\;C:\Program Files\OpenSSL;C:\tools\php;c:\php;%PATH%
- SET ANSICON=121x90 (121x90)
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" /v DelayedExpansion /t REG_DWORD /d 1 /f
before_test:
- ps: |
Set-Service wuauserv -StartupType Manual
choco install chocolatey -y --version 0.10.13 --allow-downgrade
choco install php -y --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
Get-ChildItem -Path "c:\tools\php$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1$2')" -Recurse |
Move-Item -destination "c:\tools\php"
cd c:\tools\php
cat php.ini-development | %{$_ -replace "memory_limit = 128M","memory_limit = 1024M"} | Out-File -Encoding "Default" php.ini
Add-Content php.ini "`n date.timezone=UTC"
Add-Content php.ini "`n display_errors=On"
Add-Content php.ini "`n extension_dir=ext"
Add-Content php.ini "`n extension=php_openssl.dll"
Add-Content php.ini "`n extension=php_mbstring.dll"
Add-Content php.ini "`n extension=php_curl.dll"
Add-Content php.ini "`n extension=php_gd2.dll"
Add-Content php.ini "`n extension=php_tidy.dll"
Add-Content php.ini "`n extension=php_fileinfo.dll"
Add-Content php.ini "`n extension=php_pdo_sqlite.dll"
Add-Content php.ini "`n extension=php_sqlite3.dll"
Add-Content php.ini "`n extension=php_pdo_mysql.dll"
Add-Content php.ini "`n extension=php_mysqli.dll"
Add-Content php.ini "`n extension=php_pdo_pgsql.dll"
Add-Content php.ini "`n extension=php_pgsql.dll"
# Get MSSQL driver
if ($env:db -eq "mssql") {
cd c:\tools\php\ext
$DLLVersion = "5.3.0"
$VCVersion = If ([System.Version]"$($env:php)" -ge [System.Version]"7.2") {"vc15"} Else {"vc14"}
curl -o php_sqlsrv-$($DLLVersion)-$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1.$2')-nts-vc14-x64.zip https://windows.php.net/downloads/pecl/releases/sqlsrv/$($:DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1.$2')-nts-$($VCVersion)-x64.zip
7z x -y php_sqlsrv-$($DLLVersion)-$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1.$2')-nts-vc14-x64.zip > $null
curl -o php_pdo_sqlsrv-$($DLLVersion)-$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1.$2')-nts-vc14-x64.zip https://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($DLLVersion)/php_pdo_sqlsrv-$($DLLVersion)-$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1.$2')-nts-$($VCVersion)-x64.zip
7z x -y php_pdo_sqlsrv-$($DLLVersion)-$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1.$2')-nts-vc14-x64.zip > $null
Remove-Item c:\tools\php\* -include .zip
cd c:\tools\php
Add-Content php.ini "`nextension=php_sqlsrv.dll"
Add-Content php.ini "`nextension=php_pdo_sqlsrv.dll"
Add-Content php.ini "`n"
$instanceName = $env:db_version.ToUpper()
Start-Service "MSSQL`$$instanceName"
Set-Variable -Name "sqlServerPath" -Value "(local)\$($env:db_version.ToUpper())"
# Create database write test config
sqlcmd -S $sqlServerPath -Q "Use [master]; CREATE DATABASE [phpbb_test] COLLATE Latin1_General_CI_AS"
$data = "<?php`n`n`$dbms = 'phpbb\\db\\driver\\mssqlnative';`n`$dbhost = '.\\$env:db_version';`n`$dbport = '';`n`$dbname = 'phpbb_test';`n`$dbuser = 'sa';`n`$dbpasswd = 'Password12!';`n`$phpbb_functional_url = 'http://phpbb.test/';"; $data | Out-File -Encoding "Default" "c:\\projects\\phpbb\\tests\\test_config.php"
}
elseif ($env:db -eq "mysqli") {
Start-Service MySQL57
$env:MYSQL_PWD="Password12!"
$cmd = '"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -e "create database phpbb_test;" --user=root'
iex "& $cmd"
$data = "<?php`n`n`$dbms = 'phpbb\\db\\driver\\mysqli';`n`$dbhost = 'localhost';`n`$dbport = '';`n`$dbname = 'phpbb_test';`n`$dbuser = 'root';`n`$dbpasswd = 'Password12!';`n`$phpbb_functional_url = 'http://phpbb.test/';"; $data | Out-File -Encoding "Default" "c:\\projects\\phpbb\\tests\\test_config.php"
}
elseif ($env:db -eq "postgresql") {
Start-Service postgresql-x64-9.5
$env:PGUSER="postgres"
$env:PGPASSWORD="Password12!"
$Env:Path="C:\Program Files\PostgreSQL\9.6\bin\;$($Env:Path)"
createdb phpbb_test
$data = "<?php`n`n`$dbms = 'phpbb\\db\\driver\\postgres';`n`$dbhost = 'localhost';`n`$dbport = '';`n`$dbname = 'phpbb_test';`n`$dbuser = 'postgres';`n`$dbpasswd = 'Password12!';`n`$phpbb_functional_url = 'http://phpbb.test/';"; $data | Out-File -Encoding "Default" "c:\\projects\\phpbb\\tests\\test_config.php"
}
elseif ($env:db -eq "mariadb") {
appveyor-retry choco install mariadb -y --force
$env:MYSQL_PWD=""
$cmd = '"C:\Program Files\MariaDB 10.2\bin\mysql" -e "create database phpbb_test;" --user=root'
iex "& $cmd"
$data = "<?php`n`n`$dbms = 'phpbb\\db\\driver\\mysqli';`n`$dbhost = 'localhost';`n`$dbport = '';`n`$dbname = 'phpbb_test';`n`$dbuser = 'root';`n`$dbpasswd = '';`n`$phpbb_functional_url = 'http://phpbb.test/';"; $data | Out-File -Encoding "Default" "c:\\projects\\phpbb\\tests\\test_config.php"
}
elseif ($env:db -eq "sqlite") {
# install sqlite
appveyor-retry choco install sqlite -y
sqlite3 c:\projects\test.db "create table aTable(field1 int); drop table aTable;"
$data = "<?php`n`n`$dbms = 'phpbb\\db\\driver\\sqlite3';`n`$dbhost = 'c:\\projects\\test.db';`n`$dbport = '';`n`$dbname = '';`n`$dbuser = '';`n`$dbpasswd = '';`n`$phpbb_functional_url = 'http://phpbb.test/';"; $data | Out-File -Encoding "Default" "c:\\projects\\phpbb\\tests\\test_config.php"
}
# Install PhantomJS
choco install phantomjs -y
Start-Process "phantomjs" "--webdriver=8910" | Out-Null
- ps: |
cd c:\projects\phpbb\phpBB
(Get-Content c:\projects\phpbb\phpBB\web.config).replace("<configuration>", "<configuration>`n`t<system.web>`n`t`t<customErrors mode=`"Off`"/>`n`t</system.web>") | Set-Content c:\projects\phpbb\phpBB\web.config
(Get-Content c:\projects\phpbb\phpBB\web.config).replace("`t</system.webServer>", "`t`t<httpErrors errorMode=`"Detailed`" />`n`t</system.webServer>") | Set-Content c:\projects\phpbb\phpBB\web.config
- cd c:\projects\phpbb\phpBB
- php ..\composer.phar install
- choco install urlrewrite -y
- ps: New-WebSite -Name 'phpBBTest' -PhysicalPath 'c:\projects\phpbb\phpBB' -Force
- ps: Import-Module WebAdministration; Set-ItemProperty 'IIS:\Sites\phpBBTest' -name Bindings -value @{protocol='http';bindingInformation='*:80:phpbb.test'}
- echo Change default anonymous user AUTH to ApplicationPool
- appcmd set config -section:anonymousAuthentication /username:"" --password
- echo Setup FAST-CGI configuration
- appcmd set config /section:system.webServer/fastCGI /+[fullPath='C:\tools\php\php-cgi.exe']
- echo Setup FACT-CGI handler
- appcmd set config /section:system.webServer/handlers /+[name='PHP-FastCGI',path='*.php',verb='*',modules='FastCgiModule',scriptProcessor='C:\tools\php\php-cgi.exe',resourceType='Either']
- iisreset
- NET START W3SVC
- mkdir "C:\projects\phpbb\phpBB\cache\test"
- mkdir "C:\projects\phpbb\phpBB\cache\installer"
- icacls "C:\projects\phpbb\phpBB\cache" /grant Users:F /T
- icacls "C:\projects\phpbb\phpBB\files" /grant Users:F /T
- icacls "C:\projects\phpbb\phpBB\store" /grant Users:F /T
- icacls "C:\projects\phpbb\phpBB\images\avatars\upload" /grant Users:F /T
test_script:
- cd c:\projects\phpbb
- php -e phpBB\vendor\phpunit\phpunit\phpunit --verbose

View File

@@ -1,8 +1,8 @@
Checklist:
- [ ] Correct branch: master for new features; 3.3.x & 3.2.x for fixes
- [ ] Correct branch: master for new features; 3.3.x for fixes
- [ ] Tests pass
- [ ] Code follows coding guidelines: [master](https://area51.phpbb.com/docs/dev/master/development/coding_guidelines.html), [3.3.x](https://area51.phpbb.com/docs/dev/3.3.x/development/coding_guidelines.html) and [3.2.x](https://area51.phpbb.com/docs/dev/3.2.x/development/coding_guidelines.html)
- [ ] Code follows coding guidelines: [master](https://area51.phpbb.com/docs/dev/master/development/coding_guidelines.html) and [3.3.x](https://area51.phpbb.com/docs/dev/3.3.x/development/coding_guidelines.html)
- [ ] Commit follows commit message [format](https://area51.phpbb.com/docs/dev/3.3.x/development/git.html)
Tracker ticket (set the ticket ID to **your ticket ID**):

26
.github/check-doctum-parse-errors.sh vendored Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
#
# This file is part of the phpBB Forum Software package.
#
# @copyright (c) phpBB Limited <https://www.phpbb.com>
# @license GNU General Public License, version 2 (GPL-2.0)
#
# For full copyright and license information, please see
# the docs/CREDITS.txt file.
#
set -e
if [ ! -f doctum.phar ]; then
# Download the latest (5.1.x) release if the file does not exist
# Remove it to update your phar
curl -O https://doctum.long-term.support/releases/5.1/doctum.phar
rm -f doctum.phar.sha256
curl -O https://doctum.long-term.support/releases/5.1/doctum.phar.sha256
sha256sum --strict --check doctum.phar.sha256
rm -f doctum.phar.sha256
# You can fetch the latest (5.1.x) version code here:
# https://doctum.long-term.support/releases/5.1/VERSION
fi
# Show the version to inform users of the script
php doctum.phar --version
php doctum.phar parse build/doctum-checkout.conf.php -v

63
.github/check-executable-files.sh vendored Executable file
View File

@@ -0,0 +1,63 @@
#!/bin/bash
#
# This file is part of the phpBB Forum Software package.
#
# @copyright (c) phpBB Limited <https://www.phpbb.com>
# @license GNU General Public License, version 2 (GPL-2.0)
#
# For full copyright and license information, please see
# the docs/CREDITS.txt file.
#
set -e
root="$1"
path="${root}phpBB/"
# Check the permissions of the files
# The following variables MUST NOT contain any wildcard
# Directories to skip
directories_skipped="-path ${path}develop -o -path ${path}vendor"
# Files to skip
files_skipped="-false"
# Files which have to be executable
executable_files="-path ${path}bin/* -o -path ${path}install/phpbbcli.php"
incorrect_files=$( \
find ${path} \
'(' \
'(' \
${directories_skipped} \
')' \
-a -type d -prune -a -type f \
')' -o \
'(' \
-type f -a \
-not '(' \
${files_skipped} \
')' -a \
'(' \
'(' \
'(' \
${executable_files} \
')' -a \
-not -perm /100 \
')' -o \
'(' \
-not '(' \
${executable_files} \
')' -a \
-perm /111 \
')' \
')' \
')' \
)
if [ "${incorrect_files}" != '' ]
then
echo "The following files do not have proper permissions:";
ls -la ${incorrect_files}
exit 1;
fi

14
.github/check-image-icc-profiles.sh vendored Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
#
# This file is part of the phpBB Forum Software package.
#
# @copyright (c) phpBB Limited <https://www.phpbb.com>
# @license GNU General Public License, version 2 (GPL-2.0)
#
# For full copyright and license information, please see
# the docs/CREDITS.txt file.
#
set -e
find . -type f -a -iregex '.*\.\(gif\|jpg\|jpeg\|png\)$' -a -not -wholename '*vendor/*' | \
parallel --gnu --keep-order 'phpBB/develop/strip_icc_profiles.sh {}'

64
.github/ext-check-executable-files.sh vendored Executable file
View File

@@ -0,0 +1,64 @@
#!/bin/bash
#
# This file is part of the phpBB Forum Software package.
#
# @copyright (c) phpBB Limited <https://www.phpbb.com>
# @license GNU General Public License, version 2 (GPL-2.0)
#
# For full copyright and license information, please see
# the docs/CREDITS.txt file.
#
set -e
root="$1"
extname="$2"
path="${root}phpBB/ext/${extname}/"
# Check the permissions of the files
# The following variables MUST NOT contain any wildcard
# Directories to skip
directories_skipped="-path ${path}develop -o -path ${path}vendor -o -path ${path}.git"
# Files to skip
files_skipped="-false"
# Files which have to be executable
executable_files="-path ${path}bin/* -o -path ${path}install/phpbbcli.php"
incorrect_files=$( \
find ${path} \
'(' \
'(' \
${directories_skipped} \
')' \
-a -type d -prune -a -type f \
')' -o \
'(' \
-type f -a \
-not '(' \
${files_skipped} \
')' -a \
'(' \
'(' \
'(' \
${executable_files} \
')' -a \
-not -perm /100 \
')' -o \
'(' \
-not '(' \
${executable_files} \
')' -a \
-perm /111 \
')' \
')' \
')' \
)
if [ "${incorrect_files}" != '' ]
then
echo "The following files do not have proper permissions:";
ls -la ${incorrect_files}
exit 1;
fi

25
.github/ext-sniff.sh vendored Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
#
# This file is part of the phpBB Forum Software package.
#
# @copyright (c) phpBB Limited <https://www.phpbb.com>
# @license GNU General Public License, version 2 (GPL-2.0)
#
# For full copyright and license information, please see
# the docs/CREDITS.txt file.
#
set -e
set -x
EXTNAME=$1
NOTESTS=$2
if [ "$NOTESTS" == "1" ]
then
phpBB/vendor/bin/phpcs \
-s \
--extensions=php \
--standard=build/code_sniffer/ruleset-php-extensions.xml \
--ignore=*/"$EXTNAME"/tests/*,*/"$EXTNAME"/vendor/* \
phpBB/ext/"$EXTNAME"
fi

41
.github/ldap/base.ldif vendored Normal file
View File

@@ -0,0 +1,41 @@
dn: dc=example,dc=com
objectClass: top
objectClass: dcObject
objectClass: organization
o: example
dc: example
dn: ou=foo,dc=example,dc=com
objectClass: organizationalUnit
ou: foo
dn: cn=admin,dc=example,dc=com
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator
userPassword:: e1NTSEF9NytMR2gveUxTMzdsc3RRd1V1dENZSVA0TWdYdm9SdDY=
dn: ou=group,dc=example,dc=com
objectClass: organizationalUnit
ou: group
dn: cn=admin,ou=foo,dc=example,dc=com
objectClass: posixAccount
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
loginShell: /bin/bash
homeDirectory: /home/admin
uid: admin
cn: admin
uidNumber: 10000
gidNumber: 10000
sn: admin
mail: admin@example.com
userPassword:: e1NTSEF9WHpueGZURHZZc21JSkl6czdMVXBjdCtWYTA1dlMzVlQ=
dn: cn=admin,ou=group,dc=example,dc=com
objectClass: posixGroup
gidNumber: 10000
cn: admin

17
.github/ldap/slapd.conf vendored Normal file
View File

@@ -0,0 +1,17 @@
# See slapd.conf(5) for details on configuration options.
include /etc/ldap/schema/core.schema
include /etc/ldap/schema/cosine.schema
include /etc/ldap/schema/inetorgperson.schema
include /etc/ldap/schema/nis.schema
pidfile /var/tmp/slapd/slapd.pid
argsfile /var/tmp/slapd/slapd.args
modulepath /usr/lib/openldap
database ldif
directory /var/tmp/slapd
suffix "dc=example,dc=com"
rootdn "cn=admin,dc=example,dc=com"
rootpw adminadmin

16
.github/phing-sniff.sh vendored Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
#
# This file is part of the phpBB Forum Software package.
#
# @copyright (c) phpBB Limited <https://www.phpbb.com>
# @license GNU General Public License, version 2 (GPL-2.0)
#
# For full copyright and license information, please see
# the docs/CREDITS.txt file.
#
set -e
set -x
cd build
../phpBB/vendor/bin/phing sniff
cd ..

39
.github/phpunit-mariadb-github.xml vendored Normal file
View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="true"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
verbose="true"
bootstrap="../tests/bootstrap.php">
<testsuites>
<testsuite name="phpBB Test Suite">
<directory suffix="_test.php">../tests</directory>
<exclude>../tests/functional</exclude>
<exclude>../tests/lint_test.php</exclude>
</testsuite>
<testsuite name="phpBB Functional Tests">
<directory suffix="_test.php">../tests/functional</directory>
</testsuite>
</testsuites>
<groups>
<exclude>
<group>slow</group>
</exclude>
</groups>
<php>
<server name="PHPBB_TEST_DBMS" value="mysqli" />
<server name="PHPBB_TEST_DBHOST" value="0.0.0.0" />
<server name="PHPBB_TEST_DBPORT" value="3306" />
<server name="PHPBB_TEST_DBNAME" value="phpbb_tests" />
<server name="PHPBB_TEST_DBUSER" value="root" />
<server name="PHPBB_TEST_DBPASSWD" value="" />
<server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/>
<server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/" />
</php>
</phpunit>

41
.github/phpunit-mssql-github.xml vendored Normal file
View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="true"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
verbose="true"
bootstrap="../tests/bootstrap.php">
<testsuites>
<testsuite name="phpBB Test Suite">
<directory suffix="_test.php">../tests</directory>
<exclude>../tests/functional</exclude>
<exclude>../tests/lint_test.php</exclude>
</testsuite>
<testsuite name="phpBB Functional Tests">
<directory suffix="_test.php">../tests/functional</directory>
</testsuite>
</testsuites>
<groups>
<exclude>
<group>slow</group>
</exclude>
</groups>
<php>
<server name="PHPBB_TEST_DBMS" value="phpbb\db\driver\mssqlnative" />
<server name="PHPBB_TEST_DBHOST" value="127.0.0.1" />
<server name="PHPBB_TEST_DBPORT" value="" />
<server name="PHPBB_TEST_DBNAME" value="phpbb_tests" />
<server name="PHPBB_TEST_DBUSER" value="sa" />
<server name="PHPBB_TEST_DBPASSWD" value="Pssw0rd_12" />
<server name="PHPBB_TEST_REDIS_HOST" value="localhost" />
<server name="PHPBB_TEST_MEMCACHED_HOST" value="localhost" />
<server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/>
<server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/" />
</php>
</phpunit>

41
.github/phpunit-mysql-github.xml vendored Normal file
View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="true"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
verbose="true"
bootstrap="../tests/bootstrap.php">
<testsuites>
<testsuite name="phpBB Test Suite">
<directory suffix="_test.php">../tests</directory>
<exclude>../tests/functional</exclude>
<exclude>../tests/lint_test.php</exclude>
</testsuite>
<testsuite name="phpBB Functional Tests">
<directory suffix="_test.php">../tests/functional</directory>
</testsuite>
</testsuites>
<groups>
<exclude>
<group>slow</group>
</exclude>
</groups>
<php>
<server name="PHPBB_TEST_DBMS" value="phpbb\db\driver\mysqli" />
<server name="PHPBB_TEST_DBHOST" value="0.0.0.0" />
<server name="PHPBB_TEST_DBPORT" value="3306" />
<server name="PHPBB_TEST_DBNAME" value="phpbb_tests" />
<server name="PHPBB_TEST_DBUSER" value="root" />
<server name="PHPBB_TEST_DBPASSWD" value="" />
<server name="PHPBB_TEST_REDIS_HOST" value="localhost" />
<server name="PHPBB_TEST_MEMCACHED_HOST" value="localhost" />
<server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/>
<server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/" />
</php>
</phpunit>

41
.github/phpunit-postgres-github.xml vendored Normal file
View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="true"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
verbose="true"
bootstrap="../tests/bootstrap.php">
<testsuites>
<testsuite name="phpBB Test Suite">
<directory suffix="_test.php">../tests</directory>
<exclude>../tests/functional</exclude>
<exclude>../tests/lint_test.php</exclude>
</testsuite>
<testsuite name="phpBB Functional Tests">
<directory suffix="_test.php">../tests/functional</directory>
</testsuite>
</testsuites>
<groups>
<exclude>
<group>slow</group>
</exclude>
</groups>
<php>
<server name="PHPBB_TEST_DBMS" value="phpbb\db\driver\postgres"/>
<server name="PHPBB_TEST_DBHOST" value="localhost" />
<server name="PHPBB_TEST_DBPORT" value="5432" />
<server name="PHPBB_TEST_DBNAME" value="phpbb_tests" />
<server name="PHPBB_TEST_DBUSER" value="postgres" />
<server name="PHPBB_TEST_DBPASSWD" value="postgres" />
<server name="PHPBB_TEST_REDIS_HOST" value="localhost" />
<server name="PHPBB_TEST_MEMCACHED_HOST" value="localhost" />
<server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/>
<server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/" />
</php>
</phpunit>

41
.github/phpunit-psql-windows-github.xml vendored Normal file
View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="true"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
verbose="true"
bootstrap="../tests/bootstrap.php">
<testsuites>
<testsuite name="phpBB Test Suite">
<directory suffix="_test.php">../tests</directory>
<exclude>../tests/functional</exclude>
<exclude>../tests/lint_test.php</exclude>
</testsuite>
<testsuite name="phpBB Functional Tests">
<directory suffix="_test.php">../tests/functional</directory>
</testsuite>
</testsuites>
<groups>
<exclude>
<group>slow</group>
</exclude>
</groups>
<php>
<server name="PHPBB_TEST_DBMS" value="phpbb\db\driver\postgres"/>
<server name="PHPBB_TEST_DBHOST" value="localhost" />
<server name="PHPBB_TEST_DBPORT" value="5432" />
<server name="PHPBB_TEST_DBNAME" value="phpbb_tests" />
<server name="PHPBB_TEST_DBUSER" value="postgres" />
<server name="PHPBB_TEST_DBPASSWD" value="root" />
<server name="PHPBB_TEST_REDIS_HOST" value="localhost" />
<server name="PHPBB_TEST_MEMCACHED_HOST" value="localhost" />
<server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/>
<server name="PHPBB_FUNCTIONAL_URL" value="http://phpbb.test/" />
</php>
</phpunit>

35
.github/phpunit-sqlite3-github.xml vendored Normal file
View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="true"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
verbose="true"
bootstrap="../tests/bootstrap.php">
<testsuites>
<testsuite name="phpBB Test Suite">
<directory suffix="_test.php">../tests</directory>
<exclude>../tests/functional</exclude>
<exclude>../tests/lint_test.php</exclude>
</testsuite>
<testsuite name="phpBB Functional Tests">
<directory suffix="_test.php">../tests/functional</directory>
</testsuite>
</testsuites>
<groups>
<exclude>
<group>slow</group>
</exclude>
</groups>
<php>
<server name="PHPBB_TEST_REDIS_HOST" value="localhost" />
<server name="PHPBB_TEST_MEMCACHED_HOST" value="localhost" />
<server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/>
<server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/" />
</php>
</phpunit>

22
.github/prepare-extension.sh vendored Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
#
# This file is part of the phpBB Forum Software package.
#
# @copyright (c) phpBB Limited <https://www.phpbb.com>
# @license GNU General Public License, version 2 (GPL-2.0)
#
# For full copyright and license information, please see
# the docs/CREDITS.txt file.
#
set -e
set -x
EXTNAME=$1
# Move the extension in place
mkdir --parents phpBB/ext/$EXTNAME
cp -R ../tmp/* phpBB/ext/$EXTNAME
# Move the test files for extensions in place
cp -R .github/*.xml phpBB/ext/$EXTNAME/.github
cp -R .github/*.sh phpBB/ext/$EXTNAME/.github

26
.github/setup-database.sh vendored Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
#
# This file is part of the phpBB Forum Software package.
#
# @copyright (c) phpBB Limited <https://www.phpbb.com>
# @license GNU General Public License, version 2 (GPL-2.0)
#
# For full copyright and license information, please see
# the docs/CREDITS.txt file.
#
set -e
set -x
DB=$1
MYISAM=$2
if [ "$DB" == "postgres" ]
then
psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres
psql -c 'create database phpbb_tests;' -U postgres
fi
if [ "$MYISAM" == '1' ]
then
mysql -h 127.0.0.1 -u root -e 'SET GLOBAL storage_engine=MyISAM;'
fi

14
.github/setup-exiftool.sh vendored Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
#
# This file is part of the phpBB Forum Software package.
#
# @copyright (c) phpBB Limited <https://www.phpbb.com>
# @license GNU General Public License, version 2 (GPL-2.0)
#
# For full copyright and license information, please see
# the docs/CREDITS.txt file.
#
set -e
sudo apt-get update
sudo apt-get install -y parallel libimage-exiftool-perl

19
.github/setup-ldap.sh vendored Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
#
# This file is part of the phpBB Forum Software package.
#
# @copyright (c) phpBB Limited <https://www.phpbb.com>
# @license GNU General Public License, version 2 (GPL-2.0)
#
# For full copyright and license information, please see
# the docs/CREDITS.txt file.
#
set -e
set -x
sudo apt-get -y install ldap-utils slapd
mkdir /var/tmp/slapd
cp .github/ldap/slapd.conf /var/tmp/slapd/slapd.conf
slapd -d 256 -d 128 -f /var/tmp/slapd/slapd.conf -h ldap://localhost:3389 &
sleep 3
ldapadd -h localhost:3389 -D "cn=admin,dc=example,dc=com" -w adminadmin -f .github/ldap/base.ldif

36
.github/setup-phpbb.sh vendored Executable file
View File

@@ -0,0 +1,36 @@
#!/bin/bash
#
# This file is part of the phpBB Forum Software package.
#
# @copyright (c) phpBB Limited <https://www.phpbb.com>
# @license GNU General Public License, version 2 (GPL-2.0)
#
# For full copyright and license information, please see
# the docs/CREDITS.txt file.
#
set -e
set -x
DB=$1
PHP_VERSION=$2
NOTESTS=$3
if [ "$NOTESTS" == '1' ]
then
.github/setup-exiftool.sh
.github/setup-unbuffer.sh
fi
if [ "$NOTESTS" != '1' ]
then
.github/setup-webserver.sh
fi
cd phpBB
php ../composer.phar install --dev --no-interaction
if [[ "$PHP_VERSION" =~ ^nightly$ || "$PHP_VERSION" =~ ^8 ]]
then
php ../composer.phar remove phpunit/dbunit --dev --update-with-dependencies \
&& php ../composer.phar require symfony/yaml:~4.4 misantron/dbunit:~5.0 phpunit/phpunit:^9.3 --dev --update-with-all-dependencies --ignore-platform-reqs
fi
cd ..

14
.github/setup-unbuffer.sh vendored Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
#
# This file is part of the phpBB Forum Software package.
#
# @copyright (c) phpBB Limited <https://www.phpbb.com>
# @license GNU General Public License, version 2 (GPL-2.0)
#
# For full copyright and license information, please see
# the docs/CREDITS.txt file.
#
set -e
sudo apt-get update
sudo apt-get install -y expect-dev

81
.github/setup-webserver.sh vendored Executable file
View File

@@ -0,0 +1,81 @@
#!/bin/bash
#
# This file is part of the phpBB Forum Software package.
#
# @copyright (c) phpBB Limited <https://www.phpbb.com>
# @license GNU General Public License, version 2 (GPL-2.0)
#
# For full copyright and license information, please see
# the docs/CREDITS.txt file.
#
set -e
set -x
sudo apt-get update
sudo apt-get install -y nginx coreutils
sudo service nginx stop
DIR=$(dirname "$0")
USER=$(whoami)
PHPBB_ROOT_PATH=$(realpath "$DIR/../phpBB")
NGINX_SITE_CONF="/etc/nginx/sites-enabled/default"
NGINX_CONF="/etc/nginx/nginx.conf"
APP_SOCK=$(realpath "$DIR")/php-app.sock
NGINX_PHP_CONF="$DIR/nginx-php.conf"
# php-fpm
PHP_FPM_BIN="/usr/sbin/php-fpm$PHP_VERSION"
PHP_FPM_CONF="$DIR/php-fpm.conf"
if [ ! -f $PHP_FPM_BIN ] && [ "$PHP_VERSION" == '8.1' ] && [ -f "/usr/bin/php-fpm" ]
then
PHP_FPM_BIN="/usr/bin/php-fpm"
fi
if [ ! -f $PHP_FPM_BIN ] && [ "$PHP_VERSION" != '8.1' ]
then
sudo apt-get install php$PHP_VERSION-fpm php$PHP_VERSION-cli \
php$PHP_VERSION-curl php$PHP_VERSION-xml php$PHP_VERSION-mbstring \
php$PHP_VERSION-zip php$PHP_VERSION-mysql php$PHP_VERSION-sqlite3 \
php$PHP_VERSION-intl php$PHP_VERSION-gd php$PHP_VERSION-pgsql
sudo service php$PHP_VERSION-fpm start
sudo service php$PHP_VERSION-fpm status
fi
echo "
[global]
[ci]
user = $USER
group = $USER
listen = $APP_SOCK
listen.mode = 0666
pm = static
pm.max_children = 2
php_admin_value[memory_limit] = 128M
" > $PHP_FPM_CONF
sudo $PHP_FPM_BIN \
--fpm-config "$DIR/php-fpm.conf"
# nginx
sudo sed -i "s/user www-data;/user $USER;/g" $NGINX_CONF
sudo cp "$DIR/../phpBB/docs/nginx.sample.conf" "$NGINX_SITE_CONF"
sudo sed -i \
-e "s/example\.com/localhost/g" \
-e "s|root /path/to/phpbb;|root $PHPBB_ROOT_PATH;|g" \
$NGINX_SITE_CONF
# Generate FastCGI configuration for Nginx
echo "
upstream php {
server unix:$APP_SOCK;
}
" > $NGINX_PHP_CONF
sudo mv "$NGINX_PHP_CONF" /etc/nginx/conf.d/php.conf
sudo nginx -T
sudo service nginx start

529
.github/workflows/tests.yml vendored Normal file
View File

@@ -0,0 +1,529 @@
name: Tests
on:
push:
branches:
- 3.3.x
- master
pull_request:
branches:
- 3.3.x
- master
jobs:
# Basic checks, e.g. parse errors, commit messages, etc.
basic-checks:
runs-on: ubuntu-18.04
strategy:
matrix:
include:
- db: 'none'
php: '7.1'
NOTESTS: 1
name: PHP ${{ matrix.php }} - ${{ matrix.db }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 100
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap
coverage: none
- name: Get Composer Cache Directory
id: composer-cache
env:
PHP_VERSION: ${{ matrix.php }}
run: |
cd phpBB
echo "::set-output name=dir::$(composer config cache-files-dir)"
echo "::set-output name=version::${PHP_VERSION%.*}"
cd ..
- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ steps.composer-cache.outputs.version }}-${{ hashFiles('phpBB/composer.lock') }}
- name: Setup environment for phpBB
env:
DB: ${{ matrix.db }}
PHP_VERSION: ${{ matrix.php }}
NOTESTS: '1'
run: |
.github/setup-phpbb.sh $DB $PHP_VERSION $NOTESTS
- name: Phing sniff
run: |
.github/phing-sniff.sh
- name: Check doctum parse errors
run: |
.github/check-doctum-parse-errors.sh
- name: Check image ICC profiles
run: |
.github/check-image-icc-profiles.sh
- name: Check executable files
run: |
.github/check-executable-files.sh ./
- name: Check commit message
env:
BRANCH: ${{ github.event.pull_request.base.sha }}
if: github.event_name == 'pull_request'
run: |
git-tools/commit-msg-hook-range.sh $BRANCH..$GITHUB_SHA
# Tests for MySQL and MariaDB
mysql-tests:
runs-on: ubuntu-18.04
strategy:
matrix:
include:
- php: '7.1'
db: "mariadb:10.1"
- php: '7.1'
db: "mariadb:10.2"
- php: '7.1'
db: "mariadb:10.3"
- php: '7.1'
db: "mariadb:10.4"
- php: '7.1'
db: "mariadb:10.5"
- php: '7.1'
db: "mysql:5.6"
db_alias: "MySQL Slow Tests"
SLOWTESTS: 1
- php: '7.1'
db: "mysql:5.6"
db_alias: "MyISAM Tests"
MYISAM: 1
- php: '7.1'
db: "mysql:5.6"
- php: '7.1'
db: "mysql:5.7"
- php: '7.2'
db: "mysql:5.7"
- php: '7.3'
db: "mysql:5.7"
- php: '7.4'
db: "mysql:5.7"
- php: '7.4'
db: "mysql:8.0"
- php: '8.0'
db: "mysql:5.7"
- php: '8.1'
db: "mysql:5.7"
name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }}
services:
mysql:
image: ${{ matrix.db }}
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: phpbb_tests
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- name: Checkout repository
uses: actions/checkout@v2
- id: database-type
env:
MATRIX_DB: ${{ matrix.db }}
run: |
db=$(echo "${MATRIX_DB%%:*}")
echo "::set-output name=db::$db"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap
coverage: none
- name: Get Composer Cache Directory
id: composer-cache
env:
PHP_VERSION: ${{ matrix.php }}
run: |
cd phpBB
echo "::set-output name=dir::$(composer config cache-files-dir)"
echo "::set-output name=version::${PHP_VERSION%.*}"
cd ..
- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ steps.composer-cache.outputs.version }}-${{ hashFiles('phpBB/composer.lock') }}
- name: Setup environment for phpBB
env:
DB: ${{steps.database-type.outputs.db}}
PHP_VERSION: ${{ matrix.php }}
NOTESTS: '0'
run: |
.github/setup-phpbb.sh $DB $PHP_VERSION ${NOTESTS:-0}
- name: Setup database
env:
DB: ${{steps.database-type.outputs.db}}
MYISAM: ${{ matrix.MYISAM != 1 && '0' || '1' }}
run: |
.github/setup-database.sh $DB $MYISAM
- name: Setup LDAP
if: ${{ matrix.SLOWTESTS == 1 }}
run: |
.github/setup-ldap.sh
- name: Lint tests
if: ${{ matrix.SLOWTESTS != 1 && steps.database-type.outputs.db == 'mysql' }}
run: phpBB/vendor/bin/phpunit tests/lint_test.php
- name: Run unit tests
env:
DB: ${{steps.database-type.outputs.db}}
if: ${{ matrix.SLOWTESTS != 1 && matrix.NOTESTS != 1 }}
run: |
phpBB/vendor/bin/phpunit --configuration .github/phpunit-$DB-github.xml --verbose --stop-on-error
- name: Slow tests
env:
DB: ${{steps.database-type.outputs.db}}
if: ${{ matrix.SLOWTESTS == 1 }}
run: |
phpBB/vendor/bin/phpunit --configuration .github/phpunit-$DB-github.xml --group slow
# Tests for PostgreSQL
postgres-tests:
runs-on: ubuntu-18.04
strategy:
matrix:
include:
- php: '7.1'
db: "postgres:9.5"
- php: '7.1'
db: "postgres:9.6"
- php: '7.1'
db: "postgres:10"
- php: '7.1'
db: "postgres:11"
- php: '7.1'
db: "postgres:12"
- php: '7.1'
db: "postgres:13"
name: PHP ${{ matrix.php }} - ${{ matrix.db }}
services:
postgres:
image: ${{ matrix.db != 'postgres:9.5' && matrix.db != 'postgres:9.6' && matrix.db != 'postgres:10' && matrix.db != 'postgres:11' && matrix.db != 'postgres:12' && matrix.db != 'postgres:13' && 'postgres:10' || matrix.db }}
env:
POSTGRES_HOST: localhost
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
-v /var/run/postgresql:/var/run/postgresql
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- name: Checkout repository
uses: actions/checkout@v2
- id: database-type
env:
MATRIX_DB: ${{ matrix.db }}
run: |
db=$(echo "${MATRIX_DB%%:*}")
echo "::set-output name=db::$db"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap
coverage: none
- name: Get Composer Cache Directory
id: composer-cache
env:
PHP_VERSION: ${{ matrix.php }}
run: |
cd phpBB
echo "::set-output name=dir::$(composer config cache-files-dir)"
echo "::set-output name=version::${PHP_VERSION%.*}"
cd ..
- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ steps.composer-cache.outputs.version }}-${{ hashFiles('phpBB/composer.lock') }}
- name: Setup environment for phpBB
env:
DB: ${{steps.database-type.outputs.db}}
PHP_VERSION: ${{ matrix.php }}
NOTESTS: '0'
run: |
.github/setup-phpbb.sh $DB $PHP_VERSION ${NOTESTS:-0}
- name: Setup database
env:
DB: ${{steps.database-type.outputs.db}}
MYISAM: '0'
run: |
.github/setup-database.sh $DB $MYISAM
- name: Run unit tests
env:
DB: ${{steps.database-type.outputs.db}}
run: |
phpBB/vendor/bin/phpunit --configuration .github/phpunit-$DB-github.xml --verbose --stop-on-error
# Other database types, namely sqlite3 and mssql
other-tests:
runs-on: ubuntu-18.04
strategy:
matrix:
include:
- php: '7.1'
db: "sqlite3"
- php: '7.2'
db: "mcr.microsoft.com/mssql/server:2017-latest"
db_alias: 'MSSQL 2017'
- php: '7.2'
db: "mcr.microsoft.com/mssql/server:2019-latest"
db_alias: 'MSSQL 2019'
name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }}
services:
mssql:
image: ${{ matrix.db != 'mcr.microsoft.com/mssql/server:2017-latest' && matrix.db != 'mcr.microsoft.com/mssql/server:2019-latest' && 'mcr.microsoft.com/mssql/server:2017-latest' || matrix.db }}
env:
SA_PASSWORD: "Pssw0rd_12"
ACCEPT_EULA: "y"
ports:
- 1433:1433
options: >-
--health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'Pssw0rd_12' -Q \"Use [master]; CREATE DATABASE [phpbb_tests] COLLATE Latin1_General_CI_AS\" || exit 1"
--health-interval 10s
--health-timeout 5s
--health-retries 5
--health-start-period 10s
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- name: Checkout repository
uses: actions/checkout@v2
- id: database-type
env:
MATRIX_DB: ${{ matrix.db }}
run: |
if [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2017-latest' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2019-latest' ]
then
db='mssql'
else
db=$(echo "${MATRIX_DB%%:*}")
fi
echo "::set-output name=db::$db"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap
coverage: none
- name: Get Composer Cache Directory
id: composer-cache
env:
PHP_VERSION: ${{ matrix.php }}
run: |
cd phpBB
echo "::set-output name=dir::$(composer config cache-files-dir)"
echo "::set-output name=version::${PHP_VERSION%.*}"
cd ..
- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ steps.composer-cache.outputs.version }}-${{ hashFiles('phpBB/composer.lock') }}
- name: Setup environment for phpBB
env:
DB: ${{steps.database-type.outputs.db}}
PHP_VERSION: ${{ matrix.php }}
NOTESTS: '0'
run: |
.github/setup-phpbb.sh $DB $PHP_VERSION ${NOTESTS:-0}
- name: Setup database
env:
DB: ${{steps.database-type.outputs.db}}
MYISAM: '0'
run: |
.github/setup-database.sh $DB $MYISAM
- name: Run unit tests
env:
DB: ${{steps.database-type.outputs.db}}
run: |
phpBB/vendor/bin/phpunit --configuration .github/phpunit-$DB-github.xml --verbose --stop-on-error
# Test with IIS & PostgreSQL on Windows
windows-tests:
runs-on: windows-2016
strategy:
matrix:
include:
- php: '7.4'
db: "postgres"
name: Windows - PHP ${{ matrix.php }} - ${{ matrix.db }}
steps:
- name: Prepare git for Windows
run: |
git config --system core.autocrlf false
git config --system core.eol lf
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, intl, gd, exif, iconv, pgsql, pdo_pgsql
ini-values: upload_tmp_dir=${{ runner.temp }}, sys_temp_dir=${{ runner.temp }}
coverage: none
- name: Get Composer Cache Directory
id: composer-cache
run: |
cd phpBB
echo "::set-output name=dir::$(composer config cache-files-dir)"
$major_version="${{ matrix.php }}".substring(0,1)
echo "::set-output name=version::$major_version"
cd ..
- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ steps.composer-cache.outputs.version }}-${{ hashFiles('phpBB/composer.lock') }}
- name: Setup environment for phpBB
env:
GITHUB_WORKSPACE: ${{ github.workspace }}
TEMP_DIR: ${{ runner.temp }}
run: |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole, IIS-WebServer, IIS-CommonHttpFeatures, IIS-ManagementConsole, IIS-HttpErrors, IIS-HttpRedirect, IIS-WindowsAuthentication, IIS-StaticContent, IIS-DefaultDocument, IIS-HttpCompressionStatic, IIS-DirectoryBrowsing, IIS-WebServerManagementTools, IIS-CGI -All
Set-Service wuauserv -StartupType Manual
(Get-Content ${env:GITHUB_WORKSPACE}\phpBB\web.config).replace("<configuration>", "<configuration>`n`t<system.web>`n`t`t<customErrors mode=`"Off`"/>`n`t</system.web>") | Set-Content ${env:GITHUB_WORKSPACE}\phpBB\web.config
(Get-Content ${env:GITHUB_WORKSPACE}\phpBB\web.config).replace("`t</system.webServer>", "`t`t<httpErrors errorMode=`"Detailed`" />`n`t</system.webServer>") | Set-Content ${env:GITHUB_WORKSPACE}\phpBB\web.config
choco install urlrewrite -y
Import-Module WebAdministration
New-WebSite -Name 'phpBBTest' -PhysicalPath "${env:GITHUB_WORKSPACE}\phpBB" -Force
$session = Get-PSSession -Name WinPSCompatSession
$sb = {Set-ItemProperty 'IIS:\Sites\phpBBTest' -name Bindings -value @{protocol='http';bindingInformation='*:80:phpbb.test'}}
Invoke-Command -Scriptblock $sb -Session $session
$sb = {Set-WebConfigurationProperty -filter /system.WebServer/security/authentication/AnonymousAuthentication -name enabled -value true -location "IIS:\Sites\phpBBTest"}
Invoke-Command -Scriptblock $sb -Session $session
Add-Content -Path $env:windir\System32\drivers\etc\hosts -Value "`r`n127.0.0.1`tphpbb.test" -Force
[System.Environment]::SetEnvironmentVariable('PATH',$Env:PATH+";%windir%\system32\inetsrv")
echo Setup FAST-CGI configuration
Add-WebConfiguration -Filter /system.webServer/fastCgi -PSPath IIS:\ -Value @{fullpath="C:\tools\php\php-cgi.exe"}
echo Setup FACT-CGI handler
New-WebHandler -Name "PHP-FastCGI" -Path "*.php" -Modules FastCgiModule -ScriptProcessor "C:\tools\php\php-cgi.exe" -Verb '*' -ResourceType Either
iisreset
NET START W3SVC
mkdir "${env:GITHUB_WORKSPACE}\phpBB\cache\test"
mkdir "${env:GITHUB_WORKSPACE}\phpBB\cache\installer"
icacls "${env:GITHUB_WORKSPACE}\phpBB\cache" /grant Users:F /T
icacls "${env:GITHUB_WORKSPACE}\phpBB\files" /grant Users:F /T
icacls "${env:GITHUB_WORKSPACE}\phpBB\store" /grant Users:F /T
icacls "${env:GITHUB_WORKSPACE}\phpBB\images\avatars\upload" /grant Users:F /T
$accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule("IIS_IUSRS", "FullControl", "ContainerInherit,ObjectInherit", "None", "Allow")
$acl = Get-ACL "${env:TEMP_DIR}"
$acl.AddAccessRule($accessRule)
Set-ACL -Path "${env:TEMP_DIR}" -ACLObject $acl
cd ${env:GITHUB_WORKSPACE}\phpBB
php ..\composer.phar install
cd ..
- name: Setup database
run: |
$postgreSqlSvc = Get-Service "postgresql*"
Set-Service $postgreSqlSvc.Name -StartupType manual
$postgreSqlSvc.Start()
try {
(Get-Service "postgresql*").Start()
} catch {
$_ | select *
}
[System.Environment]::SetEnvironmentVariable('PATH',$Env:PATH+";${env:PGBIN}")
$env:PGPASSWORD = 'root'
psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres
psql -c 'create database phpbb_tests;' -U postgres
Add-MpPreference -ExclusionPath "${env:PGDATA}" # Exclude PGDATA directory from Windows Defender
- name: Run unit tests
run: |
phpBB/vendor/bin/phpunit --configuration .github/phpunit-psql-windows-github.xml --verbose --stop-on-error

View File

@@ -1,52 +0,0 @@
language: php
dist: xenial
matrix:
include:
- php: 7.1
env: DB=none;NOTESTS=1
- php: 7.1
env: DB=mariadb
- php: 7.1
env: DB=postgres
- php: 7.1
env: DB=sqlite3
- php: 7.1
env: DB=mysqli;SLOWTESTS=1
- php: 7.1
env: DB=mysqli # MyISAM
- php: 7.2
env: DB=mysqli
- php: 7.3
env: DB=mysqli
- php: 7.4
env: DB=mysqli
- php: nightly
env: DB=mysqli
allow_failures:
- php: nightly
fast_finish: true
services:
- redis-server
- postgresql
- mysql
- memcached
install:
- travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
before_script:
- travis/setup-database.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
- travis/setup-ldap.sh $SLOWTESTS
- phantomjs --webdriver=8910 > /dev/null &
script:
- travis/phing-sniff.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
- travis/check-sami-parse-errors.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
- travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
- travis/check-executable-files.sh $DB $TRAVIS_PHP_VERSION $NOTESTS ./
- sh -c "if [ '$SLOWTESTS' != '1' -a '$DB' = 'mysqli' ]; then phpBB/vendor/bin/phpunit tests/lint_test.php; fi"
- sh -c "if [ '$NOTESTS' != '1' -a '$SLOWTESTS' != '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml --verbose --stop-on-error; fi"
- sh -c "if [ '$SLOWTESTS' = '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml --group slow; fi"
- sh -c "set -x;if [ '$NOTESTS' = '1' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git remote set-branches --add origin $TRAVIS_BRANCH && git fetch && git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..$TRAVIS_PULL_REQUEST_SHA; fi"

View File

@@ -1,42 +1,47 @@
[![phpBB](https://www.phpbb.com/theme/images/logos/blue/160x52.png)](http://www.phpbb.com)
## ABOUT
[![phpBB](phpBB/styles/all/imgs/svg/phpbb_logo_large_cosmic.svg)](https://www.phpbb.com)
phpBB is a free open-source bulletin board written in PHP.
## COMMUNITY
## 🧑🏻‍🤝🏻🧑🏽 Community
Get your copy of phpBB, find support and lots more on [phpBB.com](http://www.phpbb.com)! Discuss the development on [area51](http://area51.phpbb.com/phpBB/index.php).
Get your copy of phpBB, find support and lots more on [phpBB.com](https://www.phpbb.com). Discuss the development on [area51](https://area51.phpbb.com/phpBB/index.php).
## INSTALLING DEPENDENCIES
## 👨‍💻 Contribute
To be able to run an installation from the repo (and not from a pre-built package) you need to run the following commands to install phpBB's dependencies.
cd phpBB
php ../composer.phar install
## 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)
1. [Create an account on phpBB.com](https://www.phpbb.com/community/ucp.php?mode=register)
2. [Create a ticket (unless there already is one)](https://tracker.phpbb.com/secure/CreateIssue!default.jspa)
3. Read our [Coding guidelines](https://area51.phpbb.com/docs/dev/development/coding_guidelines.html) and [Git Contribution Guidelines](https://area51.phpbb.com/docs/dev/development/git.html)
4. Send us a pull request
## VAGRANT
### 🏗️ Setting up a development build of phpBB
Read our [Vagrant documentation](phpBB/docs/vagrant.md) to find out how to use Vagrant to develop and contribute to phpBB.
To run an installation from the repo (and not from a pre-built package) on a local server, run the following commands:
## AUTOMATED TESTING
- Fork phpbb/phpbb to your GitHub account, then create a local clone of it:
```
git clone https://github.com/your_github_name/phpbb.git
```
- Install phpBB's dependencies (from the root of your phpbb repo):
```
cd phpBB
php ../composer.phar install
```
Alternatively, you can read our [Vagrant documentation](phpBB/docs/vagrant.md) to find out how to use Vagrant to develop and contribute to phpBB.
## 📓 Documentation
phpBB's [Development Documentation](https://area51.phpbb.com/docs/dev/index.html) contains all the information you'll need to learn about developing for phpBB's core, extensions and automated testing.
## 🔬 Automated Testing
We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](https://bamboo.phpbb.com) or check our travis builds below:
Travis CI | AppVeyor | Branch | Description
---------- | -------- | ------- | -----------
[![Build Status](https://travis-ci.org/phpbb/phpbb.svg?branch=master)](http://travis-ci.org/phpbb/phpbb) | [![Build status](https://ci.appveyor.com/api/projects/status/8g98ybngd2f3axy1/branch/master?svg=true)](https://ci.appveyor.com/project/phpBB/phpbb/branch/master) | **master** | Latest development version
[![Build Status](https://travis-ci.org/phpbb/phpbb.svg?branch=3.3.x)](http://travis-ci.org/phpbb/phpbb) | [![Build status](https://ci.appveyor.com/api/projects/status/8g98ybngd2f3axy1/branch/3.3.x?svg=true)](https://ci.appveyor.com/project/phpBB/phpbb/branch/3.3.x) | **3.3.x** | Development of version 3.3.x
[![Build Status](https://travis-ci.org/phpbb/phpbb.svg?branch=3.2.x)](http://travis-ci.org/phpbb/phpbb) | [![Build status](https://ci.appveyor.com/api/projects/status/8g98ybngd2f3axy1/branch/3.2.x?svg=true)](https://ci.appveyor.com/project/phpBB/phpbb/branch/3.2.x) | **3.2.x** | Development of version 3.2.x
Branch | Description | Github Actions |
------- | ----------- | -------------- |
**master** | Latest development version | ![Tests](https://github.com/phpbb/phpbb/workflows/Tests/badge.svg?branch=master) |
**3.3.x** | Development of version 3.3.x | ![Tests](https://github.com/phpbb/phpbb/workflows/Tests/badge.svg?branch=3.3.x) |
## LICENSE
## 📜 License
[GNU General Public License v2](http://opensource.org/licenses/gpl-2.0.php)

View File

@@ -2,9 +2,9 @@
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
<!-- a few settings for the build -->
<property name="newversion" value="3.3.1" />
<property name="prevversion" value="3.3.0" />
<property name="olderversions" value="3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9, 3.2.10-RC1, 3.2.10-RC2, 3.2.10, 3.3.1-RC1" />
<property name="newversion" value="3.3.3-RC1" />
<property name="prevversion" value="3.3.2" />
<property name="olderversions" value="3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9, 3.2.10, 3.2.11, 3.3.0, 3.3.1" />
<!-- no configuration should be needed beyond this point -->
<property name="oldversions" value="${olderversions}, ${prevversion}" />
@@ -128,13 +128,13 @@
<!-- Builds docs for current branch into build/api/output/master -->
<target name="docs">
<exec dir="."
command="phpBB/vendor/bin/sami.php update build/sami-checkout.conf.php"
command="php doctum.phar update build/doctum-checkout.conf.php"
passthru="true" />
</target>
<!-- Builds docs for multiple branches/tags into build/api/output/$branch -->
<target name="docs-all">
<exec dir="."
command="phpBB/vendor/bin/sami.php update build/sami-all.conf.php"
command="php doctum.phar update build/doctum-all.conf.php"
passthru="true" />
</target>

View File

@@ -18,21 +18,31 @@ if ($_SERVER['argc'] != 2)
exit(1);
}
$fixVersion = $_SERVER['argv'][1];
if ($_SERVER['argv'][1] == '--stdin')
{
$stdIn = file_get_contents('php://stdin');
// XML output from tracker can be directly piped to this script using:
// cat tracker_output.xml | php build/build_changelog.php --stdin
$xml = simplexml_load_string($stdIn);
}
else
{
$fixVersion = $_SERVER['argv'][1];
$query = 'project IN (PHPBB3, SECURITY)
AND resolution = Fixed
AND fixVersion = "' . $fixVersion . '"
AND status IN ("Unverified Fix", Closed)';
$query = 'project IN (PHPBB3, SECURITY)
AND resolution = Fixed
AND fixVersion = "' . $fixVersion . '"
AND status IN ("Unverified Fix", Closed)';
$url = 'http://tracker.phpbb.com/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=' . urlencode($query) . '&tempMax=1000';
$xml = simplexml_load_string(file_get_contents($url));
$url = 'https://tracker.phpbb.com/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=' . urlencode($query) . '&tempMax=1000';
$xml = simplexml_load_string(file_get_contents($url));
}
foreach ($xml->xpath('//item') as $item)
{
$key = (string) $item->key;
$keyUrl = 'http://tracker.phpbb.com/browse/' . $key;
$keyUrl = 'https://tracker.phpbb.com/browse/' . $key;
$keyLink = '<a href="' . $keyUrl . '">' . $key . '</a>';
$value = str_replace($key, $keyLink, htmlspecialchars($item->title));

View File

@@ -19,21 +19,34 @@ use PHP_CodeSniffer\Sniffs\Sniff;
*/
class phpbb_Sniffs_Namespaces_UnusedUseSniff implements Sniff
{
const FIND = [
T_NS_SEPARATOR,
T_STRING,
T_WHITESPACE,
];
/**
* {@inheritdoc}
*/
public function register()
{
return array(T_USE);
return [T_USE];
}
protected function check(File $phpcsFile, $found_name, $full_name, $short_name, $line)
protected function check(File $phpcsFile, $found_name, $full_name, $short_name, $stack_pointer)
{
$found_name_normalized = ltrim($found_name, '\\');
$full_name = ltrim($full_name, '\\');
if ($found_name === $full_name)
$is_global = ($full_name === $short_name);
$unnecessarily_fully_qualified = ($is_global)
? ($found_name_normalized !== $found_name && $found_name_normalized === $short_name)
: ($found_name_normalized === $full_name);
if ($unnecessarily_fully_qualified)
{
$error = 'Either use statement or full name must be used.';
$phpcsFile->addError($error, $line, 'FullName');
$phpcsFile->addError($error, $stack_pointer, 'FullName');
}
if ($found_name === $short_name)
@@ -58,27 +71,50 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements Sniff
$class_name_start = $phpcsFile->findNext(array(T_NS_SEPARATOR, T_STRING), ($stackPtr + 1));
$find = array(
T_NS_SEPARATOR,
T_STRING,
T_WHITESPACE,
);
$class_name_end = $phpcsFile->findNext($find, ($stackPtr + 1), null, true);
$class_name_end = $phpcsFile->findNext(self::FIND, ($stackPtr + 1), null, true);
$aliasing_as_position = $phpcsFile->findNext(T_AS, $class_name_end, null, false, null, true);
if ($aliasing_as_position !== false)
{
$alias_position = $phpcsFile->findNext(T_STRING, $aliasing_as_position, null, false, null, true);
$class_name_short = $tokens[$alias_position]['content'];
$class_name_full = $phpcsFile->getTokensAsString($class_name_start, ($class_name_end - $class_name_start - 1));
$name_short = $tokens[$alias_position]['content'];
$name_full = $phpcsFile->getTokensAsString($class_name_start, ($class_name_end - $class_name_start - 1));
}
else
{
$class_name_full = $phpcsFile->getTokensAsString($class_name_start, ($class_name_end - $class_name_start));
$class_name_short = $tokens[$class_name_end - 1]['content'];
$name_full = $phpcsFile->getTokensAsString($class_name_start, ($class_name_end - $class_name_start));
$name_short = $tokens[$class_name_end - 1]['content'];
}
if ($tokens[$class_name_start]['content'] === 'function'
&& $tokens[$class_name_start + 1]['code'] === T_WHITESPACE)
{
$class_name_start += 2;
$name_full = $phpcsFile->getTokensAsString(
$class_name_start,
($class_name_end - $class_name_start - (int) ($aliasing_as_position !== false))
);
$ok = $this->findFunctionUsage($phpcsFile, $stackPtr, $tokens, $name_full, $name_short);
}
else
{
$ok = $this->findClassUsage($phpcsFile, $stackPtr, $tokens, $name_full, $name_short);
}
if ($name_full[0] === '\\')
{
$phpcsFile->addError("There must not be a leading '\\' in use statements.", $stackPtr, 'Malformed');
}
if (!$ok)
{
$error = 'There must not be unused USE statements.';
$phpcsFile->addError($error, $stackPtr, 'Unused');
}
}
private function findClassUsage(File $phpcsFile, $stackPtr, $tokens, $class_name_full, $class_name_short)
{
$ok = false;
// Checks in simple statements (new, instanceof and extends)
@@ -95,11 +131,11 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements Sniff
continue;
}
$simple_class_name_end = $phpcsFile->findNext($find, ($simple_statement + 1), null, true);
$simple_class_name_end = $phpcsFile->findNext(self::FIND, ($simple_statement + 1), null, true);
$simple_class_name = trim($phpcsFile->getTokensAsString($simple_class_name_start, ($simple_class_name_end - $simple_class_name_start)));
$ok = $this->check($phpcsFile, $simple_class_name, $class_name_full, $class_name_short, $simple_statement) ? true : $ok;
$ok = $this->check($phpcsFile, $simple_class_name, $class_name_full, $class_name_short, $simple_statement) || $ok;
}
}
@@ -109,12 +145,12 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements Sniff
{
$old_paamayim_nekudotayim = $paamayim_nekudotayim;
$paamayim_nekudotayim_class_name_start = $phpcsFile->findPrevious($find, $paamayim_nekudotayim - 1, null, true);
$paamayim_nekudotayim_class_name_start = $phpcsFile->findPrevious(self::FIND, $paamayim_nekudotayim - 1, null, true);
$paamayim_nekudotayim_class_name_end = $paamayim_nekudotayim - 1;
$paamayim_nekudotayim_class_name = trim($phpcsFile->getTokensAsString($paamayim_nekudotayim_class_name_start + 1, ($paamayim_nekudotayim_class_name_end - $paamayim_nekudotayim_class_name_start)));
$ok = $this->check($phpcsFile, $paamayim_nekudotayim_class_name, $class_name_full, $class_name_short, $paamayim_nekudotayim) ? true : $ok;
$ok = $this->check($phpcsFile, $paamayim_nekudotayim_class_name, $class_name_full, $class_name_short, $paamayim_nekudotayim) || $ok;
}
// Checks in implements
@@ -129,11 +165,11 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements Sniff
$old_implemented_class = $implemented_class;
$implements_class_name_start = $phpcsFile->findNext(array(T_NS_SEPARATOR, T_STRING), ($implemented_class - 1));
$implements_class_name_end = $phpcsFile->findNext($find, ($implemented_class - 1), null, true);
$implements_class_name_end = $phpcsFile->findNext(self::FIND, ($implemented_class - 1), null, true);
$implements_class_name = trim($phpcsFile->getTokensAsString($implements_class_name_start, ($implements_class_name_end - $implements_class_name_start)));
$ok = $this->check($phpcsFile, $implements_class_name, $class_name_full, $class_name_short, $implements) ? true : $ok;
$ok = $this->check($phpcsFile, $implements_class_name, $class_name_full, $class_name_short, $implements) || $ok;
}
}
@@ -141,7 +177,7 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements Sniff
while (($docblock = $phpcsFile->findNext(T_DOC_COMMENT_CLOSE_TAG, ($old_docblock + 1))) !== false)
{
$old_docblock = $docblock;
$ok = $this->checkDocblock($phpcsFile, $docblock, $tokens, $class_name_full, $class_name_short) ? true : $ok;
$ok = $this->checkDocblock($phpcsFile, $docblock, $tokens, $class_name_full, $class_name_short) || $ok;
}
// Checks in type hinting
@@ -154,7 +190,7 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements Sniff
$params = $phpcsFile->getMethodParameters($function_declaration);
foreach ($params as $param)
{
$ok = $this->check($phpcsFile, $param['type_hint'], $class_name_full, $class_name_short, $function_declaration) ? true : $ok;
$ok = $this->check($phpcsFile, $param['type_hint'], $class_name_full, $class_name_short, $function_declaration) || $ok;
}
}
@@ -165,18 +201,106 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements Sniff
$old_catch = $catch;
$caught_class_name_start = $phpcsFile->findNext(array(T_NS_SEPARATOR, T_STRING), $catch + 1);
$caught_class_name_end = $phpcsFile->findNext($find, $caught_class_name_start + 1, null, true);
$caught_class_name_end = $phpcsFile->findNext(self::FIND, $caught_class_name_start + 1, null, true);
$caught_class_name = trim($phpcsFile->getTokensAsString($caught_class_name_start, ($caught_class_name_end - $caught_class_name_start)));
$ok = $this->check($phpcsFile, $caught_class_name, $class_name_full, $class_name_short, $catch) ? true : $ok;
$ok = $this->check($phpcsFile, $caught_class_name, $class_name_full, $class_name_short, $catch) || $ok;
}
if (!$ok)
$old_use = $stackPtr;
while (($use = $phpcsFile->findNext(T_USE, ($old_use + 1))) !== false)
{
$error = 'There must not be unused USE statements.';
$phpcsFile->addError($error, $stackPtr, 'Unused');
$old_use = $use;
// Needs to be inside a class and must not be inside a function scope.
if (!$phpcsFile->hasCondition($use, [T_CLASS, T_TRAIT]) || $phpcsFile->hasCondition($use, T_FUNCTION))
{
continue;
}
$next = $phpcsFile->findNext(T_WHITESPACE, ($use + 1), null, true, null, true);
if ($tokens[$next]['code'] === T_OPEN_PARENTHESIS)
{
continue;
}
$class_name_start = $phpcsFile->findNext(array(T_NS_SEPARATOR, T_STRING), $use + 1, null, false, null, true);
$class_name_end = $phpcsFile->findNext(self::FIND, $class_name_start + 1, null, true, null, true);
$found_name = trim($phpcsFile->getTokensAsString($class_name_start, ($class_name_end - $class_name_start)));
$ok = $this->check($phpcsFile, $found_name, $class_name_full, $class_name_short, $use) || $ok;
}
return $ok;
}
private function findFunctionUsage(File $phpcsFile, $stackPtr, $tokens, $name_full, $name_short)
{
$ok = false;
$position = $phpcsFile->findNext(T_OPEN_PARENTHESIS, $stackPtr + 1);
while ($position !== false)
{
$function_name_end = $position;
$found_start = 1 + $phpcsFile->findPrevious(
[T_NS_SEPARATOR, T_STRING, T_WHITESPACE],
$function_name_end - 1,
null,
true
);
$position = $phpcsFile->findNext(T_OPEN_PARENTHESIS, $position + 1);
if ($found_start === null)
{
continue;
}
$function_name_start = $found_start;
// Trim the output.
while ($tokens[$function_name_start]['code'] === T_WHITESPACE && $function_name_start < $function_name_end)
{
++$function_name_start;
}
while ($tokens[$function_name_end]['code'] === T_WHITESPACE && $function_name_end > $function_name_start)
{
--$function_name_end;
}
$function_name_length = $function_name_end - $function_name_start;
// Filter out control structures, built in type constructors, etc.
if ($function_name_length <= 0)
{
continue;
}
// This doesn't seem to be valid PHP, where is the opening tag?
if ($found_start === 0)
{
continue;
}
$previous_token = $found_start - 1;
$filter = [
T_FUNCTION, // Function declaration
T_OBJECT_OPERATOR, // Method call
T_DOUBLE_COLON, // Static method call
T_NEW, // Constructors
];
// Filter out calls to methods and function declarations.
if (in_array($tokens[$previous_token]['code'], $filter))
{
continue;
}
$function_name = $phpcsFile->getTokensAsString($function_name_start, $function_name_length);
$ok = $this->check($phpcsFile, $function_name, $name_full, $name_short, $function_name_start) || $ok;
}
return $ok;
}
/**
@@ -247,7 +371,7 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements Sniff
$classes = explode('|', str_replace('[]', '', $classes));
foreach ($classes as $class)
{
$ok = $this->check($phpcsFile, $class, $class_name_full, $class_name_short, $tokens[$tag + 2]['line']) ? true : $ok;
$ok = $this->check($phpcsFile, $class, $class_name_full, $class_name_short, $tag + 2) || $ok;
}
}

21
build/doctum-all.conf.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
require __DIR__ . '/doctum-checkout.conf.php';
$config['versions'] = Doctum\Version\GitVersionCollection::create(__DIR__ . '/../')
->add('3.3.x')
->add('master')
;
return new Doctum\Doctum($iterator, $config);

View File

@@ -0,0 +1,31 @@
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
$iterator = Symfony\Component\Finder\Finder::create()
->files()
->name('*.php')
->in(__DIR__ . '/../phpBB/')
->notPath('#^cache/#')
->notPath('#^develop/#')
->notPath('#^ext/#')
->notPath('#^vendor/#')
->notPath('data');
// This variable will be used and changed in doctum-all.conf.php
$config = [
'title' => 'phpBB API Documentation',
'build_dir' => __DIR__ . '/api/output/%version%',
'cache_dir' => __DIR__ . '/api/cache/%version%',
];
return new Doctum\Doctum($iterator, $config);

View File

@@ -1,33 +0,0 @@
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
require __DIR__ . '/sami-checkout.conf.php';
$config['versions'] = Sami\Version\GitVersionCollection::create(__DIR__ . '/../')
/*
This would be nice, but currently causes various problems that need
debugging.
->addFromTags('release-3.0.*')
->add('3.0.x', '3.0-next (olympus)')
->addFromTags('release-3.1.*')
->add('3.1.x', '3.1-next (ascraeus)')
->add('master')
*/
->add('3.0.x')
->add('3.1.x')
->add('3.2.x')
->add('3.3.x')
->add('master')
;
return new Sami\Sami($iterator, $config);

View File

@@ -1,44 +0,0 @@
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
// Prevent 'Class "acm" does not exist.' exception on removeClass().
class PhpbbArrayStore extends Sami\Store\ArrayStore
{
public function removeClass(Sami\Project $project, $name)
{
unset($this->classes[$name]);
}
}
$iterator = Symfony\Component\Finder\Finder::create()
->files()
->name('*.php')
->in(__DIR__ . '/../phpBB/')
->notPath('#^cache/#')
->notPath('#^develop/#')
->notPath('#^ext/#')
->notPath('#^vendor/#')
->notPath('data')
;
$config = array(
'theme' => 'default',
'title' => 'phpBB API Documentation',
'build_dir' => __DIR__.'/api/output/%version%',
'cache_dir' => __DIR__.'/api/cache/%version%',
'default_opened_level' => 2,
// Do not use JsonStore. See https://github.com/fabpot/Sami/issues/79
'store' => new PhpbbArrayStore,
);
return new Sami\Sami($iterator, $config);

Binary file not shown.

BIN
doctum.phar Normal file

Binary file not shown.

View File

@@ -24,7 +24,17 @@ COMMIT_MSG_HOOK_FATAL=$(git config --bool phpbb.hooks.commit-msg.fatal 2> /dev/n
git config phpbb.hooks.commit-msg.fatal true
EXIT_STATUS=0
for COMMIT_HASH in $(git rev-list --no-merges "$COMMIT_RANGE")
COMMIT_HASHES=$(git rev-list --no-merges "$COMMIT_RANGE")
# If any message have been returned instead of commit hashes list
# send a non-zero exit status upstream.
if ! [[ "$COMMIT_HASHES" =~ ^[0-9a-f]{5,40} ]]
then
EXIT_STATUS=1
fi
for COMMIT_HASH in $COMMIT_HASHES
do
echo "Inspecting commit message of commit $COMMIT_HASH"

View File

@@ -78,6 +78,13 @@
<p>{L_ERROR_MBSTRING_HTTP_OUTPUT_EXPLAIN}</p>
</div>
<!-- ENDIF -->
{% if S_DEFAULT_CHARSET_FAIL %}
<div class="errorbox">
<h3>{{ lang('ERROR_DEFAULT_CHARSET') }}</h3>
<p>{{ lang('ERROR_DEFAULT_CHARSET_EXPLAIN') }}</p>
</div>
{% endif %}
<!-- ENDIF -->
<!-- IF S_WRITABLE_CONFIG -->

View File

@@ -102,7 +102,7 @@
<legend>{L_ACP_SUBMIT_CHANGES}</legend>
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
<input class="button2" type="submit" id="cancel" name="cancel" value="{L_CANCEL}" />
</p>
{S_FORM_TOKEN}
</fieldset>

View File

@@ -169,7 +169,7 @@ function parse_document(container)
ul = $this.children(),
tabs = ul.children().not('[data-skip-responsive]'),
links = tabs.children('a'),
item = ul.append('<li class="tab responsive-tab" style="display:none;"><a href="javascript:void(0);" class="responsive-tab-link">&nbsp;</a><div class="dropdown tab-dropdown" style="display: none;"><div class="pointer"><div class="pointer-inner" /></div><ul class="dropdown-contents" /></div></li>').find('li.responsive-tab'),
item = ul.append('<li class="tab responsive-tab" style="display:none;"><a href="javascript:void(0);" class="responsive-tab-link">&nbsp;</a><div class="dropdown tab-dropdown" style="display: none;"><div class="pointer"><div class="pointer-inner"></div></div><ul class="dropdown-contents" /></div></li>').find('li.responsive-tab'),
menu = item.find('.dropdown-contents'),
maxHeight = 0,
lastWidth = false,

22
phpBB/cache/.htaccess vendored
View File

@@ -1,33 +1,25 @@
# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
# module mod_authz_host to a new module called mod_access_compat (which may be
# disabled) and a new "Require" syntax has been introduced to mod_authz_host.
# disabled) and a new "Require" syntax has been introduced to mod_authz_core.
# We could just conditionally provide both versions, but unfortunately Apache
# does not explicitly tell us its version if the module mod_version is not
# available. In this case, we check for the availability of module
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
<IfModule mod_version.c>
<IfVersion < 2.4>
<Files "*">
Order Allow,Deny
Deny from All
</Files>
Order Allow,Deny
Deny from All
</IfVersion>
<IfVersion >= 2.4>
<Files "*">
Require all denied
</Files>
Require all denied
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
<IfModule !mod_authz_core.c>
<Files "*">
Order Allow,Deny
Deny from All
</Files>
Order Allow,Deny
Deny from All
</IfModule>
<IfModule mod_authz_core.c>
<Files "*">
Require all denied
</Files>
Require all denied
</IfModule>
</IfModule>

View File

@@ -27,7 +27,9 @@
"require": {
"php": "^7.1.3",
"ext-json": "*",
"ext-mbstring": "*",
"bantu/ini-get-wrapper": "~1.0",
"composer/package-versions-deprecated": "^1.11",
"google/recaptcha": "~1.1",
"guzzlehttp/guzzle": "~6.3",
"lusitanian/oauth": "^0.8.1",
@@ -60,8 +62,7 @@
"squizlabs/php_codesniffer": "~3.4",
"symfony/browser-kit": "~3.4",
"symfony/css-selector": "~3.4",
"symfony/dom-crawler": "~3.4",
"sami/sami": "^4.1"
"symfony/dom-crawler": "~3.4"
},
"extra": {
"branch-alias": {

1971
phpBB/composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,33 +1,25 @@
# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
# module mod_authz_host to a new module called mod_access_compat (which may be
# disabled) and a new "Require" syntax has been introduced to mod_authz_host.
# disabled) and a new "Require" syntax has been introduced to mod_authz_core.
# We could just conditionally provide both versions, but unfortunately Apache
# does not explicitly tell us its version if the module mod_version is not
# available. In this case, we check for the availability of module
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
<IfModule mod_version.c>
<IfVersion < 2.4>
<Files "*">
Order Allow,Deny
Deny from All
</Files>
Order Allow,Deny
Deny from All
</IfVersion>
<IfVersion >= 2.4>
<Files "*">
Require all denied
</Files>
Require all denied
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
<IfModule !mod_authz_core.c>
<Files "*">
Order Allow,Deny
Deny from All
</Files>
Order Allow,Deny
Deny from All
</IfModule>
<IfModule mod_authz_core.c>
<Files "*">
Require all denied
</Files>
Require all denied
</IfModule>
</IfModule>
</IfModule>

View File

@@ -2,7 +2,7 @@ services:
cron.manager:
class: phpbb\cron\manager
arguments:
- '@cron.task_collection'
- '@service_container'
- '@routing.helper'
- '%core.root_path%'
- '%core.php_ext%'

View File

@@ -12,11 +12,13 @@ services:
- '@user'
- '@auth'
- '@dispatcher'
- '@language'
- '%core.php_ext%'
feed.helper:
class: phpbb\feed\helper
arguments:
- '@auth'
- '@config'
- '@service_container'
- '@path_helper'

View File

@@ -176,6 +176,16 @@ services:
tags:
- { name: notification.type }
notification.type.forum:
class: phpbb\notification\type\forum
shared: false
parent: notification.type.post
calls:
- [set_user_loader, ['@user_loader']]
- [set_config, ['@config']]
tags:
- { name: notification.type }
# ----- Notification's methods -----
# Service MUST NOT be shared for all the plugins to work.
notification.method_collection:

View File

@@ -73,6 +73,7 @@ services:
class: phpbb\textreparser\plugins\poll_option
arguments:
- '@dbal.conn'
- '%tables.poll_options%'
calls:
- [set_name, [poll_option]]
tags:

View File

@@ -50,12 +50,15 @@
<ol>
<li><a href="#changelog">Changelog</a>
<ul>
<li><a href="#v332">Changes since 3.3.2</a></li>
<li><a href="#v331">Changes since 3.3.1</a></li>
<li><a href="#v331rc1">Changes since 3.3.1-RC1</a></li>
<li><a href="#v330">Changes since 3.3.0</a></li>
<li><a href="#v330rc1">Changes since 3.3.0-RC1</a></li>
<li><a href="#v330b2">Changes since 3.3.0-b2</a></li>
<li><a href="#v330b1">Changes since 3.3.0-b1</a></li>
<li><a href="#v32x">Changes since 3.2.x</a></li>
<li><a href="#v3210">Changes since 3.2.10</a></li>
<li><a href="#v3210rc2">Changes since 3.2.10-RC2</a></li>
<li><a href="#v3210rc1">Changes since 3.2.10-RC1</a></li>
<li><a href="#v329">Changes since 3.2.9</a></li>
@@ -151,6 +154,97 @@
<div class="inner">
<div class="content">
<a name="v332"></a><h3>Changes since 3.3.2</h3>
<h4>Bug</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16178">PHPBB3-16178</a>] - Container_builder and Container don't use the same cache_dir when cache dir is overridden via env parameter</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16535">PHPBB3-16535</a>] - Migration from phpBB 2.0.x broken with MySQL 8.x</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16582">PHPBB3-16582</a>] - SQL error when saving profile with empty custom field of type &quot;Numbers&quot;</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16619">PHPBB3-16619</a>] - Spelling on non-existant</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16629">PHPBB3-16629</a>] - ACP get_database_size() fails on MySql 8.0.xx</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16630">PHPBB3-16630</a>] - Preserve the text manipulation API</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16640">PHPBB3-16640</a>] - MCP link not showing in menubar</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16641">PHPBB3-16641</a>] - Failure in config.php validation in ACP (Windows) - PHP 8</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16646">PHPBB3-16646</a>] - PHP fatal error while installing</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16648">PHPBB3-16648</a>] - &quot;Access to undeclared static property&quot; error on setExpectedTriggerError() tests</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16653">PHPBB3-16653</a>] - Recaptcha v3 - Request method is set even though that default isn't actually available</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16656">PHPBB3-16656</a>] - Outdated check in code for mbstring http_input &amp; output</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16665">PHPBB3-16665</a>] - Fix Emoji for strings in board settings + new event</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16666">PHPBB3-16666</a>] - Windows tests in github actions can't write file in postgres</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16667">PHPBB3-16667</a>] - Remove unused create_schema install task</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16670">PHPBB3-16670</a>] - OAuth provider unique secret and key check fails on PHP 8 </li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16673">PHPBB3-16673</a>] - Invalid Atom feed</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16677">PHPBB3-16677</a>] - Event handlers inside dropdown containers not working in mobile view</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16679">PHPBB3-16679</a>] - Login form should respect setting for &quot;Allow password reset&quot;</li>
</ul>
<h4>Improvement</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-15722">PHPBB3-15722</a>] - Allow forum topicrow pagination to use topicrow values</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16538">PHPBB3-16538</a>] - Add MySQL 8 tests</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16549">PHPBB3-16549</a>] - Use PHPUnit 9.3+ for PHP 8.0+ tests</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16606">PHPBB3-16606</a>] - UCP_PM_VIEWMESSAGE.HTML Event Request</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16607">PHPBB3-16607</a>] - Oracle DBAL driver uses obsoleted PHP OCI8 aliases and functions</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16617">PHPBB3-16617</a>] - Add events to modify content status variables</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16632">PHPBB3-16632</a>] - Update composer to version 2</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16636">PHPBB3-16636</a>] - Add PHP 8.0 builds to TravisCI</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16659">PHPBB3-16659</a>] - Use Github Actions instead of TravisCI and AppVeyor</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16661">PHPBB3-16661</a>] - Clean up github actions tasks after merge</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16675">PHPBB3-16675</a>] - Restore checking commit messages</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16676">PHPBB3-16676</a>] - Make Github actions cache composer dependendencies</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16678">PHPBB3-16678</a>] - Add support for Traits in code sniffer</li>
</ul>
<h4>New Feature</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-15951">PHPBB3-15951</a>] - Add core events to core.mcp_delete_topic_modify_*</li>
</ul>
<h4>Task</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16633">PHPBB3-16633</a>] - Update pull request template after end of life of 3.2</li>
</ul>
<a name="v331"></a><h3>Changes since 3.3.1</h3>
<h4>Bug</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16366">PHPBB3-16366</a>] - Language dictionaries other than common.php are unavailable to BBCode templates in feeds</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16488">PHPBB3-16488</a>] - ACP build_cfg_template does not support 0 as minimum value</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16512">PHPBB3-16512</a>] - make_clickable() function does not apply custom classes</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16525">PHPBB3-16525</a>] - Database backup generates a general error with PostgreSQL 12+</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16526">PHPBB3-16526</a>] - Not proper handled comma-separated ACP configuration values</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16532">PHPBB3-16532</a>] - Example post is stored as invalid XML</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16544">PHPBB3-16544</a>] - topic_notify.txt is wrongly used for forum subscriptions</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16565">PHPBB3-16565</a>] - Circular dependencies when cron task depends on controller.helper</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16568">PHPBB3-16568</a>] - Problem with drop-down menu</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16569">PHPBB3-16569</a>] - Massive margin between posts when zoomed out in browser</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16583">PHPBB3-16583</a>] - Reset button in create search index not working</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16588">PHPBB3-16588</a>] - Update docs links from 3.2.x to 3.3.x</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16593">PHPBB3-16593</a>] - Undefined properties in create_search_index install task</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16597">PHPBB3-16597</a>] - Doctum can't build docs on branches older than 3.3.x</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16602">PHPBB3-16602</a>] - phpBB cannot be installed and/or run without iconv or mbstring</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16605">PHPBB3-16605</a>] - SQL Registration errors do not trigger an error correctly</li>
</ul>
<h4>Improvement</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-15300">PHPBB3-15300</a>] - Maximum attachment filesize is nowhere mentioned</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16208">PHPBB3-16208</a>] - No option for email for &quot;Notify me&quot; when a reported post is dealt with</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16430">PHPBB3-16430</a>] - Permission ordering</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16472">PHPBB3-16472</a>] - Remove PhantomJS UI tests</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16527">PHPBB3-16527</a>] - Add role_exists to migration tools</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16533">PHPBB3-16533</a>] - Add core and template events to customize UCP login keys management module</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16556">PHPBB3-16556</a>] - Remove purposeless &lt;Files &quot;*&quot;&gt; from .htaccess</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16557">PHPBB3-16557</a>] - Support piping tracker XML to build_changelog.php</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16562">PHPBB3-16562</a>] - Add explanation for password complexity when resetting password</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16604">PHPBB3-16604</a>] - Display error message if avatar upload folder is not writable</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16608">PHPBB3-16608</a>] - Modernize README</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16612">PHPBB3-16612</a>] - Restructure HTML for agreement, coppa, terms etc. </li>
</ul>
<h4>Task</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-15594">PHPBB3-15594</a>] - The deprecated AOL contact field should be removed</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16571">PHPBB3-16571</a>] - Update s9e TextFormatter</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16580">PHPBB3-16580</a>] - Update rendering tests to match actual Prosilver</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16616">PHPBB3-16616</a>] - Update composer dependencies to latest versions</li>
</ul>
<a name="v331rc1"></a><h3>Changes since 3.3.1-RC1</h3>
<h4>Bug</h4>
<ul>
@@ -537,6 +631,16 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-16185">PHPBB3-16185</a>] - Use Xenial build environment on travis-ci</li>
</ul>
<a name="v3210"></a><h3>Changes since 3.2.10</h3>
<h4>Security Issue</h4>
<ul>
<li>[SECURITY-264] - Invalid conversion of HTML entities when stripping BBCode</li>
</ul>
<h4>Hardening</h4>
<ul>
<li>[SECURITY-265] - Reduce verbosity of jabber output in ACP</li>
</ul>
<a name="v3210rc2"></a><h3>Changes since 3.2.10-RC2</h3>
<h4>Bug</h4>
<ul>

View File

@@ -1,6 +1,6 @@
/**
*
* phpBB © Copyright phpBB Limited 2003-2019
* phpBB © Copyright phpBB Limited 2003-2021
* https://www.phpbb.com
*
* phpBB is free software. You can redistribute it and/or modify it

View File

@@ -60,7 +60,6 @@
<li><a href="#viewonline">According to viewonline a user is doing/reading something they should not be able to!</a></li>
<li><a href="#mail">I keep getting Mail sending errors when I (or my users) post/send PM's/etc.!</a></li>
<li><a href="#mail_language">My users are complaining that emails are not in their selected language!</a></li>
<li><a href="#aol_browser">My AOL based users keep getting logged out!</a></li>
<li><a href="#avatars">I am unable to upload avatars from my computer, regardless of the settings.</a></li>
<li><a href="#gallery_avatars">I just cannot get gallery avatars to appear!</a></li>
<li><a href="#permissions">How do I use/set permissions?</a></li>
@@ -182,28 +181,6 @@ I want to sue you because i think you host an illegal board!</h2>
<hr />
<a name="aol_browser"></a><h2>My AOL based users keep getting logged out!</h2>
<div class="paragraph">
<div class="inner">
<div class="content">
<p>phpBB uses sessions to keep track of users as they browse the board. These sessions use a combination of a unique session id, the users IP and if specified the users browser and/or the users x-forwarded-for header to identify each user. We make use of all of this as an extra safe-guard to help prevent sessions being hijacked (by discovering the unique session id).</p>
<p>Unfortunately this only works when the users IP is constant as they browse the board. For most users this will be the case. However certain providers route their users via a cluster of proxys. In some cases, particularly the AOL browser, this results in different IPs being forwarded as the user moves between pages. We take account of this by not checking the entire IP by default but only the first "three quads" (<samp>A.B.C</samp>). Again in most cases this will be fine. However again AOL uses IPs which can vary so much that checking only the first two quads results in a fairly static IP being available for session validation.</p>
<p>If you are experiencing problems related to this you can set the Session IP validation parameter found in <code>Admin-&gt;General-&gt;Server Configuration-&gt;Security Settings</code> to <samp>A.B</samp>. Please note that reducing the IP validation length does potentially increase the risk of sessions being hijacked (this is something for you to consider, phpBB Limited takes no responsibility should anything happen!). We suggest to at least additionally enable the browser validation.</p>
</div>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
</div>
</div>
<hr />
<a name="avatars"></a><h2>I am unable to upload avatars from my computer, regardless of the settings.</h2>
<div class="paragraph">

View File

@@ -151,6 +151,7 @@
<li>The following PHP modules are required:
<ul>
<li>json</li>
<li>mbstring</li>
<li>XML support</li>
</ul>
</li>

View File

@@ -2387,7 +2387,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
You have <code>[1/21/31] slon</code>, <code>[2/3/4] slona</code>, <code>[0/5/6] slonova</code> and <code>[7/8/9/11] ...</code> and some more difficult rules.
</p>
<p>The <a href="https://area51.phpbb.com/docs/dev/32x/language/plurals.html">plural system</a> takes care of this and can be used as follows:</p>
<p>The <a href="https://area51.phpbb.com/docs/dev/3.3.x/language/plurals.html">plural system</a> takes care of this and can be used as follows:</p>
<p>The PHP code will basically look like this:</p>

View File

@@ -2562,6 +2562,20 @@ ucp_pm_history_row_message_author_username_prepend
* Since: 3.2.8-RC1
* Purpose: Prepend information to message author username of member
ucp_pm_viewmessage_author_full_after
===
* Locations:
+ styles/prosilver/template/ucp_pm_viewmessage.html
* Since: 3.3.3-RC1
* Purpose: Add content right after the message author when viewing a private message
ucp_pm_viewmessage_author_full_before
===
* Locations:
+ styles/prosilver/template/ucp_pm_viewmessage.html
* Since: 3.3.3-RC1
* Purpose: Add content right before the message author when viewing a private message
ucp_pm_viewmessage_avatar_after
===
* Locations:
@@ -2730,6 +2744,62 @@ ucp_prefs_view_select_menu_prepend
* Purpose: Add options to the top of the drop-down lists block of the Edit
Display Options screen
ucp_profile_autologin_keys_tbody_key_after
===
* Locations:
+ styles/prosilver/template/ucp_profile_autologin_keys.html
* Since: 3.3.2-RC1
* Purpose: Add table column after the first column.
ucp_profile_autologin_keys_tbody_key_before
===
* Locations:
+ styles/prosilver/template/ucp_profile_autologin_keys.html
* Since: 3.3.2-RC1
* Purpose: Add table column before the first column.
ucp_profile_autologin_keys_tbody_mark_after
===
* Locations:
+ styles/prosilver/template/ucp_profile_autologin_keys.html
* Since: 3.3.2-RC1
* Purpose: Add table column after the last column.
ucp_profile_autologin_keys_tbody_mark_before
===
* Locations:
+ styles/prosilver/template/ucp_profile_autologin_keys.html
* Since: 3.3.2-RC1
* Purpose: Add table column before the last column.
ucp_profile_autologin_keys_thead_key_after
===
* Locations:
+ styles/prosilver/template/ucp_profile_autologin_keys.html
* Since: 3.3.2-RC1
* Purpose: Add table header content after the first column.
ucp_profile_autologin_keys_thead_key_before
===
* Locations:
+ styles/prosilver/template/ucp_profile_autologin_keys.html
* Since: 3.3.2-RC1
* Purpose: Add table header content before the first column.
ucp_profile_autologin_keys_thead_mark_after
===
* Locations:
+ styles/prosilver/template/ucp_profile_autologin_keys.html
* Since: 3.3.2-RC1
* Purpose: Add table header content after the last column.
ucp_profile_autologin_keys_thead_mark_before
===
* Locations:
+ styles/prosilver/template/ucp_profile_autologin_keys.html
* Since: 3.3.2-RC1
* Purpose: Add table header content before the last column.
ucp_profile_profile_info_after
===
* Locations:

View File

@@ -1,33 +1,25 @@
# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
# module mod_authz_host to a new module called mod_access_compat (which may be
# disabled) and a new "Require" syntax has been introduced to mod_authz_host.
# disabled) and a new "Require" syntax has been introduced to mod_authz_core.
# We could just conditionally provide both versions, but unfortunately Apache
# does not explicitly tell us its version if the module mod_version is not
# available. In this case, we check for the availability of module
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
<IfModule mod_version.c>
<IfVersion < 2.4>
<Files "*">
Order Allow,Deny
Deny from All
</Files>
Order Allow,Deny
Deny from All
</IfVersion>
<IfVersion >= 2.4>
<Files "*">
Require all denied
</Files>
Require all denied
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
<IfModule !mod_authz_core.c>
<Files "*">
Order Allow,Deny
Deny from All
</Files>
Order Allow,Deny
Deny from All
</IfModule>
<IfModule mod_authz_core.c>
<Files "*">
Require all denied
</Files>
Require all denied
</IfModule>
</IfModule>
</IfModule>

View File

@@ -1,33 +1,25 @@
# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
# module mod_authz_host to a new module called mod_access_compat (which may be
# disabled) and a new "Require" syntax has been introduced to mod_authz_host.
# disabled) and a new "Require" syntax has been introduced to mod_authz_core.
# We could just conditionally provide both versions, but unfortunately Apache
# does not explicitly tell us its version if the module mod_version is not
# available. In this case, we check for the availability of module
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
<IfModule mod_version.c>
<IfVersion < 2.4>
<Files "*">
Order Allow,Deny
Deny from All
</Files>
Order Allow,Deny
Deny from All
</IfVersion>
<IfVersion >= 2.4>
<Files "*">
Require all denied
</Files>
Require all denied
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
<IfModule !mod_authz_core.c>
<Files "*">
Order Allow,Deny
Deny from All
</Files>
Order Allow,Deny
Deny from All
</IfModule>
<IfModule mod_authz_core.c>
<Files "*">
Require all denied
</Files>
Require all denied
</IfModule>
</IfModule>
</IfModule>

View File

@@ -1,33 +1,25 @@
# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
# module mod_authz_host to a new module called mod_access_compat (which may be
# disabled) and a new "Require" syntax has been introduced to mod_authz_host.
# disabled) and a new "Require" syntax has been introduced to mod_authz_core.
# We could just conditionally provide both versions, but unfortunately Apache
# does not explicitly tell us its version if the module mod_version is not
# available. In this case, we check for the availability of module
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
<IfModule mod_version.c>
<IfVersion < 2.4>
<Files "*">
Order Allow,Deny
Deny from All
</Files>
Order Allow,Deny
Deny from All
</IfVersion>
<IfVersion >= 2.4>
<Files "*">
Require all denied
</Files>
Require all denied
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
<IfModule !mod_authz_core.c>
<Files "*">
Order Allow,Deny
Deny from All
</Files>
Order Allow,Deny
Deny from All
</IfModule>
<IfModule mod_authz_core.c>
<Files "*">
Require all denied
</Files>
Require all denied
</IfModule>
</IfModule>
</IfModule>

View File

@@ -193,7 +193,7 @@ class acp_board
'allow_post_flash' => array('lang' => 'ALLOW_POST_FLASH', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_post_links' => array('lang' => 'ALLOW_POST_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allowed_schemes_links' => array('lang' => 'ALLOWED_SCHEMES_LINKS', 'validate' => 'string', 'type' => 'text:0:255', 'explain' => true),
'allowed_schemes_links' => array('lang' => 'ALLOWED_SCHEMES_LINKS', 'validate' => 'csv', 'type' => 'text:0:255', 'explain' => true),
'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'enable_post_confirm' => array('lang' => 'VISUAL_CONFIRM_POST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
@@ -497,6 +497,42 @@ class acp_board
$cfg_array = (isset($_REQUEST['config'])) ? $request->variable('config', array('' => ''), true) : $this->new_config;
$error = array();
// Prevalidate allowed URL schemes
if ($mode == 'post')
{
$schemes = array_filter(explode(',', $cfg_array['allowed_schemes_links']));
foreach ($schemes as $scheme)
{
if (!preg_match('#^[a-z][a-z0-9+\\-.]*$#Di', $scheme))
{
$error[] = $language->lang('URL_SCHEME_INVALID', $language->lang('ALLOWED_SCHEMES_LINKS'), $scheme);
}
}
}
if ($mode == 'avatar' && $cfg_array['allow_avatar_upload'])
{
// If avatar uploading is enabled but the path setting is empty,
// config variable validation is bypassed. Catch the case here
if (!$cfg_array['avatar_path'])
{
$error[] = $language->lang('AVATAR_NO_UPLOAD_PATH');
}
else if (!$submit)
{
$filesystem = $phpbb_container->get('filesystem');
$avatar_path_exists = $filesystem->exists($phpbb_root_path . $cfg_array['avatar_path']);
$avatar_path_writable = $filesystem->is_writable($phpbb_root_path . $cfg_array['avatar_path']);
// Not existing or writable path will be caught on submit by validate_config_vars().
// Display the warning if the directory was changed on the server afterwards
if (!$avatar_path_exists || !$avatar_path_writable)
{
$error[] = $language->lang('AVATAR_NO_UPLOAD_DIR');
}
}
}
// We validate the complete config if wished
validate_config_vars($display_vars['vars'], $cfg_array, $error);
@@ -546,7 +582,37 @@ class acp_board
continue;
}
$config->set($config_name, $config_value);
// Array of emoji-enabled configurations
$config_name_ary = [
'sitename',
'site_desc',
'site_home_text',
'board_index_text',
'board_disable_msg',
];
/**
* Event to manage the array of emoji-enabled configurations
*
* @event core.acp_board_config_emoji_enabled
* @var array config_name_ary Array of config names to process
* @since 3.3.3-RC1
*/
$vars = ['config_name_ary'];
extract($phpbb_dispatcher->trigger_event('core.acp_board_config_emoji_enabled', compact($vars)));
if (in_array($config_name, $config_name_ary))
{
/**
* Replace Emojis and other 4bit UTF-8 chars not allowed by MySQL to UCR/NCR.
* Using their Numeric Character Reference's Hexadecimal notation.
*/
$config->set($config_name, utf8_encode_ucr($config_value));
}
else
{
$config->set($config_name, $config_value);
}
if ($config_name == 'allow_quick_reply' && isset($_POST['allow_quick_reply_enable']))
{
@@ -622,7 +688,7 @@ class acp_board
if ($submit && (($cfg_array['auth_method'] != $this->new_config['auth_method']) || $updated_auth_settings))
{
$method = basename($cfg_array['auth_method']);
if (array_key_exists('auth.provider.' . $method, $auth_providers))
if (array_key_exists('auth.provider.' . $method, (array) $auth_providers))
{
$provider = $auth_providers['auth.provider.' . $method];
if ($error = $provider->init())

View File

@@ -20,8 +20,8 @@ if (!defined('IN_PHPBB'))
}
/**
* @todo [smilies] check regular expressions for special char replacements (stored specialchared in db)
*/
* @todo {smilies} check regular expressions for special char replacements (stored specialchared in db)
*/
class acp_icons
{
var $u_action;

View File

@@ -679,26 +679,33 @@ class acp_main
}
}
if (!defined('PHPBB_DISABLE_CONFIG_CHECK') && file_exists($phpbb_root_path . 'config.' . $phpEx) && $phpbb_filesystem->is_writable($phpbb_root_path . 'config.' . $phpEx))
if (!defined('PHPBB_DISABLE_CONFIG_CHECK'))
{
// World-Writable? (000x)
$template->assign_var('S_WRITABLE_CONFIG', (bool) (@fileperms($phpbb_root_path . 'config.' . $phpEx) & 0x0002));
}
$this->php_ini = $phpbb_container->get('php_ini');
$func_overload = $this->php_ini->getNumeric('mbstring.func_overload');
$encoding_translation = $this->php_ini->getString('mbstring.encoding_translation');
$http_input = $this->php_ini->getString('mbstring.http_input');
$http_output = $this->php_ini->getString('mbstring.http_output');
$this->php_ini = $phpbb_container->get('php_ini');
$func_overload = $this->php_ini->getNumeric('mbstring.func_overload');
$encoding_translation = $this->php_ini->getString('mbstring.encoding_translation');
$http_input = $this->php_ini->getString('mbstring.http_input');
$http_output = $this->php_ini->getString('mbstring.http_output');
$default_charset = $this->php_ini->getString('default_charset');
if (extension_loaded('mbstring'))
{
$template->assign_vars(array(
/**
* “mbstring.http_input” and “mbstring.http_output” are deprecated as of PHP 5.6.0
* @link https://www.php.net/manual/mbstring.configuration.php#ini.mbstring.http-input
*/
$template->assign_vars([
'S_MBSTRING_LOADED' => true,
'S_MBSTRING_FUNC_OVERLOAD_FAIL' => $func_overload && ($func_overload & (MB_OVERLOAD_MAIL | MB_OVERLOAD_STRING)),
'S_MBSTRING_ENCODING_TRANSLATION_FAIL' => $encoding_translation && ($encoding_translation != 0),
'S_MBSTRING_HTTP_INPUT_FAIL' => $http_input && !in_array($http_input, array('pass', '')),
'S_MBSTRING_HTTP_OUTPUT_FAIL' => $http_output && !in_array($http_output, array('pass', '')),
));
'S_MBSTRING_HTTP_INPUT_FAIL' => !empty($http_input),
'S_MBSTRING_HTTP_OUTPUT_FAIL' => !empty($http_output),
'S_DEFAULT_CHARSET_FAIL' => $default_charset !== 'UTF-8',
]);
}
// Fill dbms version if not yet filled

View File

@@ -53,7 +53,7 @@ class acp_search
global $user, $template, $phpbb_log, $request;
global $config, $phpbb_admin_path, $phpEx;
$submit = (isset($_POST['submit'])) ? true : false;
$submit = $request->is_set_post('submit');
if ($submit && !check_link_hash($request->variable('hash', ''), 'acp_search'))
{
@@ -245,13 +245,13 @@ class acp_search
$action = $request->variable('action', '');
$this->state = explode(',', $config['search_indexing_state']);
if (isset($_POST['cancel']))
if ($request->is_set_post('cancel'))
{
$action = '';
$this->state = array();
$this->save_state();
}
$submit = $request->is_set_post('submit', false);
$submit = $request->is_set_post('submit');
if (!check_link_hash($request->variable('hash', ''), 'acp_search') && in_array($action, array('create', 'delete')))
{

View File

@@ -20,8 +20,8 @@ if (!defined('IN_PHPBB'))
}
/**
* @todo [words] check regular expressions for special char replacements (stored specialchared in db)
*/
* @todo {words} check regular expressions for special char replacements (stored specialchared in db)
*/
class acp_words
{
var $u_action;

View File

@@ -1131,9 +1131,11 @@ class auth_admin extends \phpbb\auth\auth
{
global $template, $phpbb_admin_path, $phpEx, $phpbb_container;
/* @var $phpbb_permissions \phpbb\permissions */
/** @var \phpbb\permissions $phpbb_permissions */
$phpbb_permissions = $phpbb_container->get('acl.permissions');
$order = array_flip(array_keys($phpbb_permissions->get_permissions()));
foreach ($category_array as $cat => $cat_array)
{
if (!$phpbb_permissions->category_defined($cat))
@@ -1149,28 +1151,14 @@ class auth_admin extends \phpbb\auth\auth
'CAT_NAME' => $phpbb_permissions->get_category_lang($cat),
));
/* Sort permissions by name (more naturaly and user friendly than sorting by a primary key)
* Commented out due to it's memory consumption and time needed
*
$key_array = array_intersect(array_keys($user->lang), array_map(create_function('$a', 'return "acl_" . $a;'), array_keys($cat_array['permissions'])));
$values_array = $cat_array['permissions'];
$permissions = array_filter($cat_array['permissions'], [$phpbb_permissions, 'permission_defined'], ARRAY_FILTER_USE_KEY);
$cat_array['permissions'] = array();
uksort($permissions, function($a, $b) use ($order) {
return $order[$a] <=> $order[$b];
});
foreach ($key_array as $key)
foreach ($permissions as $permission => $allowed)
{
$key = str_replace('acl_', '', $key);
$cat_array['permissions'][$key] = $values_array[$key];
}
unset($key_array, $values_array);
*/
foreach ($cat_array['permissions'] as $permission => $allowed)
{
if (!$phpbb_permissions->permission_defined($permission))
{
continue;
}
if ($s_view)
{
$template->assign_block_vars($tpl_cat . '.' . $tpl_mask, array(
@@ -1218,9 +1206,11 @@ class auth_admin extends \phpbb\auth\auth
{
global $phpbb_container;
/* @var $phpbb_permissions \phpbb\permissions */
/** @var \phpbb\permissions $phpbb_permissions */
$phpbb_permissions = $phpbb_container->get('acl.permissions');
$order = array_flip(array_keys($phpbb_permissions->get_permissions()));
foreach ($key_sort_array as $forum_id)
{
if (!isset($permission_row[$forum_id]))
@@ -1228,8 +1218,11 @@ class auth_admin extends \phpbb\auth\auth
continue;
}
$permissions = $permission_row[$forum_id];
ksort($permissions);
$permissions = array_filter($permission_row[$forum_id], [$phpbb_permissions, 'permission_defined'], ARRAY_FILTER_USE_KEY);
uksort($permissions, function($a, $b) use ($order) {
return $order[$a] <=> $order[$b];
});
foreach ($permissions as $permission => $auth_setting)
{

View File

@@ -28,7 +28,7 @@ if (!defined('IN_PHPBB'))
*/
// phpBB Version
@define('PHPBB_VERSION', '3.3.1');
@define('PHPBB_VERSION', '3.3.3-RC1');
// QA-related
// define('PHPBB_QA', 1);

View File

@@ -580,6 +580,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
'notification.type.post',
'notification.type.approve_topic',
'notification.type.approve_post',
'notification.type.forum',
), false, $user->data['user_id'], $post_time);
if ($config['load_db_lastread'] && $user->data['is_registered'])
@@ -663,6 +664,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
'notification.type.bookmark',
'notification.type.post',
'notification.type.approve_post',
'notification.type.forum',
), $topic_ids, $user->data['user_id'], $post_time);
// Add 0 to forums array to mark global announcements correctly
@@ -773,6 +775,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
'notification.type.bookmark',
'notification.type.post',
'notification.type.approve_post',
'notification.type.forum',
), $topic_id, $user->data['user_id'], $post_time);
if ($config['load_db_lastread'] && $user->data['is_registered'])
@@ -2481,7 +2484,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
'LOGIN_ERROR' => $err,
'LOGIN_EXPLAIN' => $l_explain,
'U_SEND_PASSWORD' => ($config['email_enable']) ? $controller_helper->route('phpbb_ucp_forgot_password_controller') : '',
'U_SEND_PASSWORD' => ($config['email_enable'] && $config['allow_password_reset']) ? $controller_helper->route('phpbb_ucp_forgot_password_controller') : '',
'U_RESEND_ACTIVATION' => ($config['require_activation'] == USER_ACTIVATION_SELF && $config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=resend_act') : '',
'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'),
'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'),

View File

@@ -283,27 +283,17 @@ function build_cfg_template($tpl_type, $key, &$new_ary, $config_key, $vars)
case 'time':
case 'number':
case 'range':
$max = '';
$min = ( isset($tpl_type[1]) ) ? (int) $tpl_type[1] : false;
if ( isset($tpl_type[2]) )
{
$max = (int) $tpl_type[2];
}
$min = isset($tpl_type[1]) ? (int) $tpl_type[1] : false;
$max = isset($tpl_type[2]) ? (int) $tpl_type[2] : false;
$tpl = '<input id="' . $key . '" type="' . $tpl_type[0] . '"' . (( $min != '' ) ? ' min="' . $min . '"' : '') . (( $max != '' ) ? ' max="' . $max . '"' : '') . ' name="' . $name . '" value="' . $new_ary[$config_key] . '" />';
$tpl = '<input id="' . $key . '" type="' . $tpl_type[0] . '"' . (( $min !== false ) ? ' min="' . $min . '"' : '') . (( $max !== false ) ? ' max="' . $max . '"' : '') . ' name="' . $name . '" value="' . $new_ary[$config_key] . '" />';
break;
case 'dimension':
$max = '';
$min = isset($tpl_type[1]) ? (int) $tpl_type[1] : false;
$max = isset($tpl_type[2]) ? (int) $tpl_type[2] : false;
$min = (int) $tpl_type[1];
if ( isset($tpl_type[2]) )
{
$max = (int) $tpl_type[2];
}
$tpl = '<input id="' . $key . '" type="number"' . (( $min !== '' ) ? ' min="' . $min . '"' : '') . (( $max != '' ) ? ' max="' . $max . '"' : '') . ' name="config[' . $config_key . '_width]" value="' . $new_ary[$config_key . '_width'] . '" /> x <input type="number"' . (( $min !== '' ) ? ' min="' . $min . '"' : '') . (( $max != '' ) ? ' max="' . $max . '"' : '') . ' name="config[' . $config_key . '_height]" value="' . $new_ary[$config_key . '_height'] . '" />';
$tpl = '<input id="' . $key . '" type="number"' . (( $min !== false ) ? ' min="' . $min . '"' : '') . (( $max !== false ) ? ' max="' . $max . '"' : '') . ' name="config[' . $config_key . '_width]" value="' . $new_ary[$config_key . '_width'] . '" /> x <input type="number"' . (( $min !== '' ) ? ' min="' . $min . '"' : '') . (( $max != '' ) ? ' max="' . $max . '"' : '') . ' name="config[' . $config_key . '_height]" value="' . $new_ary[$config_key . '_height'] . '" />';
break;
case 'textarea':
@@ -445,13 +435,27 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
switch ($validator[$type])
{
case 'url':
$cfg_array[$config_name] = trim($cfg_array[$config_name]);
if (!empty($cfg_array[$config_name]) && !preg_match('#^' . get_preg_expression('url') . '$#iu', $cfg_array[$config_name]))
case 'csv':
if ($validator[$type] == 'url')
{
$error[] = $language->lang('URL_INVALID', $language->lang($config_definition['lang']));
}
$cfg_array[$config_name] = trim($cfg_array[$config_name]);
if (!empty($cfg_array[$config_name]) && !preg_match('#^' . get_preg_expression('url') . '$#iu', $cfg_array[$config_name]))
{
$error[] = $language->lang('URL_INVALID', $language->lang($config_definition['lang']));
}
}
else if ($validator[$type] == 'csv')
{
// Validate comma separated values
$unfiltered_array = explode(',', $cfg_array[$config_name]);
$filtered_array = array_filter($unfiltered_array);
if (!empty($filtered_array) && count($unfiltered_array) !== count($filtered_array))
{
$error[] = $language->lang('CSV_INVALID', $language->lang($config_definition['lang']));
}
}
// no break here
case 'string':

View File

@@ -2832,56 +2832,36 @@ function view_warned_users(&$users, &$user_count, $limit = 0, $offset = 0, $limi
/**
* Get database size
* Currently only mysql and mssql are supported
*/
function get_database_size()
{
global $db, $user, $table_prefix;
global $db, $user;
$database_size = false;
// This code is heavily influenced by a similar routine in phpMyAdmin 2.2.0
switch ($db->get_sql_layer())
{
case 'mysqli':
$sql = 'SELECT VERSION() AS mysql_version';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$mysql_engine = ['MyISAM', 'InnoDB', 'Aria'];
$db_name = $db->get_db_name();
$database_size = 0;
if ($row)
$sql = 'SHOW TABLE STATUS
FROM ' . $db_name;
$result = $db->sql_query($sql, 7200);
while ($row = $db->sql_fetchrow($result))
{
$version = $row['mysql_version'];
if (preg_match('#(3\.23|[45]\.|10\.[0-9]\.[0-9]{1,2}-+Maria)#', $version))
if (isset($row['Engine']) && in_array($row['Engine'], $mysql_engine))
{
$db_name = (preg_match('#^(?:3\.23\.(?:[6-9]|[1-9]{2}))|[45]\.|10\.[0-9]\.[0-9]{1,2}-+Maria#', $version)) ? "`{$db->get_db_name()}`" : $db->get_db_name();
$sql = 'SHOW TABLE STATUS
FROM ' . $db_name;
$result = $db->sql_query($sql, 7200);
$database_size = 0;
while ($row = $db->sql_fetchrow($result))
{
if ((isset($row['Type']) && $row['Type'] != 'MRG_MyISAM') || (isset($row['Engine']) && ($row['Engine'] == 'MyISAM' || $row['Engine'] == 'InnoDB' || $row['Engine'] == 'Aria')))
{
if ($table_prefix != '')
{
if (strpos($row['Name'], $table_prefix) !== false)
{
$database_size += $row['Data_length'] + $row['Index_length'];
}
}
else
{
$database_size += $row['Data_length'] + $row['Index_length'];
}
}
}
$db->sql_freeresult($result);
$database_size += $row['Data_length'] + $row['Index_length'];
}
}
$db->sql_freeresult($result);
$database_size = $database_size ? $database_size : false;
break;
case 'sqlite3':

View File

@@ -488,8 +488,8 @@ function phpbb_realpath($path)
* Determine which plural form we should use.
* For some languages this is not as simple as for English.
*
* @param $rule int ID of the plural rule we want to use, see https://area51.phpbb.com/docs/dev/32x/language/plurals.html
* @param $number int|float The number we want to get the plural case for. Float numbers are floored.
* @param int $rule ID of the plural rule we want to use, see https://area51.phpbb.com/docs/dev/3.3.x/language/plurals.html
* @param int|float $number The number we want to get the plural case for. Float numbers are floored.
* @return int The plural-case we need to use for the number plural-rule combination
*
* @deprecated 3.2.0-dev (To be removed: 4.0.0)

View File

@@ -532,7 +532,7 @@ function strip_bbcode(&$text, $uid = '')
if (preg_match('#^<[rt][ >]#', $text))
{
$text = $phpbb_container->get('text_formatter.utils')->clean_formatting($text);
$text = utf8_htmlspecialchars($phpbb_container->get('text_formatter.utils')->clean_formatting($text));
}
else
{
@@ -921,13 +921,17 @@ function make_clickable_callback($type, $whitespace, $url, $relative_url, $class
}
/**
* make_clickable function
*
* Replace magic urls of form http://xxx.xxx., www.xxx. and xxx@xxx.xxx.
* Cuts down displayed size of link if over 50 chars, turns absolute links
* into relative versions when the server/script path matches the link
*/
function make_clickable($text, $server_url = false, $class = 'postlink')
* Replaces magic urls of form http://xxx.xxx., www.xxx. and xxx@xxx.xxx.
* Cuts down displayed size of link if over 50 chars, turns absolute links
* into relative versions when the server/script path matches the link
*
* @param string $text Message text to parse URL/email entries
* @param bool|string $server_url The server URL. If false, the board URL will be used
* @param string $class CSS class selector to add to the parsed URL entries
*
* @return string A text with parsed URL/email entries
*/
function make_clickable($text, $server_url = false, string $class = 'postlink')
{
if ($server_url === false)
{
@@ -948,39 +952,70 @@ function make_clickable($text, $server_url = false, $class = 'postlink')
$magic_url_match_args = array();
}
// relative urls for this board
$magic_url_match_args[$server_url][] = array(
'#(^|[\n\t (>.])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#iu',
MAGIC_URL_LOCAL,
$local_class,
);
// Check if the match for this $server_url and $class already exists
$element_exists = false;
if (isset($magic_url_match_args[$server_url]))
{
array_walk_recursive($magic_url_match_args[$server_url], function($value) use (&$element_exists, $static_class)
{
if ($value == $static_class)
{
$element_exists = true;
return;
}
}
);
}
// matches a xxxx://aaaaa.bbb.cccc. ...
$magic_url_match_args[$server_url][] = array(
'#(^|[\n\t (>.])(' . get_preg_expression('url_inline') . ')#iu',
MAGIC_URL_FULL,
$class,
);
// Only add new $server_url and $class matches if not exist
if (!$element_exists)
{
// relative urls for this board
$magic_url_match_args[$server_url][] = [
'#(^|[\n\t (>.])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#iu',
MAGIC_URL_LOCAL,
$local_class,
$static_class,
];
// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
$magic_url_match_args[$server_url][] = array(
'#(^|[\n\t (>])(' . get_preg_expression('www_url_inline') . ')#iu',
MAGIC_URL_WWW,
$class,
);
// matches a xxxx://aaaaa.bbb.cccc. ...
$magic_url_match_args[$server_url][] = [
'#(^|[\n\t (>.])(' . get_preg_expression('url_inline') . ')#iu',
MAGIC_URL_FULL,
$class,
$static_class,
];
// matches an email@domain type address at the start of a line, or after a space or after what might be a BBCode.
$magic_url_match_args[$server_url][] = array(
'/(^|[\n\t (>])(' . get_preg_expression('email') . ')/iu',
MAGIC_URL_EMAIL,
'',
);
// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
$magic_url_match_args[$server_url][] = [
'#(^|[\n\t (>])(' . get_preg_expression('www_url_inline') . ')#iu',
MAGIC_URL_WWW,
$class,
$static_class,
];
}
if (!isset($magic_url_match_args[$server_url]['email']))
{
// matches an email@domain type address at the start of a line, or after a space or after what might be a BBCode.
$magic_url_match_args[$server_url]['email'] = [
'/(^|[\n\t (>])(' . get_preg_expression('email') . ')/iu',
MAGIC_URL_EMAIL,
'',
];
}
}
foreach ($magic_url_match_args[$server_url] as $magic_args)
{
if (preg_match($magic_args[0], $text, $matches))
{
// Only apply $class from the corresponding function call argument (excepting emails which never has a class)
if ($magic_args[1] != MAGIC_URL_EMAIL && $magic_args[3] != $static_class)
{
continue;
}
$text = preg_replace_callback($magic_args[0], function($matches) use ($magic_args)
{
$relative_url = isset($matches[3]) ? $matches[3] : '';

View File

@@ -207,7 +207,7 @@ class jabber
*/
function login()
{
if (!count($this->features))
if (empty($this->features))
{
$this->add_to_log('Error: No feature information from server available.');
return false;
@@ -227,7 +227,6 @@ class jabber
if ($this->connected())
{
$xml = trim($xml);
$this->add_to_log('SEND: '. $xml);
return fwrite($this->connection, $xml);
}
else
@@ -338,7 +337,6 @@ class jabber
if ($data != '')
{
$this->add_to_log('RECV: '. $data);
return $this->xmlize($data);
}
else
@@ -419,7 +417,7 @@ class jabber
{
// or even multiple elements of the same type?
// array('message' => array(0 => ..., 1 => ...))
if (count(reset($xml)) > 1)
if (is_array(reset($xml)) && count(reset($xml)) > 1)
{
foreach (reset($xml) as $value)
{
@@ -445,7 +443,7 @@ class jabber
}
$second_time = isset($this->session['id']);
$this->session['id'] = $xml['stream:stream'][0]['@']['id'];
$this->session['id'] = isset($xml['stream:stream'][0]['@']['id']) ? $xml['stream:stream'][0]['@']['id'] : '';
if ($second_time)
{
@@ -701,7 +699,7 @@ class jabber
default:
// hm...don't know this response
$this->add_to_log('Notice: Unknown server response (' . key($xml) . ')');
$this->add_to_log('Notice: Unknown server response');
return false;
break;
}

View File

@@ -118,7 +118,7 @@ function generate_smilies($mode, $forum_id)
SMILIES_TABLE => 's',
],
'GROUP_BY' => 's.smiley_url, s.smiley_width, s.smiley_height',
'ORDER_BY' => 'min_smiley_order',
'ORDER_BY' => $db->sql_quote('min_smiley_order'),
];
}
else
@@ -770,10 +770,11 @@ function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_a
// Some default template variables
$template->assign_vars(array(
'S_SHOW_ATTACH_BOX' => $show_attach_box,
'S_HAS_ATTACHMENTS' => count($attachment_data),
'FILESIZE' => $config['max_filesize'],
'FILE_COMMENT' => (isset($filename_data['filecomment'])) ? $filename_data['filecomment'] : '',
'S_SHOW_ATTACH_BOX' => $show_attach_box,
'S_HAS_ATTACHMENTS' => count($attachment_data),
'FILESIZE' => $config['max_filesize'],
'FILE_COMMENT' => (isset($filename_data['filecomment'])) ? $filename_data['filecomment'] : '',
'MAX_ATTACHMENT_FILESIZE' => $config['max_filesize'] > 0 ? $user->lang('MAX_ATTACHMENT_FILESIZE', get_formatted_filesize($config['max_filesize'])) : '',
));
if (count($attachment_data))
@@ -2399,6 +2400,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
'notification.type.quote',
'notification.type.bookmark',
'notification.type.post',
'notification.type.forum',
), $notification_data);
break;
@@ -2417,6 +2419,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
'notification.type.bookmark',
'notification.type.topic',
'notification.type.post',
'notification.type.forum',
), $notification_data);
break;
}

View File

@@ -1610,7 +1610,7 @@ function validate_num($num, $optional = false, $min = 0, $max = 1E99)
/**
* Validate Date
* @param String $string a date in the dd-mm-yyyy format
* @param string $date_string a date in the dd-mm-yyyy format
* @return boolean
*/
function validate_date($date_string, $optional = false)

View File

@@ -881,16 +881,38 @@ function mcp_restore_topic($topic_ids)
*/
function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = '', $action = 'delete_topic')
{
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_container, $phpbb_log;
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_container, $phpbb_log, $phpbb_dispatcher;
$check_permission = ($is_soft) ? 'm_softdelete' : 'm_delete';
if (!phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array($check_permission)))
$forum_id = $request->variable('f', 0);
$check_permission = ($is_soft) ? ['m_softdelete'] : ['m_delete'];
/**
* This event allows you to modify the current user's checked permissions when deleting a topic
*
* @event core.mcp_delete_topic_modify_permissions
* @var array topic_ids The array of topic IDs to be deleted
* @var int forum_id The current forum ID
* @var bool is_soft Boolean designating whether we're soft deleting or not
* @var string soft_delete_reason The reason we're soft deleting
* @var string action The current delete action
* @var array check_permission The array with a permission to check for, can be set to false to not check them
* @since 3.3.3-RC1
*/
$vars = array(
'topic_ids',
'forum_id',
'is_soft',
'soft_delete_reason',
'action',
'check_permission',
);
extract($phpbb_dispatcher->trigger_event('core.mcp_delete_topic_modify_permissions', compact($vars)));
if (!phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', $check_permission))
{
return;
}
$redirect = $request->variable('redirect', build_url(array('action', 'quickmod')));
$forum_id = $request->variable('f', 0);
$s_hidden_fields = array(
'topic_id_list' => $topic_ids,
@@ -1002,6 +1024,28 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
$s_hidden_fields['delete_permanent'] = '1';
}
/**
* This event allows you to modify the hidden form fields when deleting topics
*
* @event core.mcp_delete_topic_modify_hidden_fields
* @var string l_confirm The confirmation text language variable (DELETE_TOPIC(S), DELETE_TOPIC(S)_PERMANENTLY)
* @var array s_hidden_fields The array holding the hidden form fields
* @var array topic_ids The array of topic IDs to be deleted
* @var int forum_id The current forum ID
* @var bool only_softdeleted If the topic_ids are all soft deleted, this is true
* @var bool only_shadow If the topic_ids are all shadow topics, this is true
* @since 3.3.3-RC1
*/
$vars = array(
'l_confirm',
's_hidden_fields',
'topic_ids',
'forum_id',
'only_softdeleted',
'only_shadow',
);
extract($phpbb_dispatcher->trigger_event('core.mcp_delete_topic_modify_hidden_fields', compact($vars)));
confirm_box(false, $l_confirm, build_hidden_fields($s_hidden_fields), 'confirm_delete_body.html');
}

View File

@@ -687,6 +687,27 @@ function compose_pm($id, $mode, $action, $user_folders = array())
$flash_status = ($config['auth_flash_pm'] && $auth->acl_get('u_pm_flash')) ? true : false;
$url_status = ($config['allow_post_links']) ? true : false;
/**
* Event to override private message BBCode status indications
*
* @event core.ucp_pm_compose_modify_bbcode_status
*
* @var bool bbcode_status BBCode status
* @var bool smilies_status Smilies status
* @var bool img_status Image BBCode status
* @var bool flash_status Flash BBCode status
* @var bool url_status URL BBCode status
* @since 3.3.3-RC1
*/
$vars = [
'bbcode_status',
'smilies_status',
'img_status',
'flash_status',
'url_status',
];
extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_modify_bbcode_status', compact($vars)));
// Save Draft
if ($save && $auth->acl_get('u_savedrafts'))
{

View File

@@ -810,23 +810,50 @@ class ucp_profile
$error = array_map(array($user, 'lang'), $error);
}
$sql = 'SELECT key_id, last_ip, last_login
FROM ' . SESSIONS_KEYS_TABLE . '
WHERE user_id = ' . (int) $user->data['user_id'] . '
ORDER BY last_login ASC';
$sql_ary = [
'SELECT' => 'sk.key_id, sk.last_ip, sk.last_login',
'FROM' => [SESSIONS_KEYS_TABLE => 'sk'],
'WHERE' => 'sk.user_id = ' . (int) $user->data['user_id'],
'ORDER_BY' => 'sk.last_login ASC',
];
$result = $db->sql_query($sql);
/**
* Event allows changing SQL query for autologin keys
*
* @event core.ucp_profile_autologin_keys_sql
* @var array sql_ary Array with autologin keys SQL query
* @since 3.3.2-RC1
*/
$vars = ['sql_ary'];
extract($phpbb_dispatcher->trigger_event('core.ucp_profile_autologin_keys_sql', compact($vars)));
while ($row = $db->sql_fetchrow($result))
$result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
$sessions = (array) $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
$template_vars = [];
foreach ($sessions as $row)
{
$template->assign_block_vars('sessions', array(
'KEY' => substr($row['key_id'], 0, 8),
$key = substr($row['key_id'], 0, 8);
$template_vars[$key] = [
'KEY' => $key,
'IP' => $row['last_ip'],
'LOGIN_TIME' => $user->format_date($row['last_login']),
));
];
}
$db->sql_freeresult($result);
/**
* Event allows changing template variables
*
* @event core.ucp_profile_autologin_keys_template_vars
* @var array sessions Array with session keys data
* @var array template_vars Array with template variables
* @since 3.3.2-RC1
*/
$vars = ['sessions', 'template_vars'];
extract($phpbb_dispatcher->trigger_event('core.ucp_profile_autologin_keys_template_vars', compact($vars)));
$template->assign_block_vars_array('sessions', $template_vars);
break;
}

View File

@@ -424,7 +424,7 @@ class ucp_register
$user_id = user_add($user_row, $cp_data);
// This should not happen, because the required variables are listed above...
if ($user_id === false)
if ((bool) $user_id === false)
{
trigger_error('NO_USER', E_USER_ERROR);
}

View File

@@ -211,6 +211,7 @@ if ($show_birthdays)
$template->assign_block_vars_array('birthdays', $birthdays);
}
$controller_helper = $phpbb_container->get('controller.helper');
// Assign index specific vars
$template->assign_vars(array(
'TOTAL_POSTS' => $user->lang('TOTAL_POSTS_COUNT', (int) $config['num_posts']),
@@ -222,7 +223,7 @@ $template->assign_vars(array(
'BIRTHDAY_LIST' => (empty($birthday_list)) ? '' : implode($user->lang['COMMA_SEPARATOR'], $birthday_list),
'S_LOGIN_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'),
'U_SEND_PASSWORD' => ($config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=sendpassword') : '',
'U_SEND_PASSWORD' => ($config['email_enable'] && $config['allow_password_reset']) ? $controller_helper->route('phpbb_ucp_forgot_password_controller') : '',
'S_DISPLAY_BIRTHDAY_LIST' => $show_birthdays,
'S_INDEX' => true,

View File

@@ -1300,7 +1300,7 @@ class convertor
else
{
// No table alias
$sql_data['source_tables'][$m[1]] = (empty($convert->src_table_prefix)) ? $m[1] : $convert->src_table_prefix . $m[1] . ' ' . $m[1];
$sql_data['source_tables'][$m[1]] = (empty($convert->src_table_prefix)) ? $m[1] : $convert->src_table_prefix . $m[1] . ' ' . $db->sql_quote($m[1]);
}
$sql_data['select_fields'][$value_1] = $value_1;
@@ -1314,7 +1314,7 @@ class convertor
{
foreach ($m[1] as $value)
{
$sql_data['source_tables'][$value] = (empty($convert->src_table_prefix)) ? $value : $convert->src_table_prefix . $value . ' ' . $value;
$sql_data['source_tables'][$value] = (empty($convert->src_table_prefix)) ? $value : $convert->src_table_prefix . $value . ' ' . $db->sql_quote($value);
}
}
}
@@ -1323,7 +1323,7 @@ class convertor
// Add the aliases to the list of tables
foreach ($aliases as $alias => $table)
{
$sql_data['source_tables'][$alias] = $convert->src_table_prefix . $table . ' ' . $alias;
$sql_data['source_tables'][$alias] = $convert->src_table_prefix . $table . ' ' . $db->sql_quote($alias);
}
// 'left_join' => 'forums LEFT JOIN forum_prune ON forums.forum_id = forum_prune.forum_id',

View File

@@ -38,7 +38,7 @@ $dbms = $phpbb_config_php_file->convert_30_dbms_to_31($dbms);
$convertor_data = array(
'forum_name' => 'phpBB 2.0.x',
'version' => '1.0.3',
'phpbb_version' => '3.3.1',
'phpbb_version' => '3.3.3',
'author' => '<a href="https://www.phpbb.com/">phpBB Limited</a>',
'dbms' => $dbms,
'dbhost' => $dbhost,
@@ -963,7 +963,6 @@ if (!$get_info)
array('pf_phpbb_location', 'users.user_from', array('function1' => 'phpbb_set_encoding')),
array('pf_phpbb_icq', 'users.user_icq', array('function1' => 'phpbb_set_encoding')),
array('pf_phpbb_yahoo', 'users.user_yim', array('function1' => 'phpbb_set_encoding')),
array('pf_phpbb_aol', 'users.user_aim', array('function1' => 'phpbb_set_encoding')),
array('pf_phpbb_website', 'users.user_website', 'validate_website'),
'where' => 'users.user_id <> -1',

View File

@@ -23,7 +23,7 @@ if (php_sapi_name() !== 'cli')
define('IN_PHPBB', true);
define('IN_INSTALL', true);
define('PHPBB_ENVIRONMENT', 'production');
define('PHPBB_VERSION', '3.3.1');
define('PHPBB_VERSION', '3.3.3-RC1');
$phpbb_root_path = __DIR__ . '/../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);

View File

@@ -316,7 +316,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('update_hashes_lock
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 ('use_system_cron', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.3.1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.3.3-RC1');
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');
@@ -832,7 +832,6 @@ INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_len
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_website', 'profilefields.type.url', 'phpbb_website', '40', '12', '255', '', '', '', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 2, 1, 'VISIT_WEBSITE', '%s');
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_interests', 'profilefields.type.text', 'phpbb_interests', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, '', '');
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_occupation', 'profilefields.type.text', 'phpbb_occupation', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, '', '');
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_aol', 'profilefields.type.string', 'phpbb_aol', '40', '5', '255', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 5, 1, '', '');
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_icq', 'profilefields.type.string', 'phpbb_icq', '20', '3', '15', '', '', '[0-9]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 6, 1, 'SEND_ICQ_MESSAGE', 'https://www.icq.com/people/%s/');
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_yahoo', 'profilefields.type.string', 'phpbb_yahoo', '40', '5', '255', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 8, 1, 'SEND_YIM_MESSAGE', 'ymsgr:sendim?%s');
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_facebook', 'profilefields.type.string', 'phpbb_facebook', '20', '5', '50', '', '', '[\w.]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 9, 1, 'VIEW_FACEBOOK_PROFILE', 'http://facebook.com/%s/');
@@ -845,5 +844,7 @@ INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUE
INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('notification.type.post', 0, 2, 'notification.method.email');
INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('notification.type.topic', 0, 2, 'notification.method.board');
INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('notification.type.topic', 0, 2, 'notification.method.email');
INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('notification.type.forum', 0, 2, 'notification.method.board');
INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('notification.type.forum', 0, 2, 'notification.method.email');
# POSTGRES COMMIT #

View File

@@ -235,6 +235,7 @@ $lang = array_merge($lang, array(
'CRON_NO_SUCH_TASK' => 'Could not find cron task “%s”.',
'CRON_NO_TASK' => 'No cron tasks need to be run right now.',
'CRON_NO_TASKS' => 'No cron tasks could be found.',
'CSV_INVALID' => 'The provided comma-separated setting “%1$s” is invalid. The values should be delimited by comma only, it should not contain any leading or trailing delimiters.',
'CURRENT_VERSION' => 'Current version',
'DEACTIVATE' => 'Deactivate',
@@ -316,6 +317,7 @@ $lang = array_merge($lang, array(
'UCP' => 'User Control Panel',
'URL_INVALID' => 'The provided URL for the setting “%1$s” is invalid.',
'URL_SCHEME_INVALID' => 'The provided scheme “%2$s” in comma-separated setting “%1$s” is invalid. Scheme should start with a latin character followed by alphanumeric characters, hyphens or dots.',
'USERNAMES_EXPLAIN' => 'Place each username on a separate line.',
'USER_CONTROL_PANEL' => 'User Control Panel',
@@ -369,9 +371,11 @@ $lang = array_merge($lang, array(
'ERROR_MBSTRING_ENCODING_TRANSLATION' => 'Transparent character encoding is improperly configured',
'ERROR_MBSTRING_ENCODING_TRANSLATION_EXPLAIN' => '<var>mbstring.encoding_translation</var> must be set to 0. You can check the current value on the <samp>PHP information</samp> page.',
'ERROR_MBSTRING_HTTP_INPUT' => 'HTTP input character conversion is improperly configured',
'ERROR_MBSTRING_HTTP_INPUT_EXPLAIN' => '<var>mbstring.http_input</var> must be set to <samp>pass</samp>. You can check the current value on the <samp>PHP information</samp> page.',
'ERROR_MBSTRING_HTTP_INPUT_EXPLAIN' => '<var>mbstring.http_input</var> must be left empty. You can check the current value on the <samp>PHP information</samp> page.',
'ERROR_MBSTRING_HTTP_OUTPUT' => 'HTTP output character conversion is improperly configured',
'ERROR_MBSTRING_HTTP_OUTPUT_EXPLAIN' => '<var>mbstring.http_output</var> must be set to <samp>pass</samp>. You can check the current value on the <samp>PHP information</samp> page.',
'ERROR_MBSTRING_HTTP_OUTPUT_EXPLAIN' => '<var>mbstring.http_output</var> must be left empty. You can check the current value on the <samp>PHP information</samp> page.',
'ERROR_DEFAULT_CHARSET' => 'Default charset is improperly configured',
'ERROR_DEFAULT_CHARSET_EXPLAIN' => '<var>default_charset</var> must be set to <samp>UTF-8</samp>. You can check the current value on the <samp>PHP information</samp> page.',
'FILES_PER_DAY' => 'Attachments per day',
'FORUM_STATS' => 'Board statistics',

View File

@@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
if (empty($lang) || !is_array($lang))
{
$lang = array();
$lang = [];
}
// DEVELOPERS PLEASE NOTE
@@ -36,7 +36,7 @@ if (empty($lang) || !is_array($lang))
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
$lang = array_merge($lang, array(
$lang = array_merge($lang, [
// Find the language/country code on https://developers.google.com/recaptcha/docs/language
// If no code exists for your language you can use "en" or leave the string empty
'RECAPTCHA_LANG' => 'en-GB',
@@ -73,4 +73,5 @@ $lang = array_merge($lang, array(
'RECAPTCHA_V3_THRESHOLD_REPORT' => 'Report threshold',
'RECAPTCHA_V3_THRESHOLDS' => 'Thresholds',
'RECAPTCHA_V3_THRESHOLDS_EXPLAIN' => 'reCAPTCHA v3 returns a score (<samp>1.0</samp> is very likely a good interaction, <samp>0.0</samp> is very likely a bot). Here you can set the minimum score per action.',
));
'EMPTY_RECAPTCHA_V3_REQUEST_METHOD' => 'reCAPTCHA v3 requires to know which available method you want to use when verifying the request.',
]);

View File

@@ -48,7 +48,7 @@ $lang = array_merge($lang, array(
'USER_LANG' => 'en-gb',
// You can define different rules for the determination of plural forms here.
// See https://area51.phpbb.com/docs/dev/32x/language/plurals.html for more information
// See https://area51.phpbb.com/docs/dev/3.3.x/language/plurals.html for more information
// or ask the translation manager for help.
'PLURAL_RULE' => 1,
@@ -110,6 +110,8 @@ $lang = array_merge($lang, array(
'AVATAR_NOT_UPLOADED' => 'Avatar could not be uploaded.',
'AVATAR_NO_TEMP_DIR' => 'Temporary folder could not be found or is not writable.',
'AVATAR_NO_SIZE' => 'The width or height of the linked avatar could not be determined. Please enter them manually.',
'AVATAR_NO_UPLOAD_DIR' => 'Avatar storage path does not exist or is not writable.',
'AVATAR_NO_UPLOAD_PATH' => 'Avatar uploading is enabled but avatar storage path is not set.',
'AVATAR_PARTIAL_UPLOAD' => 'The specified file was only partially uploaded.',
'AVATAR_PHP_SIZE_NA' => 'The avatars filesize is too large.<br />The maximum allowed filesize set in php.ini could not be determined.',
'AVATAR_PHP_SIZE_OVERRUN' => 'The avatars filesize is too large. The maximum allowed upload size is %1$d %2$s.<br />Please note this is set in php.ini and cannot be overridden.',
@@ -396,7 +398,7 @@ $lang = array_merge($lang, array(
'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 pass the CAPTCHA test.',
'LOGIN_ERROR_EXTERNAL_AUTH_APACHE' => 'You have not been authenticated by Apache.',
'LOGIN_ERROR_OAUTH_SERVICE_DOES_NOT_EXIST' => 'A non-existant OAuth service has been requested.',
'LOGIN_ERROR_OAUTH_SERVICE_DOES_NOT_EXIST' => 'A non-existent OAuth service has been requested.',
'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 boards software. Please %srequest a new password%s. If you continue to have problems please contact the %sBoard Administrator%s.',
'LOGIN_ERROR_USERNAME' => 'You have specified an incorrect username. Please check your username and try again. If you continue to have problems please contact the %sBoard Administrator%s.',
@@ -489,6 +491,7 @@ $lang = array_merge($lang, array(
'NOTIFICATION_REFERENCE' => '"%1$s"',
'NOTIFICATION_REASON' => '<em>Reason:</em> %1$s.',
'NOTIFICATION_REPORT_PM' => '<strong>Private Message reported</strong> by %1$s:',
'NOTIFICATION_REPORT_PM_CLOSED' => '<strong>Private Message report closed</strong> by %1$s:',
'NOTIFICATION_REPORT_POST' => '<strong>Post reported</strong> by %1$s:',
'NOTIFICATION_REPORT_CLOSED' => '<strong>Report closed</strong> by %1$s for:',
'NOTIFICATION_TOPIC' => '<strong>New topic</strong> by %1$s:',

View File

@@ -2,6 +2,12 @@ Subject: Report closed - "{POST_SUBJECT}"
Hello {USERNAME},
You are receiving this notification because the report you filed on the post "{POST_SUBJECT}" in "{TOPIC_TITLE}" at "{SITENAME}" was handled by a moderator or by an administrator. The report was afterwards closed. If you have further questions contact {CLOSER_NAME} with a personal message.
You are receiving this notification because the report you filed on the post "{POST_SUBJECT}" by "{AUTHOR_NAME}" in "{TOPIC_TITLE}" at "{SITENAME}" was handled by a moderator or by an administrator. The report was afterwards closed. If you have further questions contact {CLOSER_NAME} with a personal message.
You can view your reported post by clicking on the following link:
{U_VIEW_POST}
You have requested that you be notified on this event, remember that you can always choose not to be notified of closed post reports by changing the appropriate setting in your profile.
{EMAIL_SIG}

View File

@@ -0,0 +1,13 @@
Subject: Private message report closed - "{SUBJECT}"
Hello {USERNAME},
You are receiving this notification because the report you filed on the private message "{SUBJECT}" by "{AUTHOR_NAME}" at "{SITENAME}" was handled by a moderator or by an administrator. The report was afterwards closed. If you have further questions contact {CLOSER_NAME} with a personal message.
You can view your reported private message by clicking on the following link:
{U_VIEW_MESSAGE}
You have requested that you be notified on this event, remember that you can always choose not to be notified of closed private message reports by changing the appropriate setting in your profile.
{EMAIL_SIG}

View File

@@ -112,6 +112,8 @@ $lang = array_merge($lang, array(
'PCRE_UTF_SUPPORT_EXPLAIN' => 'phpBB will not run if your PHP installation is not compiled with UTF-8 support in the PCRE extension.',
'PHP_JSON_SUPPORT' => 'PHP JSON support',
'PHP_JSON_SUPPORT_EXPLAIN' => 'In order for phpBB to function correctly, the PHP JSON extension needs to be available.',
'PHP_MBSTRING_SUPPORT' => 'PHP mbstring support',
'PHP_MBSTRING_SUPPORT_EXPLAIN' => 'In order for phpBB to function correctly, the PHP mbstring extension needs to be available.',
'PHP_XML_SUPPORT' => 'PHP XML/DOM support',
'PHP_XML_SUPPORT_EXPLAIN' => 'In order for phpBB to function correctly, the PHP XML/DOM extension needs to be available.',
'PHP_SUPPORTED_DB' => 'Supported databases',
@@ -237,7 +239,7 @@ $lang = array_merge($lang, array(
'CONFIG_SITE_DESC' => 'A short text to describe your forum',
'CONFIG_SITENAME' => 'yourdomain.com',
'DEFAULT_INSTALL_POST' => 'This is an example post in your phpBB3 installation. Everything seems to be working. You may delete this post if you like and continue to set up your board. During the installation process your first category and your first forum are assigned an appropriate set of permissions for the predefined usergroups administrators, bots, global moderators, guests, registered users and registered COPPA users. If you also choose to delete your first category and your first forum, do not forget to assign permissions for all these usergroups for all new categories and forums you create. It is recommended to rename your first category and your first forum and copy permissions from these while creating new categories and forums. Have fun!',
'DEFAULT_INSTALL_POST' => '<t>This is an example post in your phpBB3 installation. Everything seems to be working. You may delete this post if you like and continue to set up your board. During the installation process your first category and your first forum are assigned an appropriate set of permissions for the predefined usergroups administrators, bots, global moderators, guests, registered users and registered COPPA users. If you also choose to delete your first category and your first forum, do not forget to assign permissions for all these usergroups for all new categories and forums you create. It is recommended to rename your first category and your first forum and copy permissions from these while creating new categories and forums. Have fun!</t>',
'FORUMS_FIRST_CATEGORY' => 'Your first category',
'FORUMS_TEST_FORUM_DESC' => 'Description of your first forum.',

View File

@@ -151,6 +151,7 @@ $lang = array_merge($lang, array(
'LOGIN_EXPLAIN_QUOTE' => 'You need to login in order to quote posts within this forum.',
'LOGIN_EXPLAIN_REPLY' => 'You need to login in order to reply to topics within this forum.',
'MAX_ATTACHMENT_FILESIZE' => 'Maximum filesize per attachment: %s.',
'MAX_FONT_SIZE_EXCEEDED' => 'You may only use fonts up to size %d.',
'MAX_FLASH_HEIGHT_EXCEEDED' => array(
1 => 'Your flash files may only be up to %d pixel high.',

View File

@@ -38,22 +38,22 @@ if (empty($lang) || !is_array($lang))
// Privacy policy and T&C
$lang = array_merge($lang, array(
'TERMS_OF_USE_CONTENT' => 'By accessing “%1$s” (hereinafter “we”, “us”, “our”, “%1$s”, “%2$s”), you agree to be legally bound by the following terms. If you do not agree to be legally bound by all of the following terms then please do not access and/or use “%1$s”. We may change these at any time and well do our utmost in informing you, though it would be prudent to review this regularly yourself as your continued usage of “%1$s” after changes mean you agree to be legally bound by these terms as they are updated and/or amended.<br />
<br />
Our forums are powered by phpBB (hereinafter “they”, “them”, “their”, “phpBB software”, “www.phpbb.com”, “phpBB Limited”, “phpBB Teams”) which is a bulletin board solution released under the “<a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>” (hereinafter “GPL”) and can be downloaded from <a href="https://www.phpbb.com/">www.phpbb.com</a>. The phpBB software only facilitates internet based discussions; phpBB Limited is not responsible for what we allow and/or disallow as permissible content and/or conduct. For further information about phpBB, please see: <a href="https://www.phpbb.com/">https://www.phpbb.com/</a>.<br />
<br />
'TERMS_OF_USE_CONTENT' => 'By accessing “%1$s” (hereinafter “we”, “us”, “our”, “%1$s”, “%2$s”), you agree to be legally bound by the following terms. If you do not agree to be legally bound by all of the following terms then please do not access and/or use “%1$s”. We may change these at any time and well do our utmost in informing you, though it would be prudent to review this regularly yourself as your continued usage of “%1$s” after changes mean you agree to be legally bound by these terms as they are updated and/or amended.
<br><br>
Our forums are powered by phpBB (hereinafter “they”, “them”, “their”, “phpBB software”, “www.phpbb.com”, “phpBB Limited”, “phpBB Teams”) which is a bulletin board solution released under the “<a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>” (hereinafter “GPL”) and can be downloaded from <a href="https://www.phpbb.com/">www.phpbb.com</a>. The phpBB software only facilitates internet based discussions; phpBB Limited is not responsible for what we allow and/or disallow as permissible content and/or conduct. For further information about phpBB, please see: <a href="https://www.phpbb.com/">https://www.phpbb.com/</a>.
<br><br>
You agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate any laws be it of your country, the country where “%1$s” is hosted or International Law. Doing so may lead to you being immediately and permanently banned, with notification of your Internet Service Provider if deemed required by us. The IP address of all posts are recorded to aid in enforcing these conditions. You agree that “%1$s” have the right to remove, edit, move or close any topic at any time should we see fit. As a user you agree to any information you have entered to being stored in a database. While this information will not be disclosed to any third party without your consent, neither “%1$s” nor phpBB shall be held responsible for any hacking attempt that may lead to the data being compromised.
',
'PRIVACY_POLICY' => 'This policy explains in detail how “%1$s” along with its affiliated companies (hereinafter “we”, “us”, “our”, “%1$s”, “%2$s”) and phpBB (hereinafter “they”, “them”, “their”, “phpBB software”, “www.phpbb.com”, “phpBB Limited”, “phpBB Teams”) use any information collected during any session of usage by you (hereinafter “your information”).<br />
<br />
Your information is collected via two ways. Firstly, by browsing “%1$s” will cause the phpBB software to create a number of cookies, which are small text files that are downloaded on to your computers web browser temporary files. The first two cookies just contain a user identifier (hereinafter “user-id”) and an anonymous session identifier (hereinafter “session-id”), automatically assigned to you by the phpBB software. A third cookie will be created once you have browsed topics within “%1$s” and is used to store which topics have been read, thereby improving your user experience.<br />
<br />
We may also create cookies external to the phpBB software whilst browsing “%1$s”, though these are outside the scope of this document which is intended to only cover the pages created by the phpBB software. The second way in which we collect your information is by what you submit to us. This can be, and is not limited to: posting as an anonymous user (hereinafter “anonymous posts”), registering on “%1$s” (hereinafter “your account”) and posts submitted by you after registration and whilst logged in (hereinafter “your posts”).<br />
<br />
Your account will at a bare minimum contain a uniquely identifiable name (hereinafter “your user name”), a personal password used for logging into your account (hereinafter “your password”) and a personal, valid email address (hereinafter “your email”). Your information for your account at “%1$s” is protected by data-protection laws applicable in the country that hosts us. Any information beyond your user name, your password, and your email address required by “%1$s” during the registration process is either mandatory or optional, at the discretion of “%1$s”. In all cases, you have the option of what information in your account is publicly displayed. Furthermore, within your account, you have the option to opt-in or opt-out of automatically generated emails from the phpBB software.<br />
<br />
Your password is ciphered (a one-way hash) so that it is secure. However, it is recommended that you do not reuse the same password across a number of different websites. Your password is the means of accessing your account at “%1$s”, so please guard it carefully and under no circumstance will anyone affiliated with “%1$s”, phpBB or another 3rd party, legitimately ask you for your password. Should you forget your password for your account, you can use the “I forgot my password” feature provided by the phpBB software. This process will ask you to submit your user name and your email, then the phpBB software will generate a new password to reclaim your account.<br />
'PRIVACY_POLICY' => 'This policy explains in detail how “%1$s” along with its affiliated companies (hereinafter “we”, “us”, “our”, “%1$s”, “%2$s”) and phpBB (hereinafter “they”, “them”, “their”, “phpBB software”, “www.phpbb.com”, “phpBB Limited”, “phpBB Teams”) use any information collected during any session of usage by you (hereinafter “your information”).
<br><br>
Your information is collected via two ways. Firstly, by browsing “%1$s” will cause the phpBB software to create a number of cookies, which are small text files that are downloaded on to your computers web browser temporary files. The first two cookies just contain a user identifier (hereinafter “user-id”) and an anonymous session identifier (hereinafter “session-id”), automatically assigned to you by the phpBB software. A third cookie will be created once you have browsed topics within “%1$s” and is used to store which topics have been read, thereby improving your user experience.
<br><br>
We may also create cookies external to the phpBB software whilst browsing “%1$s”, though these are outside the scope of this document which is intended to only cover the pages created by the phpBB software. The second way in which we collect your information is by what you submit to us. This can be, and is not limited to: posting as an anonymous user (hereinafter “anonymous posts”), registering on “%1$s” (hereinafter “your account”) and posts submitted by you after registration and whilst logged in (hereinafter “your posts”).
<br><br>
Your account will at a bare minimum contain a uniquely identifiable name (hereinafter “your user name”), a personal password used for logging into your account (hereinafter “your password”) and a personal, valid email address (hereinafter “your email”). Your information for your account at “%1$s” is protected by data-protection laws applicable in the country that hosts us. Any information beyond your user name, your password, and your email address required by “%1$s” during the registration process is either mandatory or optional, at the discretion of “%1$s”. In all cases, you have the option of what information in your account is publicly displayed. Furthermore, within your account, you have the option to opt-in or opt-out of automatically generated emails from the phpBB software.
<br><br>
Your password is ciphered (a one-way hash) so that it is secure. However, it is recommended that you do not reuse the same password across a number of different websites. Your password is the means of accessing your account at “%1$s”, so please guard it carefully and under no circumstance will anyone affiliated with “%1$s”, phpBB or another 3rd party, legitimately ask you for your password. Should you forget your password for your account, you can use the “I forgot my password” feature provided by the phpBB software. This process will ask you to submit your user name and your email, then the phpBB software will generate a new password to reclaim your account.
',
));
@@ -336,12 +336,16 @@ $lang = array_merge($lang, array(
'NOTIFICATION_TYPE' => 'Notification type',
'NOTIFICATION_TYPE_BOOKMARK' => 'Someone replies to a topic you have bookmarked',
'NOTIFICATION_TYPE_GROUP_REQUEST' => 'Someone requests to join a group you lead',
'NOTIFICATION_TYPE_FORUM' => 'Someone replies to a topic in a forum to which you are subscribed',
'NOTIFICATION_TYPE_IN_MODERATION_QUEUE' => 'A post or topic needs approval',
'NOTIFICATION_TYPE_MODERATION_QUEUE' => 'Your topics/posts are approved or disapproved by a moderator',
'NOTIFICATION_TYPE_PM' => 'Someone sends you a private message',
'NOTIFICATION_TYPE_POST' => 'Someone replies to a topic to which you are subscribed',
'NOTIFICATION_TYPE_QUOTE' => 'Someone quotes you in a post',
'NOTIFICATION_TYPE_REPORT' => 'Someone reports a post',
'NOTIFICATION_TYPE_REPORT_CLOSED' => 'Your report on a post is closed by a moderator',
'NOTIFICATION_TYPE_REPORT_PM' => 'Someone reports a private message',
'NOTIFICATION_TYPE_REPORT_PM_CLOSED' => 'Your report on a private message is closed by a moderator',
'NOTIFICATION_TYPE_TOPIC' => 'Someone creates a topic in a forum to which you are subscribed',
'NOTIFICATION_TYPE_ADMIN_ACTIVATE_USER' => 'User requiring activation',

View File

@@ -125,6 +125,26 @@ if (!$auth->acl_getf_global('m_'))
}
}
/**
* Allow modification of the permissions to access the mcp file
*
* @event core.mcp_modify_permissions
* @var array user_quickmod_actions Array holding the quickmod actions and their respectiev permissions
* @var bool quickmod Whether or not the action is performed via QuickMod
* @var bool allow_user Boolean holding if the user can access the mcp
* @var int forum_id The current forum ID
* @var int topic_id The current topic ID
* @since 3.3.3-RC1
*/
$vars = array(
'user_quickmod_actions',
'quickmod',
'allow_user',
'forum_id',
'topic_id',
);
extract($phpbb_dispatcher->trigger_event('core.mcp_modify_permissions', compact($vars)));
if (!$allow_user)
{
send_status_line(403, 'Forbidden');
@@ -313,12 +333,6 @@ $template->assign_block_vars('navlinks', array(
'U_BREADCRUMB' => append_sid("{$phpbb_root_path}mcp.$phpEx"),
));
// Load and execute the relevant module
$module->load_active();
// Assign data to the template engine for the list of modules
$module->assign_tpl_vars(append_sid("{$phpbb_root_path}mcp.$phpEx"));
// Generate urls for letting the moderation control panel being accessed in different modes
$template->assign_vars(array(
'U_MCP' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main'),
@@ -327,5 +341,11 @@ $template->assign_vars(array(
'U_MCP_POST' => ($forum_id && $topic_id && $post_id) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&amp;mode=post_details&amp;t=$topic_id&amp;p=$post_id") : '',
));
// Load and execute the relevant module
$module->load_active();
// Assign data to the template engine for the list of modules
$module->assign_tpl_vars(append_sid("{$phpbb_root_path}mcp.$phpEx"));
// Generate the page, do not display/query online list
$module->display($module->get_page_title());

View File

@@ -13,10 +13,10 @@
namespace phpbb\attachment;
use \phpbb\config\config;
use \phpbb\db\driver\driver_interface;
use \phpbb\event\dispatcher;
use \phpbb\filesystem\filesystem;
use phpbb\config\config;
use phpbb\db\driver\driver_interface;
use phpbb\event\dispatcher;
use phpbb\filesystem\filesystem;
/**
* Attachment delete class

View File

@@ -13,7 +13,7 @@
namespace phpbb\attachment;
use \phpbb\db\driver\driver_interface;
use phpbb\db\driver\driver_interface;
/**
* Attachment resync class

View File

@@ -14,13 +14,13 @@
namespace phpbb\attachment;
use phpbb\auth\auth;
use \phpbb\cache\service;
use \phpbb\config\config;
use \phpbb\event\dispatcher;
use \phpbb\language\language;
use \phpbb\mimetype\guesser;
use \phpbb\plupload\plupload;
use \phpbb\user;
use phpbb\cache\service;
use phpbb\config\config;
use phpbb\event\dispatcher;
use phpbb\language\language;
use phpbb\mimetype\guesser;
use phpbb\plupload\plupload;
use phpbb\user;
/**
* Attachment upload class

View File

@@ -21,15 +21,15 @@ class recaptcha_v3 extends captcha_abstract
/**
* Possible request methods to verify the token.
*/
const CURL = 'curl';
const POST = 'post';
const SOCKET = 'socket';
const CURL = 'curl';
const POST = 'post';
const SOCKET = 'socket';
/**
* Possible domain names to load the script and verify the token.
*/
const GOOGLE = 'google.com';
const RECAPTCHA = 'recaptcha.net';
const GOOGLE = 'google.com';
const RECAPTCHA = 'recaptcha.net';
/** @var array CAPTCHA types mapped to their action */
static protected $actions = [
@@ -139,8 +139,7 @@ class recaptcha_v3 extends captcha_abstract
$language->add_lang('captcha_recaptcha');
return ($config->offsetGet('recaptcha_v3_key') ?? false)
&& ($config->offsetGet('recaptcha_v3_secret') ?? false);
return ($config->offsetGet('recaptcha_v3_key') ?? false) && ($config->offsetGet('recaptcha_v3_secret') ?? false);
}
/**
@@ -162,8 +161,9 @@ class recaptcha_v3 extends captcha_abstract
*/
global $config, $language, $phpbb_log, $request, $template, $user;
$module->tpl_name = 'captcha_recaptcha_v3_acp';
$module->page_title = 'ACP_VC_SETTINGS';
$module->tpl_name = 'captcha_recaptcha_v3_acp';
$module->page_title = 'ACP_VC_SETTINGS';
$recaptcha_v3_method = $request->variable('recaptcha_v3_method', '', true);
$form_key = 'acp_captcha';
add_form_key($form_key);
@@ -175,10 +175,15 @@ class recaptcha_v3 extends captcha_abstract
trigger_error($language->lang('FORM_INVALID') . adm_back_link($module->u_action), E_USER_WARNING);
}
if (empty($recaptcha_v3_method))
{
trigger_error($language->lang('EMPTY_RECAPTCHA_V3_REQUEST_METHOD') . adm_back_link($module->u_action), E_USER_WARNING);
}
$config->set('recaptcha_v3_key', $request->variable('recaptcha_v3_key', '', true));
$config->set('recaptcha_v3_secret', $request->variable('recaptcha_v3_secret', '', true));
$config->set('recaptcha_v3_domain', $request->variable('recaptcha_v3_domain', '', true));
$config->set('recaptcha_v3_method', $request->variable('recaptcha_v3_method', '', true));
$config->set('recaptcha_v3_method', $recaptcha_v3_method);
foreach (self::$actions as $action)
{
@@ -208,7 +213,7 @@ class recaptcha_v3 extends captcha_abstract
'RECAPTCHA_V3_DOMAIN' => $config['recaptcha_v3_domain'] ?? self::GOOGLE,
'RECAPTCHA_V3_DOMAINS' => [self::GOOGLE, self::RECAPTCHA],
'RECAPTCHA_V3_METHOD' => $config['recaptcha_v3_method'] ?? self::POST,
'RECAPTCHA_V3_METHOD' => $config['recaptcha_v3_method'] ?? '',
'RECAPTCHA_V3_METHODS' => [
self::POST => ini_get('allow_url_fopen') && function_exists('file_get_contents'),
self::CURL => extension_loaded('curl') && function_exists('curl_init'),

View File

@@ -20,14 +20,14 @@ class config implements \ArrayAccess, \IteratorAggregate, \Countable
{
/**
* The configuration data
* @var array(string => string)
* @var array<string,string>
*/
protected $config;
/**
* Creates a configuration container with a default set of values
*
* @param array(string => string) $config The configuration data.
* @param array<string,string> $config The configuration data.
*/
public function __construct(array $config)
{

View File

@@ -26,11 +26,12 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
class check extends \phpbb\console\command\command
{
/** @var \phpbb\config\config */
/** @var config */
protected $config;
/** @var \Symfony\Component\DependencyInjection\ContainerBuilder */
protected $phpbb_container;
/**
* @var language
*/

View File

@@ -818,7 +818,7 @@ class content_visibility
* Add post to topic and forum statistics
*
* @param $data array Contains information from the topics table about given topic
* @param &$sql_data array Populated with the SQL changes, may be empty at call time
* @param $sql_data array Populated with the SQL changes, may be empty at call time (by reference)
* @return null
*/
public function add_post_to_statistic($data, &$sql_data)
@@ -839,7 +839,7 @@ class content_visibility
* Remove post from topic and forum statistics
*
* @param $data array Contains information from the topics table about given topic
* @param &$sql_data array Populated with the SQL changes, may be empty at call time
* @param $sql_data array Populated with the SQL changes, may be empty at call time (by reference)
* @return null
*/
public function remove_post_from_statistic($data, &$sql_data)
@@ -872,7 +872,7 @@ class content_visibility
* Remove topic from forum statistics
*
* @param $data array Post and topic data
* @param &$sql_data array Populated with the SQL changes, may be empty at call time
* @param $sql_data array Populated with the SQL changes, may be empty at call time (by reference)
* @return null
*/
public function remove_topic_from_statistic($data, &$sql_data)

View File

@@ -14,7 +14,7 @@
namespace phpbb\controller;
use phpbb\auth\auth;
use \phpbb\cache\driver\driver_interface as cache_interface;
use phpbb\cache\driver\driver_interface as cache_interface;
use phpbb\config\config;
use phpbb\cron\manager;
use phpbb\db\driver\driver_interface;

View File

@@ -64,7 +64,7 @@ class resolver implements ControllerResolverInterface
/**
* Load a controller callable
*
* @param \Symfony\Component\HttpFoundation\Request $request Symfony Request object
* @param Request $request Symfony Request object
* @return bool|Callable Callable or false
* @throws \phpbb\controller\exception
*/
@@ -119,7 +119,7 @@ class resolver implements ControllerResolverInterface
* and should match the parameters of the method you are using as your
* controller.
*
* @param \Symfony\Component\HttpFoundation\Request $request Symfony Request object
* @param Request $request Symfony Request object
* @param mixed $controller A callable (controller class, method)
* @return array An array of arguments to pass to the controller
* @throws \phpbb\controller\exception

View File

@@ -26,17 +26,17 @@ use Symfony\Component\HttpKernel\Event\PostResponseEvent;
class cron_runner_listener implements EventSubscriberInterface
{
/**
* @var \phpbb\lock\db
* @var db
*/
private $cron_lock;
/**
* @var \phpbb\cron\manager
* @var manager
*/
private $cron_manager;
/**
* @var \phpbb\request\request_interface
* @var request_interface
*/
private $request;

View File

@@ -15,6 +15,7 @@ namespace phpbb\cron;
use phpbb\cron\task\wrapper;
use phpbb\routing\helper;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Cron manager class.
@@ -23,6 +24,11 @@ use phpbb\routing\helper;
*/
class manager
{
/**
* @var ContainerInterface
*/
protected $phpbb_container;
/**
* @var helper
*/
@@ -34,7 +40,14 @@ class manager
*
* @var array
*/
protected $tasks = array();
protected $tasks = [];
/**
* Flag indicating if $this->tasks contains tasks registered in the container
*
* @var bool
*/
protected $is_initialised_from_container = false;
/**
* @var string
@@ -49,18 +62,17 @@ class manager
/**
* Constructor. Loads all available tasks.
*
* @param array|\Traversable $tasks Provides an iterable set of task names
* @param ContainerInterface $phpbb_container Container
* @param helper $routing_helper Routing helper
* @param string $phpbb_root_path Relative path to phpBB root
* @param string $php_ext PHP file extension
*/
public function __construct($tasks, helper $routing_helper, $phpbb_root_path, $php_ext)
public function __construct(ContainerInterface $phpbb_container, helper $routing_helper, $phpbb_root_path, $php_ext)
{
$this->phpbb_container = $phpbb_container;
$this->routing_helper = $routing_helper;
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;
$this->load_tasks($tasks);
}
/**
@@ -68,8 +80,6 @@ class manager
* and puts them into $this->tasks.
*
* @param array|\Traversable $tasks Array of instances of \phpbb\cron\task\task
*
* @return null
*/
public function load_tasks($tasks)
{
@@ -79,6 +89,22 @@ class manager
}
}
/**
* Loads registered tasks from the container, wraps them
* and puts them into $this->tasks.
*/
public function load_tasks_from_container()
{
if (!$this->is_initialised_from_container)
{
$this->is_initialised_from_container = true;
$tasks = $this->phpbb_container->get('cron.task_collection');
$this->load_tasks($tasks);
}
}
/**
* Finds a task that is ready to run.
*
@@ -86,10 +112,12 @@ class manager
*
* If no tasks are ready, null is returned.
*
* @return \phpbb\cron\task\wrapper|null
* @return wrapper|null
*/
public function find_one_ready_task()
{
$this->load_tasks_from_container();
shuffle($this->tasks);
foreach ($this->tasks as $task)
{
@@ -108,7 +136,9 @@ class manager
*/
public function find_all_ready_tasks()
{
$tasks = array();
$this->load_tasks_from_container();
$tasks = [];
foreach ($this->tasks as $task)
{
if ($task->is_ready())
@@ -127,10 +157,12 @@ class manager
* Web runner uses this method to resolve names to tasks.
*
* @param string $name Name of the task to look up.
* @return \phpbb\cron\task\wrapper A wrapped task corresponding to the given name, or null.
* @return wrapper A wrapped task corresponding to the given name, or null.
*/
public function find_task($name)
{
$this->load_tasks_from_container();
foreach ($this->tasks as $task)
{
if ($task->get_name() == $name)
@@ -148,6 +180,8 @@ class manager
*/
public function get_tasks()
{
$this->load_tasks_from_container();
return $this->tasks;
}
@@ -155,7 +189,7 @@ class manager
* Wraps a task inside an instance of \phpbb\cron\task\wrapper.
*
* @param \phpbb\cron\task\task $task The task.
* @return \phpbb\cron\task\wrapper The wrapped task.
* @return wrapper The wrapped task.
*/
public function wrap_task(\phpbb\cron\task\task $task)
{

Some files were not shown because too many files have changed in this diff Show More