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

Compare commits

...

346 Commits

Author SHA1 Message Date
Marc Alexander
2e37b2dc2d [prep-release-3.3.6] Update changelog for 3.3.6 2022-03-14 21:17:29 +01:00
Marc Alexander
8d6a9245c1 [prep-release-3.3.6] Add migration for 3.3.6 2022-03-14 21:17:13 +01:00
Marc Alexander
1a8950d01b [prep-release-3.3.6] Update version numbers to 3.3.6 2022-03-14 21:17:11 +01:00
Marc Alexander
b4fa01e943 [prep-release-3.3.6] Update stylesheet hashes 2022-03-14 21:15:42 +01:00
Marc Alexander
cd057c126a Merge pull request #66 from phpbb/ticket/security-273
[ticket/security-273] Reset reset token info when re-activating account
2022-03-14 17:58:58 +01:00
Marc Alexander
377ebacf0d Merge pull request #65 from phpbb/ticket/security-272
[ticket/security-272] Use longer random string for activation key
2022-03-14 17:51:07 +01:00
Marc Alexander
fb2d1c2a28 Merge pull request #6368 from marc1706/ticket/15028
[ticket/15028] Rename automatic to advanced update
2022-03-13 19:46:19 +01:00
Marc Alexander
da2364b2c1 [ticket/15028] Replace remaining mentions of automatic update with advanced
PHPBB3-15028
2022-03-12 22:53:18 +01:00
Marc Alexander
4044900c69 [ticket/15028] Rephrase "recommendation" of who should use advanced update
PHPBB3-15028
2022-02-22 21:15:58 +01:00
Marc Alexander
e78664d68b [ticket/15028] Rename automatic to advanced update
Also made it clear that it's only for expert users.

PHPBB3-15028
2022-02-20 11:18:30 +01:00
Marc Alexander
4e5b9b23de [ticket/security-273] Reset reset token info when re-activating account
SECURITY-273
2022-02-10 21:37:34 +01:00
Marc Alexander
9bc98278fe [ticket/security-272] Use strtolower for actkey
SECURITY-272
2022-02-10 21:23:34 +01:00
Marc Alexander
33a789e030 [ticket/security-272] Use longer random string for activation key
SECURITY-272
2022-02-10 21:23:33 +01:00
Marc Alexander
3cf83f1a62 Merge pull request #6364 from marc1706/ticket/16964
[ticket/16964] Update composer and dependencies to latest versions
2022-02-10 21:18:48 +01:00
Marc Alexander
d0344b9318 [ticket/16964] Update composer dependencies to latest versions
PHPBB3-16964
2022-02-05 08:59:35 +01:00
Marc Alexander
4072dd0246 [ticket/16964] Update composer to 2.2.6
PHPBB3-16964
2022-02-05 08:58:34 +01:00
Marc Alexander
94fe538100 Merge pull request #6355 from marc1706/ticket/16872
[ticket/16872] Add event exporter for BBCode
2022-02-05 08:55:45 +01:00
Marc Alexander
8e4559f49f Merge pull request #6363 from marc1706/ticket/16956
[ticket/16956] Remove router cache flag
2022-01-31 20:32:56 +01:00
Marc Alexander
0fe95a032b [ticket/16956] Remove router cache flag
The deferred purge will be used in the future instead. The cache flag in the
router only causes additional issues by trying to rebuild the routing
mid-request

PHPBB3-16956
2022-01-31 16:52:19 +01:00
Marc Alexander
893dad0297 Merge pull request #6357 from marc1706/ticket/16956
[ticket/16956] Remove use of recently changed status for extensions
2022-01-25 22:10:37 +01:00
Marc Alexander
d08843853e [ticket/16956] Remove use of recently changed status for extensions
PHPBB3-16956
2022-01-23 20:51:50 +01:00
Marc Alexander
8a3164aaf7 [ticket/16872] Add event exporter for BBCode
PHPBB3-16872
2022-01-22 16:52:45 +01:00
Marc Alexander
9bf6e7f32e [prep-release-3.3.6] Update changelog for 3.3.6-RC1 2022-01-19 22:11:25 +01:00
Marc Alexander
c93381ff04 [prep-release-3.3.6] Add migration for 3.3.6-RC1 2022-01-19 22:09:33 +01:00
Marc Alexander
88b79aba00 [prep-release-3.3.6] Update version numbers to 3.3.6 2022-01-19 22:09:29 +01:00
Marc Alexander
9c6df33e3b Merge pull request #6257 from xchwarze/patch-1
[ticket/16828] Add hook event before find_users_for_notification() ex…
2022-01-19 21:37:20 +01:00
Marc Alexander
605726a4d7 Merge pull request #6321 from rxu/ticket/16902
[ticket/16902] Improve search results count - 3.3.x
2022-01-19 20:33:58 +01:00
Marc Alexander
3103e99dc7 [ticket/16828] Adjust event to allow modifying notified_users and early return
PHPBB3-16828
2022-01-19 20:32:10 +01:00
rxu
a8c93ff661 [ticket/16902] Fix docblock
PHPBB3-16902
2022-01-19 09:23:56 +07:00
Marc Alexander
1f4eac13b9 Merge pull request #6341 from MichaIng/ticket/16930
[ticket/16930] Remove redundant topic ID from last post URL
2022-01-17 17:15:46 +01:00
rxu
5e43f6195c [ticket/16902] Make flood interval control in tests consistent
Also remove crawler dumping tool

PHPBB3-16902
2022-01-15 10:37:45 +07:00
rxu
6846eeaa48 [ticket/16902] Add search index created assertion to test
PHPBB3-16902
2022-01-15 10:19:12 +07:00
rxu
b602b57b02 [ticket/16902] Add search index deleted assertion to test
PHPBB3-16902
2022-01-15 10:19:11 +07:00
rxu
ba487a24dc [ticket/16902] Fix PosgreSQL author topics search results count
PHPBB3-16902
2022-01-15 10:18:16 +07:00
rxu
015c9313a7 [ticket/16902] Extend test
PHPBB3-16902
2022-01-15 10:18:16 +07:00
rxu
e7c81cd1a6 [ticket/16902] Improve test, use DISTINCT for precise results count
PHPBB3-16902
2022-01-15 10:16:54 +07:00
rxu
bf7936380a [ticket/16902] Improve search results count for MySQL
PHPBB3-16902
2022-01-15 10:16:14 +07:00
MichaIng
3f56bbb9d1 [ticket/16930] Remove redundant topic ID from last post URL
Since U_LAST_POST contains the post ID, the topic ID is not required.
This shortens the URL and helps with SEO by reducing the amount of
redundant parameters in internal links.

PHPBB3-16930

Signed-off-by: MichaIng <micha@dietpi.com>
2022-01-15 02:27:13 +01:00
Marc Alexander
44d0a3a716 Merge pull request #6343 from rxu/ticket/16933
[ticket/16933] Consistent handling of hyphen by phpBB Native search backend
2022-01-12 21:26:10 +01:00
Marc Alexander
999122acdb Merge pull request #6342 from Mikir2021/ticket/16914
[ticket/16914] Added missing id to language select element
2022-01-12 21:24:02 +01:00
Marc Alexander
c785c4b716 Merge pull request #6332 from rxu/ticket/16912
[ticket/16912] Rewrite email headers encoding method
2022-01-12 21:18:26 +01:00
rxu
b305070e0a [ticket/16912] Adjust code
PHPBB3-16912
2021-12-24 20:44:15 +07:00
Marc Alexander
99634d4c05 Merge pull request #6347 from DaRk1V0iD/ticket/16940_3.3.x
[ticket/16940] Optimize phpBB Native Search [3.3.x]
2021-12-23 22:24:28 +01:00
Dark❶
fad1c652c0 [ticket/16940] Optimize phpBB Native Search
PHPBB3-16940
2021-12-14 16:26:39 +05:30
Marc Alexander
1df74005a8 Merge pull request #6318 from 3D-I/ticket/16899
[ticket/16899] Add SVG and WEBP to ranks, smilies and topic icons
2021-12-13 20:23:13 +01:00
Dark❶
c7856ce162 [ticket/16940] Optimize phpBB Native Search
- Use `ORDER BY post_id ASC` for batch posts.

PHPBB3-16940
2021-12-13 19:36:36 +05:30
Dark❶
cccf01447f [ticket/16940] Optimize phpBB Native Search
- Fixed infinite loop

PHPBB3-16940
2021-12-13 00:37:04 +05:30
Dark❶
ddc3eaa5bf [ticket/16940] Optimize phpBB Native Search
- Removed `end()` replaced with `$ids[count($ids) - 1]`

PHPBB3-16940
2021-12-12 20:44:37 +05:30
Dark❶
65fa73855c [ticket/16940] Optimize phpBB Native Search
- Use `sql_query_limit` instead of `sql_query`
- Update SQL query to reflect the above change
- Assign proper last `post_id` to `$post_counter`

PHPBB3-16940
2021-12-12 19:51:50 +05:30
Marc Alexander
391e4943d9 Merge pull request #6346 from marc1706/ticket/16939
[ticket/16939] Wait for postgresql service to start on windows CI runners
2021-12-12 11:00:22 +01:00
Marc Alexander
6801f7949f [ticket/16939] Use ALTER SYSTEM queries to modify psql config variables
PHPBB3-16939
2021-12-12 09:39:14 +01:00
Marc Alexander
710aa10905 [ticket/16939] Wait for postgresql service to start on windows CI runners
PHPBB3-16939
2021-12-12 09:16:51 +01:00
rxu
4a78202f96 [ticket/16933] Fix test
PHPBB3-16933
2021-12-11 19:46:47 +07:00
rxu
d6a591cde3 [ticket/16933] Consistent handling of hyphen by phpBB Native search backend
PHPBB3-16933
2021-12-11 19:03:29 +07:00
Mikir
4e447cc91a [ticket/16914] Added missing id to language select element
The id of the language select element referenced by it's label was missing.

PHPBB3-16914
2021-12-08 19:54:02 +01:00
Marc Alexander
ec75f1741b Merge pull request #6337 from marc1706/ticket/16924
[ticket/16924] Do not double escape values inserted into config table
2021-12-07 21:57:47 +01:00
Marc Alexander
af38f9d6c8 Merge pull request #6339 from marc1706/ticket/16928
[ticket/16928] Update composer and dependencies to latest versions
2021-12-05 12:01:48 +01:00
Marc Alexander
4614d3d92b [ticket/16928] Update composer dependencies to latest versions
PHPBB3-16928
2021-12-05 09:51:15 +01:00
Marc Alexander
866a4dc6d4 [ticket/16928] Update composer to 2.1.14
PHPBB3-16928
2021-12-05 09:51:02 +01:00
Marc Alexander
492352f652 Merge pull request #6338 from marc1706/ticket/16927
[ticket/16927] Update plupload to latest version
2021-12-05 09:45:14 +01:00
Marc Alexander
1d05f722cb [ticket/16927] Update plupload to latest version
PHPBB3-16927
2021-12-04 22:21:35 +01:00
Marc Alexander
c1b88de806 Merge pull request #6312 from rxu/ticket/16895
[ticket/16895] Fix role removal for migrator permission tool
2021-12-03 21:06:14 +01:00
Marc Alexander
89168c507b [ticket/16895] Add missing return and remove not needed declarations
PHPBB3-16895
2021-12-03 20:14:26 +01:00
Marc Alexander
7a69c0f98c Merge pull request #6336 from 3D-I/ticket/16921
[ticket/16921] Increase PHP requirements in the DOCS
2021-12-03 19:51:24 +01:00
Marc Alexander
8cc6075d92 [ticket/16924] Do not double escape values inserted into config table
PHPBB3-16924
2021-12-02 21:01:45 +01:00
Marc Alexander
03b36d46c3 [ticket/16924] Add test to cover potential escaping of json values
PHPBB3-16924
2021-12-02 20:59:06 +01:00
3D-I
8104a446d4 [ticket/16921] Increase PHP requirements in the DOCS
Attempt to fix postgres test for 3.3.x. branch

PHPBB3-16921
2021-12-02 05:51:09 +01:00
3D-I
aff3852568 [ticket/16921] Increase PHP requirements in the DOCS
PHPBB3-16921
2021-12-02 02:02:31 +01:00
Marc Alexander
39905eaf4b Merge pull request #6324 from rxu/ticket/16908
[ticket/16908] Fix PHP warning on non-existent post id requests
2021-11-30 21:54:09 +01:00
Marc Alexander
534cef94c9 Merge pull request #6323 from rxu/ticket/16904
[ticket/16904] Fix regression in MCP for topics selection
2021-11-30 21:11:39 +01:00
rxu
a0ced790e2 [ticket/16912] Add test
PHPBB3-16912
2021-11-23 22:29:49 +07:00
rxu
0537365cac [ticket/16912] Rewrite email headers encoding method
Based on symfony/polyfill-iconv implementations.

PHPBB3-16912
2021-11-23 15:17:11 +07:00
Máté Bartus
6e34e3c24e Merge pull request #6326 from rxu/ticket/16910
[ticket/16910] Fix PHP warnings on uploading orphaned files to posts
2021-11-21 21:45:33 +01:00
rxu
fecf3306f3 [ticket/16910] Add test
PHPBB3-16910
2021-11-14 21:02:40 +07:00
rxu
39db7005cd [ticket/16910] Fix PHP warnings on uploading orphaned files to posts
PHPBB3-16910
2021-11-14 16:31:52 +07:00
Marc Alexander
e956629735 Merge pull request #6325 from rxu/ticket/16909
[ticket/16909] Add PHP 8.2 builds to test matrix
2021-11-14 10:11:22 +01:00
rxu
89ca3f087e [ticket/16909] Fix Postgres configuration on Windows, fix auth tests
PHPBB3-16909
2021-11-14 10:02:53 +07:00
rxu
29d137cc5e [ticket/16909] Add PHP 8.2 builds to test matrix
PHPBB3-16909
2021-11-13 20:58:47 +07:00
rxu
88a11c1377 [ticket/16908] Fix PHP warning on non-existent post id requests
PHPBB3-16908
2021-11-13 18:16:39 +07:00
rxu
69b895caae [ticket/16895] Rename custom method
PHPBB3-16895
2021-11-10 14:13:02 +07:00
rxu
d7f433fbf7 [ticket/16895] Rename migration file
PHPBB3-16895
2021-11-10 13:30:14 +07:00
rxu
4d00c4c8af [ticket/16904] Adjust tests
PHPBB3-16904
2021-11-07 19:38:49 +07:00
rxu
1e6c5cd381 [ticket/16904] Refactor MCP tests
PHPBB3-16904
2021-11-05 22:32:14 +07:00
rxu
0fbc5a3d83 [ticket/16904] Refactor MCP tests
PHPBB3-16904
2021-11-05 01:03:59 +07:00
Marc Alexander
3bfb2b3f69 Merge pull request #6322 from rxu/ticket/16900
[ticket/16900] Fix quoted_printable_encode() behavior
2021-11-03 20:07:10 +01:00
rxu
337d876df7 [ticket/16904] Fix regression in MCP for topics selection
Regression introduced in #5760

PHPBB3-16904
2021-11-02 13:55:39 +07:00
Marc Alexander
8246023e0f Merge pull request #6313 from Nicofuma/ticket/16891
[ticket/16891] Do not change an extension status in the midle of a request
2021-10-30 21:57:15 +02:00
Tristan Darricau
b28b94b1f1 [ticket/16891] Do not change an extension status in the middle of a request
When enabling an extension, it should be considered as not being enabled for
the entire request as if the "enabled" flag is switch during the request, the
extension will stay not loaded (same when disabling an extension).

Example when it can be an issue today : if the router is called for the first
time after enabling the extension and if the extension uses a custom route
loader (like phpbb/pages) then the router will fail because the custom route
will be found but the custom loader will not be loaded and available.

PHPBB3-16891
2021-10-30 04:25:31 +02:00
Marc Alexander
baf4bd7b5c Merge pull request #6317 from Nicofuma/ticket/16896
[ticket/16896] Adds comments in .gitignore and excludes custom envs
2021-10-29 21:29:00 +02:00
Marc Alexander
81126dc97e Merge pull request #6314 from Nicofuma/ticket/16897
[ticket/16897] Ignores sqlite3 warnings when an explain query plan query fails
2021-10-29 21:26:22 +02:00
rxu
391f80d480 [ticket/16900] Fix quoted_printable_encode() behavior
PHPBB3-16900
2021-10-30 00:33:10 +07:00
Tristan Darricau
febe44ed79 [ticket/16896] Adds comments in .gitignore and excludes custom envs
PHPBB3-16896
2021-10-28 22:15:25 +02:00
Tristan Darricau
ede9a6815a [ticket/16897] Ignores sqlite3 warnings when an explain query plan query fails
PHPBB3-16897
2021-10-28 21:52:03 +02:00
rxu
2801415c1c [ticket/16895] Rename language entry
PHPBB3-16895
2021-10-28 21:13:52 +07:00
Marc Alexander
dd029ed592 Merge pull request #6315 from Nicofuma/ticket/16898
[ticket/16898] Do not restrict the debug error handler to the dev env
2021-10-26 21:52:50 +02:00
Tristan Darricau
1d4fbd240e [ticket/16898] Do not restrict the debug error handler to the dev env
PHPBB3-16898
2021-10-26 20:23:28 +02:00
rxu
7275cdd152 [ticket/16895] Adjust test
PHPBB3-16895
2021-10-27 00:15:46 +07:00
rxu
b1e6fad38a [ticket/16895] Add test
PHPBB3-16895
2021-10-26 20:14:45 +07:00
3D-I
9671a00214 [ticket/16899] Add SVG and WEBP to ranks, smilies and topic icons
Prevent breaking layout

PHPBB3-16899
2021-10-24 19:52:37 +02:00
3D-I
d17b15a545 [ticket/16899] Add SVG and WEBP to ranks, smilies and topic icons
PHPBB3-16899
2021-10-22 16:14:28 +02:00
3D-I
f841a0a1b8 [ticket/16899] Add SVG and WEBP to ranks, smilies and topic icons
Attempt to read the SVG dimensions

PHPBB3-16899
2021-10-22 02:34:39 +02:00
3D-I
7472d300b6 [ticket/16899] Add SVG and WEBP to ranks, smilies and topic icons
Attempt to read the SVG dimensions

PHPBB3-16899
2021-10-22 02:30:13 +02:00
3D-I
06ef03f8d6 [ticket/16899] Add SVG and WEBP to ranks, smilies and topic icons
Take care of the old crappy IE

PHPBB3-16899
2021-10-21 23:54:58 +02:00
3D-I
40322bb1b6 [ticket/16899] Add SVG and WEBP to ranks, smilies and topic icons
PHPBB3-16899
2021-10-21 23:44:15 +02:00
3D-I
6218c2e120 [ticket/16899] Add SVG and WEBP to ranks, smilies and topic icons
PHPBB3-16899
2021-10-21 22:05:38 +02:00
3D-I
afbf7aadd2 [ticket/16899] Add SVG and WEBP image type to ranks, smilies and topic icons
PHPBB3-16899
2021-10-21 21:48:14 +02:00
rxu
a860a3310a [ticket/16895] Add migration
PHPBB3-16895
2021-10-20 21:58:24 +07:00
rxu
ca24013470 [ticket/16895] Fix role removal for migrator permission tool
PHPBB3-16895
2021-10-19 23:26:32 +07:00
Marc Alexander
99734fc648 Merge pull request #6278 from rxu/ticket/16859
[ticket/16859] Exclude language selection option on register if only 1 language is installed
2021-10-19 17:24:33 +02:00
Marc Alexander
3547f0bf0e Merge pull request #6310 from marc1706/ticket/16892
[ticket/16892] Remove duplicate entry for jav files in extension_guesser
2021-10-17 21:57:35 +02:00
Marc Alexander
01a22e7223 Merge pull request #6302 from 3D-I/ticket/16885
[ticket/16885] Add type casting filters to Twig
2021-10-17 20:32:49 +02:00
Arshid
2145938d74 [ticket/16892] Remove duplicate entry for jav files in extension_guesser
Remove duplicated key

PHPBB3-16892
2021-10-17 20:25:20 +02:00
Marc Alexander
62a8741494 Merge pull request #6303 from marc1706/ticket/13508
[ticket/13508] Add tests for INCLUDEJS & INCLUDECSS with twig syntax
2021-10-17 19:51:31 +02:00
3D-I
13155bf846 [ticket/16885] Add type casting filters to Twig
PHPBB3-16885
2021-10-17 16:18:47 +02:00
Marc Alexander
4d966d1762 [ticket/13508] Rename test files to fit in with current naming
PHPBB3-13508
2021-10-17 13:21:35 +02:00
Marc Alexander
056fb494b1 [ticket/13508] Switch back to current include format
PHPBB3-13508
2021-10-17 13:20:22 +02:00
Marc Alexander
da7c9f6a7c Merge pull request #6306 from 3D-I/ticket/16888
[ticket/16888] List allowed attachment types using accept attribute
2021-10-17 11:58:58 +02:00
Marc Alexander
73eb54bf54 Merge pull request #6309 from marc1706/ticket/16889
[ticket/16889] Move windows CI runner to server 2019
2021-10-17 11:57:03 +02:00
Marc Alexander
6af8872ef3 [ticket/16889] Create separate runs for unit and functional tests
PHPBB3-16889
2021-10-17 11:22:39 +02:00
Marc Alexander
a3070bedeb [ticket/16889] Remove invalid command for adding registry entry
PHPBB3-16889
2021-10-17 11:22:39 +02:00
Marc Alexander
a12f903e93 [ticket/16889] Remove build on push for ticket branch again
PHPBB3-16889
2021-10-17 11:22:39 +02:00
rxu
d4cb357b26 [ticket/16889] Run functional tests separately
PHPBB3-16889
2021-10-17 11:22:38 +02:00
Marc Alexander
b6e31e3664 [ticket/16889] Disable anti spyware in windows CI builds
PHPBB3-16889
2021-10-17 11:22:38 +02:00
3D-I
7355ee623a [ticket/16888] Add the list of allowed files in the attachment tab
Add core.modify_default_attachments_template_vars

PHPBB3-16888
2021-10-11 08:23:52 +02:00
3D-I
a7385f0fbe [ticket/16888] Add the list of allowed files in the attachment tab
PHPBB3-16888
2021-10-11 04:54:52 +02:00
3D-I
c5814ddfaa [ticket/16888] Add the list of allowed files in the attachment tab
PHPBB3-16888
2021-10-11 04:24:15 +02:00
3D-I
96c439bf10 [ticket/16888] Add the list of allowed files in the attachment tab
PHPBB3-16888
2021-10-11 04:15:29 +02:00
3D-I
7a21a9032e [ticket/16888] Add the list of allowed files in the attachment tab
PHPBB3-16888
2021-10-11 04:04:13 +02:00
3D-I
1619014120 [ticket/16888] Add the list of allowed files in the attachment tab
PHPBB3-16888
2021-10-11 02:48:39 +02:00
Marc Alexander
0a4d062e16 Merge pull request #6308 from marc1706/ticket/16889
[ticket/16889] Improve antivirus behavior in windows CI builds
2021-10-10 21:17:49 +02:00
Marc Alexander
dda2dfecb3 [ticket/16889] Improve antivirus behavior in windows CI builds
PHPBB3-16889
2021-10-10 20:45:50 +02:00
3D-I
b29c0ca153 [ticket/16888] Add the list of allowed files in the attachment tab
PHPBB3-16888
2021-10-10 16:26:28 +02:00
3D-I
c0296d10db [ticket/16888] Add the list of allowed files in the attachment tab
Using the accept attribute

PHPBB3-16888
2021-10-10 16:17:40 +02:00
3D-I
4f3f91dfc3 [ticket/16888] Add the list of allowed files in the attachment tab
PHPBB3-16888
2021-10-10 14:00:42 +02:00
3D-I
52c931a8b6 [ticket/16888] Add the list of allowed files in the attachment tab
Request mixed content using shorthand Ternary

PHPBB3-16888
2021-10-10 13:34:31 +02:00
3D-I
9ca70432d9 [ticket/16888] Add the list of allowed files in the attachment tab
Make sure we are checking both PMs and topics

PHPBB3-16888
2021-10-10 13:27:08 +02:00
Marc Alexander
1fbb807cc7 Merge pull request #6305 from Crizz0/ticket/16887
[ticket/16887] Update PHP requirements to include PHP 8.0
2021-10-10 12:56:29 +02:00
3D-I
98f446df67 [ticket/16888] Add the list of allowed files in the attachment tab
PHPBB3-16888
2021-10-10 07:06:24 +02:00
Christian Schnegelberger
43b9254d1d [ticket/16887] Update PHP requirements to include PHP 8.0
PHPBB3-16887
2021-10-09 21:12:18 +02:00
Marc Alexander
97034e0776 [ticket/13508] Add tests for include_js() and include_css() twig tokens
PHPBB3-13508
2021-10-07 21:20:09 +02:00
Marc Alexander
02e5a7afc4 [ticket/13508] Add include_css() and fix include_js() code linting issues
PHPBB3-13508
2021-10-07 21:19:35 +02:00
Marc Alexander
7efddcef54 [ticket/13508] Add include_js twig tag as replacement for INCLUDEJS
PHPBB3-13508
2021-10-07 20:08:31 +02:00
3D-I
ea36b83ee9 [ticket/16885] Add type casting filters to Twig
PHPBB3-16885
2021-10-06 19:57:13 +02:00
Máté Bartus
59cece1a0a Merge pull request #6301 from marc1706/ticket/16883
[ticket/16883] Check if var is array before using count()
2021-10-06 08:39:40 +02:00
Marc Alexander
e5fa23c3c0 [ticket/16883] Check if var is array before using count()
PHPBB3-16883
2021-10-05 21:07:50 +02:00
Marc Alexander
9a7d88362f Merge pull request #6299 from 3D-I/ticket/16881
[ticket/16881] Fix ACP statistics
2021-10-03 17:34:28 +02:00
Marc Alexander
7f6c859b0d [3.3.x] Fix invalid build.xml syntax after merge 2021-10-03 17:31:42 +02:00
Marc Alexander
441a5a2175 Merge branch 'prep-release-3.3.5' into 3.3.x 2021-10-03 15:25:12 +02:00
Marc Alexander
ceca69d121 [prep-release-3.3.5] Update changelog for 3.3.5 2021-10-01 22:42:05 +02:00
Marc Alexander
6a72d0305b [prep-release-3.3.5] Add migration for 3.3.5 2021-10-01 22:40:24 +02:00
Marc Alexander
7a8d9671c2 [prep-release-3.3.5] Update version numbers to 3.3.5 2021-10-01 22:40:21 +02:00
Marc Alexander
5b3d238804 Merge branch 'ticket/security/254' into prep-release-3.3.5 2021-10-01 22:35:54 +02:00
Máté Bartus
1860a06eab Merge pull request #6296 from 3D-I/ticket/16879
[ticket/16879] Add events to phpbb_mail()
2021-09-29 09:36:03 +02:00
3D-I
1862992ca7 [ticket/16881] Fix ACP statistics
PHPBB3-16881
2021-09-24 00:39:44 +02:00
3D-I
95fa6cceee [ticket/16881] Fix ACP statistics
PHPBB3-16881
2021-09-23 21:51:11 +02:00
3D-I
19076de94c [ticket/16879] Add events to phpbb_mail()
PHPBB3-16879
2021-09-22 22:39:19 +02:00
3D-I
27289cbfad [ticket/16879] Add events to phpbb_mail()
PHPBB3-16879
2021-09-20 22:02:25 +02:00
Marc Alexander
3d76942cdf Merge branch 'prep-release-3.3.5' into 3.3.x 2021-09-20 11:27:10 +02:00
Marc Alexander
51cc7202f8 Merge pull request #6295 from marc1706/ticket/16878
[ticket/16878] Default to threads value of 1 when using argon with libsodium
2021-09-20 11:26:39 +02:00
3D-I
303a933403 [ticket/16879] Add events to phpbb_mail()
PHPBB3-16879
2021-09-19 03:59:46 +02:00
3D-I
54b54c41c6 [ticket/16879] Add event core.phpbb_mail_after
PHPBB3-16879
2021-09-19 03:00:59 +02:00
Marc Alexander
59e50d6d53 [ticket/16878] Default to threads value of 1 when using argon with libsodium
PHPBB3-16878
2021-09-18 11:45:23 +02:00
Marc Alexander
2a1656e7b3 Merge pull request #6293 from 3D-I/ticket/16868-33
[ticket/16868] Fix links to coding guidelines
2021-09-16 11:02:33 +02:00
3D-I
12ce75b5f5 [ticket/16868] Fix links to coding guidelines
PHPBB3-16868
2021-09-16 10:27:08 +02:00
Marc Alexander
b82d90eb39 [ticket/security/254] Add tests for validation
SECURITY-254
2021-09-13 10:38:35 +02:00
Marc Alexander
f302440297 [ticket/security/254] Disallow whitespace characters that might be invisible
SECURITY-254
2021-09-13 10:38:35 +02:00
Marc Alexander
848021c743 Merge pull request #6291 from 3D-I/ticket/16850-33
[ticket/16850][3.3] Update webfont loader
2021-09-13 10:32:48 +02:00
Marc Alexander
c4b4e1d7a9 Merge branch 'prep-release-3.3.5' into 3.3.x 2021-09-13 10:32:30 +02:00
Marc Alexander
ed33f06235 Merge branch 'ticket/16850' into prep-release-3.3.5 2021-09-13 10:32:18 +02:00
3D-I
643845306a [ticket/16850] Update webfont loader
PHPBB3-16850
2021-09-13 10:32:04 +02:00
3D-I
95511540ea [ticket/16850] Update webfont loader
PHPBB3-16850
2021-09-13 10:31:56 +02:00
3D-I
b3b5fcc874 [ticket/16850] Update webfont loader
PHPBB3-16850
2021-09-12 21:48:29 +02:00
3D-I
1b4ba00a73 [ticket/16850] Update webfont loader
PHPBB3-16850
2021-09-11 17:02:12 +02:00
Marc Alexander
8caf2e7c59 [3.3.x] Update versions to 3.3.6-dev 2021-09-11 13:38:10 +02:00
Marc Alexander
a87a60c108 Merge branch 'prep-release-3.3.5' into 3.3.x 2021-09-11 13:36:37 +02:00
Marc Alexander
5b5502390d [prep-release-3.3.5] Update changelog for 3.3.5-RC1 2021-09-08 22:37:18 +02:00
Marc Alexander
1db2d9c3c1 [prep-release-3.3.5] Add migration for 3.3.5-RC1 2021-09-08 22:37:11 +02:00
Marc Alexander
5ef0105a5f [prep-release-3.3.5] Update version numbers to 3.3.5 2021-09-08 22:37:07 +02:00
Marc Alexander
e8421dbab1 [prep-release-3.3.5] Update version numbers to 3.3.5-RC1 2021-09-08 22:37:06 +02:00
Marc Alexander
e0197d711f Merge pull request #6288 from marc1706/ticket/16870
[ticket/16870] Ensure to properly escape values when running db:migrate
2021-09-08 22:25:02 +02:00
Marc Alexander
11563ce971 [ticket/16870] Use string representation of float value for treshold
PHPBB3-16870
2021-09-08 20:42:41 +02:00
Marc Alexander
bbcac37e30 [ticket/16870] Ensure to properly escape values when running db:migrate
PHPBB3-16870
2021-09-08 20:24:44 +02:00
Marc Alexander
8c25f3a9f7 Merge pull request #6284 from marc1706/ticket/16867
[ticket/16867] Update symfony and text-formatter to latest versions
2021-09-06 17:37:38 +02:00
Marc Alexander
e371f3eac7 [ticket/16867] Update symfony and text-formatter to latest versions
PHPBB3-16867
2021-09-05 22:08:06 +02:00
Máté Bartus
dc7012864b Merge pull request #6282 from CHItA/ticket/16858
[ticket/16858] Fix coding style
2021-09-03 10:31:12 +02:00
Máté Bartus
cd53106ec3 [ticket/16858] Fix coding style
PHPBB3-16858
2021-09-03 09:58:34 +02:00
Máté Bartus
86af3a2ba4 Merge pull request #6275 from marc1706/ticket/16856
[ticket/16856] Add lang_js twig function as replacement for LA_
2021-09-02 10:48:22 +02:00
Marc Alexander
a6d4b460f1 Merge pull request #6277 from 3D-I/ticket/16858
[ticket/16858] Update jQuery to 3.6.0
2021-08-31 20:59:56 +02:00
Marc Alexander
975ad95bff Merge pull request #6281 from paul999/ticket/16865
[ticket/16865] Update IRC + discord links in composer and documentati…
2021-08-31 20:57:29 +02:00
paul sohier
61c59bdc91 [ticket/16865] Update IRC + discord links in composer and documentation
Update the links from Freenode to Libera.chat,
add discord as option to chat in composer.json,
and remove references to wiki.phpbb.com
(And replace it with links to the development documentation)

PHPBB3-16865
2021-08-31 16:03:41 +02:00
Marc Alexander
79efbcaa4e [ticket/16856] Make other vars twig as well
PHPBB3-16856
2021-08-30 20:09:15 +02:00
rxu
8cc0e5438a [ticket/16859] Twigify the rest of respective template block
PHPBB3-16859
2021-08-29 11:10:00 +07:00
rxu
2c8be65dcf [ticket/16859] Apply similar logic to UCP board preferences
PHPBB3-16859
2021-08-29 01:48:55 +07:00
rxu
c3598d0d58 [ticket/16859] Optimize code to save SQL queries and use Twig for template
PHPBB3-16859
2021-08-29 00:15:06 +07:00
rxu
92a2c08616 [ticket/16859] Exclude language option on register if only 1 language installed
PHPBB3-16859
2021-08-28 22:51:51 +07:00
DSR!
e5b43eabe1 [ticket/16828] Add hook event before find_users_for_notification() execute
PHPBB3-16828
2021-08-27 11:58:55 -03:00
3D-I
a8be17dd4d [ticket/16858] Update jQuery to 3.6.0
PHPBB3-16858
2021-08-27 04:25:41 +02:00
Marc Alexander
170ddeaf63 [ticket/16856] Maybe use lang_js() for all lang vars in JS
PHPBB3-16856
2021-08-26 20:51:43 +02:00
Marc Alexander
8db200d75f Merge pull request #6272 from MichaIng/ticket/16851
[ticket/16851] Add Amazonbot, AhrefsBot and SemrushBot
2021-08-25 20:07:31 +02:00
MichaIng
3638b36849 [ticket/16851] Add Amazonbot, AhrefsBot and SemrushBot
PHPBB3-16851

Signed-off-by: MichaIng <micha@dietpi.com>
2021-08-25 14:46:37 +02:00
Marc Alexander
8804cf885b [ticket/16856] Remove extra empty line
PHPBB3-16856
2021-08-24 19:07:32 +02:00
Marc Alexander
ad23388043 [ticket/16856] Add tests for lang_js() function
PHPBB3-16856
2021-08-24 19:05:13 +02:00
Marc Alexander
79a8ed4677 [ticket/16856] Proof that lang_js() actually works
PHPBB3-16856
2021-08-24 19:05:13 +02:00
Marc Alexander
5eeb213b12 [ticket/16856] Add lang_js() twig function
PHPBB3-16856
2021-08-24 19:05:13 +02:00
Marc Alexander
75df7c202e Merge pull request #6258 from rxu/ticket/15729
[ticket/15729] Avoid unnecessary email headers encoding in Base64
2021-08-23 21:23:42 +02:00
Marc Alexander
2ef37a8e77 Merge pull request #6260 from Prosk8er/ticket/16829
[ticket/16829] forumtitle and lastsubject text decoration hover
2021-08-23 21:16:58 +02:00
Marc Alexander
acbcb18226 Merge pull request #5760 from v12mike/ticket/16138
Ticket/16138 Eliminate redundant parameters from board URLs
2021-08-23 20:11:35 +02:00
Marc Alexander
5d0fd9f73a Merge pull request #6262 from 3D-I/ticket/16832
[ticket/16832] Fix UCP attachments plural rules
2021-08-20 16:58:01 +02:00
Marc Alexander
47c583516b Merge pull request #6261 from Prosk8er/ticket/16831
[ticket/16831] fix tabs missing delimiters and remove commented class
2021-08-19 19:56:39 +02:00
Marc Alexander
91c6edf092 Merge pull request #6271 from 3D-I/ticket/16850-33
[ticket/16850][3.3] Update webfont loader
2021-08-19 19:43:12 +02:00
Marc Alexander
c2873cbc01 Merge pull request #6265 from rxu/ticket/16840
[ticket/16840] Add more PHP 8.x builds to tests matrix
2021-08-16 23:06:39 +02:00
3D-I
a1f1c0cc9d [ticket/16850] Update webfont loader
PHPBB3-16850
2021-08-16 11:45:52 +02:00
3D-I
f46ebf5bec [ticket/16850] Update webfont loader
PHPBB3-16850
2021-08-16 11:33:54 +02:00
Prosk8er
6dd7b7e8b5 [ticket/16831] fix tabs missing delimiters and remove commented class
this is just to fix tabs, missing delimiters, and
remove old commented classes in css files

PHPBB3-16831
2021-08-14 17:33:26 -04:00
rxu
721a39502a [ticket/16840] Add PHP 8.0 / 8.1 builds for Windows tests
Also fix Postrges PHP 8.1 related issue.

PHPBB3-16840
2021-08-07 16:50:45 +07:00
rxu
b01a956461 [ticket/16840] Add PHP 8.1 test
PHPBB3-16840
2021-08-07 16:34:38 +07:00
3D-I
364c6d328a [ticket/16832] Fix UCP attachments plural rules
PHPBB3-16832
2021-08-05 14:30:03 +02:00
Prosk8er
f7487e4e5c [ticket/16829] forumtitle and lastsubject text decoration hover
Fix text decoration on hover for forumtitle and last subject

PHPBB3-16829
2021-08-04 19:50:17 -04:00
Marc Alexander
84b414a4f0 [ticket/16138] Remove redundant specifiers from functional test URLs
PHPBB3-16138
2021-08-04 22:11:02 +02:00
Marc Alexander
3f9e6c6013 [ticket/16138] Remove extra variables and improve fallback to viewforum
PHPBB3-16138
2021-08-04 21:44:49 +02:00
rxu
e855f5cba4 [ticket/15729] Avoid unnecessary email headers encoding in Base64
PHPBB3-15729
2021-08-03 00:33:13 +07:00
Máté Bartus
90fccff6f1 Merge pull request #6252 from rxu/ticket/16823
[ticket/16823] Make datetime class correctly handle edge cases
2021-07-31 12:05:26 +02:00
Marc Alexander
a380c78e1e Merge pull request #6254 from marc1706/ticket/16804
[ticket/16804] Extend bbcode help line tooltip
2021-07-23 22:25:31 +02:00
3D-I
a6a18f2c59 [ticket/16804] Extend bbcode help line tooltip
PHPBB3-16804
2021-07-23 21:47:07 +02:00
Máté Bartus
6efebf7571 Merge pull request #6249 from marc1706/ticket/12075
[ticket/12075] Add acp/modules language file to extensions page
2021-07-23 07:56:00 +02:00
Marc Alexander
c7c3adf762 Merge pull request #6250 from rxu/ticket/16822
[ticket/16822] Replace patchwork/utf8 with symfony/polyfill
2021-07-22 10:53:34 +02:00
rxu
2e29bb48fa [ticket/16823] Adjust wrapper condition
PHPBB3-16823
2021-07-20 20:59:28 +07:00
rxu
e1fc0a9059 [ticket/16823] Make datetime class correctly handle edge cases
PHPBB3-16823
2021-07-20 20:35:04 +07:00
rxu
c846dd5666 [ticket/16822] Replace patchwork/utf8 with symfony/polyfill
PHPBB3-16822
2021-07-19 22:49:04 +07:00
Marc Alexander
19a5900db5 Merge pull request #6247 from 3D-I/ticket/16810
[ticket/16810] Fix No end tag in Custom BBCodes
2021-07-18 15:19:19 +02:00
Marc Alexander
5de8c3dc3c [ticket/12075] Add acp/modules language file to extensions page
PHPBB3-12075
2021-07-18 10:57:30 +02:00
Marc Alexander
3ae0d347c9 Merge pull request #6245 from 3D-I/ticket/16657
[ticket/16657] Properly decode usernames in member list live-search
2021-07-15 22:02:07 +02:00
3D-I
2244635a41 [ticket/16810] Fix No end tag in Custom BBCodes
PHPBB3-16810
2021-07-15 20:32:53 +02:00
3D-I
68bd4e9faa [ticket/16810] Fix No end tag in Custom BBCodes
PHPBB3-16810
2021-07-15 20:27:37 +02:00
Máté Bartus
8c12c46869 Merge pull request #6242 from Prosk8er/ticket/16816
[ticket/16816] acp style html validation fixes
2021-07-13 18:48:07 +02:00
3D-I
aecd1fa04e [ticket/16657] Properly decode usernames in member list live-search
Housekeeping

PHPBB3-16657
2021-07-13 16:06:21 +02:00
3D-I
ac781e570f [ticket/16657] Properly decode usernames in member list live-search
PHPBB3-16657
2021-07-13 09:04:06 +02:00
Prosk8er
f28eed7f30 [ticket/16816] acp style html validation fixes
Fix acp style html validation errors and warnings

PHPBB3-16816
2021-07-09 18:14:38 -04:00
Máté Bartus
2869e04756 Merge pull request #6241 from Prosk8er/ticket/16812
[ticket/16812] login_body.html missing dt tag for autologin
2021-07-08 23:27:29 +02:00
Marc Alexander
4446888eb2 Merge pull request #6238 from marc1706/ticket/16809
[ticket/16809] Reset display options at the end of preferences test
2021-07-08 21:09:36 +02:00
Prosk8er
7783912e93 [ticket/16812] login_body.html missing dt tag for autologin
Added missing dt element to autologin

PHPBB3-16812
2021-07-06 17:40:36 -04:00
Marc Alexander
ccac4c5fe8 Merge pull request #6233 from rxu/ticket/16799
[ticket/16799] Fix OAuth external account linking PHP fatal error
2021-07-06 22:02:12 +02:00
Máté Bartus
a18681cfe4 Merge pull request #6237 from DavidIQ/ticket/16808
[ticket/16808] Make sure we have a container before using it
2021-07-06 11:32:56 +02:00
Marc Alexander
096dad1767 [ticket/16809] Reset display options at the end of preferences test
PHPBB3-16809
2021-07-03 22:25:43 +02:00
David Colón
068f8eed25 [ticket/16808] Make sure we have a container before using it
PHPBB3-16808
2021-07-01 16:34:38 -04:00
rxu
dd62829f96 [ticket/16799] Use offsetExists() method instead of array_key_exists()
PHPBB3-16799
2021-07-01 03:04:38 +07:00
Marc Alexander
be2959fbab Merge pull request #6234 from 3D-I/ticket/16729
[ticket/16729] Fix Unknown named parameter in Log - PHP 8
2021-06-30 21:10:10 +02:00
Marc Alexander
7acdef7c01 Merge pull request #6224 from 3D-I/ticket/16789
[ticket/16789] Update user_delete() doc-block
2021-06-29 22:33:47 +02:00
Marc Alexander
bd0b6fbdab Merge pull request #6223 from 3D-I/ticket/16788
[ticket/16788] Update s9e/text-formatter to 2.9.3
2021-06-29 22:26:38 +02:00
Marc Alexander
c83b4c21a4 Merge pull request #6207 from marc1706/ticket/13700
[ticket/13700] Add method for initializing config after cache purge
2021-06-29 22:24:40 +02:00
3D-I
9d22731d03 [ticket/16729] Fix Unknown named parameter in Log - PHP 8
PHPBB3-16729
2021-06-15 17:57:17 +02:00
rxu
7b5ad8bb74 [ticket/16799] Fix OAuth external account linking PHP fatal error
PHPBB3-16799
2021-06-15 00:08:45 +07:00
Marc Alexander
af98278590 Merge pull request #6226 from 3D-I/ticket/16795
[ticket/16795] Add template events around signature in viewtopic
2021-06-13 22:06:35 +02:00
Marc Alexander
bef2a4bc41 Merge pull request #6230 from iMattPro/ticket/16798
[ticket/16798] Scale down phpbb logo on readme
2021-06-13 22:01:36 +02:00
Matt Friedman
f24396ac0d [ticket/16798] Scale down phpbb logo on readme
PHPBB3-16798
2021-06-13 08:44:46 -07:00
Marc Alexander
b7f57eb556 Merge pull request #6227 from 3D-I/ticket/16793
[ticket/16793] Fix topic/post attachments visibility - PHP 8
2021-06-13 11:26:06 +02:00
3D-I
c452c83855 [ticket/16793] Fix topic/post visibility - PHP 8
PHPBB3-16793
2021-06-10 21:34:32 +02:00
3D-I
c9b32463de [ticket/16793] Fix topic/post visibility - PHP 8
PHPBB3-16793
2021-06-09 04:08:04 +02:00
3D-I
1177f843c5 [ticket/16793] Fix topic/post visibility - PHP 8
PHPBB3-16793
2021-06-09 03:52:48 +02:00
3D-I
cdca28eb3f [ticket/16795] Add template events around signature in viewtopic
PHPBB3-16795
2021-06-08 23:03:53 +02:00
Marc Alexander
5169a947f4 Merge pull request #6222 from 3D-I/ticket/16787
[ticket/16787] Properly check if fsockopen() is enabled - PHP 8
2021-06-05 22:24:19 +02:00
3D-I
6a95f34d0c [ticket/16789] Update user_delete() doc-block
PHPBB3-16789
2021-06-03 08:10:04 +02:00
3D-I
11083e59ed [ticket/16789] Update user_delete() doc-block
PHPBB3-16789
2021-06-03 06:40:31 +02:00
3D-I
6b45c7bd5f [ticket/16788] Update s9e/text-formatter to 2.9.3
PHPBB3-16788
2021-06-01 02:56:45 +02:00
3D-I
c5ec036b84 [ticket/16787] Properly check if fsockopen() is enabled - PHP 8
PHPBB3-16787
2021-05-29 21:53:23 +02:00
3D-I
e2cfc01964 [ticket/16787] Properly check if fsockopen() is enabled - PHP 8
PHPBB3-16787
2021-05-29 21:12:07 +02:00
Marc Alexander
f007aef3d8 Merge pull request #6218 from marc1706/ticket/16783
[ticket/16783] Remove structure only backup
2021-05-29 20:05:43 +02:00
Marc Alexander
5ad1ae4e7b Merge pull request #6220 from marc1706/ticket/16785
[ticket/16785] Use correct versions in build.xml for 3.3.x branch
2021-05-28 07:23:56 +02:00
Marc Alexander
32586407d1 [ticket/16785] Use correct versions in build.xml for 3.3.x branch
PHPBB3-16785
2021-05-27 22:36:33 +02:00
Marc Alexander
233b2fdade Merge pull request #6219 from hanakin/ticket/16784
[ticket/16784] ignore .vscode
2021-05-27 21:33:37 +02:00
hanakin
ea7e07c1a4 [ticket/16784] ignore .vscode
PHPBB3-17684
2021-05-26 21:01:19 -10:00
Marc Alexander
acf0885948 [ticket/16783] Add back data only backups
PHPBB3-16783
2021-05-25 20:34:31 +02:00
Marc Alexander
d8ef094a9a [ticket/16783] Remove structure only backup
PHPBB3-16783
2021-05-24 16:36:54 +02:00
Marc Alexander
c925e8ef58 [ticket/16138] Use same variable for forum_id in one query
PHPBB3-16138
2021-05-24 16:20:13 +02:00
Marc Alexander
3f518c9263 [ticket/16138] Use array to pass parameters to append_sid()
PHPBB3-16138
2021-05-24 16:14:17 +02:00
Máté Bartus
8a746b457d Merge pull request #6216 from marc1706/ticket/16570
[ticket/16570] Support continuing update on manually merging files
2021-05-22 08:23:26 +02:00
Marc Alexander
0502b9cc22 [ticket/16570] Support continuing update on manually merging files
PHPBB3-16570
2021-05-21 22:19:47 +02:00
Marc Alexander
6a0b1333da [ticket/16138] Resolve misc coding style issues
PHPBB3-16138
2021-05-19 22:11:01 +02:00
Marc Alexander
d05abc0807 [ticket/16138] Fix typo in visibility_reapprove_test
PHPBB3-16138
2021-05-19 22:05:08 +02:00
v12mike
b734fed853 [ticket/16138] Eliminate redundant parameters from board URLs
Revert mcp change to fix some moderator functions
such as selecting topic for move posts

PHPBB3-16138
2021-05-19 22:05:08 +02:00
Marc Alexander
67f80c7942 [ticket/16138] Make comment more objective
PHPBB3-16138
2021-05-19 22:05:07 +02:00
v12mike
bb24d619d2 [ticket/16138] Eliminate redundant parameters from board URLs
Fix whitespace

PHPBB3-16138
2021-05-19 22:05:07 +02:00
v12mike
62f59fa59d [ticket/16138] Eliminate redundant parameters from board URLs
Minor fixes after review

PHPBB3-16138
2021-05-19 22:05:07 +02:00
v12mike
adacf21edb [ticket/16138] Eliminate redundant parameters from board URLs
Rebase to 3.3.x

PHPBB3-16138
2021-05-19 22:05:06 +02:00
Marc Alexander
314ab17edd Merge pull request #6210 from 3D-I/ticket/16772
[ticket/16772] Fix Emoji for Email signature
2021-05-19 21:49:14 +02:00
Marc Alexander
49974a169b Merge pull request #6209 from rxu/ticket/16771
[ticket/16771] Add MCP core events
2021-05-16 21:07:04 +02:00
Marc Alexander
3bb58556ea [ticket/16771] Fix typo and invalid type in event docblocks
PHPBB3-16771
2021-05-15 22:49:28 +02:00
Marc Alexander
98713a7cbe Merge pull request #5505 from toxyy/ticket/15925
[ticket/15925] Add core events for sync and mcp functions
2021-05-15 22:38:04 +02:00
Marc Alexander
43e503e0ee Merge pull request #6211 from AlfredoRamos/ticket/16773
[ticket/16773] Add missing constraints in PostgreSQL backups
2021-05-15 22:31:16 +02:00
Alfredo Ramos
37518342c6 [ticket/16773] Add missing constraints in PostgreSQL backups
PHPBB3-16773
2021-05-08 01:12:46 -05:00
3D-I
81d582a2d2 [ticket/16772] Fix Emoji for Email signature
PHPBB3-16772
2021-05-08 04:49:20 +02:00
toxyy
bcea34ee7c [ticket/15925] Update events for 3.3.5-RC1
PHPBB3-15925
2021-05-07 19:25:35 -04:00
rxu
3ff99a9eb1 [ticket/16771] Add MCP core events
PHPBB3-16771
2021-05-07 22:30:50 +07:00
Marc Alexander
20fbe0e254 Merge pull request #6208 from Noxwizard/ticket/16292
[ticket/16292] Propagate more errors to the installer UI
2021-05-05 20:14:39 +02:00
Patrick Webster
e22f431660 [ticket/16292] Check that the installer container is available
PHPBB3-16292
2021-05-03 17:29:52 -05:00
Marc Alexander
9c8f2007d9 [ticket/13700] Add docblock and clean up code
PHPBB3-13700
2021-05-03 20:03:53 +02:00
Patrick Webster
62a45d86ec [ticket/16292] Try to propagate serious errors to the installer UI
Only raise a runtime exception during install/update as a last resort.

PHPBB3-16292
2021-05-02 16:29:31 -05:00
Marc Alexander
3e0b20820a Merge pull request #6199 from Noxwizard/ticket/16765
[ticket/16765] Check if ACP_CONTACT_SETTINGS module already installed
2021-05-02 20:44:53 +02:00
Marc Alexander
2dc8e61a72 Merge pull request #6204 from marc1706/ticket/16770
[ticket/16770] Rearrange static qualifier in 3.3.4 migration
2021-05-02 20:41:28 +02:00
Marc Alexander
47321954b7 [ticket/16770] Rearrange static qualifier in 3.3.4 migration
PHPBB3-16770
2021-05-02 15:42:04 +02:00
Marc Alexander
ecc79ea2ec Merge branch 'prep-release-3.3.4' into 3.3.x 2021-05-01 21:51:16 +02:00
Marc Alexander
710740d6be Merge pull request #6202 from marc1706/ticket/16769
[ticket/16769] Update composer & dependencies to latest versions
2021-05-01 13:34:06 +02:00
Marc Alexander
de3c0f274c [ticket/16769] Update composer dependencies to latest versions
PHPBB3-16769
2021-04-29 20:40:43 +02:00
Marc Alexander
b215f13f04 [ticket/16769] Update composer to latest version
PHPBB3-16769
2021-04-29 20:40:03 +02:00
Marc Alexander
950d8b8a13 Merge pull request #6198 from Noxwizard/ticket/16766
[ticket/16766] Show long error messages during install/update
2021-04-29 20:30:55 +02:00
Patrick Webster
31fc85153e [ticket/16766] Restructure conditional
PHPBB3-16766
2021-04-27 18:00:08 -05:00
Marc Alexander
7f79849146 Merge pull request #6189 from 3D-I/ticket/16757
[ticket/16757] Properly handle RTL text in ACP QA Captcha HTML
2021-04-27 20:09:48 +02:00
Marc Alexander
db9f54bee5 Merge pull request #6200 from Noxwizard/ticket/16767
[ticket/16767] Report missing migration instead of dependency
2021-04-26 22:05:50 +02:00
Patrick Webster
134482f6c2 [ticket/16767] Report missing migration instead of dependency
If a migration has an unfulfillable dependency, the migration causing the
dependency to be unfulfillable is now shown in the error message instead
of just the dependency.

PHPBB3-16767
2021-04-25 15:22:42 -05:00
Patrick Webster
9051b28e14 [ticket/16765] Check if ACP_CONTACT_SETTINGS module already installed
Checks to see if the ACP_CONTACT_SETTINGS module is already installed prior to
running migration.

PHPBB3-16765
2021-04-24 13:02:07 -05:00
Patrick Webster
1f76aa65f3 [ticket/16766] Show long error messages during install/update
PHPBB3-16766
2021-04-24 12:39:27 -05:00
Máté Bartus
a641a992f6 Merge pull request #6195 from williamdes/16754-5.4.1
[ticket/16754] Update Doctum to 5.4.1
2021-04-22 08:56:24 +02:00
William Desportes
8c334f0c10 [ticket/16754] Update Doctum to 5.4.1
PHPBB3-16754
2021-04-22 02:03:21 +02:00
3D-I
ecd7b14171 [ticket/16757] Properly handle RTL text in ACP QA Captcha HTML
Twig version

PHPBB3-16757
2021-04-14 23:23:30 +02:00
3D-I
65a1ed0f82 [ticket/16757] Properly handle RTL text in ACP QA Captcha HTML
Remove double newline

PHPBB3-16757
2021-04-14 23:12:08 +02:00
3D-I
f6a8981028 [ticket/16757] Properly handle RTL text in ACP QA Captcha HTML
PHPBB3-16757
2021-04-14 23:03:59 +02:00
Marc Alexander
bd1033be68 Merge pull request #6188 from CHItA/ticket/16754
[ticket/16754] Update doctum.phar to 5.4
2021-04-10 23:01:30 +02:00
Máté Bartus
6eb357b421 [ticket/16754] Fix docblocks
PHPBB3-16754
2021-04-10 10:36:01 +02:00
Máté Bartus
1482efc927 [ticket/16754] Update doctum.phar to 5.4
PHPBB3-16754
2021-04-10 09:45:15 +02:00
Marc Alexander
908245686e Merge pull request #6186 from marc1706/ticket/16752
[ticket/16752] Add exporter for event into to restructured text
2021-04-09 17:29:14 +02:00
Marc Alexander
70337e99fa [ticket/16752] Add deprecation notices and fix tests
PHPBB3-16752
2021-04-08 21:18:35 +02:00
Marc Alexander
1ecc2e042b [ticket/16752] Add methods for exporting events to rst by script
PHPBB3-16752
2021-04-08 20:14:18 +02:00
Marc Alexander
bcc75099ab [ticket/16752] Add first version of exporter to restructured text (rst)
PHPBB3-16752
2021-04-07 22:20:23 +02:00
Marc Alexander
2c66f69c51 Merge pull request #6184 from rxu/ticket/16749
[ticket/16749] Explicitly set default MySQLi error mode
2021-04-05 21:39:49 +02:00
rxu
3d5639a844 [ticket/16749] Explicitly set default MySQLi error mode
PHPBB3-16749
2021-04-04 17:11:59 +07:00
Marc Alexander
705cc6ee6b Merge pull request #6182 from marc1706/ticket/16748
[ticket/16748] Adjust coding guidelines to put static after visibility
2021-04-04 10:00:54 +02:00
Marc Alexander
95496ebd38 [ticket/16748] Adjust coding guidelines to put static after visibility
PHPBB3-16748
2021-04-03 22:41:58 +02:00
Marc Alexander
574de287e7 [ticket/13700] Add method for initializing config after cache purge
PHPBB3-13700
2021-04-03 22:31:51 +02:00
Marc Alexander
7d48254cc9 Merge pull request #6163 from marc1706/ticket/16730
[ticket/16730] Don't do additional sorting or output without any tickets
2021-03-24 21:31:22 +01:00
Máté Bartus
50a917ab4c Merge pull request #6170 from marc1706/ticket/16736
[ticket/16736] Add sniffer for visibilitiy qualifiers before static keyword
2021-03-23 23:44:44 +01:00
Marc Alexander
a8ffd339fe [ticket/16736] Fix invalid placement of visibility qualifiers next to static
PHPBB3-16736
2021-03-23 22:12:59 +01:00
Marc Alexander
0897d3e381 [ticket/16736] Add sniffer for visibilitiy qualifiers before static keyword
PHPBB3-16736
2021-03-23 22:09:05 +01:00
Marc Alexander
4721007c02 [ticket/16730] Don't do additional sorting or output without any tickets
PHPBB3-16730
2021-03-17 21:36:53 +01:00
Marc Alexander
f6b4031a96 Merge pull request #6162 from marc1706/ticket/16707
[ticket/16707] Disable unstable PHP 8.1 builds
2021-03-17 20:21:01 +01:00
Marc Alexander
39d89c8dbc [ticket/16707] Disable unstable PHP 8.1 builds
PHP 8.1 builds keep failing. Don't use them until there is a release.

PHPBB3-16707
2021-03-17 17:50:01 +01:00
Marc Alexander
8f2d84f4dc [3.3.x] Update versions to 3.3.5-dev 2021-03-16 20:16:25 +01:00
Marc Alexander
fe49e110bd Merge branch 'prep-release-3.3.4' into 3.3.x 2021-03-16 20:14:33 +01:00
Marc Alexander
22f7f491c5 [ticket/15925] Update events for 3.3.4-RC1
PHPBB3-15925
2021-03-04 17:14:56 +01:00
Marc Alexander
60d6727974 [ticket/15925] Update events for 3.3.3-RC1
PHPBB3-15925
2021-03-04 17:12:26 +01:00
Alec
86bbd05608 [ticket/15925] Add core.update_post_info_modify_sql
Add event to modify the sql to allow for more columns to be updated during sync
Same as sync events but only ran for last posts, slightly different formatting

PHPBB3-15925
2021-03-04 17:12:26 +01:00
Alec
516d0f5b27 [ticket/15925] Add core.update_post_info_modify_posts_sql
Add core event to modify the last posts' data retrieved to update forums' data
Also add $phpbb_dispatcher to sync globals to allow function use

PHPBB3-15925
2021-03-04 17:12:25 +01:00
Alec
40d825d1c6 [ticket/15925] Add core.sync_modify_topic_data
Allow modification of topic_data when syncing topics
Another event has been added to modify the contents of $row
This means that topic_data can be populated with anything added to that query

PHPBB3-15925
2021-03-04 17:12:25 +01:00
Alec
9ff92f2c36 [ticket/15925] Add core.sync_topic_last_post_info_sql
Add event to get more post or user data when syncing
Topic_data is updated with the data from this query, so it needs to be accessed
Custom_fieldnames is merged with fieldnames later, unlike the other event
This keeps the integrity of the core's code

PHPBB3-15925
2021-03-04 17:12:25 +01:00
Alec
740b2ffbf2 [ticket/15925] Add core.sync_modify_forum_data
Allow fieldnames and forum_data to be updated before synced with the database
Used in conjunction with post_info to pull that data

PHPBB3-15925
2021-03-04 17:12:24 +01:00
Alec
6728497434 [ticket/15925] Add core.sync_forum_last_post_info_sql
Add core event to modify the last posts' data retrieved to update forums' data
Also add $phpbb_dispatcher to sync globals to allow function use

PHPBB3-15925
2021-03-04 17:12:24 +01:00
Alec
9d2ab88c69 [ticket/15925] Add core.mcp_main_modify_fork_post_sql
Modify the forked post's sql array before it's inserted into the database
Lets additional variables be added into the sql_ary
Allows the same edits as mcp_main_fork_sql_after but for posts not topics

PHPBB3-15925
2021-03-04 17:12:24 +01:00
219 changed files with 4446 additions and 1243 deletions

View File

@@ -2,7 +2,7 @@ Checklist:
- [ ] 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) and [3.3.x](https://area51.phpbb.com/docs/dev/3.3.x/development/coding_guidelines.html)
- [ ] Code follows coding guidelines: [master](https://area51.phpbb.com/docs/master/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**):

View File

@@ -11,16 +11,17 @@
set -e
if [ ! -f doctum.phar ]; then
# Download the latest (5.1.x) release if the file does not exist
# Download the latest (5.x.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
curl -O https://doctum.long-term.support/releases/5/doctum.phar
rm -f doctum.phar.sha256
curl -O https://doctum.long-term.support/releases/5.1/doctum.phar.sha256
curl -O https://doctum.long-term.support/releases/5/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
chmod +x ./doctum.phar
# You can fetch the latest (5.x.x) version code here:
# https://doctum.long-term.support/releases/5/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
./doctum.phar version --text
./doctum.phar parse build/doctum-checkout.conf.php -v

View File

@@ -28,18 +28,12 @@ NGINX_PHP_CONF="$DIR/nginx-php.conf"
PHP_FPM_BIN="/usr/sbin/php-fpm$PHP_VERSION"
PHP_FPM_CONF="$DIR/php-fpm.conf"
if [ "$PHP_VERSION" == '8.1' ]
if [ ! -f $PHP_FPM_BIN ] && [ -f "/usr/bin/php-fpm" ]
then
if [ -f "/usr/sbin/php-fpm8.0" ]
then
PHP_FPM_BIN="/usr/sbin/php-fpm8.0"
elif [ ! -f $PHP_FPM_BIN ] && [ -f "/usr/bin/php-fpm" ]
then
PHP_FPM_BIN="/usr/bin/php-fpm"
fi
PHP_FPM_BIN="/usr/bin/php-fpm"
fi
if [ ! -f $PHP_FPM_BIN ] && [ "$PHP_VERSION" != '8.1' ]
if [ ! -f $PHP_FPM_BIN ]
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 \

View File

@@ -22,7 +22,7 @@ jobs:
matrix:
include:
- db: 'none'
php: '7.1'
php: '7.2'
NOTESTS: 1
name: PHP ${{ matrix.php }} - ${{ matrix.db }}
@@ -124,8 +124,10 @@ jobs:
db: "mysql:8.0"
- php: '8.0'
db: "mysql:5.7"
#- php: '8.1'
# db: "mysql:5.7"
- php: '8.1'
db: "mysql:5.7"
- php: '8.2'
db: "mysql:5.7"
name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }}
@@ -253,6 +255,10 @@ jobs:
db: "postgres:12"
- php: '8.0'
db: "postgres:13"
- php: '8.1'
db: "postgres:14"
- php: '8.2'
db: "postgres:14"
name: PHP ${{ matrix.php }} - ${{ matrix.db }}
@@ -442,14 +448,36 @@ jobs:
# Test with IIS & PostgreSQL on Windows
windows-tests:
runs-on: windows-2016
runs-on: windows-latest
strategy:
matrix:
include:
- php: '7.4'
db: "postgres"
type: 'unit'
- php: '8.0'
db: "postgres"
type: 'unit'
- php: '8.1'
db: "postgres"
type: 'unit'
- php: '8.2'
db: "postgres"
type: 'unit'
- php: '7.4'
db: "postgres"
type: 'functional'
- php: '8.0'
db: "postgres"
type: 'functional'
- php: '8.1'
db: "postgres"
type: 'functional'
- php: '8.2'
db: "postgres"
type: 'functional'
name: Windows - PHP ${{ matrix.php }} - ${{ matrix.db }}
name: Windows - PHP ${{ matrix.php }} - ${{ matrix.db }} - ${{ matrix.type }}
steps:
- name: Prepare git for Windows
@@ -519,22 +547,34 @@ jobs:
Set-ACL -Path "${env:TEMP_DIR}" -ACLObject $acl
cd ${env:GITHUB_WORKSPACE}\phpBB
php ..\composer.phar install
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
cd ..
- name: Setup database
run: |
$postgreSqlSvc = Get-Service "postgresql*"
Set-Service $postgreSqlSvc.Name -StartupType manual
$postgreSqlSvc.Start()
$runningStatus = [System.ServiceProcess.ServiceControllerStatus]::Running
$maxStartTimeout = New-TimeSpan -Seconds 30
try {
(Get-Service "postgresql*").Start()
$postgreSqlSvc.Start()
$postgreSqlSvc.WaitForStatus($runningStatus, $maxStartTimeout)
} catch {
$_ | select *
}
[System.Environment]::SetEnvironmentVariable('PATH',$Env:PATH+";${env:PGBIN}")
$env:PGPASSWORD = 'root'
psql -c 'ALTER SYSTEM SET hot_standby = on;' -U postgres
psql -c 'ALTER SYSTEM SET wal_level = minimal;' -U postgres
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
Set-MpPreference -ExclusionPath "${env:PGDATA}" # Exclude PGDATA directory from Windows Defender
Set-MpPreference -DisableRealtimeMonitoring $true
- name: Run unit tests
if: ${{ matrix.type == 'unit' }}
run: |
phpBB/vendor/bin/phpunit --configuration .github/phpunit-psql-windows-github.xml --verbose --stop-on-error
phpBB/vendor/bin/phpunit --configuration .github/phpunit-psql-windows-github.xml --verbose --stop-on-error --exclude-group functional
- name: Run unit tests
if: ${{ matrix.type == 'functional' }}
run: |
phpBB/vendor/bin/phpunit --configuration .github/phpunit-psql-windows-github.xml --verbose --stop-on-error --group functional

34
.gitignore vendored
View File

@@ -1,32 +1,54 @@
*~
/phpunit.xml
# Excludes cache
/phpBB/cache/*
!/phpBB/cache/.htaccess
!/phpBB/cache/index.html
/phpBB/composer.phar
# Excludes user data
/phpBB/config*.php*
/phpBB/ext/*
/phpBB/files/*
/phpBB/images/avatars/gallery/*
/phpBB/images/avatars/upload/*
/phpBB/images/ranks/*
/phpBB/install/schemas/schema.json
/phpBB/store/*
# Excludes all custom langages
/phpBB/language/*
!/phpBB/language/en
/phpBB/store/*
# Excludes all custom styles
/phpBB/styles/*
!/phpBB/styles/prosilver
/phpBB/styles/prosilver/theme/*/
!/phpBB/styles/prosilver/theme/en
!/phpBB/styles/prosilver/theme/images
!/phpBB/styles/all
node_modules
# Excludes all custom env
/phpBB/config/*
!/phpBB/config/default
!/phpBB/config/development
!/phpBB/config/installer
!/phpBB/config/production
!/phpBB/config/test
!/phpBB/config/.htaccess
# Excludes vendors
/phpBB/vendor
# Excludes test / dev files
/phpunit.xml
/phpBB/composer.phar
/tests/phpbb_unit_tests.sqlite*
/tests/test_config*.php
/tests/tmp/*
/tests/vendor
/vagrant/phpbb-install-config.yml
.vagrant
node_modules
# Excludes IDE / editors files
*~
.idea
*.DS_Store*
/.vscode

View File

@@ -1,4 +1,4 @@
[![phpBB](phpBB/styles/all/imgs/svg/phpbb_logo_large_cosmic.svg)](https://www.phpbb.com)
[<img src="phpBB/styles/all/imgs/svg/phpbb_logo_large_cosmic.svg" alt="phpBB" style="max-width:40%" width="400">](https://www.phpbb.com)
phpBB is a free open-source bulletin board written in 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.4" />
<property name="prevversion" value="3.3.3" />
<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, 3.3.2, 3.3.4-RC1" />
<property name="newversion" value="3.3.6" />
<property name="prevversion" value="3.3.5" />
<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, 3.3.2, 3.3.3, 3.3.4, 3.3.6-RC1" />
<!-- 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="php doctum.phar update build/doctum-checkout.conf.php"
command="./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="php doctum.phar update build/doctum-all.conf.php"
command="./doctum.phar update build/doctum-all.conf.php"
passthru="true" />
</target>

View File

@@ -38,6 +38,7 @@ else
$xml = simplexml_load_string(file_get_contents($url));
}
$types = [];
foreach ($xml->xpath('//item') as $item)
{
$key = (string) $item->key;
@@ -51,17 +52,20 @@ foreach ($xml->xpath('//item') as $item)
$types[(string) $item->type][$key] = $value;
}
ksort($types);
foreach ($types as $type => $tickets)
if (count($types))
{
echo "<h4>$type</h4>\n";
echo "<ul>\n";
uksort($tickets, 'strnatcasecmp');
foreach ($tickets as $ticket)
ksort($types);
foreach ($types as $type => $tickets)
{
echo "<li>$ticket</li>\n";
echo "<h4>$type</h4>\n";
echo "<ul>\n";
uksort($tickets, 'strnatcasecmp');
foreach ($tickets as $ticket)
{
echo "<li>$ticket</li>\n";
}
echo "</ul>\n";
}
echo "</ul>\n";
}

View File

@@ -0,0 +1,57 @@
<?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.
*
*/
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff;
/**
* Checks that the visibility qualifiers are placed after the static keyword
* according to the coding guidelines
*/
class phpbb_Sniffs_ControlStructures_StaticKeywordSniff implements Sniff
{
/**
* Registers the tokens that this sniff wants to listen for.
*/
public function register()
{
return [
T_STATIC,
];
}
/**
* Processes this test, when one of its tokens is encountered.
*
* @param File $phpcsFile The file being scanned.
* @param int $stackPtr The position of the current token in the stack passed in $tokens.
*
* @return void
*/
public function process(File $phpcsFile, $stackPtr)
{
$tokens = $phpcsFile->getTokens();
$disallowed_after_tokens = [
T_PUBLIC,
T_PROTECTED,
T_PRIVATE,
];
if (in_array($tokens[$stackPtr + 2]['code'], $disallowed_after_tokens))
{
$error = 'Access specifier (e.g. public) should not follow static scope attribute. Encountered "' . $tokens[$stackPtr + 2]['content'] . '" after static';
$phpcsFile->addWarning($error, $stackPtr, 'InvalidStaticFunctionDeclaration', [], 1);
}
}
}

View File

@@ -89,4 +89,7 @@
<!-- There MUST be one space between control structure and opening parenthesis -->
<rule ref="./phpbb/Sniffs/ControlStructures/OpeningParenthesisSniff.php" />
<!-- Static qualifier MUST be placed before the visibility qualifiers. -->
<rule ref="./phpbb/Sniffs/ControlStructures/StaticKeywordSniff.php" />
</ruleset>

Binary file not shown.

BIN
doctum.phar Normal file → Executable file

Binary file not shown.

View File

@@ -1,7 +1,7 @@
#!/bin/sh
#
# A hook to check syntax of a phpBB3 commit message, per:
# * <http://wiki.phpbb.com/display/DEV/Git>
# * <https://area51.phpbb.com/docs/dev/master/development/git.html>
# * <http://area51.phpbb.com/phpBB/viewtopic.php?p=209919#p209919>
#
# This is a commit-msg hook.

View File

@@ -29,7 +29,7 @@
<!-- BEGIN upload -->
:: {upload.FILE_INFO}<br />
<!-- IF upload.S_DENIED --><span class="error">{upload.DENIED}</span><!-- ELSEIF upload.ERROR_MSG --><span class="error">{upload.ERROR_MSG}</span><!-- ELSE --><span class="success">{L_SUCCESSFULLY_UPLOADED}</span><!-- ENDIF -->
<!-- IF upload.S_DENIED --><span class="error">{upload.L_DENIED}</span><!-- ELSEIF upload.ERROR_MSG --><span class="error">{upload.ERROR_MSG}</span><!-- ELSE --><span class="success">{L_SUCCESSFULLY_UPLOADED}</span><!-- ENDIF -->
<br /><br />
<!-- END upload -->

View File

@@ -31,11 +31,11 @@
</fieldset>
<fieldset>
<legend>{L_BBCODE_HELPLINE}</legend>
<p>{L_BBCODE_HELPLINE_EXPLAIN}</p>
<legend>{{ lang('BBCODE_HELPLINE') }}</legend>
<p>{{ lang('BBCODE_HELPLINE_EXPLAIN') }}</p>
<dl>
<dt><label for="bbcode_helpline">{L_BBCODE_HELPLINE_TEXT}</label></dt>
<dd><input type="text" id="bbcode_helpline" name="bbcode_helpline" size="60" maxlength="255" value="{BBCODE_HELPLINE}" /></dd>
<dt><label for="bbcode_helpline">{{ lang('BBCODE_HELPLINE_TEXT') }}</label></dt>
<dd><textarea id="bbcode_helpline" name="bbcode_helpline" cols="60" rows="4">{{ BBCODE_HELPLINE }}</textarea></dd>
</dl>
</fieldset>

View File

@@ -58,7 +58,6 @@
<dl>
<dt><label for="type">{L_BACKUP_TYPE}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="type" value="full" id="type" checked="checked" /> {L_FULL_BACKUP}</label>
<label><input type="radio" name="type" class="radio" value="structure" /> {L_STRUCTURE_ONLY}</label>
<label><input type="radio" class="radio" name="type" value="data" /> {L_DATA_ONLY}</label></dd>
</dl>
<dl>

View File

@@ -105,7 +105,7 @@
<!-- BEGIN items -->
<tr>
<td style="text-align: center;"><img src="{items.IMG_SRC}" alt="{items.TEXT_ALT}" title="{items.TEXT_ALT}" /><input type="hidden" name="image[{items.IMG}]" value="1" /></td>
<td style="text-align: center;"><img src="{items.IMG_SRC}" alt="{items.TEXT_ALT}" title="{items.TEXT_ALT}" style="max-width: 160px;"><input type="hidden" name="image[{items.IMG}]" value="1" /></td>
<td style="vertical-align: top;">[{items.IMG}]</td>
<!-- IF S_SMILIES -->
<td><input class="text post" type="text" name="code[{items.IMG}]" value="{items.CODE}" size="10" maxlength="50" /></td>

View File

@@ -45,7 +45,7 @@
</tr>
<!-- BEGINELSE -->
<tr>
<td colspan="6" style="text-align: center;">{L_NO_INACTIVE_USERS}</td>
<td colspan="7" style="text-align: center;">{L_NO_INACTIVE_USERS}</td>
</tr>
<!-- END inactive -->
</tbody>

View File

@@ -140,7 +140,6 @@
<td class="tabled"><strong>{{ PHP_VERSION_INFO }}</strong></td>
</tr>
<tr>
{% if S_TOTAL_ORPHAN %}
<td class="tabled">{{ lang('NUMBER_ORPHAN') ~ lang('COLON') }}</td>
<td class="tabled">
{% if TOTAL_ORPHAN > 0 %}
@@ -149,8 +148,6 @@
<strong>{{ TOTAL_ORPHAN }}</strong>
{% endif %}
</td>
{% else %}
{% endif %}
</tr>
{% if S_VERSIONCHECK %}
<tr>
@@ -204,10 +201,12 @@
<td class="tabled">{{ lang('FILES_PER_DAY') ~ lang('COLON') }}</td>
<td class="tabled"><strong>{{ FILES_PER_DAY }}</strong></td>
</tr>
{% if S_VERSIONCHECK %}
<tr>
<td class="tabled">&nbsp;</td>
<td class="tabled">&nbsp;</td>
</tr>
{% endif %}
</tbody>
</table>
</div>

View File

@@ -85,7 +85,7 @@
<!-- BEGIN ranks -->
<tr>
<!-- EVENT acp_ranks_list_column_before -->
<td style="text-align: center;"><!-- IF ranks.S_RANK_IMAGE --><img src="{ranks.RANK_IMAGE}" alt="{ranks.RANK_TITLE}" title="{ranks.RANK_TITLE}" /><!-- ELSE -->&nbsp; - &nbsp;<!-- ENDIF --></td>
<td style="text-align: center;"><!-- IF ranks.S_RANK_IMAGE --><img src="{ranks.RANK_IMAGE}" alt="{ranks.RANK_TITLE}" title="{ranks.RANK_TITLE}" style="max-width: 160px;"><!-- ELSE -->&nbsp; - &nbsp;<!-- ENDIF --></td>
<td style="text-align: center;">{ranks.RANK_TITLE}</td>
<td style="text-align: center;"><!-- IF ranks.S_SPECIAL_RANK -->&nbsp; - &nbsp;<!-- ELSE -->{ranks.MIN_POSTS}<!-- ENDIF --></td>
<!-- EVENT acp_ranks_list_column_after -->

View File

@@ -96,10 +96,10 @@
<thead>
<tr>
<th>{L_STYLE_NAME}</th>
<th width="10%" style="white-space: nowrap; text-align: center;">{{ lang('STYLE_VERSION') }}</th>
<th width="10%" style="white-space: nowrap; text-align: center;">{L_STYLE_PHPBB_VERSION}</th>
<!-- IF not STYLES_LIST_HIDE_COUNT --><th width="10%" style="white-space: nowrap; text-align: center;">{L_STYLE_USED_BY}</th><!-- ENDIF -->
<th width="25%" style="white-space: nowrap; text-align: center;">{L_ACTIONS}</th>
<th style="width: 10%; white-space: nowrap; text-align: center;">{{ lang('STYLE_VERSION') }}</th>
<th style="width: 10%; white-space: nowrap; text-align: center;">{L_STYLE_PHPBB_VERSION}</th>
<!-- IF not STYLES_LIST_HIDE_COUNT --><th style="width: 10%; white-space: nowrap; text-align: center;">{L_STYLE_USED_BY}</th><!-- ENDIF -->
<th style="width: 25%; white-space: nowrap; text-align: center;">{L_ACTIONS}</th>
{STYLES_LIST_EXTRA}
<th>&nbsp;</th>
</tr>
@@ -146,7 +146,7 @@
<!-- END actions -->
</td>
{styles_list.EXTRA}
<td class="{$ROW_CLASS} mark" width="20">
<td class="{$ROW_CLASS} mark" style="width: 20px;">
<!-- IF styles_list.STYLE_ID -->
{% if styles_list.STYLE_NAME !== 'prosilver' %}
<input class="checkbox" type="checkbox" name="ids[]" value="{styles_list.STYLE_ID}" />

View File

@@ -2,7 +2,6 @@
<a id="maincontent"></a>
<a href="<!-- IF U_LIST -->{U_LIST}<!-- ELSE -->{U_ACTION}<!-- ENDIF -->" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
<h1>{L_QUESTIONS}</h1>
@@ -25,15 +24,18 @@
<td style="vertical-align: top; width: 50px; text-align: center; white-space: nowrap;">{L_ACTION}</td>
</tr>
</thead>
<tbody>
<!-- BEGIN questions -->
<tr>
<td style="text-align: left;">{questions.QUESTION_TEXT}</td>
<td style="text-align: center;">{questions.QUESTION_LANG}</td>
<td style="text-align: center;"><a href="{questions.U_EDIT}">{ICON_EDIT}</a>&nbsp;<a href="{questions.U_DELETE}">{ICON_DELETE}</a></td>
</tr>
<!-- END questions -->
{% for question in questions %}
<tr>
{# RTL is already managed by CSS #}
<td>{{ question.QUESTION_TEXT }}</td>
<td style="text-align: center;">{{ question.QUESTION_LANG }}</td>
<td style="text-align: center;"><a href="{{ question.U_EDIT }}">{{ ICON_EDIT }}</a> <a href="{{ question.U_DELETE }}">{{ ICON_DELETE }}</a></td>
</tr>
{% endfor %}
</tbody>
</table>
<fieldset class="quick">
<input class="button1" type="submit" name="add" value="{L_ADD}" />

View File

@@ -23,7 +23,7 @@ installLang = {
</script>
<script src="{T_JQUERY_LINK}"></script>
<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery-3.5.1.min.js">\x3C/script>');</script><!-- ENDIF -->
<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery-3.6.0.min.js">\x3C/script>');</script><!-- ENDIF -->
<script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
<!-- INCLUDEJS admin.js -->
{$SCRIPTS}

View File

@@ -24,7 +24,7 @@
<div id="phpbb_alert" class="phpbb_alert" data-l-err="{L_ERROR}" data-l-timeout-processing-req="{L_TIMEOUT_PROCESSING_REQ}">
<a href="#" class="alert_close"></a>
<h3 class="alert_title"></h3><p class="alert_text"></p>
<h3 class="alert_title">&nbsp;</h3><p class="alert_text"></p>
</div>
<div id="phpbb_confirm" class="phpbb_alert">
<a href="#" class="alert_close"></a>
@@ -34,7 +34,7 @@
</div>
<script src="{T_JQUERY_LINK}"></script>
<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery-3.5.1.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery-3.6.0.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
<script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
<!-- INCLUDEJS ajax.js -->
<!-- INCLUDEJS admin.js -->

View File

@@ -12,10 +12,10 @@
<script>
// <![CDATA[
var jump_page = '{LA_JUMP_PAGE}{L_COLON}';
var on_page = '{CURRENT_PAGE}';
var per_page = '{PER_PAGE}';
var base_url = '{BASE_URL|e('js')}';
var jump_page = "{{ lang_js('JUMP_PAGE') ~ lang_js('COLON') }}";
var on_page = '{{ CURRENT_PAGE }}';
var per_page = '{{ PER_PAGE }}';
var base_url = "{{ BASE_URL|e('js') }}";
/**
* Jump to page

View File

@@ -17,7 +17,7 @@
</div>
<script src="{T_JQUERY_LINK}"></script>
<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery-3.5.1.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery-3.6.0.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
<script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
<!-- EVENT acp_simple_footer_after -->

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -96,6 +96,8 @@ include($phpbb_root_path . 'includes/functions_compatibility.' . $phpEx);
require($phpbb_root_path . 'includes/constants.' . $phpEx);
require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
// Registered before building the container so the development environment stay capable of intercepting
// the container builder exceptions.
if (PHPBB_ENVIRONMENT === 'development')
{
\phpbb\debug\debug::enable();
@@ -129,6 +131,11 @@ catch (InvalidArgumentException $e)
}
}
if ($phpbb_container->getParameter('debug.error_handler'))
{
\phpbb\debug\debug::enable();
}
$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
$phpbb_class_loader_ext->set_cache($phpbb_container->get('cache.driver'));

View File

@@ -15,8 +15,9 @@
"support": {
"issues": "https://tracker.phpbb.com",
"forum": "https://www.phpbb.com/community/",
"wiki": "https://wiki.phpbb.com",
"irc": "irc://irc.freenode.org/phpbb"
"docs": "https://www.phpbb.com/support/docs/",
"irc": "irc://irc.libera.chat/phpbb",
"chat": "https://www.phpbb.com/support/chat/"
},
"scripts": {
"post-update-cmd": "echo 'You MUST manually modify the clean-vendor-dir target in build/build.xml when adding or upgrading dependencies.'"
@@ -34,7 +35,6 @@
"guzzlehttp/guzzle": "~6.3",
"lusitanian/oauth": "^0.8.1",
"marc1706/fast-image-size": "^1.1",
"patchwork/utf8": "^1.1",
"s9e/text-formatter": "^2.0",
"symfony/config": "~3.4",
"symfony/console": "~3.4",
@@ -45,6 +45,9 @@
"symfony/finder": "~3.4",
"symfony/http-foundation": "~3.4",
"symfony/http-kernel": "~3.4",
"symfony/polyfill-intl-normalizer": "^1.23",
"symfony/polyfill-mbstring": "^1.23",
"symfony/polyfill-php72": "^1.23",
"symfony/process": "^3.4",
"symfony/proxy-manager-bridge": "~3.4",
"symfony/routing": "~3.4",

448
phpBB/composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -11,6 +11,7 @@ core:
sql_explain: true
memory: true
show_errors: true
error_handler: true
twig:
debug: true

View File

@@ -0,0 +1,126 @@
<?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.
*
*/
if (php_sapi_name() != 'cli')
{
die("This program must be run from the command line.\n");
}
$phpEx = substr(strrchr(__FILE__, '.'), 1);
$phpbb_root_path = __DIR__ . '/../';
define('IN_PHPBB', true);
function usage()
{
echo "Usage: export_events_for_bbcode.php COMMAND [VERSION] [EXTENSION]\n";
echo "\n";
echo "COMMAND:\n";
echo " diff:\n";
echo " Generate the Event Diff for the release highlights\n";
echo "\n";
echo " php:\n";
echo " Generate the PHP event section of Event_List\n";
echo "\n";
echo " adm:\n";
echo " Generate the ACP Template event section of Event_List\n";
echo "\n";
echo " styles:\n";
echo " Generate the Styles Template event section of Event_List\n";
echo "\n";
echo "VERSION (diff only):\n";
echo " Filter events (minimum version)\n";
echo "\n";
echo "EXTENSION (Optional):\n";
echo " If not given, only core events will be exported.\n";
echo " Otherwise only events from the extension will be exported.\n";
echo "\n";
exit(2);
}
function validate_argument_count($arguments, $count)
{
if ($arguments <= $count)
{
usage();
}
}
validate_argument_count($argc, 1);
$action = $argv[1];
$extension = isset($argv[2]) ? $argv[2] : null;
$min_version = null;
require __DIR__ . '/../phpbb/event/php_exporter.' . $phpEx;
require __DIR__ . '/../phpbb/event/md_exporter.' . $phpEx;
require __DIR__ . '/../phpbb/event/rst_exporter.' . $phpEx;
require __DIR__ . '/../includes/functions.' . $phpEx;
require __DIR__ . '/../phpbb/event/recursive_event_filter_iterator.' . $phpEx;
require __DIR__ . '/../phpbb/recursive_dot_prefix_filter_iterator.' . $phpEx;
switch ($action)
{
case 'diff':
echo "[size=200]Event changes[/size]\n\n";
$min_version = $extension;
$extension = isset($argv[3]) ? $argv[3] : null;
case 'php':
$exporter = new \phpbb\event\php_exporter($phpbb_root_path, $extension, $min_version);
$exporter->crawl_phpbb_directory_php();
echo $exporter->export_events_for_bbcode($action);
if ($action === 'php')
{
break;
}
echo "\n\n";
// no break;
case 'styles':
$exporter = new \phpbb\event\md_exporter($phpbb_root_path, $extension, $min_version);
if ($min_version && $action === 'diff')
{
$exporter->crawl_eventsmd('docs/events.md', 'styles');
}
else
{
$exporter->crawl_phpbb_directory_styles('docs/events.md');
}
echo $exporter->export_events_for_bbcode($action);
if ($action === 'styles')
{
break;
}
echo "\n\n";
// no break;
case 'adm':
$exporter = new \phpbb\event\md_exporter($phpbb_root_path, $extension, $min_version);
if ($min_version && $action === 'diff')
{
$exporter->crawl_eventsmd('docs/events.md', 'adm');
}
else
{
$exporter->crawl_phpbb_directory_adm('docs/events.md');
}
echo $exporter->export_events_for_bbcode($action);
echo "\n";
break;
default:
usage();
}

View File

@@ -0,0 +1,140 @@
<?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.
*
*/
if (php_sapi_name() != 'cli')
{
die("This program must be run from the command line.\n");
}
$phpEx = substr(strrchr(__FILE__, '.'), 1);
$phpbb_root_path = __DIR__ . '/../';
define('IN_PHPBB', true);
function usage()
{
echo "Usage: export_events_for_rst.php COMMAND [VERSION] [EXTENSION]\n";
echo "\n";
echo "COMMAND:\n";
echo " all:\n";
echo " Generate the complete rst for the Event List\n";
echo "\n";
echo " diff:\n";
echo " Generate the Event Diff for the release highlights\n";
echo "\n";
echo " php:\n";
echo " Generate the PHP event section of Event_List\n";
echo "\n";
echo " adm:\n";
echo " Generate the ACP Template event section of Event_List\n";
echo "\n";
echo " styles:\n";
echo " Generate the Styles Template event section of Event_List\n";
echo "\n";
echo "VERSION (diff only):\n";
echo " Filter events (minimum version)\n";
echo "\n";
echo "EXTENSION (Optional):\n";
echo " If not given, only core events will be exported.\n";
echo " Otherwise only events from the extension will be exported.\n";
echo "\n";
exit(2);
}
function validate_argument_count($arguments, $count)
{
if ($arguments <= $count)
{
usage();
}
}
validate_argument_count($argc, 1);
$action = $argv[1];
$extension = isset($argv[2]) ? $argv[2] : null;
$min_version = null;
require __DIR__ . '/../phpbb/event/php_exporter.' . $phpEx;
require __DIR__ . '/../phpbb/event/md_exporter.' . $phpEx;
require __DIR__ . '/../phpbb/event/rst_exporter.' . $phpEx;
require __DIR__ . '/../includes/functions.' . $phpEx;
require __DIR__ . '/../phpbb/event/recursive_event_filter_iterator.' . $phpEx;
require __DIR__ . '/../phpbb/recursive_dot_prefix_filter_iterator.' . $phpEx;
switch ($action)
{
case 'diff':
echo '== Event changes ==' . "\n";
echo "Event changes\n";
echo "=============\n\n";
$min_version = $extension;
$extension = isset($argv[3]) ? $argv[3] : null;
case 'all':
if ($action === 'all')
{
echo "==========================\n";
echo "Events List\n";
echo "==========================\n\n";
}
case 'php':
$exporter = new \phpbb\event\php_exporter($phpbb_root_path, $extension, $min_version);
$exporter->crawl_phpbb_directory_php();
echo $exporter->export_events_for_rst($action);
if ($action === 'php')
{
break;
}
echo "\n\n";
// no break;
case 'styles':
$exporter = new \phpbb\event\md_exporter($phpbb_root_path, $extension, $min_version);
if ($min_version && $action === 'diff')
{
$exporter->crawl_eventsmd('docs/events.md', 'styles');
}
else
{
$exporter->crawl_phpbb_directory_styles('docs/events.md');
}
echo $exporter->export_events_for_rst($action);
if ($action === 'styles')
{
break;
}
echo "\n\n";
// no break;
case 'adm':
$exporter = new \phpbb\event\md_exporter($phpbb_root_path, $extension, $min_version);
if ($min_version && $action === 'diff')
{
$exporter->crawl_eventsmd('docs/events.md', 'adm');
}
else
{
$exporter->crawl_phpbb_directory_adm('docs/events.md');
}
echo $exporter->export_events_for_rst($action);
echo "\n";
break;
default:
usage();
}

View File

@@ -2,7 +2,7 @@
/**
* Rebuild BOTS
*
* You should make a backup from your whole database. Things can and will go wrong.
* You should make a backup from your whole database. Things can and will go wrong.
* This will only work if no BOTs were added.
*
*/
@@ -24,10 +24,14 @@ $user->setup();
$bots = array(
'AdsBot [Google]' => array('AdsBot-Google', ''),
'Ahrefs [Bot]' => array('AhrefsBot/', ''),
'Alexa [Bot]' => array('ia_archiver', ''),
'Alta Vista [Bot]' => array('Scooter/', ''),
'Amazon [Bot]' => array('Amazonbot/', ''),
'Ask Jeeves [Bot]' => array('Ask Jeeves', ''),
'Baidu [Spider]' => array('Baiduspider+(', ''),
'Baidu [Spider]' => array('Baiduspider', ''),
'Bing [Bot]' => array('bingbot/', ''),
'DuckDuckGo [Bot]' => array('DuckDuckBot/', ''),
'Exabot [Bot]' => array('Exabot/', ''),
'FAST Enterprise [Crawler]' => array('FAST Enterprise Crawler', ''),
'FAST WebCrawler [Crawler]' => array('FAST-WebCrawler/', ''),
@@ -41,7 +45,7 @@ $bots = array(
'Heritrix [Crawler]' => array('heritrix/1.', ''),
'IBM Research [Bot]' => array('ibm.com/cs/crawler', ''),
'ICCrawler - ICjobs' => array('ICCrawler - ICjobs', ''),
'ichiro [Crawler]' => array('ichiro/2', ''),
'ichiro [Crawler]' => array('ichiro/', ''),
'Majestic-12 [Bot]' => array('MJ12bot/', ''),
'Metager [Bot]' => array('MetagerBot/', ''),
'MSN NewsBlogs' => array('msnbot-NewsBlogs/', ''),
@@ -54,6 +58,7 @@ $bots = array(
'Online link [Validator]' => array('online link validator', ''),
'psbot [Picsearch]' => array('psbot/0', ''),
'Seekport [Bot]' => array('Seekbot/', ''),
'Semrush [Bot]' => array('SemrushBot/', ''),
'Sensis [Crawler]' => array('Sensis Web Crawler', ''),
'SEO Crawler' => array('SEO search Crawler/', ''),
'Seoma [Crawler]' => array('Seoma [SEO Crawler]', ''),
@@ -63,7 +68,7 @@ $bots = array(
'Synoo [Bot]' => array('SynooBot/', ''),
'Telekom [Bot]' => array('crawleradmin.t-info@telekom.de', ''),
'TurnitinBot [Bot]' => array('TurnitinBot/', ''),
'Voyager [Bot]' => array('voyager/1.0', ''),
'Voyager [Bot]' => array('voyager/', ''),
'W3 [Sitesearch]' => array('W3 SiteSearch Crawler', ''),
'W3C [Linkcheck]' => array('W3C-checklink/', ''),
'W3C [Validator]' => array('W3C_*Validator', ''),
@@ -74,7 +79,7 @@ $bots = array(
'Yahoo [Bot]' => array('Yahoo! Slurp', ''),
'YahooSeeker [Bot]' => array('YahooSeeker/', ''),
);
$bot_ids = array();
user_get_id_name($bot_ids, array_keys($bots), USER_IGNORE);
foreach($bot_ids as $bot)

View File

@@ -50,6 +50,10 @@
<ol>
<li><a href="#changelog">Changelog</a>
<ul>
<li><a href="#v336rc1">Changes since 3.3.6-RC1</a></li>
<li><a href="#v335">Changes since 3.3.5</a></li>
<li><a href="#v335rc1">Changes since 3.3.5-RC1</a></li>
<li><a href="#v334">Changes since 3.3.4</a></li>
<li><a href="#v334rc1">Changes since 3.3.4-RC1</a></li>
<li><a href="#v333">Changes since 3.3.3</a></li>
<li><a href="#v332">Changes since 3.3.2</a></li>
@@ -156,6 +160,144 @@
<div class="inner">
<div class="content">
<a name="v336rc1"></a><h3>Changes since 3.3.6-RC1</h3>
<h4>Bug</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16872">PHPBB3-16872</a>] - Create event exporter to BBCode</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16956">PHPBB3-16956</a>] - White screen after disable extention</li>
</ul>
<h4>Improvement</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-15028">PHPBB3-15028</a>] - Change update instructions in ACP</li>
</ul>
<h4>Task</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16964">PHPBB3-16964</a>] - Update composer and composer dependencies to latest versions</li>
</ul>
<h4>Hardening</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/SECURITY-272">SECURITY-272</a>] - Use longer random string for activation key</li>
<li>[<a href="https://tracker.phpbb.com/browse/SECURITY-273">SECURITY-273</a>] - Reset reset token info when re-activating account</li>
</ul>
<a name="v335"></a><h3>Changes since 3.3.5</h3>
<h4>Bug</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16881">PHPBB3-16881</a>] - Fix ACP Statistic Table</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16883">PHPBB3-16883</a>] - Check if var is array before using count in installer diff</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16887">PHPBB3-16887</a>] - Update required PHP version</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16889">PHPBB3-16889</a>] - Postgres on windows builds keep failing</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16892">PHPBB3-16892</a>] - Duplicate entry for jav files in extension guesser</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16895">PHPBB3-16895</a>] - 'Permission' migration tool incorrectly handles role removal</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16897">PHPBB3-16897</a>] - sqlite3 drivers generates warnings when executing an explain query plan that fails</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16900">PHPBB3-16900</a>] - Invalid email subject header on long topic titles</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16904">PHPBB3-16904</a>] - Regression for topic selection in MCP in 3.3.5</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16908">PHPBB3-16908</a>] - PHP warning on non-existent post id requests</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16910">PHPBB3-16910</a>] - PHP warning if trying to attach orphaned files to non existent posts</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16914">PHPBB3-16914</a>] - Missing id in memberlist email template</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16924">PHPBB3-16924</a>] - Double escaping of config values inserted with db config</li>
</ul>
<h4>Improvement</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-13508">PHPBB3-13508</a>] - Support using INCLUDEJS and INCLUDECSS in twig template format</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16828">PHPBB3-16828</a>] - Add hook event before find_users_for_notification() execute</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16859">PHPBB3-16859</a>] - Language selection option is displayed on register if only 1 language is installed</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16885">PHPBB3-16885</a>] - Add filters to Twig - INT and FLOAT</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16888">PHPBB3-16888</a>] - Add the list of allowed attachment types using accept attribute </li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16896">PHPBB3-16896</a>] - Improve .gitignore visibility</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16898">PHPBB3-16898</a>] - Do not restrict the debug error handler to the development environment</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16899">PHPBB3-16899</a>] - Add SVG and WEBP image type to ranks, smilies and topic icons</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16902">PHPBB3-16902</a>] - Improve search results count for MySQL</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16909">PHPBB3-16909</a>] - Add PHP 8.2 builds to test matrix</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16912">PHPBB3-16912</a>] - Improve mail encoding to better match RFC 2047</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16921">PHPBB3-16921</a>] - Increase PHP requirements in the DOCS</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16930">PHPBB3-16930</a>] - Remove redundant topic ID from last post URL</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16933">PHPBB3-16933</a>] - Inconsistent handling of hyphen by phpBB Native search backend</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16939">PHPBB3-16939</a>] - Wait for postgres service to start in GitHub Actions windows builds</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16940">PHPBB3-16940</a>] - Optimize phpBB Native Search</li>
</ul>
<h4>Task</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16927">PHPBB3-16927</a>] - Update plupload to latest version</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16928">PHPBB3-16928</a>] - Update composer and composer dependencies to latest versions</li>
</ul>
<a name="v335rc1"></a><h3>Changes since 3.3.5-RC1</h3>
<h4>Bug</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16878">PHPBB3-16878</a>] - Error in password_hash() with ARGON2 + Sodium &amp; threadcount &gt; 1</li>
</ul>
<h4>Hardening</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/SECURITY-254">SECURITY-254</a>] - Disallow whitespace characters that might be invisible</li>
</ul>
<a name="v334"></a><h3>Changes since 3.3.4</h3>
<h4>Bug</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-12075">PHPBB3-12075</a>] - Language file Modules needs to be added to acp_extensions</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-13700">PHPBB3-13700</a>] - Column 'field_show_on_pm' not created before migration profilefield_interests</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16292">PHPBB3-16292</a>] - Database errors during conversion not propagated</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16570">PHPBB3-16570</a>] - Automatic updater no longer handles merge conflicts</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16657">PHPBB3-16657</a>] - Encoded characters inserted from live search for usernames</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16729">PHPBB3-16729</a>] - Unknown named parameter $log_data in phpbb/log/log.php</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16730">PHPBB3-16730</a>] - Build changelog throwing PHP warnings on no changes in version</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16749">PHPBB3-16749</a>] - SQL error on installation</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16757">PHPBB3-16757</a>] - RTL problem in random question text in ACP</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16765">PHPBB3-16765</a>] - contact_admin_acp_module migration lacks effectively_installed check</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16766">PHPBB3-16766</a>] - Updater only shows truncated error messages</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16767">PHPBB3-16767</a>] - Migrator shows wrong migration as missing if unfulfillable</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16770">PHPBB3-16770</a>] - Invalid position of static qualifier in 3.3.4 migration</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16772">PHPBB3-16772</a>] - Emoji not supported in email signature</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16773">PHPBB3-16773</a>] - PostgreSQL backups are missing constraint declarations</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16784">PHPBB3-16784</a>] - Ignore .vscode files in git</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16785">PHPBB3-16785</a>] - Latest release missing from previous versions in build.xml</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16787">PHPBB3-16787</a>] - Error message when &quot;fsockopen&quot; is deactivated</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16789">PHPBB3-16789</a>] - user_delete documentation incorrect</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16793">PHPBB3-16793</a>] - PHP Warning when checking topic/post attachment visibility in PHP 8</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16799">PHPBB3-16799</a>] - OAuth external account linking triggers fatal error on PHP 8</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16808">PHPBB3-16808</a>] - Container used before initialization causes error in PHP8</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16810">PHPBB3-16810</a>] - The no closing tag in Custom BBCodes is still shown onclick</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16812">PHPBB3-16812</a>] - login_body.html missing dt tag for autologin</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16823">PHPBB3-16823</a>] - Datetime class incorrectly handles edge yesterday/today/tomorrow cases</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16832">PHPBB3-16832</a>] - Wrong singular language shown in UCP attachments</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16865">PHPBB3-16865</a>] - Update IRC + discord links in composer and documentation and update docs</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16870">PHPBB3-16870</a>] - Setting float config value can fail with CLI db:migrate</li>
</ul>
<h4>Improvement</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-15729">PHPBB3-15729</a>] - Don't unnecessarily encode email headers in Base64</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-15925">PHPBB3-15925</a>] - Add core events for sync and mcp functions</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16138">PHPBB3-16138</a>] - Eliminate redundant f= and t= parameters from board urls</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16736">PHPBB3-16736</a>] - Enforce placement of visibility qualifiers after static</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16748">PHPBB3-16748</a>] - Update coding guidelines to place static after visibility qualifiers</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16752">PHPBB3-16752</a>] - Create event exporter to restructured text</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16754">PHPBB3-16754</a>] - Update doctum</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16771">PHPBB3-16771</a>] - Add core events to MCP</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16783">PHPBB3-16783</a>] - Remove structure only backup</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16788">PHPBB3-16788</a>] - Update s9e/text-formatter to latest</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16795">PHPBB3-16795</a>] - Add template events around signature in viewtopic</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16798">PHPBB3-16798</a>] - Scale down phpBB logo in readme</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16804">PHPBB3-16804</a>] - Extend bbcode help line tooltip</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16809">PHPBB3-16809</a>] - Reset UCP preferences at end of test</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16816">PHPBB3-16816</a>] - acp style html validation fixes</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16822">PHPBB3-16822</a>] - Replace patchwork/utf8 with symfony/polyfill</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16829">PHPBB3-16829</a>] - Add forumtitle and lastsubject text decoration hover</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16831">PHPBB3-16831</a>] - fix tabs missing delimiters and remove old commented classes</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16850">PHPBB3-16850</a>] - Update webfont.js to latest</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16851">PHPBB3-16851</a>] - Add Amazonbot, AhrefsBot and SemrushBot</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16858">PHPBB3-16858</a>] - Update to the latest version of jQuery 3.6.0</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16867">PHPBB3-16867</a>] - Update symfony and text-formatter to latest versions</li>
</ul>
<h4>New Feature</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16856">PHPBB3-16856</a>] - Add lang_js() function to twig as replacement for LA_</li>
</ul>
<h4>Task</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16769">PHPBB3-16769</a>] - Update composer to latest version</li>
</ul>
<a name="v334rc1"></a><h3>Changes since 3.3.4-RC1</h3>
<h4>Bug</h4>
<ul>

View File

@@ -64,7 +64,7 @@
<li><a href="#update_full">Full package</a></li>
<li><a href="#update_files">Changed files</a></li>
<li><a href="#update_patch">Patch file</a></li>
<li><a href="#update_auto">Automatic update package</a></li>
<li><a href="#update_advanced">Advanced update package</a></li>
<li><a href="#update_all">All package types</a></li>
</ol>
</li>
@@ -147,7 +147,7 @@
<li>Oracle</li>
</ul>
</li>
<li><strong>PHP 7.1.3+</strong> up to and including <strong>PHP 7.4</strong> with support for the database you intend to use.</li>
<li><strong>PHP 7.1.3+</strong> up to and including <strong>PHP 8.1</strong> with support for the database you intend to use.</li>
<li>The following PHP modules are required:
<ul>
<li>json</li>
@@ -291,7 +291,7 @@
<p>The patch file package is for those wanting to update through the patch application, and should only be used by those who are comfortable with it.</p>
<p>The patch file is one solution for those with changes in to the phpBB core files and do not want to re-add them back to all the changed files. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application, but still want to use this update approach, we strongly recommend the <a href="#update_auto">Automatic update package</a> explained below. It is also the recommended update method.</p>
<p>The patch file is one solution for those with changes in to the phpBB core files and do not want to re-add them back to all the changed files. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application, but still want to use this update approach, we strongly recommend the <a href="#update_full">Full package update</a> explained above. It is also the recommended update method.</p>
<p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is <strong>3.3.0</strong>, you need the <code>phpBB-3.3.1-patch.zip/tar.bz2</code> file. Place the correct patch in the parent directory containing the phpBB core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <code>patch -cl -d [PHPBB DIRECTORY] -p1 &lt; [PATCH NAME]</code> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
@@ -299,11 +299,13 @@
<p>You should, of course, delete the patch file (or files) after use. As for the other update procedures, you should navigate to <code>/install/app.php/update</code>, select "Update database only" and submit the page after you have finished updating the files. This will update your database schema and data (if appropriate) and increment the version number. If you have shell access to your server, you may wish to update via the command line interface. From your board's root, execute the following command: <code>php bin/phpbbcli.php --safe-mode db:migrate</code>.</p>
<a name="update_auto"></a><h3>4.iv. Automatic update package</h3>
<a name="update_advanced"></a><h3>4.iv. Advanced update package (Expert users)</h3>
<p>This update method is only recommended for installations with modifications to core phpBB files. This package detects changed files automatically and merges in changes if needed.</p>
<p>This update method should only be used for installations with modifications to core phpBB files. If you simply use Extensions or custom Styles and have not modified core files, please use the Full Package update.</p>
<p>The automatic update package will update the board from a given version to the latest version. A number of automatic update files are available, and you should choose the one that corresponds to the version of the board that you are currently running. For example, if your current version is <strong>3.3.0</strong>, you need the <code>phpBB-3.3.0_to_3.3.1.zip/tar.bz2</code> file.</p>
<p>This package detects changed files and merges in changes if needed. Since this type of update has a potential to cause issues while upgrading, it should only be used by expert users.</p>
<p>The advanced update package will update the board from a given version to the latest version. A number of advanced update files are available, and you should choose the one that corresponds to the version of the board that you are currently running. For example, if your current version is <strong>3.3.0</strong>, you need the <code>phpBB-3.3.0_to_3.3.1.zip/tar.bz2</code> file.</p>
<p>To perform the update, either follow the instructions from the <strong>Administration Control Panel-&gt;System</strong> Tab - this should point out that you are running an outdated version and will guide you through the update - or follow the instructions listed below.</p>

View File

@@ -104,7 +104,7 @@
<ul>
<li>Updates from phpBB 3.0 RC1, 3.1 RC1 and 3.2 RC1 to the latest version</li>
<li>Note: if using the <em>Automatic Update Package</em>, updates are supported from phpBB 3.0.2 onward. To update a pre-3.0.2 installation, first update to 3.0.2 and then update to the current version.</li>
<li>Note: if using the <em>Advanced Update Package</em>, updates are supported from phpBB 3.0.2 onward. To update a pre-3.0.2 installation, first update to 3.0.2 and then update to the current version.</li>
<li>Conversions from phpBB 2.0.x to the latest version</li>
<li>New installations of phpBB 3.2.x - only the latest released version</li>
<li>New installations of phpBB 3.3.x - only the latest released version</li>
@@ -204,7 +204,7 @@
<a name="irc"></a><h3>3.iv Internet Relay Chat</h3>
<p>Another place you may find help is our IRC channel. This operates on the Freenode IRC network, <a href="irc://irc.freenode.net">irc.freenode.net</a> and the channel is <em>#phpbb</em> and can be accessed by any decent IRC client such as mIRC, XChat, etc. Again, please do not abuse this service and be respectful of other users.</p>
<p>Another place you may find help is our IRC channel. This operates on the Libera IRC network, <a href="irc://irc.libera.chat">irc.libera.chat</a> and the channel is <em>#phpbb</em> and can be accessed by any decent IRC client such as mIRC, XChat, etc. Again, please do not abuse this service and be respectful of other users.</p>
<p>There are other IRC channels available, please see <a href="https://www.phpbb.com/support/irc/">https://www.phpbb.com/support/irc/</a> for the complete list.</p>

View File

@@ -718,18 +718,18 @@ switch ($mode)
<h4>Class Members</h4>
<p>Use the explicit visibility qualifiers <code>public</code>, <code>private</code> and <code>protected</code> for all properties instead of <code>var</code>.
<p>Place the <code>static</code> qualifier before the visibility qualifiers.</p>
<p>Place the <code>static</code> qualifier after the visibility qualifiers.</p>
<p class="bad">//Wrong </p>
<div class="codebox"><pre>
var $x;
private static function f()</pre>
static private function f()</pre>
</div>
<p class="good">// Right </p>
<div class="codebox"><pre>
public $x;
static private function f()</pre>
private static function f()</pre>
</div>
<h4>Constants</h4>

View File

@@ -3359,6 +3359,20 @@ viewtopic_body_postrow_rank_before
* Purpose: Add data before the rank on the user profile when viewing
a post
viewtopic_body_postrow_signature_after
===
* Locations:
+ styles/prosilver/template/viewtopic_body.html
* Since: 3.3.5-RC1
* Purpose: Add content after the signature
viewtopic_body_postrow_signature_before
===
* Locations:
+ styles/prosilver/template/viewtopic_body.html
* Since: 3.3.5-RC1
* Purpose: Add content before the signature
viewtopic_body_topic_actions_before
===
* Locations:

View File

@@ -220,7 +220,7 @@ else
{
phpbb_download_handle_forum_auth($db, $auth, $attachment['topic_id']);
$sql = 'SELECT forum_id, post_visibility
$sql = 'SELECT forum_id, poster_id, post_visibility
FROM ' . POSTS_TABLE . '
WHERE post_id = ' . (int) $attachment['post_msg_id'];
$result = $db->sql_query($sql);

View File

@@ -1000,29 +1000,45 @@ class acp_attachments
$result = $db->sql_query($sql);
$files_added = $space_taken = 0;
$error_msg = '';
$upload_row = [];
while ($row = $db->sql_fetchrow($result))
{
$post_row = $post_info[$upload_list[$row['attach_id']]];
$upload_row = [
'FILE_INFO' => $user->lang('UPLOADING_FILE_TO', $row['real_filename'], $upload_list[$row['attach_id']]),
];
$template->assign_block_vars('upload', array(
'FILE_INFO' => sprintf($user->lang['UPLOADING_FILE_TO'], $row['real_filename'], $post_row['post_id']),
'S_DENIED' => (!$auth->acl_get('f_attach', $post_row['forum_id'])) ? true : false,
'L_DENIED' => (!$auth->acl_get('f_attach', $post_row['forum_id'])) ? sprintf($user->lang['UPLOAD_DENIED_FORUM'], $forum_names[$row['forum_id']]) : '')
);
if (isset($post_info[$upload_list[$row['attach_id']]]))
{
$post_row = $post_info[$upload_list[$row['attach_id']]];
$upload_row = array_merge($upload_row, [
'S_DENIED' => !$auth->acl_get('f_attach', $post_row['forum_id']),
'L_DENIED' => !$auth->acl_get('f_attach', $post_row['forum_id']) ? $user->lang('UPLOAD_DENIED_FORUM', $forum_names[$row['forum_id']]) : '',
]);
}
else
{
$error_msg = $user->lang('UPLOAD_POST_NOT_EXIST', $row['real_filename'], $upload_list[$row['attach_id']]);
$upload_row = array_merge($upload_row, [
'ERROR_MSG' => $error_msg,
]);
};
if (!$auth->acl_get('f_attach', $post_row['forum_id']))
$template->assign_block_vars('upload', $upload_row);
if ($error_msg || !$auth->acl_get('f_attach', $post_row['forum_id']))
{
continue;
}
// Adjust attachment entry
$sql_ary = array(
$sql_ary = [
'in_message' => 0,
'is_orphan' => 0,
'poster_id' => $post_row['poster_id'],
'post_msg_id' => $post_row['post_id'],
'topic_id' => $post_row['topic_id'],
);
];
$sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
@@ -1042,7 +1058,7 @@ class acp_attachments
$space_taken += $row['filesize'];
$files_added++;
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTACH_FILEUPLOAD', false, array($post_row['post_id'], $row['real_filename']));
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTACH_FILEUPLOAD', false, [$post_row['post_id'], $row['real_filename']]);
}
$db->sql_freeresult($result);
@@ -1054,9 +1070,9 @@ class acp_attachments
}
}
$template->assign_vars(array(
'S_ORPHAN' => true)
);
$template->assign_vars([
'S_ORPHAN' => true,
]);
$attachments_per_page = (int) $config['topics_per_page'];
@@ -1084,15 +1100,15 @@ class acp_attachments
while ($row = $db->sql_fetchrow($result))
{
$template->assign_block_vars('orphan', array(
$template->assign_block_vars('orphan', [
'FILESIZE' => get_formatted_filesize($row['filesize']),
'FILETIME' => $user->format_date($row['filetime']),
'REAL_FILENAME' => utf8_basename($row['real_filename']),
'PHYSICAL_FILENAME' => utf8_basename($row['physical_filename']),
'ATTACH_ID' => $row['attach_id'],
'POST_IDS' => (!empty($post_ids[$row['attach_id']])) ? $post_ids[$row['attach_id']] : '',
'U_FILE' => append_sid($phpbb_root_path . 'download/file.' . $phpEx, 'mode=view&amp;id=' . $row['attach_id']))
);
'POST_ID' => (!empty($post_ids[$row['attach_id']])) ? $post_ids[$row['attach_id']] : '',
'U_FILE' => append_sid($phpbb_root_path . 'download/file.' . $phpEx, 'mode=view&amp;id=' . $row['attach_id']),
]);
}
$db->sql_freeresult($result);
@@ -1105,10 +1121,10 @@ class acp_attachments
$start
);
$template->assign_vars(array(
$template->assign_vars([
'TOTAL_FILES' => $num_files,
'TOTAL_SIZE' => get_formatted_filesize($total_size),
));
]);
break;
@@ -1278,7 +1294,7 @@ class acp_attachments
'S_IN_MESSAGE' => (bool) $row['in_message'],
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$row['topic_id']}&amp;p={$row['post_msg_id']}") . "#p{$row['post_msg_id']}",
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p={$row['post_msg_id']}") . "#p{$row['post_msg_id']}",
'U_FILE' => append_sid($phpbb_root_path . 'download/file.' . $phpEx, 'mode=view&amp;id=' . $row['attach_id']))
);
}

View File

@@ -235,7 +235,7 @@ class acp_bbcodes
trigger_error($user->lang['BBCODE_TAG_DEF_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (strlen($bbcode_helpline) > 255)
if (strlen($bbcode_helpline) > 3000)
{
trigger_error($user->lang['BBCODE_HELPLINE_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
}

View File

@@ -589,6 +589,7 @@ class acp_board
'site_home_text',
'board_index_text',
'board_disable_msg',
'board_email_sig',
];
/**

View File

@@ -69,20 +69,6 @@ class acp_database
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$store = true;
$structure = false;
$schema_data = false;
if ($type == 'full' || $type == 'structure')
{
$structure = true;
}
if ($type == 'full' || $type == 'data')
{
$schema_data = true;
}
@set_time_limit(1200);
@set_time_limit(0);
@@ -92,14 +78,14 @@ class acp_database
/** @var phpbb\db\extractor\extractor_interface $extractor Database extractor */
$extractor = $phpbb_container->get('dbal.extractor');
$extractor->init_extractor($format, $filename, $time, false, $store);
$extractor->init_extractor($format, $filename, $time, false, true);
$extractor->write_start($table_prefix);
foreach ($table as $table_name)
{
// Get the table structure
if ($structure)
if ($type == 'full')
{
$extractor->write_table($table_name);
}
@@ -123,15 +109,11 @@ class acp_database
default:
$extractor->flush('TRUNCATE TABLE ' . $table_name . ";\n");
break;
}
}
// Data
if ($schema_data)
{
$extractor->write_data($table_name);
}
// Only supported types are full and data, therefore always write the data
$extractor->write_data($table_name);
}
$extractor->write_end();

View File

@@ -53,7 +53,7 @@ class acp_extensions
$this->phpbb_container = $phpbb_container;
$this->php_ini = $this->phpbb_container->get('php_ini');
$this->user->add_lang(array('install', 'acp/extensions', 'migrator'));
$this->user->add_lang(array('install', 'acp/extensions', 'acp/modules', 'migrator'));
$this->page_title = 'ACP_EXTENSIONS';

View File

@@ -91,29 +91,43 @@ class acp_icons
{
$img_size = getimagesize($phpbb_root_path . $img_path . '/' . $path . $img);
if (!$img_size[0] || !$img_size[1] || strlen($img) > 255)
if ($img_size)
{
continue;
}
if (!$img_size[0] || !$img_size[1] || strlen($img) > 255)
{
continue;
}
// adjust the width and height to be lower than 128px while perserving the aspect ratio (for icons)
if ($mode == 'icons')
// adjust the width and height to be lower than 128px while perserving the aspect ratio (for icons)
if ($mode == 'icons')
{
if ($img_size[0] > 127 && $img_size[0] > $img_size[1])
{
$img_size[1] = (int) ($img_size[1] * (127 / $img_size[0]));
$img_size[0] = 127;
}
else if ($img_size[1] > 127)
{
$img_size[0] = (int) ($img_size[0] * (127 / $img_size[1]));
$img_size[1] = 127;
}
}
}
else
{
if ($img_size[0] > 127 && $img_size[0] > $img_size[1])
{
$img_size[1] = (int) ($img_size[1] * (127 / $img_size[0]));
$img_size[0] = 127;
}
else if ($img_size[1] > 127)
{
$img_size[0] = (int) ($img_size[0] * (127 / $img_size[1]));
$img_size[1] = 127;
}
// getimagesize can't read the dimensions of the SVG files
// https://bugs.php.net/bug.php?id=71517
$xml_get = simplexml_load_file($phpbb_root_path . $img_path . '/' . $path . $img);
$svg_width = intval($xml_get['width']);
$svg_height = intval($xml_get['height']);
}
$_images[$path . $img]['file'] = $path . $img;
$_images[$path . $img]['width'] = $img_size[0];
$_images[$path . $img]['height'] = $img_size[1];
// Give SVG a fallback on failure
$_images[$path . $img]['width'] = $img_size ? $img_size[0] : ($svg_width ?: 32);
$_images[$path . $img]['height'] = $img_size ? $img_size[1] : ($svg_height ?: 32);
}
}
unset($imglist);

View File

@@ -544,20 +544,13 @@ class acp_main
$files_per_day = $total_files;
}
if ($config['allow_attachments'] || $config['allow_pm_attach'])
{
$sql = 'SELECT COUNT(attach_id) AS total_orphan
FROM ' . ATTACHMENTS_TABLE . '
WHERE is_orphan = 1
AND filetime < ' . (time() - 3*60*60);
$result = $db->sql_query($sql);
$total_orphan = (int) $db->sql_fetchfield('total_orphan');
$db->sql_freeresult($result);
}
else
{
$total_orphan = false;
}
$sql = 'SELECT COUNT(attach_id) AS total_orphan
FROM ' . ATTACHMENTS_TABLE . '
WHERE is_orphan = 1
AND filetime < ' . (time() - 3*60*60);
$result = $db->sql_query($sql);
$total_orphan = (int) $db->sql_fetchfield('total_orphan');
$db->sql_freeresult($result);
$dbsize = get_database_size();
@@ -575,7 +568,6 @@ class acp_main
'DBSIZE' => $dbsize,
'UPLOAD_DIR_SIZE' => $upload_dir_size,
'TOTAL_ORPHAN' => $total_orphan,
'S_TOTAL_ORPHAN' => ($total_orphan === false) ? false : true,
'GZIP_COMPRESSION' => ($config['gzip_compress'] && @extension_loaded('zlib')) ? $user->lang['ON'] : $user->lang['OFF'],
'DATABASE_INFO' => $db->sql_server_info(),
'PHP_VERSION_INFO' => PHP_VERSION,

View File

@@ -55,8 +55,8 @@ class acp_ranks
$min_posts = ($special_rank) ? 0 : max(0, $request->variable('min_posts', 0));
$rank_image = $request->variable('rank_image', '');
// The rank image has to be a jpg, gif or png
if ($rank_image != '' && !preg_match('#(\.gif|\.png|\.jpg|\.jpeg)$#i', $rank_image))
// The rank image has to be a jp(e)g, gif, png, svg or webp
if ($rank_image != '' && !preg_match('#(\.gif|\.png|\.jpg|\.jpeg|\.svg|\.webp)$#i', $rank_image))
{
$rank_image = '';
}

View File

@@ -322,9 +322,9 @@ class acp_search
{
$sql = 'SELECT post_id, poster_id, forum_id
FROM ' . POSTS_TABLE . '
WHERE post_id >= ' . (int) ($post_counter + 1) . '
AND post_id <= ' . (int) ($post_counter + $this->batch_size);
$result = $db->sql_query($sql);
WHERE post_id > ' . (int) $post_counter . '
ORDER BY post_id ASC';
$result = $db->sql_query_limit($sql, $this->batch_size);
$ids = $posters = $forum_ids = array();
while ($row = $db->sql_fetchrow($result))
@@ -339,14 +339,13 @@ class acp_search
if (count($ids))
{
$this->search->index_remove($ids, $posters, $forum_ids);
$post_counter = $ids[count($ids) - 1];
}
$post_counter += $this->batch_size;
}
// save the current state
$this->save_state();
if ($post_counter <= $this->max_post_id)
if ($post_counter < $this->max_post_id)
{
$totaltime = microtime(true) - $starttime;
$rows_per_second = $row_count / $totaltime;
@@ -393,9 +392,9 @@ class acp_search
{
$sql = 'SELECT post_id, post_subject, post_text, poster_id, forum_id
FROM ' . POSTS_TABLE . '
WHERE post_id >= ' . (int) ($post_counter + 1) . '
AND post_id <= ' . (int) ($post_counter + $this->batch_size);
$result = $db->sql_query($sql);
WHERE post_id > ' . (int) $post_counter . '
ORDER BY post_id ASC';
$result = $db->sql_query_limit($sql, $this->batch_size);
$buffer = $db->sql_buffer_nested_transactions();
@@ -416,13 +415,12 @@ class acp_search
$this->search->index('post', $row['post_id'], $row['post_text'], $row['post_subject'], $row['poster_id'], $row['forum_id']);
}
$row_count++;
$post_counter = $row['post_id'];
}
if (!$buffer)
{
$db->sql_freeresult($result);
}
$post_counter += $this->batch_size;
}
// save the current state
$this->save_state();
@@ -434,7 +432,7 @@ class acp_search
$this->search->tidy();
$config['num_posts'] = $num_posts;
if ($post_counter <= $this->max_post_id)
if ($post_counter < $this->max_post_id)
{
$totaltime = microtime(true) - $starttime;
$rows_per_second = $row_count / $totaltime;

View File

@@ -2277,7 +2277,7 @@ class acp_users
}
else
{
$view_topic = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$row['topic_id']}&amp;p={$row['post_msg_id']}") . '#p' . $row['post_msg_id'];
$view_topic = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p={$row['post_msg_id']}") . '#p' . $row['post_msg_id'];
}
$template->assign_block_vars('attach', array(

View File

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

View File

@@ -168,8 +168,14 @@ class diff
$final = $edit->final;
// We can simplify one case where the array is usually supposed to be empty...
if (count($orig) == 1 && trim($orig[0]) === '') $orig = array();
if (count($final) == 1 && trim($final[0]) === '') $final = array();
if (is_array($orig) && count($orig) == 1 && trim($orig[0]) === '')
{
$orig = array();
}
if (is_array($final) && count($final) == 1 && trim($final[0]) === '')
{
$final = array();
}
if (!$orig && !$final)
{

View File

@@ -263,49 +263,68 @@ function phpbb_version_compare($version1, $version2, $operator = null)
// functions used for building option fields
/**
* Pick a language, any language ...
*/
function language_select($default = '')
* Pick a language, any language ...
*
* @param string $default Language ISO code to be selected by default in the dropdown list
* @param array $langdata Language data in format of array(array('lang_iso' => string, lang_local_name => string), ...)
*
* @return string HTML options for language selection dropdown list.
*/
function language_select($default = '', array $langdata = [])
{
global $db;
$sql = 'SELECT lang_iso, lang_local_name
FROM ' . LANG_TABLE . '
ORDER BY lang_english_name';
$result = $db->sql_query($sql);
if (empty($langdata))
{
$sql = 'SELECT lang_iso, lang_local_name
FROM ' . LANG_TABLE . '
ORDER BY lang_english_name';
$result = $db->sql_query($sql);
$langdata = (array) $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
}
$lang_options = '';
while ($row = $db->sql_fetchrow($result))
foreach ($langdata as $row)
{
$selected = ($row['lang_iso'] == $default) ? ' selected="selected"' : '';
$lang_options .= '<option value="' . $row['lang_iso'] . '"' . $selected . '>' . $row['lang_local_name'] . '</option>';
}
$db->sql_freeresult($result);
return $lang_options;
}
/**
* Pick a template/theme combo,
*/
function style_select($default = '', $all = false)
* Pick a template/theme combo
*
* @param string $default Style ID to be selected by default in the dropdown list
* @param bool $all Flag indicating if all styles data including inactive ones should be fetched
* @param array $styledata Style data in format of array(array('style_id' => int, style_name => string), ...)
*
* @return string HTML options for style selection dropdown list.
*/
function style_select($default = '', $all = false, array $styledata = [])
{
global $db;
$sql_where = (!$all) ? 'WHERE style_active = 1 ' : '';
$sql = 'SELECT style_id, style_name
FROM ' . STYLES_TABLE . "
$sql_where
ORDER BY style_name";
$result = $db->sql_query($sql);
if (empty($styledata))
{
$sql_where = (!$all) ? 'WHERE style_active = 1 ' : '';
$sql = 'SELECT style_id, style_name
FROM ' . STYLES_TABLE . "
$sql_where
ORDER BY style_name";
$result = $db->sql_query($sql);
$styledata = (array) $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
}
$style_options = '';
while ($row = $db->sql_fetchrow($result))
foreach ($styledata as $row)
{
$selected = ($row['style_id'] == $default) ? ' selected="selected"' : '';
$style_options .= '<option value="' . $row['style_id'] . '"' . $selected . '>' . $row['style_name'] . '</option>';
}
$db->sql_freeresult($result);
return $style_options;
}
@@ -1075,7 +1094,7 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis
* @param string $sql_limit Limits the size of unread topics list, 0 for unlimited query
* @param string $sql_limit_offset Sets the offset of the first row to search, 0 to search from the start
*
* @return array[int][int] Topic ids as keys, mark_time of topic as value
* @return int[] Topic ids as keys, mark_time of topic as value
*/
function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $sql_limit = 1001, $sql_limit_offset = 0)
{
@@ -1464,10 +1483,9 @@ function tracking_unserialize($string, $max_depth = 3)
* @return string The corrected url.
*
* Examples:
* <code>
* append_sid("{$phpbb_root_path}viewtopic.$phpEx?t=1&amp;f=2");
* append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=1&amp;f=2');
* append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=1&f=2', false);
* <code> append_sid("{$phpbb_root_path}viewtopic.$phpEx?t=1");
* append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=1');
* append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=1', false);
* append_sid("{$phpbb_root_path}viewtopic.$phpEx", array('t' => 1, 'f' => 2));
* </code>
*
@@ -2996,7 +3014,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
// Check the error reporting level and return if the error level does not match
// If DEBUG is defined the default level is E_ALL
if (($errno & ($phpbb_container->getParameter('debug.show_errors') ? E_ALL : error_reporting())) == 0)
if (($errno & ($phpbb_container != null && $phpbb_container->getParameter('debug.show_errors') ? E_ALL : error_reporting())) == 0)
{
return;
}
@@ -4070,7 +4088,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
'T_FONT_AWESOME_LINK' => !empty($config['allow_cdn']) && !empty($config['load_font_awesome_url']) ? $config['load_font_awesome_url'] : "{$web_path}assets/css/font-awesome.min.css?assets_version=" . $config['assets_version'],
'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery-3.5.1.min.js?assets_version=" . $config['assets_version'],
'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery-3.6.0.min.js?assets_version=" . $config['assets_version'],
'S_ALLOW_CDN' => !empty($config['allow_cdn']),
'S_COOKIE_NOTICE' => !empty($config['cookie_notice']),

View File

@@ -178,7 +178,7 @@ function adm_page_footer($copyright_html = true)
'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
'S_COPYRIGHT_HTML' => $copyright_html,
'CREDIT_LINE' => $user->lang('POWERED_BY', '<a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Limited'),
'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$phpbb_root_path}assets/javascript/jquery-3.5.1.min.js",
'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$phpbb_root_path}assets/javascript/jquery-3.6.0.min.js",
'S_ALLOW_CDN' => !empty($config['allow_cdn']),
'VERSION' => $config['version'])
);

View File

@@ -479,7 +479,7 @@ function copy_forum_permissions($src_forum_id, $dest_forum_ids, $clear_dest_perm
/**
* Get physical file listing
*/
function filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png')
function filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png|svg|webp')
{
$matches = array($dir => array());
@@ -1324,7 +1324,7 @@ function update_posted_info(&$topic_ids)
*/
function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, $sync_extra = false)
{
global $db;
global $db, $phpbb_dispatcher;
if (is_array($where_ids))
{
@@ -1826,11 +1826,26 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
// 5: Retrieve last_post infos
if (count($post_ids))
{
$sql = 'SELECT p.post_id, p.poster_id, p.post_subject, p.post_time, p.post_username, u.username, u.user_colour
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . '
AND p.poster_id = u.user_id';
$result = $db->sql_query($sql);
$sql_ary = array(
'SELECT' => 'p.post_id, p.poster_id, p.post_subject, p.post_time, p.post_username, u.username, u.user_colour',
'FROM' => array(
POSTS_TABLE => 'p',
USERS_TABLE => 'u',
),
'WHERE' => $db->sql_in_set('p.post_id', $post_ids) . '
AND p.poster_id = u.user_id',
);
/**
* Event to modify the SQL array to get the post and user data from all forums' last posts
*
* @event core.sync_forum_last_post_info_sql
* @var array sql_ary SQL array with some post and user data from the last posts list
* @since 3.3.5-RC1
*/
$vars = ['sql_ary'];
extract($phpbb_dispatcher->trigger_event('core.sync_forum_last_post_info_sql', compact($vars)));
$result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
while ($row = $db->sql_fetchrow($result))
{
@@ -1862,7 +1877,6 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
}
}
}
unset($post_info);
}
// 6: Now do that thing
@@ -1873,6 +1887,23 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
array_push($fieldnames, 'posts_approved', 'posts_unapproved', 'posts_softdeleted', 'topics_approved', 'topics_unapproved', 'topics_softdeleted');
}
/**
* Event to modify the SQL array to get the post and user data from all forums' last posts
*
* @event core.sync_modify_forum_data
* @var array forum_data Array with data to update for all forum ids
* @var array post_info Array with some post and user data from the last posts list
* @var array fieldnames Array with the partial column names that are being updated
* @since 3.3.5-RC1
*/
$vars = [
'forum_data',
'post_info',
'fieldnames',
];
extract($phpbb_dispatcher->trigger_event('core.sync_modify_forum_data', compact($vars)));
unset($post_info);
foreach ($forum_data as $forum_id => $row)
{
$sql_ary = array();
@@ -2041,11 +2072,31 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
unset($delete_topics, $delete_topic_ids);
}
$sql = 'SELECT p.post_id, p.topic_id, p.post_visibility, p.poster_id, p.post_subject, p.post_username, p.post_time, u.username, u.user_colour
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . '
AND u.user_id = p.poster_id';
$result = $db->sql_query($sql);
$sql_ary = array(
'SELECT' => 'p.post_id, p.topic_id, p.post_visibility, p.poster_id, p.post_subject, p.post_username, p.post_time, u.username, u.user_colour',
'FROM' => array(
POSTS_TABLE => 'p',
USERS_TABLE => 'u',
),
'WHERE' => $db->sql_in_set('p.post_id', $post_ids) . '
AND u.user_id = p.poster_id',
);
$custom_fieldnames = [];
/**
* Event to modify the SQL array to get the post and user data from all topics' last posts
*
* @event core.sync_topic_last_post_info_sql
* @var array sql_ary SQL array with some post and user data from the last posts list
* @var array custom_fieldnames Empty array for custom fieldnames to update the topics_table with
* @since 3.3.5-RC1
*/
$vars = [
'sql_ary',
'custom_fieldnames',
];
extract($phpbb_dispatcher->trigger_event('core.sync_topic_last_post_info_sql', compact($vars)));
$result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
while ($row = $db->sql_fetchrow($result))
{
@@ -2067,6 +2118,22 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
$topic_data[$topic_id]['last_poster_name'] = ($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username'];
$topic_data[$topic_id]['last_poster_colour'] = $row['user_colour'];
}
/**
* Event to modify the topic_data when syncing topics
*
* @event core.sync_modify_topic_data
* @var array topic_data Array with the topics' data we are syncing
* @var array row Array with some of the current user and post data
* @var int topic_id The current topic_id of $row
* @since 3.3.5-RC1
*/
$vars = [
'topic_data',
'row',
'topic_id',
];
extract($phpbb_dispatcher->trigger_event('core.sync_modify_topic_data', compact($vars)));
}
$db->sql_freeresult($result);
@@ -2182,6 +2249,10 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
// These are fields that will be synchronised
$fieldnames = array('time', 'visibility', 'posts_approved', 'posts_unapproved', 'posts_softdeleted', 'poster', 'first_post_id', 'first_poster_name', 'first_poster_colour', 'last_post_id', 'last_post_subject', 'last_post_time', 'last_poster_id', 'last_poster_name', 'last_poster_colour');
// Add custom fieldnames
$fieldnames = array_merge($fieldnames, $custom_fieldnames);
unset($custom_fieldnames);
if ($sync_extra)
{
// This routine assumes that post_reported values are correct
@@ -2418,7 +2489,7 @@ function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_fr
* must be carried through for the moderators table.
*
* @param \phpbb\db\driver\driver_interface $db Database connection
* @param \phpbb\cache\driver\driver_interface Cache driver
* @param \phpbb\cache\driver\driver_interface $cache Cache driver
* @param \phpbb\auth\auth $auth Authentication object
* @return null
*/
@@ -2605,7 +2676,7 @@ function phpbb_cache_moderators($db, $cache, $auth)
* @param mixed $forum_id Restrict the log entries to the given forum_id (can also be an array of forum_ids)
* @param int $topic_id Restrict the log entries to the given topic_id
* @param int $user_id Restrict the log entries to the given user_id
* @param int $log_time Only get log entries newer than the given timestamp
* @param int $limit_days Only get log entries newer than the given timestamp
* @param string $sort_by SQL order option, e.g. 'l.log_time DESC'
* @param string $keywords Will only return log entries that have the keywords in log_operation or log_data
*

View File

@@ -223,12 +223,12 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port
/**
* Add log entry
*
* @param string $mode The mode defines which log_type is used and from which log the entry is retrieved
* @param int $forum_id Mode 'mod' ONLY: forum id of the related item, NOT INCLUDED otherwise
* @param int $topic_id Mode 'mod' ONLY: topic id of the related item, NOT INCLUDED otherwise
* @param int $reportee_id Mode 'user' ONLY: user id of the reportee, NOT INCLUDED otherwise
* @param string $log_operation Name of the operation
* @param array $additional_data More arguments can be added, depending on the log_type
* string $mode The mode defines which log_type is used and from which log the entry is retrieved
* int $forum_id Mode 'mod' ONLY: forum id of the related item, NOT INCLUDED otherwise
* int $topic_id Mode 'mod' ONLY: topic id of the related item, NOT INCLUDED otherwise
* int $reportee_id Mode 'user' ONLY: user id of the reportee, NOT INCLUDED otherwise
* string $log_operation Name of the operation
* array $additional_data More arguments can be added, depending on the log_type
*
* @return int|bool Returns the log_id, if the entry was added to the database, false otherwise.
*
@@ -345,7 +345,8 @@ function set_config_count($config_name, $increment, $is_dynamic = false, \phpbb\
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
* @param bool $cookie This param is mapped to \phpbb\request\request_interface::COOKIE as the last param for
* \phpbb\request\request_interface::variable for backwards compatability reasons.
* @param \phpbb\request\request_interface|null|false If an instance of \phpbb\request\request_interface is given the instance is stored in
* @param \phpbb\request\request_interface|null|false $request
* If an instance of \phpbb\request\request_interface is given the instance is stored in
* a static variable and used for all further calls where this parameters is null. Until
* the function is called with an instance it automatically creates a new \phpbb\request\request
* instance on every call. By passing false this per-call instantiation can be restored

View File

@@ -1127,6 +1127,7 @@ function add_user_group($group_id, $user_id, $group_leader = false)
*
* @param string $group The name of the special group to add to
* @param string $select_query An SQL query to retrieve the user(s) to add to the group
* @param bool $use_src_db
*/
function user_group_auth($group, $select_query, $use_src_db)
{
@@ -1835,10 +1836,12 @@ function add_bots()
$bots = array(
'AdsBot [Google]' => array('AdsBot-Google', ''),
'Ahrefs [Bot]' => array('AhrefsBot/', ''),
'Alexa [Bot]' => array('ia_archiver', ''),
'Alta Vista [Bot]' => array('Scooter/', ''),
'Amazon [Bot]' => array('Amazonbot/', ''),
'Ask Jeeves [Bot]' => array('Ask Jeeves', ''),
'Baidu [Spider]' => array('Baiduspider+(', ''),
'Baidu [Spider]' => array('Baiduspider', ''),
'Bing [Bot]' => array('bingbot/', ''),
'DuckDuckGo [Bot]' => array('DuckDuckBot/', ''),
'Exabot [Bot]' => array('Exabot/', ''),
@@ -1854,7 +1857,7 @@ function add_bots()
'Heritrix [Crawler]' => array('heritrix/1.', ''),
'IBM Research [Bot]' => array('ibm.com/cs/crawler', ''),
'ICCrawler - ICjobs' => array('ICCrawler - ICjobs', ''),
'ichiro [Crawler]' => array('ichiro/2', ''),
'ichiro [Crawler]' => array('ichiro/', ''),
'Majestic-12 [Bot]' => array('MJ12bot/', ''),
'Metager [Bot]' => array('MetagerBot/', ''),
'MSN NewsBlogs' => array('msnbot-NewsBlogs/', ''),
@@ -1867,6 +1870,7 @@ function add_bots()
'Online link [Validator]' => array('online link validator', ''),
'psbot [Picsearch]' => array('psbot/0', ''),
'Seekport [Bot]' => array('Seekbot/', ''),
'Semrush [Bot]' => array('SemrushBot/', ''),
'Sensis [Crawler]' => array('Sensis Web Crawler', ''),
'SEO Crawler' => array('SEO search Crawler/', ''),
'Seoma [Crawler]' => array('Seoma [SEO Crawler]', ''),
@@ -1876,7 +1880,7 @@ function add_bots()
'Synoo [Bot]' => array('SynooBot/', ''),
'Telekom [Bot]' => array('crawleradmin.t-info@telekom.de', ''),
'TurnitinBot [Bot]' => array('TurnitinBot/', ''),
'Voyager [Bot]' => array('voyager/1.0', ''),
'Voyager [Bot]' => array('voyager/', ''),
'W3 [Sitesearch]' => array('W3 SiteSearch Crawler', ''),
'W3C [Linkcheck]' => array('W3C-checklink/', ''),
'W3C [Validator]' => array('W3C_*Validator', ''),

View File

@@ -551,7 +551,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
}
$last_post_time = $user->format_date($row['forum_last_post_time']);
$last_post_time_rfc3339 = gmdate(DATE_RFC3339, $row['forum_last_post_time']);
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&amp;p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
}
else
{
@@ -1086,12 +1086,12 @@ function display_custom_bbcodes()
// Start counting from 22 for the bbcode ids (every bbcode takes two ids - opening/closing)
$num_predefined_bbcodes = NUM_PREDEFINED_BBCODES;
$sql_ary = array(
'SELECT' => 'b.bbcode_id, b.bbcode_tag, b.bbcode_helpline',
'FROM' => array(BBCODES_TABLE => 'b'),
$sql_ary = [
'SELECT' => 'b.bbcode_id, b.bbcode_tag, b.bbcode_helpline, b.bbcode_match',
'FROM' => [BBCODES_TABLE => 'b'],
'WHERE' => 'b.display_on_posting = 1',
'ORDER_BY' => 'b.bbcode_tag',
);
];
/**
* Event to modify the SQL query before custom bbcode data is queried
@@ -1119,13 +1119,18 @@ function display_custom_bbcodes()
// Convert Numeric Character References to UTF-8 chars.
$row['bbcode_helpline'] = utf8_decode_ncr($row['bbcode_helpline']);
$custom_tags = array(
'BBCODE_NAME' => "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'",
// Does the closing bbcode tag exists? If so display it.
$bbcode_close_tag = '%\[\/' . utf8_strtolower($row['bbcode_tag']) . '\]%';
$bbcode_match_str = utf8_strtolower($row['bbcode_match']);
$bbcode_name_clean = preg_match($bbcode_close_tag, $bbcode_match_str) ? "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'" : "'[{$row['bbcode_tag']}]', ''";
$custom_tags = [
'BBCODE_NAME' => $bbcode_name_clean,
'BBCODE_ID' => $num_predefined_bbcodes + ($i * 2),
'BBCODE_TAG' => $row['bbcode_tag'],
'BBCODE_TAG_CLEAN' => str_replace('=', '-', $row['bbcode_tag']),
'BBCODE_HELPLINE' => $row['bbcode_helpline'],
);
];
/**
* Event to modify the template data block of a custom bbcode

View File

@@ -656,15 +656,15 @@ function phpbb_download_handle_forum_auth($db, $auth, $topic_id)
{
global $phpbb_container;
$sql_array = array(
'SELECT' => 't.topic_visibility, t.forum_id, f.forum_name, f.forum_password, f.parent_id',
'FROM' => array(
$sql_array = [
'SELECT' => 't.forum_id, t.topic_poster, t.topic_visibility, f.forum_name, f.forum_password, f.parent_id',
'FROM' => [
TOPICS_TABLE => 't',
FORUMS_TABLE => 'f',
),
'WHERE' => 't.topic_id = ' . (int) $topic_id . '
],
'WHERE' => 't.topic_id = ' . (int) $topic_id . '
AND t.forum_id = f.forum_id',
);
];
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query($sql);

View File

@@ -35,7 +35,7 @@ function phpbb_module_notes_url($mode, $module_row)
}
global $user_id;
return ($user_id) ? "&amp;u=$user_id" : '';
return phpbb_extra_url();
}
function phpbb_module_warn_url($mode, $module_row)
@@ -43,24 +43,18 @@ function phpbb_module_warn_url($mode, $module_row)
if ($mode == 'front' || $mode == 'list')
{
global $forum_id;
return ($forum_id) ? "&amp;f=$forum_id" : '';
return phpbb_extra_url();
}
if ($mode == 'warn_post')
{
global $forum_id, $post_id;
$url_extra = ($forum_id) ? "&amp;f=$forum_id" : '';
$url_extra .= ($post_id) ? "&amp;p=$post_id" : '';
return $url_extra;
return phpbb_extra_url();
}
else
{
global $user_id;
return ($user_id) ? "&amp;u=$user_id" : '';
return phpbb_extra_url();
}
}
@@ -89,18 +83,34 @@ function phpbb_module_reports_url($mode, $module_row)
return phpbb_extra_url();
}
function phpbb_extra_url()
/**
* Generate URL parameters for MCP modules
*
* @param array $additional_parameters Array with additional parameters in format of ['key' => 'parameter_name']
*
* @return string String with URL parameters (empty string if not any)
*/
function phpbb_extra_url($additional_parameters = [])
{
global $forum_id, $topic_id, $post_id, $report_id, $user_id;
$url_extra = [];
$url_parameters = array_merge([
'f' => 'forum_id',
't' => 'topic_id',
'p' => 'post_id',
'r' => 'report_id',
'u' => 'user_id',
], $additional_parameters);
$url_extra = '';
$url_extra .= ($forum_id) ? "&amp;f=$forum_id" : '';
$url_extra .= ($topic_id) ? "&amp;t=$topic_id" : '';
$url_extra .= ($post_id) ? "&amp;p=$post_id" : '';
$url_extra .= ($user_id) ? "&amp;u=$user_id" : '';
$url_extra .= ($report_id) ? "&amp;r=$report_id" : '';
foreach ($url_parameters as $key => $value)
{
global $$value;
if (isset($$value) && $parameter = $$value)
{
$url_extra[] = "$key=$parameter";
}
}
return $url_extra;
return implode('&amp;', $url_extra);
}
/**
@@ -383,7 +393,7 @@ function phpbb_get_pm_data($pm_ids)
/**
* sorting in mcp
*
* @param string $where_sql should either be WHERE (default if ommited) or end with AND or OR
* $where_sql should either be WHERE (default if ommited) or end with AND or OR
*
* $mode reports and reports_closed: the $where parameters uses aliases p for posts table and r for report table
* $mode unapproved_posts: the $where parameters uses aliases p for posts table and t for topic table
@@ -684,7 +694,7 @@ function phpbb_mcp_sorting($mode, &$sort_days_val, &$sort_key_val, &$sort_dir_va
* @param string $table The table to find the ids in
* @param string $sql_id The ids relevant column name
* @param array $acl_list A list of permissions the user need to have
* @param mixed $singe_forum Limit to one forum id (int) or the first forum found (true)
* @param mixed $single_forum Limit to one forum id (int) or the first forum found (true)
*
* @return mixed False if no ids were able to be retrieved, true if at least one id left.
* Additionally, this value can be the forum_id assigned if $single_forum was set.

View File

@@ -1840,56 +1840,84 @@ class smtp_class
}
/**
* Encodes the given string for proper display in UTF-8.
*
* This version is using base64 encoded data. The downside of this
* is if the mail client does not understand this encoding the user
* is basically doomed with an unreadable subject.
*
* Please note that this version fully supports RFC 2045 section 6.8.
*
* @param string $eol End of line we are using (optional to be backwards compatible)
*/
* Encodes the given string for proper display in UTF-8 or US-ASCII.
*
* This version is based on iconv_mime_encode() implementation
* from symfomy/polyfill-iconv
* https://github.com/symfony/polyfill-iconv/blob/fd324208ec59a39ebe776e6e9ec5540ad4f40aaa/Iconv.php#L355
*
* @param string $str
* @param string $eol Lines delimiter (optional to be backwards compatible)
*
* @return string
*/
function mail_encode($str, $eol = "\r\n")
{
// define start delimimter, end delimiter and spacer
$start = "=?UTF-8?B?";
$end = "?=";
$delimiter = "$eol ";
// Check if string contains ASCII only characters
$is_ascii = strlen($str) === utf8_strlen($str);
// Maximum length is 75. $split_length *must* be a multiple of 4, but <= 75 - strlen($start . $delimiter . $end)!!!
$split_length = 60;
$encoded_str = base64_encode($str);
$scheme = $is_ascii ? 'Q' : 'B';
// If encoded string meets the limits, we just return with the correct data.
if (strlen($encoded_str) <= $split_length)
// Define start delimiter, end delimiter
// Use the Quoted-Printable encoding for ASCII strings to avoid unnecessary encoding in Base64
$start = '=?' . ($is_ascii ? 'US-ASCII' : 'UTF-8') . '?' . $scheme . '?';
$end = '?=';
// Maximum encoded-word length is 75 as per RFC 2047 section 2.
// $split_length *must* be a multiple of 4, but <= 75 - strlen($start . $eol . $end)!!!
$split_length = 75 - strlen($start . $eol . $end);
$split_length = $split_length - $split_length % 4;
$line_length = strlen($start) + strlen($end);
$line_offset = strlen($start) + 1;
$line_data = '';
$is_quoted_printable = 'Q' === $scheme;
preg_match_all('/./us', $str, $chars);
$chars = $chars[0] ?? [];
$str = [];
foreach ($chars as $char)
{
return $start . $encoded_str . $end;
}
$encoded_char = $is_quoted_printable
? $char = preg_replace_callback(
'/[=_\?\x20\x00-\x1F\x80-\xFF]/',
function ($matches)
{
$hex = dechex(ord($matches[0]));
$hex = strlen($hex) == 1 ? "0$hex" : $hex;
return '=' . strtoupper($hex);
},
$char
)
: base64_encode($line_data . $char);
// If there is only ASCII data, we just return what we want, correctly splitting the lines.
if (strlen($str) === utf8_strlen($str))
{
return $start . implode($end . $delimiter . $start, str_split($encoded_str, $split_length)) . $end;
}
// UTF-8 data, compose encoded lines
$array = utf8_str_split($str);
$str = '';
while (count($array))
{
$text = '';
while (count($array) && intval((strlen($text . $array[0]) + 2) / 3) << 2 <= $split_length)
if (isset($encoded_char[$split_length - $line_length]))
{
$text .= array_shift($array);
if (!$is_quoted_printable)
{
$line_data = base64_encode($line_data);
}
$str[] = $start . $line_data . $end;
$line_length = $line_offset;
$line_data = '';
}
$str .= $start . base64_encode($text) . $end . $delimiter;
$line_data .= $char;
$is_quoted_printable && $line_length += strlen($char);
}
return substr($str, 0, -strlen($delimiter));
if ($line_data !== '')
{
if (!$is_quoted_printable)
{
$line_data = base64_encode($line_data);
}
$str[] = $start . $line_data . $end;
}
return implode($eol . ' ', $str);
}
/**
@@ -1897,7 +1925,7 @@ function mail_encode($str, $eol = "\r\n")
*/
function phpbb_mail($to, $subject, $msg, $headers, $eol, &$err_msg)
{
global $config, $phpbb_root_path, $phpEx;
global $config, $phpbb_root_path, $phpEx, $phpbb_dispatcher;
// Convert Numeric Character References to UTF-8 chars (ie. Emojis)
$subject = utf8_decode_ncr($subject);
@@ -1926,8 +1954,54 @@ function phpbb_mail($to, $subject, $msg, $headers, $eol, &$err_msg)
*/
$additional_parameters = $config['email_force_sender'] ? '-f' . $config['board_email'] : '';
/**
* Modify data before sending out emails with PHP's mail function
*
* @event core.phpbb_mail_before
* @var string to The message recipient
* @var string subject The message subject
* @var string msg The message text
* @var string headers The email headers
* @var string eol The endline character
* @var string additional_parameters The additional parameters
* @since 3.3.6-RC1
*/
$vars = [
'to',
'subject',
'msg',
'headers',
'eol',
'additional_parameters',
];
extract($phpbb_dispatcher->trigger_event('core.phpbb_mail_before', compact($vars)));
$result = mail($to, mail_encode($subject, ''), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers, $additional_parameters);
/**
* Execute code after sending out emails with PHP's mail function
*
* @event core.phpbb_mail_after
* @var string to The message recipient
* @var string subject The message subject
* @var string msg The message text
* @var string headers The email headers
* @var string eol The endline character
* @var string additional_parameters The additional parameters
* @var bool result True if the email was sent, false otherwise
* @since 3.3.6-RC1
*/
$vars = [
'to',
'subject',
'msg',
'headers',
'eol',
'additional_parameters',
'result',
];
extract($phpbb_dispatcher->trigger_event('core.phpbb_mail_after', compact($vars)));
$collector->uninstall();
$err_msg = $collector->format_errors();

View File

@@ -662,7 +662,7 @@ class p_master
// Add url_extra parameter to u_action url
if (!empty($this->module_ary) && $this->active_module !== false && $this->module_ary[$this->active_module_row_id]['url_extra'])
{
$this->module->u_action .= $this->module_ary[$this->active_module_row_id]['url_extra'];
$this->module->u_action .= '&amp;' . $this->module_ary[$this->active_module_row_id]['url_extra'];
}
// Assign the module path for re-usage
@@ -920,7 +920,7 @@ class p_master
}
// Was not allowed in categories before - /*!$item_ary['cat'] && */
$u_title .= (isset($item_ary['url_extra'])) ? $item_ary['url_extra'] : '';
$u_title .= (isset($item_ary['url_extra']) && $item_ary['url_extra']) ? '&amp;' . $item_ary['url_extra'] : '';
// Only output a categories items if it's currently selected
if (!$depth || ($depth && (in_array($item_ary['parent'], array_values($this->module_cache['parents'])) || $item_ary['parent'] == $this->p_parent)))

View File

@@ -256,7 +256,7 @@ function generate_smilies($mode, $forum_id)
*/
function update_post_information($type, $ids, $return_update_sql = false)
{
global $db;
global $db, $phpbb_dispatcher;
if (empty($ids))
{
@@ -340,14 +340,35 @@ function update_post_information($type, $ids, $return_update_sql = false)
if (count($last_post_ids))
{
$sql = 'SELECT p.' . $type . '_id, p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
WHERE p.poster_id = u.user_id
AND ' . $db->sql_in_set('p.post_id', $last_post_ids);
$result = $db->sql_query($sql);
$sql_ary = array(
'SELECT' => 'p.' . $type . '_id, p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour',
'FROM' => array(
POSTS_TABLE => 'p',
USERS_TABLE => 'u',
),
'WHERE' => $db->sql_in_set('p.post_id', $last_post_ids) . '
AND p.poster_id = u.user_id',
);
/**
* Event to modify the SQL array to get the post and user data from all last posts
*
* @event core.update_post_info_modify_posts_sql
* @var string type The table being updated (forum or topic)
* @var array sql_ary SQL array to get some of the last posts' data
* @since 3.3.5-RC1
*/
$vars = [
'type',
'sql_ary',
];
extract($phpbb_dispatcher->trigger_event('core.update_post_info_modify_posts_sql', compact($vars)));
$result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
$rowset = array();
while ($row = $db->sql_fetchrow($result))
{
$rowset[] = $row;
$update_sql[$row["{$type}_id"]][] = $type . '_last_post_id = ' . (int) $row['post_id'];
$update_sql[$row["{$type}_id"]][] = "{$type}_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
$update_sql[$row["{$type}_id"]][] = $type . '_last_post_time = ' . (int) $row['post_time'];
@@ -356,6 +377,23 @@ function update_post_information($type, $ids, $return_update_sql = false)
$update_sql[$row["{$type}_id"]][] = "{$type}_last_poster_name = '" . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['post_username']) : $db->sql_escape($row['username'])) . "'";
}
$db->sql_freeresult($result);
/**
* Event to modify the update_sql array to add new update data for forum or topic last posts
*
* @event core.update_post_info_modify_sql
* @var string type The table being updated (forum or topic)
* @var array rowset Array with the posts data
* @var array update_sql Array with SQL data to update the forums or topics table with
* @since 3.3.5-RC1
*/
$vars = [
'type',
'rowset',
'update_sql',
];
extract($phpbb_dispatcher->trigger_event('core.update_post_info_modify_sql', compact($vars)));
unset($rowset);
}
unset($empty_forums, $ids, $last_post_ids);
@@ -775,20 +813,42 @@ function posting_gen_inline_attachments(&$attachment_data)
}
/**
* Generate inline attachment entry
*/
function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_attach_box = true)
* Generate inline attachment entry
*
* @param array $attachment_data The attachment data
* @param string $filename_data The filename data (filecomment)
* @param bool $show_attach_box Whether to show the attach box
* @param mixed $forum_id The forum id to check or false if private message
* @return int
*/
function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_attach_box = true, $forum_id = false)
{
global $template, $config, $phpbb_root_path, $phpEx, $user, $phpbb_dispatcher;
global $template, $cache, $config, $phpbb_root_path, $phpEx, $user, $phpbb_dispatcher;
$allowed_attachments = array_keys($cache->obtain_attach_extensions($forum_id)['_allowed_']);
// Some default template variables
$template->assign_vars(array(
$default_vars = [
'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'])) : '',
));
'ALLOWED_ATTACHMENTS' => !empty($allowed_attachments) ? implode(',', $allowed_attachments) : '',
];
/**
* Modify default attachments template vars
*
* @event core.modify_default_attachments_template_vars
* @var array allowed_attachments Array containing allowed attachments data
* @var array default_vars Array containing default attachments template vars
* @since 3.3.6-RC1
*/
$vars = ['allowed_attachments', 'default_vars'];
extract($phpbb_dispatcher->trigger_event('core.modify_default_attachments_template_vars', compact($vars)));
$template->assign_vars($default_vars);
if (count($attachment_data))
{
@@ -937,10 +997,10 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0, $pm_action = '', $ms
$topic_forum_id = ($topic_rows[$draft['topic_id']]['forum_id']) ? $topic_rows[$draft['topic_id']]['forum_id'] : $forum_id;
$link_topic = true;
$view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_forum_id . '&amp;t=' . $draft['topic_id']);
$view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $draft['topic_id']);
$title = $topic_rows[$draft['topic_id']]['topic_title'];
$insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 'f=' . $topic_forum_id . '&amp;t=' . $draft['topic_id'] . '&amp;mode=reply&amp;d=' . $draft['draft_id']);
$insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 't=' . $draft['topic_id'] . '&amp;mode=reply&amp;d=' . $draft['draft_id']);
}
else if ($draft['forum_id'] && $auth->acl_get('f_read', $draft['forum_id']))
{
@@ -1160,7 +1220,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
$post_subject = censor_text($post_subject);
$post_anchor = ($mode == 'post_review') ? 'ppr' . $row['post_id'] : 'pr' . $row['post_id'];
$u_show_post = append_sid($phpbb_root_path . 'viewtopic.' . $phpEx, "f=$forum_id&amp;t=$topic_id&amp;p={$row['post_id']}&amp;view=show#p{$row['post_id']}");
$u_show_post = append_sid($phpbb_root_path . 'viewtopic.' . $phpEx, "t=$topic_id&amp;p={$row['post_id']}&amp;view=show#p{$row['post_id']}");
$l_deleted_message = '';
if ($row['post_visibility'] == ITEM_DELETED)
@@ -1209,7 +1269,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
'POST_TIME' => $row['post_time'],
'USER_ID' => $row['user_id'],
'U_MINI_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . '#p' . $row['post_id'],
'U_MCP_DETAILS' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=post_details&amp;f=' . $forum_id . '&amp;p=' . $row['post_id'], true, $user->session_id) : '',
'U_MCP_DETAILS' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=post_details&amp;p=' . $row['post_id'], true, $user->session_id) : '',
'POSTER_QUOTE' => ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) ? addslashes(get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '',
);
@@ -2503,27 +2563,35 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
}
}
$params = $add_anchor = '';
$params = [];
$add_anchor = '';
$url = "{$phpbb_root_path}viewtopic.$phpEx";
if ($post_visibility == ITEM_APPROVED ||
($auth->acl_get('m_softdelete', $data_ary['forum_id']) && $post_visibility == ITEM_DELETED) ||
($auth->acl_get('m_approve', $data_ary['forum_id']) && in_array($post_visibility, array(ITEM_UNAPPROVED, ITEM_REAPPROVE))))
{
$params .= '&amp;t=' . $data_ary['topic_id'];
if ($mode != 'post')
{
$params .= '&amp;p=' . $data_ary['post_id'];
$params['p'] = $data_ary['post_id'];
$add_anchor = '#p' . $data_ary['post_id'];
}
else
{
$params['t'] = $data_ary['topic_id'];
}
}
else if ($mode != 'post' && $post_mode != 'edit_first_post' && $post_mode != 'edit_topic')
{
$params .= '&amp;t=' . $data_ary['topic_id'];
$params['t'] = $data_ary['topic_id'];
}
else
{
$url = "{$phpbb_root_path}viewforum.$phpEx";
$params['f'] = $data_ary['forum_id'];
}
$url = (!$params) ? "{$phpbb_root_path}viewforum.$phpEx" : "{$phpbb_root_path}viewtopic.$phpEx";
$url = append_sid($url, 'f=' . $data_ary['forum_id'] . $params) . $add_anchor;
$url = append_sid($url, $params) . $add_anchor;
$poll = $poll_ary;
$data = $data_ary;
@@ -2584,7 +2652,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
* - 'topic_last_poster_name'
* - 'topic_last_poster_colour'
* @param int $bump_time The time at which topic was bumped, usually it is a current time as obtained via time().
* @return string An URL to the bumped topic, example: ./viewtopic.php?forum_id=1&amptopic_id=2&ampp=3#p3
* @return string An URL to the bumped topic, example: ./viewtopic.php?p=3#p3
*/
function phpbb_bump_topic($forum_id, $topic_id, $post_data, $bump_time = false)
{
@@ -2673,7 +2741,7 @@ function phpbb_bump_topic($forum_id, $topic_id, $post_data, $bump_time = false)
$post_data['topic_title']
));
$url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;p={$post_data['topic_last_post_id']}") . "#p{$post_data['topic_last_post_id']}";
$url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p={$post_data['topic_last_post_id']}") . "#p{$post_data['topic_last_post_id']}";
return $url;
}
@@ -2804,7 +2872,7 @@ function phpbb_handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $
$delete_reason
));
$meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;p=$next_post_id") . "#p$next_post_id";
$meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p=$next_post_id") . "#p$next_post_id";
$message = $user->lang['POST_DELETED'];
if (!$request->is_ajax())

View File

@@ -425,7 +425,7 @@ function user_add($user_row, $cp_data = false, $notifications_data = null)
/**
* Delete user(s) and their related data
*
* @param string $mode Mode of posts deletion (retain|delete)
* @param string $mode Mode of posts deletion (retain|remove)
* @param mixed $user_ids Either an array of integers or an integer
* @param bool $retain_username True if username should be retained, false otherwise
* @return bool
@@ -464,7 +464,7 @@ function user_delete($mode, $user_ids, $retain_username = true)
* Event before of the performing of the user(s) delete action
*
* @event core.delete_user_before
* @var string mode Mode of posts deletion (retain|delete)
* @var string mode Mode of posts deletion (retain|remove)
* @var array user_ids ID(s) of the user(s) bound to be deleted
* @var bool retain_username True if username should be retained, false otherwise
* @var array user_rows Array containing data of the user(s) bound to be deleted
@@ -774,7 +774,7 @@ function user_delete($mode, $user_ids, $retain_username = true)
* Event after the user(s) delete action has been performed
*
* @event core.delete_user_after
* @var string mode Mode of posts deletion (retain|delete)
* @var string mode Mode of posts deletion (retain|remove)
* @var array user_ids ID(s) of the deleted user(s)
* @var bool retain_username True if username should be retained, false otherwise
* @var array user_rows Array containing data of the deleted user(s)
@@ -797,6 +797,8 @@ function user_delete($mode, $user_ids, $retain_username = true)
* Flips user_type from active to inactive and vice versa, handles group membership updates
*
* @param string $mode can be flip for flipping from active/inactive, activate or deactivate
* @param array $user_id_ary
* @param int $reason
*/
function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
{
@@ -919,6 +921,7 @@ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
* @param string $ban_len_other Ban length as a date (YYYY-MM-DD)
* @param boolean $ban_exclude Exclude these entities from banning?
* @param string $ban_reason String describing the reason for this ban
* @param string $ban_give_reason
* @return boolean
*/
function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason = '')
@@ -1611,6 +1614,7 @@ function validate_num($num, $optional = false, $min = 0, $max = 1E99)
/**
* Validate Date
* @param string $date_string a date in the dd-mm-yyyy format
* @param bool $optional
* @return boolean
*/
function validate_date($date_string, $optional = false)
@@ -1748,7 +1752,8 @@ function validate_username($username, $allowed_username = false, $allow_all_name
}
// ... fast checks first.
if (strpos($username, '&quot;') !== false || strpos($username, '"') !== false || empty($clean_username))
if (strpos($username, '&quot;') !== false || strpos($username, '"') !== false || empty($clean_username)
|| preg_match('/[\x{180E}\x{2005}-\x{200D}\x{202F}\x{205F}\x{2060}\x{FEFF}]/u', $username))
{
return 'INVALID_CHARS';
}
@@ -1882,6 +1887,7 @@ function validate_password($password)
* Check to see if email address is a valid address and contains a MX record
*
* @param string $email The email to check
* @param $config
*
* @return mixed Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)
*/
@@ -3621,7 +3627,8 @@ function group_update_listings($group_id)
/**
* Funtion to make a user leave the NEWLY_REGISTERED system group.
* @access public
* @param $user_id The id of the user to remove from the group
* @param int $user_id The id of the user to remove from the group
* @param mixed $user_data The id of the user to remove from the group
*/
function remove_newly_registered($user_id, $user_data = false)
{

View File

@@ -542,8 +542,8 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
sync('forum', 'forum_id', $sync_forums, true, true);
// Link to the new topic
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&amp;t=$to_topic_id");
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $to_topic_id) . '">', '</a>');
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?t=$to_topic_id");
$redirect = reapply_sid($redirect);
/**

View File

@@ -105,7 +105,7 @@ function mcp_front_view($id, $mode, $action)
* @var int total Number of unapproved posts
* @var array post_list List of unapproved posts
* @var array forum_list List of forums that contain the posts
* @var array forum_names Associative array with forum_id as key and it's corresponding forum_name as value
* @var array forum_names Associative array with forum_id as key and its corresponding forum_name as value
* @since 3.1.0-RC3
*/
$vars = array('total', 'post_list', 'forum_list', 'forum_names');
@@ -119,16 +119,37 @@ function mcp_front_view($id, $mode, $action)
AND t.topic_id = p.topic_id
AND p.poster_id = u.user_id
ORDER BY p.post_time DESC, p.post_id DESC';
/**
* Alter posts data SQL query
*
* @event core.mcp_front_view_modify_posts_data_sql
* @var array forum_list List of forums that contain the posts
* @var array forum_names Associative array with forum_id as key and its corresponding forum_name as value
* @var array post_list List of unapproved posts
* @var string sql String with the SQL query to be executed
* @var int total Number of unapproved posts
* @since 3.3.5-RC1
*/
$vars = [
'forum_list',
'forum_names',
'post_list',
'sql',
'total',
];
extract($phpbb_dispatcher->trigger_event('core.mcp_front_view_modify_posts_data_sql', compact($vars)));
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$template->assign_block_vars('unapproved', array(
'U_POST_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;f=' . $row['forum_id'] . '&amp;p=' . $row['post_id']),
$unapproved_post_row = [
'U_POST_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;p=' . $row['post_id']),
'U_MCP_FORUM' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=forum_view&amp;f=' . $row['forum_id']),
'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=topic_view&amp;f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id']),
'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=topic_view&amp;t=' . $row['topic_id']),
'U_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id']),
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $row['topic_id']),
'AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour']),
'AUTHOR' => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour']),
@@ -141,7 +162,27 @@ function mcp_front_view($id, $mode, $action)
'SUBJECT' => ($row['post_subject']) ? $row['post_subject'] : $user->lang['NO_SUBJECT'],
'POST_TIME' => $user->format_date($row['post_time']),
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
));
];
/**
* Alter unapproved posts template block for MCP front page
*
* @event core.mcp_front_view_modify_unapproved_post_row
* @var array forum_names Array containing forum names
* @var string mode MCP front view mode
* @var array row Array with unapproved post data
* @var array unapproved_post_row Template block array of the unapproved post
* @since 3.3.5-RC1
*/
$vars = [
'forum_names',
'mode',
'row',
'unapproved_post_row',
];
extract($phpbb_dispatcher->trigger_event('core.mcp_front_view_modify_unapproved_post_row', compact($vars)));
$template->assign_block_vars('unapproved', $unapproved_post_row);
}
$db->sql_freeresult($result);
}
@@ -238,12 +279,12 @@ function mcp_front_view($id, $mode, $action)
while ($row = $db->sql_fetchrow($result))
{
$template->assign_block_vars('report', array(
'U_POST_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . '&amp;p=' . $row['post_id'] . "&amp;i=reports&amp;mode=report_details"),
$reported_post_row = [
'U_POST_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'p=' . $row['post_id'] . "&amp;i=reports&amp;mode=report_details"),
'U_MCP_FORUM' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . "&amp;i=$id&amp;mode=forum_view"),
'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id'] . "&amp;i=$id&amp;mode=topic_view"),
'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 't=' . $row['topic_id'] . "&amp;i=$id&amp;mode=topic_view"),
'U_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id']),
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $row['topic_id']),
'REPORTER_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
'REPORTER' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
@@ -261,7 +302,27 @@ function mcp_front_view($id, $mode, $action)
'REPORT_TIME' => $user->format_date($row['report_time']),
'POST_TIME' => $user->format_date($row['post_time']),
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
));
];
/**
* Alter reported posts template block for MCP front page
*
* @event core.mcp_front_view_modify_reported_post_row
* @var array forum_list List of forums that contain the posts
* @var string mode MCP front view mode
* @var array reported_post_row Template block array of the reported post
* @var array row Array with reported post data
* @since 3.3.5-RC1
*/
$vars = [
'forum_list',
'mode',
'reported_post_row',
'row',
];
extract($phpbb_dispatcher->trigger_event('core.mcp_front_view_modify_reported_post_row', compact($vars)));
$template->assign_block_vars('report', $reported_post_row);
}
$db->sql_freeresult($result);
}

View File

@@ -1171,7 +1171,7 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
$return_link = array();
if ($affected_topics == 1 && $topic_id)
{
$return_link[] = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id") . '">', '</a>');
$return_link[] = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t=$topic_id") . '">', '</a>');
}
$return_link[] = sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
@@ -1230,7 +1230,7 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
$return_link = array();
if ($affected_topics == 1 && !$deleted_topics && $topic_id)
{
$return_link[] = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id") . '">', '</a>');
$return_link[] = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t=$topic_id") . '">', '</a>');
}
$return_link[] = sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
@@ -1563,6 +1563,26 @@ function mcp_fork_topic($topic_ids)
$counter[$row['poster_id']] = 1;
}
}
/**
* Modify the forked post's sql array before it's inserted into the database.
*
* @event core.mcp_main_modify_fork_post_sql
* @var int new_topic_id The newly created topic ID
* @var int to_forum_id The forum ID where the forked topic has been moved to
* @var array sql_ary SQL Array with the post's data
* @var array row Post data
* @var array counter Array with post counts
* @since 3.3.5-RC1
*/
$vars = [
'new_topic_id',
'to_forum_id',
'sql_ary',
'row',
'counter',
];
extract($phpbb_dispatcher->trigger_event('core.mcp_main_modify_fork_post_sql', compact($vars)));
$db->sql_query('INSERT INTO ' . POSTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
$new_post_id = $db->sql_nextid();

View File

@@ -220,7 +220,7 @@ function mcp_post_details($id, $mode, $action)
$mcp_post_template_data = array(
'U_MCP_ACTION' => "$url&amp;i=main&amp;quickmod=1&amp;mode=post_details", // Use this for mode paramaters
'U_POST_ACTION' => "$url&amp;i=$id&amp;mode=post_details", // Use this for action parameters
'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;p=$post_id&amp;f={$post_info['forum_id']}"),
'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;p=$post_id"),
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
'S_CAN_CHGPOSTER' => $auth->acl_get('m_chgposter', $post_info['forum_id']),
@@ -236,18 +236,18 @@ function mcp_post_details($id, $mode, $action)
'DELETED_MESSAGE' => $l_deleted_by,
'DELETE_REASON' => $post_info['post_delete_reason'],
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&amp;f={$post_info['forum_id']}&amp;p={$post_info['post_id']}") : '',
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&amp;p={$post_info['post_id']}") : '',
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=mcp_chgposter&amp;field=username&amp;select_single=true'),
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;f=' . $post_info['forum_id'] . '&amp;p=' . $post_id),
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;f=' . $post_info['forum_id'] . '&amp;p=' . $post_id),
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;p=' . $post_id),
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;p=' . $post_id),
'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $post_info['user_id']),
'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $post_info['user_id']) : '',
'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;p=' . $post_info['post_id'] . '#p' . $post_info['post_id']),
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']),
'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $post_info['post_id'] . '#p' . $post_info['post_id']),
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $post_info['topic_id']),
'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'UNREAD_POST') : $user->img('icon_post_target', 'POST'),
'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$post_info['forum_id']}&amp;p=$post_id") . "#p$post_id\">", '</a>'),
'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p=$post_id") . "#p$post_id\">", '</a>'),
'RETURN_FORUM' => sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", "f={$post_info['forum_id']}&amp;start={$start}") . '">', '</a>'),
'REPORTED_IMG' => $user->img('icon_topic_reported', $user->lang['POST_REPORTED']),
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', $user->lang['POST_UNAPPROVED']),

View File

@@ -278,12 +278,12 @@ class mcp_queue
$l_deleted_by = '';
}
$post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;p=' . $post_info['post_id'] . '#p' . $post_info['post_id']);
$topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']);
$post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $post_info['post_id'] . '#p' . $post_info['post_id']);
$topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $post_info['topic_id']);
$post_data = array(
'S_MCP_QUEUE' => true,
'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;p=$post_id&amp;f=$forum_id"),
'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;p=$post_id"),
'S_CAN_DELETE_POST' => $auth->acl_get('m_delete', $post_info['forum_id']),
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
'S_POST_REPORTED' => $post_info['post_reported'],
@@ -294,9 +294,9 @@ class mcp_queue
'DELETED_MESSAGE' => $l_deleted_by,
'DELETE_REASON' => $post_info['post_delete_reason'],
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&amp;f={$post_info['forum_id']}&amp;p={$post_info['post_id']}") : '',
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;f=' . $post_info['forum_id'] . '&amp;p=' . $post_id),
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;f=' . $post_info['forum_id'] . '&amp;p=' . $post_id),
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&amp;p={$post_info['post_id']}") : '',
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;p=' . $post_id),
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;p=' . $post_id),
'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $post_info['user_id']),
'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $post_info['user_id']) : '',
'U_VIEW_POST' => $post_url,
@@ -324,7 +324,7 @@ class mcp_queue
'POST_ID' => $post_info['post_id'],
'S_FIRST_POST' => ($post_info['topic_first_post_id'] == $post_id),
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;f=' . $post_info['forum_id'] . '&amp;p=' . $post_id . '&amp;lookup=' . $post_info['poster_ip']) . '#ip' : '',
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;p=' . $post_id . '&amp;lookup=' . $post_info['poster_ip']) . '#ip' : '',
);
/**
@@ -614,10 +614,10 @@ class mcp_queue
}
$post_row = array(
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id']),
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $row['topic_id']),
'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;p=' . $row['post_id']) . (($mode == 'unapproved_posts') ? '#p' . $row['post_id'] : ''),
'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;start=$start&amp;mode=approve_details&amp;f={$row['forum_id']}&amp;p={$row['post_id']}" . (($mode == 'unapproved_topics') ? "&amp;t={$row['topic_id']}" : '')),
'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . (($mode == 'unapproved_posts') ? '#p' . $row['post_id'] : ''),
'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;start=$start&amp;mode=approve_details&amp;p={$row['post_id']}" . (($mode == 'unapproved_topics') ? "&amp;t={$row['topic_id']}" : '')),
'POST_AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
'POST_AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
@@ -746,7 +746,7 @@ class mcp_queue
$topic_info[$topic_id]['last_post'] = true;
}
$post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$post_data['forum_id']}&amp;t={$post_data['topic_id']}&amp;p={$post_data['post_id']}") . '#p' . $post_data['post_id'];
$post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p={$post_data['post_id']}") . '#p' . $post_data['post_id'];
$approve_log[] = array(
'forum_id' => $post_data['forum_id'],
@@ -984,7 +984,7 @@ class mcp_queue
$phpbb_content_visibility->set_topic_visibility(ITEM_APPROVED, $topic_id, $topic_data['forum_id'], $user->data['user_id'], time(), '');
$first_post_ids[$topic_id] = (int) $topic_data['topic_first_post_id'];
$topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$topic_data['forum_id']}&amp;t={$topic_id}");
$topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$topic_id}");
$approve_log[] = array(
'forum_id' => $topic_data['forum_id'],
@@ -1430,7 +1430,7 @@ class mcp_queue
{
// However this is only possible if the topic still exists,
// Otherwise we go back to the viewforum page
$redirect = append_sid($phpbb_root_path . 'viewforum.' . $phpEx, 'f=' . $request->variable('f', 0));
$redirect = append_sid($phpbb_root_path . 'viewforum.' . $phpEx, 'f=' . $post_data['forum_id']);
}
}

View File

@@ -251,7 +251,7 @@ class mcp_reports
// So it can be sent through the event below.
$report_template = array(
'S_MCP_REPORT' => true,
'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;f=' . $post_info['forum_id'] . '&amp;p=' . $post_id),
'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;p=' . $post_id),
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
'S_POST_REPORTED' => $post_info['post_reported'],
'S_POST_UNAPPROVED' => $post_info['post_visibility'] == ITEM_UNAPPROVED || $post_info['post_visibility'] == ITEM_REAPPROVE,
@@ -259,16 +259,16 @@ class mcp_reports
'S_REPORT_CLOSED' => $report['report_closed'],
'S_USER_NOTES' => true,
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&amp;f={$post_info['forum_id']}&amp;p={$post_info['post_id']}") : '',
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;f=' . $post_info['forum_id'] . '&amp;p=' . $post_id),
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;f=' . $post_info['forum_id'] . '&amp;p=' . $post_id),
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&amp;p={$post_info['post_id']}") : '',
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;p=' . $post_id),
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;p=' . $post_id),
'U_MCP_REPORTER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $report['user_id']),
'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $post_info['user_id']),
'U_MCP_WARN_REPORTER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $report['user_id']) : '',
'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $post_info['user_id']) : '',
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $post_info['forum_id']),
'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;p=' . $post_info['post_id'] . '#p' . $post_info['post_id']),
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']),
'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $post_info['post_id'] . '#p' . $post_info['post_id']),
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $post_info['topic_id']),
'EDIT_IMG' => $user->img('icon_post_edit', $user->lang['EDIT_POST']),
'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'UNREAD_POST') : $user->img('icon_post_target', 'POST'),
@@ -300,7 +300,7 @@ class mcp_reports
'POST_ID' => $post_info['post_id'],
'SIGNATURE' => $post_info['user_sig'],
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? $this->u_action . '&amp;r=' . $report_id . '&amp;p=' . $post_id . '&amp;f=' . $forum_id . '&amp;lookup=' . $post_info['poster_ip'] . '#ip' : '',
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? $this->u_action . '&amp;r=' . $report_id . '&amp;p=' . $post_id . '&amp;lookup=' . $post_info['poster_ip'] . '#ip' : '',
);
/**
@@ -493,14 +493,33 @@ class mcp_reports
AND ru.user_id = r.user_id
AND r.pm_id = 0
ORDER BY ' . $sort_order_sql;
/**
* Alter sql query to get reports data for requested forum and topic or just forum
*
* @event core.mcp_reports_modify_reports_data_sql
* @var string sql String with the query to be executed
* @var array forum_list List of forums that contain the posts
* @var int topic_id topic_id in the page request
* @var string sort_order_sql String with the ORDER BY SQL code used in this query
* @since 3.3.5-RC1
*/
$vars = [
'sql',
'forum_list',
'topic_id',
'sort_order_sql',
];
extract($phpbb_dispatcher->trigger_event('core.mcp_reports_modify_reports_data_sql', compact($vars)));
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$template->assign_block_vars('postrow', array(
$post_row = [
'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;p=' . $row['post_id']) . '#p' . $row['post_id'],
'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=reports&amp;start=$start&amp;mode=report_details&amp;f={$row['forum_id']}&amp;r={$row['report_id']}"),
'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . '#p' . $row['post_id'],
'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=reports&amp;start=$start&amp;mode=report_details&amp;r={$row['report_id']}"),
'POST_AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
'POST_AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
@@ -520,13 +539,37 @@ class mcp_reports
'REPORT_TIME' => $user->format_date($row['report_time']),
'TOPIC_TITLE' => $row['topic_title'],
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
));
];
/**
* Alter posts template block for MCP reports
*
* @event core.mcp_reports_modify_post_row
* @var string mode Post report mode
* @var array forum_data Array containing forum data
* @var array post_row Template block array of the post
* @var array row Array with original post and report data
* @var int start Start item of this page
* @var int topic_id topic_id in the page request
* @since 3.3.5-RC1
*/
$vars = [
'mode',
'forum_data',
'post_row',
'row',
'start',
'topic_id',
];
extract($phpbb_dispatcher->trigger_event('core.mcp_reports_modify_post_row', compact($vars)));
$template->assign_block_vars('postrow', $post_row);
}
$db->sql_freeresult($result);
unset($report_ids, $row);
}
$base_url = $this->u_action . "&amp;f=$forum_id&amp;t=$topic_id&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir";
$base_url = $this->u_action . "&amp;t=$topic_id&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir";
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total, $config['topics_per_page'], $start);
// Now display the page
@@ -830,7 +873,7 @@ function close_report($report_id_list, $mode, $action, $pm = false)
if (count($topic_ids) === 1)
{
$return_topic = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . current($topic_ids) . '&amp;f=' . current($forum_ids)) . '">', '</a>') . '<br /><br />';
$return_topic = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . current($topic_ids)) . '">', '</a>') . '<br /><br />';
}
}

View File

@@ -288,9 +288,9 @@ function mcp_topic_view($id, $mode, $action)
'S_CHECKED' => (($submitted_id_list && !in_array(intval($row['post_id']), $submitted_id_list)) || in_array(intval($row['post_id']), $checked_ids)) ? true : false,
'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,
'U_POST_DETAILS' => "$url&amp;i=$id&amp;p={$row['post_id']}&amp;mode=post_details" . (($forum_id) ? "&amp;f=$forum_id" : ''),
'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;f=' . $topic_info['forum_id'] . '&amp;p=' . $row['post_id']) : '',
'U_MCP_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;f=' . $topic_info['forum_id'] . '&amp;p=' . $row['post_id']) : '',
'U_POST_DETAILS' => "$url&amp;i=$id&amp;p={$row['post_id']}&amp;mode=post_details",
'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;p=' . $row['post_id']) : '',
'U_MCP_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;p=' . $row['post_id']) : '',
);
/**
@@ -379,12 +379,12 @@ function mcp_topic_view($id, $mode, $action)
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total, $posts_per_page, $start);
}
$template->assign_vars(array(
$topic_row = [
'TOPIC_TITLE' => $topic_info['topic_title'],
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_info['forum_id'] . '&amp;t=' . $topic_info['topic_id']),
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $topic_info['topic_id']),
'TO_TOPIC_ID' => $to_topic_id,
'TO_TOPIC_INFO' => ($to_topic_id) ? sprintf($user->lang['YOU_SELECTED_TOPIC'], $to_topic_id, '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_topic_info['forum_id'] . '&amp;t=' . $to_topic_id) . '">' . $to_topic_info['topic_title'] . '</a>') : '',
'TO_TOPIC_INFO' => ($to_topic_id) ? sprintf($user->lang['YOU_SELECTED_TOPIC'], $to_topic_id, '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $to_topic_id) . '">' . $to_topic_info['topic_title'] . '</a>') : '',
'SPLIT_SUBJECT' => $subject,
'POSTS_PER_PAGE' => $posts_per_page,
@@ -416,11 +416,53 @@ function mcp_topic_view($id, $mode, $action)
'U_SELECT_TOPIC' => "$url&amp;i=$id&amp;mode=forum_view&amp;action=merge_select" . (($forum_id) ? "&amp;f=$forum_id" : ''),
'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$topic_info['forum_id']}&amp;t={$topic_info['topic_id']}&amp;start=$start") . '">', '</a>'),
'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$topic_info['topic_id']}&amp;start=$start") . '">', '</a>'),
'RETURN_FORUM' => sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", "f={$topic_info['forum_id']}&amp;start=$start") . '">', '</a>'),
'TOTAL_POSTS' => $user->lang('VIEW_TOPIC_POSTS', (int) $total),
));
];
/**
* Event to modify the template data block for topic data output in the MCP
*
* @event core.mcp_topic_review_modify_topic_row
* @var string action Moderation action type to be performed with the topic
* @var bool has_unapproved_posts Flag indicating if the topic has unapproved posts
* @var int icon_id Split topic icon ID
* @var int id ID of the tab we are displaying
* @var string mode Mode of the MCP page we are displaying
* @var int topic_id The topic ID we are currently reviewing
* @var int forum_id The forum ID we are currently in
* @var bool s_topic_icons Flag indicating if split topic icon to be displayed
* @var int start Start item of this page
* @var string subject Subject of the topic to be split
* @var array topic_info Array with topic data
* @var int to_forum_id Forum id the topic is being moved to
* @var int to_topic_id Topic ID the topic is being merged with
* @var array topic_row Topic template data array
* @var int total Total posts count
* @since 3.3.5-RC1
*/
$vars = [
'action',
'has_unapproved_posts',
'icon_id',
'id',
'mode',
'topic_id',
'forum_id',
's_topic_icons',
'start',
'subject',
'topic_info',
'to_forum_id',
'to_topic_id',
'topic_row',
'total',
];
extract($phpbb_dispatcher->trigger_event('core.mcp_topic_review_modify_topic_row', compact($vars)));
$template->assign_vars($topic_row);
}
/**
@@ -692,10 +734,36 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
$config->increment('num_topics', 1, false);
// Link back to both topics
$return_link = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']) . '">', '</a>') . '<br /><br />' . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&amp;t=$to_topic_id");
$return_link = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $post_info['topic_id']) . '">', '</a>') . '<br /><br />' . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $to_topic_id) . '">', '</a>');
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?t=$to_topic_id");
$redirect = reapply_sid($redirect);
/**
* Event to access topic data after split
*
* @event core.mcp_topic_split_topic_after
* @var string action Split action type to be performed with the topic
* @var int topic_id The topic ID we are currently splitting
* @var int forum_id The forum ID we are currently in
* @var int start Start item of this page
* @var string subject Subject of the topic to be split
* @var array topic_info Array with topic data
* @var int to_forum_id Forum id the topic is being moved to
* @var int to_topic_id Topic ID the topic is being split to
* @since 3.3.5-RC1
*/
$vars = [
'action',
'topic_id',
'forum_id',
'start',
'subject',
'topic_info',
'to_forum_id',
'to_topic_id',
];
extract($phpbb_dispatcher->trigger_event('core.mcp_topic_split_topic_after', compact($vars)));
meta_refresh(3, $redirect);
trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
}
@@ -789,7 +857,7 @@ function merge_posts($topic_id, $to_topic_id)
if ($row)
{
$return_link .= sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $topic_id) . '">', '</a>');
$return_link .= sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $topic_id) . '">', '</a>');
}
else
{
@@ -812,8 +880,8 @@ function merge_posts($topic_id, $to_topic_id)
sync('forum', 'forum_id', $sync_forums, true, true);
// Link to the new topic
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&amp;t=$to_topic_id");
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $to_topic_id) . '">', '</a>');
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?t=$to_topic_id");
$redirect = reapply_sid($redirect);
/**

View File

@@ -238,10 +238,10 @@ class mcp_warn
$user_id = $user_row['user_id'];
if (strpos($this->u_action, "&amp;f=$forum_id&amp;p=$post_id") === false)
if (strpos($this->u_action, "&amp;p=$post_id") === false)
{
$this->p_master->adjust_url("&amp;f=$forum_id&amp;p=$post_id");
$this->u_action .= "&amp;f=$forum_id&amp;p=$post_id";
$this->p_master->adjust_url("&amp;p=$post_id");
$this->u_action .= "&amp;p=$post_id";
}
// Check if can send a notification
@@ -358,7 +358,7 @@ class mcp_warn
'AVATAR_IMG' => $avatar_img,
'RANK_IMG' => $user_rank_data['img'],
'L_WARNING_POST_DEFAULT' => sprintf($user->lang['WARNING_POST_DEFAULT'], generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&amp;p=$post_id#p$post_id"),
'L_WARNING_POST_DEFAULT' => sprintf($user->lang['WARNING_POST_DEFAULT'], generate_board_url() . "/viewtopic.$phpEx?p=$post_id#p$post_id"),
'S_CAN_NOTIFY' => $s_can_notify,
));

View File

@@ -38,7 +38,7 @@ class phpbb_questionnaire_data_collector
/**
* Constructor.
*
* @param string
* @param string $install_id
*/
function __construct($install_id)
{

View File

@@ -76,10 +76,12 @@ class ucp_activate
if ($update_password)
{
$sql_ary = array(
'user_actkey' => '',
'user_password' => $user_row['user_newpasswd'],
'user_newpasswd' => '',
'user_login_attempts' => 0,
'user_actkey' => '',
'user_password' => $user_row['user_newpasswd'],
'user_newpasswd' => '',
'user_login_attempts' => 0,
'reset_token' => '',
'reset_token_expiration' => 0,
);
$sql = 'UPDATE ' . USERS_TABLE . '
@@ -101,8 +103,14 @@ class ucp_activate
user_active_flip('activate', $user_row['user_id']);
$sql = 'UPDATE ' . USERS_TABLE . "
SET user_actkey = ''
$sql_ary = [
'user_actkey' => '',
'reset_token' => '',
'reset_token_expiration' => 0,
];
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
WHERE user_id = {$user_row['user_id']}";
$db->sql_query($sql);

View File

@@ -159,7 +159,7 @@ class ucp_attachments
}
else
{
$view_topic = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$row['topic_id']}&amp;p={$row['post_msg_id']}") . "#p{$row['post_msg_id']}";
$view_topic = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p={$row['post_msg_id']}") . "#p{$row['post_msg_id']}";
}
$template->assign_block_vars('attachrow', array(
@@ -194,7 +194,7 @@ class ucp_attachments
$template->assign_vars(array(
'TOTAL_ATTACHMENTS' => $num_attachments,
'NUM_ATTACHMENTS' => $user->lang('NUM_ATTACHMENTS', $num_attachments),
'NUM_ATTACHMENTS' => $user->lang('NUM_ATTACHMENTS', (int) $num_attachments),
'L_TITLE' => $user->lang['UCP_ATTACHMENTS'],

View File

@@ -184,10 +184,10 @@ class ucp_main
'S_UNREAD' => $unread_topic,
'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;p=" . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p=" . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;view=unread") . '#unread',
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id"),
'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t=$topic_id&amp;view=unread") . '#unread',
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t=$topic_id"),
);
/**
@@ -396,7 +396,7 @@ class ucp_main
if ($row['forum_last_post_id'])
{
$last_post_time = $user->format_date($row['forum_last_post_time']);
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;p=" . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p=" . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
}
else
{
@@ -677,10 +677,10 @@ class ucp_main
if (isset($topic_rows[$draft['topic_id']]) && $auth->acl_get('f_read', $topic_rows[$draft['topic_id']]['forum_id']))
{
$link_topic = true;
$view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_rows[$draft['topic_id']]['forum_id'] . '&amp;t=' . $draft['topic_id']);
$view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $draft['topic_id']);
$title = $topic_rows[$draft['topic_id']]['topic_title'];
$insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 'f=' . $topic_rows[$draft['topic_id']]['forum_id'] . '&amp;t=' . $draft['topic_id'] . '&amp;mode=reply&amp;d=' . $draft['draft_id']);
$insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 't=' . $draft['topic_id'] . '&amp;mode=reply&amp;d=' . $draft['draft_id']);
}
else if ($auth->acl_get('f_read', $draft['forum_id']))
{
@@ -940,7 +940,7 @@ class ucp_main
$folder_img = $folder_alt = $topic_type = '';
topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type);
$view_topic_url_params = "f=$forum_id&amp;t=$topic_id";
$view_topic_url_params = "t=$topic_id";
$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params);
// Send vars to template
@@ -1022,7 +1022,7 @@ class ucp_main
$template->assign_block_vars('topicrow', $template_vars);
$pagination->generate_template_pagination(append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . "&amp;t=$topic_id"), 'topicrow.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true);
$pagination->generate_template_pagination(append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t=$topic_id"), 'topicrow.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true);
}
}
}

View File

@@ -159,33 +159,23 @@ class ucp_prefs
phpbb_timezone_select($template, $user, $data['tz'], true);
// check if there are any user-selectable languages
$sql = 'SELECT COUNT(lang_id) as languages_count
FROM ' . LANG_TABLE;
$sql = 'SELECT lang_iso, lang_local_name
FROM ' . LANG_TABLE . '
ORDER BY lang_english_name';
$result = $db->sql_query($sql);
if ($db->sql_fetchfield('languages_count') > 1)
{
$s_more_languages = true;
}
else
{
$s_more_languages = false;
}
$lang_row = (array) $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
$s_more_languages = count($lang_row) > 1;
// check if there are any user-selectable styles
$sql = 'SELECT COUNT(style_id) as styles_count
FROM ' . STYLES_TABLE . '
WHERE style_active = 1';
$sql = 'SELECT style_id, style_name
FROM ' . STYLES_TABLE . '
WHERE style_active = 1
ORDER BY style_name';
$result = $db->sql_query($sql);
if ($db->sql_fetchfield('styles_count') > 1)
{
$s_more_styles = true;
}
else
{
$s_more_styles = false;
}
$styles_row = (array) $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
$s_more_styles = count($styles_row) > 1;
$template->assign_vars(array(
'ERROR' => (count($error)) ? implode('<br />', $error) : '',
@@ -205,11 +195,11 @@ class ucp_prefs
'DEFAULT_DATEFORMAT' => $config['default_dateformat'],
'A_DEFAULT_DATEFORMAT' => addslashes($config['default_dateformat']),
'S_MORE_LANGUAGES' => $s_more_languages,
'S_MORE_LANGUAGES' => $s_more_languages,
'S_MORE_STYLES' => $s_more_styles,
'S_LANG_OPTIONS' => language_select($data['lang']),
'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($data['user_style']),
'S_LANG_OPTIONS' => language_select($data['lang'], $lang_row),
'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($data['user_style'], false, $styles_row),
'S_CAN_HIDE_ONLINE' => ($auth->acl_get('u_hideonline')) ? true : false,
'S_SELECT_NOTIFY' => ($config['jab_enable'] && $user->data['user_jabber'] && @extension_loaded('xml')) ? true : false)
);

View File

@@ -150,15 +150,11 @@ class ucp_register
}
// Checking amount of available languages
$sql = 'SELECT lang_id
FROM ' . LANG_TABLE;
$sql = 'SELECT lang_iso, lang_local_name
FROM ' . LANG_TABLE . '
ORDER BY lang_english_name';
$result = $db->sql_query($sql);
$lang_row = array();
while ($row = $db->sql_fetchrow($result))
{
$lang_row[] = $row;
}
$lang_row = (array) $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
if ($coppa === false && $config['coppa_enable'])
@@ -171,7 +167,7 @@ class ucp_register
unset($now);
$template_vars = array(
'S_LANG_OPTIONS' => (count($lang_row) > 1) ? language_select($user_lang) : '',
'S_LANG_OPTIONS' => (count($lang_row) > 1) ? language_select($user_lang, $lang_row) : '',
'L_COPPA_NO' => $user->lang('UCP_COPPA_BEFORE', $coppa_birthday),
'L_COPPA_YES' => $user->lang('UCP_COPPA_ON_AFTER', $coppa_birthday),
@@ -186,7 +182,7 @@ class ucp_register
else
{
$template_vars = array(
'S_LANG_OPTIONS' => (count($lang_row) > 1) ? language_select($user_lang) : '',
'S_LANG_OPTIONS' => (count($lang_row) > 1) ? language_select($user_lang, $lang_row) : '',
'L_TERMS_OF_USE' => sprintf($user->lang['TERMS_OF_USE_CONTENT'], $config['sitename'], generate_board_url()),
'S_SHOW_COPPA' => false,
@@ -367,7 +363,7 @@ class ucp_register
$config['require_activation'] == USER_ACTIVATION_SELF ||
$config['require_activation'] == USER_ACTIVATION_ADMIN) && $config['email_enable'])
{
$user_actkey = gen_rand_string(mt_rand(6, 10));
$user_actkey = strtolower(gen_rand_string(32));
$user_type = USER_INACTIVE;
$user_inactive_reason = INACTIVE_REGISTER;
$user_inactive_time = time();
@@ -633,6 +629,14 @@ class ucp_register
// Assign template vars for timezone select
phpbb_timezone_select($template, $user, $data['tz'], true);
// Checking amount of available languages
$sql = 'SELECT lang_iso, lang_local_name
FROM ' . LANG_TABLE . '
ORDER BY lang_english_name';
$result = $db->sql_query($sql);
$lang_row = (array) $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
$template_vars = array(
'USERNAME' => $data['username'],
'PASSWORD' => $data['new_password'],
@@ -643,7 +647,7 @@ class ucp_register
'L_USERNAME_EXPLAIN' => $user->lang($config['allow_name_chars'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_name_chars']), $user->lang('CHARACTERS', (int) $config['max_name_chars'])),
'L_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_pass_chars'])),
'S_LANG_OPTIONS' => language_select($data['lang']),
'S_LANG_OPTIONS' => (count($lang_row) > 1) ? language_select($data['lang'], $lang_row) : '',
'S_TZ_PRESELECT' => !$submit,
'S_CONFIRM_REFRESH' => ($config['enable_confirm'] && $config['confirm_refresh']) ? true : false,
'S_REGISTRATION' => true,

View File

@@ -22,11 +22,9 @@ if (!defined('IN_PHPBB'))
setlocale(LC_CTYPE, 'C');
/**
* Setup the UTF-8 portability layer
*/
Patchwork\Utf8\Bootup::initUtf8Encode();
Patchwork\Utf8\Bootup::initMbstring();
Patchwork\Utf8\Bootup::initIntl();
* UTF-8 portability layer is provided by
* symfony/polyfill-mbstring, symfony/polyfill-intl-normalizer, symfony/polyfill-php72
*/
/**
* UTF-8 tools
@@ -171,7 +169,7 @@ function utf8_strspn($str, $mask, $start = null, $length = null)
* Make a string's first character uppercase
*
* @author Harry Fuecks
* @param string
* @param string $str
* @return string with first character as upper case (if applicable)
*/
function utf8_ucfirst($str)

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.4',
'phpbb_version' => '3.3.6',
'author' => '<a href="https://www.phpbb.com/">phpBB Limited</a>',
'dbms' => $dbms,
'dbhost' => $dbhost,

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.4');
define('PHPBB_VERSION', '3.3.6');
$phpbb_root_path = __DIR__ . '/../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);

View File

@@ -200,7 +200,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_lastread', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_track', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_font_awesome_url', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jumpbox', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_moderators', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_notifications', '1');
@@ -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.4');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.3.6');
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');

View File

@@ -49,13 +49,19 @@ function phpbb_include_updated($path, $phpbb_root_path, $optional = false)
function installer_msg_handler($errno, $msg_text, $errfile, $errline)
{
global $phpbb_installer_container;
global $phpbb_installer_container, $msg_long_text;
if (error_reporting() == 0)
{
return true;
}
// If the message handler is stripping text, fallback to the long version if available
if (!$msg_text && !empty($msg_long_text))
{
$msg_text = $msg_long_text;
}
switch ($errno)
{
case E_NOTICE:
@@ -87,6 +93,21 @@ function installer_msg_handler($errno, $msg_text, $errfile, $errline)
case E_USER_ERROR:
$msg = '<b>General Error:</b><br>' . $msg_text . '<br> in file ' . $errfile . ' on line ' . $errline . '<br><br>';
if (!empty($phpbb_installer_container))
{
try
{
/** @var \phpbb\install\helper\iohandler\iohandler_interface $iohandler */
$iohandler = $phpbb_installer_container->get('installer.helper.iohandler');
$iohandler->add_error_message($msg);
$iohandler->send_response(true);
exit();
}
catch (\phpbb\install\helper\iohandler\exception\iohandler_not_implemented_exception $e)
{
throw new \phpbb\exception\runtime_exception($msg);
}
}
throw new \phpbb\exception\runtime_exception($msg);
break;
case E_DEPRECATED:

View File

@@ -170,4 +170,5 @@ $lang = array_merge($lang, array(
'UPLOAD_DIR_EXPLAIN' => 'Storage path for attachments. Please note that if you change this directory while already having uploaded attachments you need to manually copy the files to their new location.',
'UPLOAD_ICON' => 'Upload icon',
'UPLOAD_NOT_DIR' => 'The upload location you specified does not appear to be a directory.',
'UPLOAD_POST_NOT_EXIST' => 'File “%1$s” can not be uploaded to post number %2$d as the post does not exist.',
));

View File

@@ -70,7 +70,6 @@ $lang = array_merge($lang, array(
'START_RESTORE' => 'Start restore',
'STORE_AND_DOWNLOAD' => 'Store and download',
'STORE_LOCAL' => 'Store file locally',
'STRUCTURE_ONLY' => 'Structure only',
'TABLE_SELECT' => 'Table select',
'TABLE_SELECT_ERROR'=> 'You must select at least one table.',

View File

@@ -347,7 +347,7 @@ $lang = array_merge($lang, array(
// Common updater messages
$lang = array_merge($lang, array(
'UPDATE_INSTALLATION' => 'Update phpBB installation',
'UPDATE_INSTALLATION_EXPLAIN' => 'With this option, it is possible to update your phpBB installation to the latest version.<br />During the process all of your files will be checked for their integrity. You are able to review all differences and files before the update.<br /><br />The file update itself can be done in two different ways.</p><h2>Manual Update</h2><p>With this update you only download your personal set of changed files to make sure you do not lose your file modifications you may have done. After you downloaded this package you need to manually upload the files to their correct position under your phpBB root directory. Once done, you are able to do the file check stage again to see if you moved the files to their correct location.</p><h2>Automatic Update with FTP</h2><p>This method is similar to the first one but without the need to download the changed files and uploading them on your own. This will be done for you. In order to use this method you need to know your FTP login details since you will be asked for them. Once finished you will be redirected to the file check again to make sure everything got updated correctly.<br /><br />',
'UPDATE_INSTALLATION_EXPLAIN' => 'With this option, it is possible to update your phpBB installation to the latest version.<br />During the process all of your files will be checked for their integrity. You are able to review all differences and files before the update.<br /><br />The file update itself can be done in two different ways.</p><h2>Manual Update</h2><p>With this update you only download your personal set of changed files to make sure you do not lose your file modifications you may have done. After you downloaded this package you need to manually upload the files to their correct position under your phpBB root directory. Once done, you are able to do the file check stage again to see if you moved the files to their correct location.</p><h2>Advanced Update with FTP</h2><p>This method is similar to the first one but without the need to download the changed files and uploading them on your own. This will be done for you. In order to use this method you need to know your FTP login details since you will be asked for them. Once finished you will be redirected to the file check again to make sure everything got updated correctly.<br /><br />',
'UPDATE_INSTRUCTIONS' => '
<h1>Release announcement</h1>
@@ -358,7 +358,7 @@ $lang = array_merge($lang, array(
<h1>How to update your installation with the Full Package</h1>
<p>The recommended way of updating your installation is using the full package. If core phpBB files have been modified in your installation you may wish to use the automatic update package in order to not lose these changes. You are also able to update your installation using the other methods listed within the INSTALL.html document. The steps for updating phpBB3 using the full package are:</p>
<p>The recommended way of updating your installation is using the full package. If core phpBB files have been modified in your installation you may wish to use the advanced update package in order to not lose these changes. You are also able to update your installation using the other methods listed within the INSTALL.html document. The steps for updating phpBB3 using the full package are:</p>
<ol style="margin-left: 20px; font-size: 1.1em;">
<li><strong class="error">Backup all board files and the database.</strong></li>
@@ -379,12 +379,12 @@ $lang = array_merge($lang, array(
<li>Update your style<br><br></li>
</ul>
<h1>How to update your installation with the Automatic Update Package</h1>
<h1>How to update your installation with the Advanced Update Package</h1>
<p>The automatic update package is only recommended in case core phpBB files have been modified in your installation. You are also able to update your installation using the methods listed within the INSTALL.html document. The steps for updating phpBB3 using the automatic update package are:</p>
<p>The advanced update package is only recommended for expert users in case core phpBB files have been modified in your installation. You are also able to update your installation using the methods listed within the INSTALL.html document. The steps for updating phpBB3 using the advanced update package are:</p>
<ol style="margin-left: 20px; font-size: 1.1em;">
<li>Go to the <a href="https://www.phpbb.com/downloads/" title="https://www.phpbb.com/downloads/">phpBB.com downloads page</a> and download the "Automatic Update Package" archive.</li>
<li>Go to the <a href="https://www.phpbb.com/downloads/" title="https://www.phpbb.com/downloads/">phpBB.com downloads page</a> and download the "Advanced Update Package" archive.</li>
<li>Unpack the archive.</li>
<li>Upload the complete uncompressed "install" and "vendor" folders to your phpBB root directory (where your config.php file is).<br><br></li>
</ol>

View File

@@ -77,5 +77,6 @@ $lang = array_merge($lang, array(
'PARENT_MODULE_FIND_ERROR' => 'Unable to determine the parent module identifier: %s',
'PERMISSION_NOT_EXIST' => 'The permission setting "%s" unexpectedly does not exist.',
'ROLE_ASSIGNED_NOT_EXIST' => 'The permission role assigned to group "%1$s" unexpectedly does not exist. Role id: "%2$s"',
'ROLE_NOT_EXIST' => 'The permission role "%s" unexpectedly does not exist.',
));

View File

@@ -980,23 +980,26 @@ switch ($mode)
WHERE ' . $db->sql_in_set('user_type', $user_types) . '
AND username_clean ' . $db->sql_like_expression(utf8_clean_string($username_chars) . $db->get_any_char());
$result = $db->sql_query_limit($sql, 10);
$user_list = array();
$user_list = [];
while ($row = $db->sql_fetchrow($result))
{
$user_list[] = array(
$user_list[] = [
'user_id' => (int) $row['user_id'],
'result' => $row['username'],
'result' => htmlspecialchars_decode($row['username']),
'username_full' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
'display' => get_username_string('no_profile', $row['user_id'], $row['username'], $row['user_colour']),
);
];
}
$db->sql_freeresult($result);
$json_response = new \phpbb\json_response();
$json_response->send(array(
$json_response->send([
'keyword' => $username_chars,
'results' => $user_list,
));
]);
break;

View File

@@ -85,7 +85,7 @@ abstract class base implements provider_interface
/**
* {@inheritdoc}
*/
public function login_link_has_necessary_data($login_link_data)
public function login_link_has_necessary_data(array $login_link_data)
{
return;
}

View File

@@ -163,7 +163,7 @@ class oauth extends base
$provider = $this->request->variable('oauth_service', '', false);
$service_name = $this->get_service_name($provider);
if ($provider === '' || !array_key_exists($service_name, $this->service_providers))
if ($provider === '' || !$this->service_providers->offsetExists($service_name))
{
return [
'status' => LOGIN_ERROR_EXTERNAL_AUTH,
@@ -411,7 +411,7 @@ class oauth extends base
/**
* {@inheritdoc}
*/
public function login_link_has_necessary_data($login_link_data)
public function login_link_has_necessary_data(array $login_link_data)
{
if (empty($login_link_data))
{
@@ -452,7 +452,7 @@ class oauth extends base
$service_name = $this->get_service_name($link_data['oauth_service']);
if (!array_key_exists($service_name, $this->service_providers))
if (!$this->service_providers->offsetExists($service_name))
{
return 'LOGIN_ERROR_OAUTH_SERVICE_DOES_NOT_EXIST';
}

View File

@@ -154,7 +154,7 @@ interface provider_interface
* @return string|null Returns a string with a language constant if there
* is data missing or null if there is no error.
*/
public function login_link_has_necessary_data($login_link_data);
public function login_link_has_necessary_data(array $login_link_data);
/**
* Links an external account to a phpBB account.

View File

@@ -15,8 +15,9 @@
"support": {
"issues": "https://tracker.phpbb.com",
"forum": "https://www.phpbb.com/community/",
"wiki": "https://wiki.phpbb.com",
"irc": "irc://irc.freenode.org/phpbb"
"docs": "https://www.phpbb.com/support/docs/",
"irc": "irc://irc.libera.chat/phpbb",
"chat": "https://www.phpbb.com/support/chat/"
},
"autoload": {
"classmap": [""]

View File

@@ -13,20 +13,23 @@
namespace phpbb\config;
use phpbb\cache\driver\driver_interface as cache_interface;
use phpbb\db\driver\driver_interface as db_interface;
/**
* Configuration container class
*/
class db extends \phpbb\config\config
class db extends config
{
/**
* Cache instance
* @var \phpbb\cache\driver\driver_interface
* @var cache_interface
*/
protected $cache;
/**
* Database connection
* @var \phpbb\db\driver\driver_interface
* @var db_interface
*/
protected $db;
@@ -39,16 +42,28 @@ class db extends \phpbb\config\config
/**
* Creates a configuration container with a default set of values
*
* @param \phpbb\db\driver\driver_interface $db Database connection
* @param \phpbb\cache\driver\driver_interface $cache Cache instance
* @param db_interface $db Database connection
* @param cache_interface $cache Cache instance
* @param string $table Configuration table name
*/
public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\cache\driver\driver_interface $cache, $table)
public function __construct(db_interface $db, cache_interface $cache, $table)
{
$this->db = $db;
$this->cache = $cache;
$this->table = $table;
$this->initialise($cache);
parent::__construct($this->config);
}
/**
* Initialise config with database and/or cached entries
*
* @param cache_interface $cache
*/
public function initialise(cache_interface $cache)
{
if (($config = $cache->get('config')) !== false)
{
$sql = 'SELECT config_name, config_value
@@ -84,7 +99,7 @@ class db extends \phpbb\config\config
$cache->put('config', $cached_config);
}
parent::__construct($config);
$this->config = $config;
}
/**
@@ -93,7 +108,7 @@ class db extends \phpbb\config\config
* @param String $key The configuration option's name
* @param bool $use_cache Whether this variable should be cached or if it
* changes too frequently to be efficiently cached
* @return null
* @return void
*/
public function delete($key, $use_cache = true)
{
@@ -157,7 +172,7 @@ class db extends \phpbb\config\config
$sql = 'INSERT INTO ' . $this->table . ' ' . $this->db->sql_build_array('INSERT', array(
'config_name' => $key,
'config_value' => $new_value,
'is_dynamic' => ($use_cache) ? 0 : 1));
'is_dynamic' => $use_cache ? 0 : 1));
$this->db->sql_query($sql);
}

View File

@@ -58,6 +58,10 @@ class migrate extends \phpbb\console\command\db\migration_command
$this->migrator->create_migrations_table();
$this->cache->purge();
if ($this->config instanceof \phpbb\config\db)
{
$this->config->initialise($this->cache->get_driver());
}
$this->load_migrations();
$orig_version = $this->config['version'];

View File

@@ -97,19 +97,19 @@ class datetime extends \DateTime
$midnight = $midnight->getTimestamp();
if ($timestamp <= $midnight + 2 * 86400)
if ($timestamp < $midnight + 2 * 86400)
{
$day = false;
if ($timestamp > $midnight + 86400)
if ($timestamp >= $midnight + 86400)
{
$day = 'TOMORROW';
}
else if ($timestamp > $midnight)
else if ($timestamp >= $midnight)
{
$day = 'TODAY';
}
else if ($timestamp > $midnight - 86400)
else if ($timestamp >= $midnight - 86400)
{
$day = 'YESTERDAY';
}

View File

@@ -71,6 +71,13 @@ class mysqli extends \phpbb\db\driver\mysql_base
// Disable loading local files on client side
@mysqli_options($this->db_connect_id, MYSQLI_OPT_LOCAL_INFILE, false);
/*
* As of PHP 8.1 MySQLi default error mode is set to MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT
* See https://wiki.php.net/rfc/mysqli_default_errmode
* Since phpBB implements own SQL errors handling, explicitly set it back to MYSQLI_REPORT_OFF
*/
mysqli_report(MYSQLI_REPORT_OFF);
@mysqli_query($this->db_connect_id, "SET NAMES 'utf8'");
// enforce strict mode on databases that support it

View File

@@ -207,14 +207,16 @@ class postgres extends \phpbb\db\driver\driver
return false;
}
$safe_query_id = $this->clean_query_id($this->query_result);
if ($cache && $cache_ttl)
{
$this->open_queries[(int) $this->query_result] = $this->query_result;
$this->open_queries[$safe_query_id] = $this->query_result;
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
}
else if (strpos($query, 'SELECT') === 0)
{
$this->open_queries[(int) $this->query_result] = $this->query_result;
$this->open_queries[$safe_query_id] = $this->query_result;
}
}
else if ($this->debug_sql_explain)
@@ -555,6 +557,15 @@ class postgres extends \phpbb\db\driver\driver
*/
private function clean_query_id($query_id)
{
return is_resource($query_id) ? (int) $query_id : $query_id;
// As of PHP 8.1 PgSQL functions accept/return \PgSQL\* objects instead of "pgsql *" resources
// Attempting to cast object to int will throw error, hence correctly handle all cases
if (is_resource($query_id))
{
return function_exists('get_resource_id') ? get_resource_id($query_id) : (int) $query_id;
}
else
{
return is_object($query_id) ? spl_object_id($query_id) : $query_id;
}
}
}

View File

@@ -390,7 +390,7 @@ class sqlite3 extends \phpbb\db\driver\driver
{
$html_table = false;
if ($result = $this->dbo->query("EXPLAIN QUERY PLAN $explain_query"))
if ($result = @$this->dbo->query("EXPLAIN QUERY PLAN $explain_query"))
{
while ($row = $result->fetchArray(SQLITE3_ASSOC))
{

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