1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-09-21 13:31:34 +02:00

Compare commits

..

282 Commits

Author SHA1 Message Date
Marc Alexander
90973a52b4 [prep-release-3.3.11] Update changelog for 3.3.11 2023-10-16 22:11:56 +02:00
Marc Alexander
31b3d56ac1 Merge pull request #70 from phpbb/ticket/security-132
[ticket/security-132] Limit maximum number of captcha attempts at register
2023-10-15 13:51:05 +02:00
Marc Alexander
ccf6e6c255 Merge pull request #69 from phpbb/ticket/security-279
[ticket/security/279] Escape smilies URL and prevent paths in .pak filename
2023-10-15 13:50:41 +02:00
Marc Alexander
8fe3a97a1a [prep-release-3.3.11] Update changelog for 3.3.11 2023-10-15 12:02:16 +02:00
Marc Alexander
2c5519da39 [prep-release-3.3.11] Add migration for 3.3.11 2023-10-15 11:59:24 +02:00
Marc Alexander
0c90bf0000 [prep-release-3.3.11] Update version numbers to 3.3.11 2023-10-15 11:57:17 +02:00
Marc Alexander
edc610e81d [prep-release-3.3.11] Update version numbers to 3.3.11 2023-10-15 11:57:16 +02:00
Marc Alexander
e071cd801a Merge pull request #6527 from marc1706/ticket/16877
[ticket/16877] Use replacement library for oauth
2023-10-10 20:53:05 +02:00
Marc Alexander
ac76b80cb1 Merge pull request #6531 from toxyy/ticket/17188
[ticket/17188] Allow request variable to check multiline unicode
2023-10-06 20:20:00 +02:00
toxyy
d4e0840e6f [ticket/17188] Change regex being edited
Change the edited regex to ruben's recommendation

PHPBB3-17188
2023-10-05 16:16:30 -04:00
Marc Alexander
137422116e [ticket/security-132] Limit maximum number of captcha attempts at register
SECURITY-132
2023-10-05 21:06:15 +02:00
Marc Alexander
5f8c9962a0 Merge pull request #6521 from marc1706/ticket/13399
[ticket/13399] Add separate plural rules for characters count
2023-10-04 21:51:46 +02:00
Marc Alexander
0a8391857f [ticket/13399] Add info about usage of CHARACTERS_XY lang string
PHPBB3-13399
2023-10-04 20:09:47 +02:00
Marc Alexander
233d6a0a69 Merge pull request #6546 from Derky/ticket/17189
[Ticket/17189] Improve installer file permission checks
2023-10-04 20:03:17 +02:00
Marc Alexander
91b3627236 [ticket/17189] Check if different way of getting parent path works better
PHPBB3-17189
2023-10-02 21:45:31 +02:00
Marc Alexander
9dec6d3176 Merge pull request #6552 from marc1706/ticket/12904
[ticket/12904] Do not display info about required fields without any
2023-10-02 21:02:05 +02:00
Marc Alexander
6fac65d193 [ticket/12904] Do not display info about required fields without any
PHPBB3-12904
2023-10-01 21:20:00 +02:00
Marc Alexander
42bf5778d5 Merge pull request #6526 from marc1706/ticket/17029
[ticket/17029] Update post count when changing post visibility
2023-10-01 13:59:05 +02:00
Marc Alexander
4bf78d139b [ticket/17029] Add tests for deleting of last post with different visibility
PHPBB3-17029
2023-10-01 11:12:14 +02:00
Marc Alexander
d76c571ad1 [ticket/17029] Test changing of post count on approve/delete
PHPBB3-17029
2023-10-01 10:35:57 +02:00
Marc Alexander
4046365977 [ticket/17029] Use constants instead of magic numbers in tests
PHPBB3-17029
2023-10-01 10:30:57 +02:00
Marc Alexander
c480dd8d2f Merge pull request #6547 from Crizz0/ticket/17113
[ticket/17113] Write icon_id to split topic's posts
2023-09-30 17:07:03 +02:00
Derky
266376af2e [ticket/security/279] Use utf8_basename for smilies pak file check
SECURITY-279
2023-09-30 16:22:57 +02:00
Derky
c4f42c1573 [ticket/security/279] Use rawurlencode for escaping smilie URLs
SECURITY-279
2023-09-30 16:22:57 +02:00
Derky
d8ac6f575e [ticket/security/279] Escape smilies URL and prevent paths in .pak filename
SECURITY-279
2023-09-30 16:22:56 +02:00
Marc Alexander
715c0ad608 Merge pull request #6545 from Crizz0/ticket/17116
[ticket/17116] Remove always TRUE if-sentence
2023-09-30 13:44:21 +02:00
Marc Alexander
745dd5f5a8 [ticket/17113] Usq sql_build_array() for cleaner code
PHPBB3-17113
2023-09-30 13:23:54 +02:00
Christian Schnegelberger
346523fad6 [ticket/17113] Write icon_id to split topic's posts
PHPBB3-17113
2023-09-30 13:23:54 +02:00
Marc Alexander
78aca08d39 Merge pull request #6551 from marc1706/ticket/17198
[ticket/17198] Use https instead of http as default in remote avatar
2023-09-30 13:22:21 +02:00
Marc Alexander
90b1c2210e Merge pull request #6550 from marc1706/ticket/15973
[ticket/15973] Add canonical URL for index
2023-09-30 13:21:44 +02:00
Marc Alexander
a04af20806 [ticket/17198] Use https instead of http as default in remote avatar
PHPBB3-17198
2023-09-29 21:34:27 +02:00
Marc Alexander
88dcb5d3d5 [ticket/15973] Add canonical URL for index
PHPBB3-15973
2023-09-27 21:03:01 +02:00
Marc Alexander
2d3781f285 Merge pull request #6548 from battye/ticket/17128
[ticket/17128] Fix outdated link to php.net date format page
2023-09-27 20:08:42 +02:00
battye
b724e82bbd [ticket/17128] Fix outdated link to date format
The information on php.net has been moved from
the date page to the DateTime page as discussed
in Zag

PHPBB3-17128
2023-09-24 19:56:30 +00:00
Marc Alexander
3163b1726c Merge pull request #6539 from battye/ticket/17172
[ticket/17172] Use correct lang for forum links
2023-09-24 20:09:57 +02:00
Derky
6b6c710706 [ticket/17189] Append slash after installer cache path
PHPBB3-17189
2023-09-24 13:46:39 +02:00
Derky
a78eb6fb42 [ticket/17189] Show file names that couldn't be modified by installer
PHPBB3-17189
2023-09-23 16:50:10 +02:00
Derky
3b622bc005 [ticket/17189] Check folder permissions before writing
PHPBB3-17189
2023-09-23 16:38:32 +02:00
Christian Schnegelberger
b14f37d409 [ticket/17116] Remove always TRUE if-sentence
PHPBB3-17116
2023-09-23 16:17:40 +02:00
battye
0f38ece743 [ticket/17172] Use correct lang for forum links
PHPBB3-17172
2023-09-22 17:08:02 +02:00
Marc Alexander
e80cf43adc Merge pull request #6536 from Crizz0/ticket/17194
[ticket/17194] Move php version in vagrant from folders to sites
2023-09-22 15:11:42 +02:00
Christian Schnegelberger
aba7f4a9e6 [ticket/17194] Move php version in vagrant from folders to sites
PHPBB3-17194
2023-09-22 13:17:22 +02:00
Derky
e1052bd168 Merge pull request #6532 from marc1706/ticket/12785
[ticket/12785] Prefer REQUEST_URI over PHP_SELF in early redirects
2023-09-21 19:29:21 +02:00
toxyy
d59a4d4aad [ticket/17188] Add unit tests
Adds rxu's unit tests, with rubencm's fix

PHPBB3-17188
2023-09-16 12:55:23 +02:00
toxyy
8360752b2a [ticket/17188] Allow request variable to check multiline unicode
Change set_var to check for multiline strings if multibyte

PHPBB3-17188
2023-09-16 12:55:23 +02:00
Marc Alexander
d572070456 [ticket/12785] Prefer REQUEST_URI over PHP_SELF in early redirects
PHPBB3-12785
2023-09-16 12:02:39 +02:00
Marc Alexander
4513d1c0af [ticket/16877] Bump minimum PHP version to 7.2.0
PHPBB3-16877
2023-08-15 20:28:41 +02:00
Marc Alexander
74fe9f40b7 [ticket/16877] Use replacement library for oauth
PHPBB3-16877
2023-08-15 19:56:36 +02:00
Marc Alexander
bdbbc63b9c Merge pull request #6524 from marc1706/ticket/17129
[ticket/17129] Use sql_build_array for cleaner update of youtube profile field
2023-08-15 18:19:43 +02:00
Marc Alexander
10330e5867 [ticket/17029] Fall back to redirecting to topic when post id is invalid
PHPBB3-17029
2023-08-15 11:07:40 +02:00
Marc Alexander
2563561663 [ticket/17029] Treat deleting post as last post when id is bigger
PHPBB3-17029
2023-08-15 11:07:10 +02:00
Marc Alexander
facd14b47e [ticket/17029] Update post count when changing post visibility
PHPBB3-17029
2023-08-15 11:06:47 +02:00
Marc Alexander
0596d1065e [ticket/17129] Use sql_build_array for cleaner update of youtube profile field
PHPBB3-17129
2023-08-13 10:21:02 +02:00
Marc Alexander
a414a44e36 Merge pull request #6516 from marc1706/ticket/17137
[ticket/17137] Allow deleting user files only when post/pm can be changed
2023-08-06 20:32:12 +02:00
Marc Alexander
6268693cff [ticket/17137] Improve code claritiy for math operation vs. comparison
PHPBB3-17137
2023-08-06 16:37:23 +02:00
Marc Alexander
e5db724d2c Merge pull request #6501 from marc1706/ticket/13276
[ticket/13276] Support PHPBB_USE_BOARD_URL_PATH in web root path
2023-08-06 14:54:42 +02:00
Marc Alexander
dd790b41eb Merge pull request #6481 from marc1706/ticket/17129
[ticket/17129] Update youtube profile field to support latest URLs
2023-08-06 14:01:27 +02:00
Marc Alexander
50859bc8a5 Merge pull request #6522 from marc1706/ticket/13364
[ticket/13364] Force sync forum after splitting topic
2023-08-03 19:37:23 +02:00
Marc Alexander
b0d976f462 [ticket/13364] Force sync forum after splitting topic
PHPBB3-13364
2023-07-31 21:45:59 +02:00
Marc Alexander
9515abdb91 [ticket/13399] Add separate plural rules for characters count
PHPBB3-13399
2023-07-31 21:14:05 +02:00
Marc Alexander
b53645177b Merge pull request #6519 from marc1706/ticket/17171
[ticket/17171] Remove unsupported CSS rules for placeholder
2023-07-31 10:04:34 +02:00
Marc Alexander
0df0bd269a [ticket/17171] Remove unsupported CSS rules for placeholder
The content property is not supported by the placeholder pseudo-element
and hence the rules do not have any effect and can be removed.

PHPBB3-17171
2023-07-30 10:00:56 +02:00
Marc Alexander
098f22609d Merge pull request #6515 from marc1706/ticket/11184
[ticket/11184] Add note about effect of admin permissions for founders
2023-07-29 14:44:49 +02:00
Marc Alexander
1dedb05dce [ticket/17137] Add missing post_time column to query
PHPBB3-17137
2023-07-29 10:06:35 +02:00
Marc Alexander
e3547aeb82 [ticket/17137] Allow deleting user files only when post/pm can be changed
PHPBB3-17137
2023-07-28 20:43:32 +02:00
Marc Alexander
253ecdd3fe [ticket/11184] Add note about effect of admin permissions for founders
PHPBB3-11184
2023-07-26 21:45:31 +02:00
Marc Alexander
f9281f9267 Merge pull request #6514 from marc1706/ticket/11765
[ticket/11765] Support IPv4 embedded IPv6 addresses in short_ipv6()
2023-07-26 21:02:07 +02:00
Marc Alexander
56f0846378 [ticket/11765] Support IPv4 embedded IPv6 addresses in short_ipv6()
PHPBB3-11765
2023-07-26 17:21:43 +02:00
Marc Alexander
0ede362120 Merge pull request #6513 from marc1706/ticket/17160
[ticket/17160] Add missing mark column header
2023-07-26 15:21:06 +02:00
Marc Alexander
e11c11ac9d Merge pull request #6512 from marc1706/ticket/8777
[ticket/8777] Discourage deleting user from group with only one group
2023-07-19 22:44:05 +02:00
Marc Alexander
e0e0173442 [ticket/17160] Add missing mark column header
PHPBB3-17160
2023-07-09 22:06:36 +02:00
Marc Alexander
33c4abe909 Merge pull request #6511 from marc1706/ticket/17053
[ticket/17053] Add simple check for writable cache directory
2023-07-04 09:00:54 +02:00
Marc Alexander
cca85f648b [ticket/8777] Discourage deleting user with only one group
It will still be possible from the manage groups page though is discouraged
now by hiding the delete entry when managing users.

In addition to this, the manage user page will now show that no group is
specified for the user when viewing the groups page of a user.

PHPBB3-8777
2023-07-04 08:43:54 +02:00
Marc Alexander
add6d2b726 [ticket/17053] Add simple check for writable cache directory
PHPBB3-17053
2023-07-03 21:40:36 +02:00
Marc Alexander
5f825002b6 Merge pull request #6508 from marc1706/ticket/17154
[ticket/17154] Update composer and dependencies
2023-07-03 15:00:38 +02:00
Marc Alexander
aaf5700076 [ticket/17154] Revert back to composer 2.2 for 3.3.x
PHPBB3-17154
2023-07-02 13:26:32 +02:00
Marc Alexander
e9ac8f1f94 [ticket/17154] Update composer dependencies
PHPBB3-17154
2023-07-02 11:32:20 +02:00
Marc Alexander
a39691b0d5 [ticket/17154] Update composer to 2.5.8
PHPBB3-17154
2023-07-02 11:26:05 +02:00
Marc Alexander
0c8e6172fb Merge pull request #6503 from rxu/ticket/17152
[ticket/17152] Add template event to viewtopic_body.html
2023-07-02 09:59:09 +02:00
Marc Alexander
14b94a1e62 Merge pull request #6497 from marc1706/ticket/17150
[ticket/17150] Set max width for forum-image img
2023-07-01 22:15:29 +02:00
rxu
b550d1db0a [ticket/17152] Add template event to viewtopic_body.html
Add template event to viewtopic_body.html before the message

PHPBB3-17152
2023-07-01 00:20:24 +07:00
Marc Alexander
a686a2f057 [ticket/13276] Support PHPBB_USE_BOARD_URL_PATH in web root path
PHPBB3-13276
2023-06-30 16:42:27 +02:00
Marc Alexander
22d6b035d6 Merge pull request #6498 from marc1706/ticket/17141
[ticket/17141] Improve stability of path_helper and increase test coverage
2023-06-28 13:39:39 +02:00
Marc Alexander
bdeedfea4e Merge pull request #6499 from marc1706/ticket/17140
[ticket/17140] Add missing parameter phpbb_root_path
2023-06-28 13:35:50 +02:00
Marc Alexander
85e5c9dcca [ticket/17140] Add missing parameter phpbb_root_path
PHPBB3-17140
2023-06-27 00:29:11 +02:00
Marc Alexander
91f216d9ce [ticket/17141] Fully cover path_helper with unit tests
PHPBB3-17141
2023-06-26 23:15:55 +02:00
Marc Alexander
b0c008690a [ticket/17141] Remove duplicate prepending with phpbb_root_path
PHPBB3-17141
2023-06-26 23:15:23 +02:00
Marc Alexander
55ea8d6030 [ticket/17141] Symfony request can never be null so don't check for it
PHPBB3-17141
2023-06-26 23:14:58 +02:00
Marc Alexander
8223a956df [ticket/17141] Ensure correction is newer below 0
PHPBB3-17141
2023-06-26 23:14:21 +02:00
Marc Alexander
cfd15752ee [ticket/17150] Set max width for forum-image img
PHPBB3-17150
2023-06-26 15:03:38 +02:00
Marc Alexander
5ee2efd4c2 Merge pull request #6493 from rxu/ticket/17148
[ticket/17148] Fix sql_table_exists() error for PostgreSQL 9.3 and earlier - 3.3.x
2023-06-26 13:16:42 +02:00
Marc Alexander
0fdc76521b Merge pull request #6492 from im4bb/ticket/17146
Fix 'undefined array key' php8 warning
2023-06-26 09:40:57 +02:00
im4bb
4c72b76809 [ticket/17146] Use empty for checking if user_jabber is not empty
PHPBB3-17146
2023-06-21 22:09:00 +02:00
Marc Alexander
bf50c63d6e Merge pull request #6491 from im4bb/ticket/17145
Change static to private variable due to php81 inheritance
2023-06-21 20:35:54 +02:00
im4bb
464466cade [ticket/17145] Change static to private variable due to php81 inheritance
PHPBB3-17145
2023-06-21 10:46:55 +02:00
Marc Alexander
b613c9f63d Merge pull request #6488 from rxu/ticket/17142
[ticket/17142] Fix DBMS+cache related PHP warnings while installing - 3.3.x
2023-06-20 11:38:36 +02:00
Marc Alexander
acaec9f95f [ticket/17129] Update regex and tests for changed input data to youtube cpf
PHPBB3-17129
2023-06-20 10:32:48 +02:00
Marc Alexander
2f3066235c Merge pull request #6495 from marc1706/ticket/17149
[ticket/17149] Update authors list and simplify pull request template
2023-06-19 11:44:45 +02:00
Marc Alexander
e0a30fbce7 [ticket/17149] Remove extra note from pull request template
PHPBB3-17149
2023-06-19 09:51:15 +02:00
Marc Alexander
a8658fe4d1 [ticket/17149] Move mrgoldy to former developers
PHPBB3-17149
2023-06-19 09:50:24 +02:00
Marc Alexander
c11f16fda0 Merge pull request #6484 from rxu/ticket/17107
[ticket/17107] Fix viewonline page locations for posting modes - 3.3.x
2023-06-18 23:12:59 +02:00
rxu
8c33a2180d [ticket/17148] Fix sql_table_exists() error for PostgreSQL 9.3 and earlier
PostgreSQL 9.3 and earlier versions don't support Empty SELECT lists
(support was added since v. 9.4).
Also add PostgreSQL 9.3 tests as earlier images fail in current tests env.

PHPBB3-17148
2023-06-18 00:46:27 +07:00
rxu
4f9bd296a7 [ticket/17107] Add method parameter and result type declarations
PHPBB3-17107
2023-06-14 21:13:49 +07:00
Marc Alexander
65fb35223c Merge pull request #6486 from rxu/ticket/17139
[ticket/17139] Fix PHP fatal error for file transfer tool of updater
2023-06-11 21:57:06 +02:00
rxu
1eb81e9b2a [ticket/17142] Fix class inheritance issues
PHPBB3-17142
2023-06-08 10:11:54 +07:00
rxu
d8d67b5f17 [ticket/17142] Fix tests' mock cache class
PHPBB3-17142
2023-06-08 09:16:47 +07:00
rxu
7adee3c50d [ticket/17142] Fix DBMS+cache related PHP warnings while installing
PHPBB3-17142
2023-06-08 00:59:32 +07:00
Marc Alexander
75dcbeaa9f Merge pull request #6478 from m-ober/ticket/17097
[ticket/17097] Fix PHP 8.2 deprecation warnings
2023-05-29 20:38:59 +02:00
Micha Ober
f4af87f718 [ticket/17097] Fix PHP 8.2 deprecation warnings
PHPBB3-17097
2023-05-28 01:28:03 +02:00
rxu
26d002a51a [ticket/17139] Fix more PHP fatal errors
PHPBB3-17139
2023-05-25 20:22:42 +07:00
rxu
e0144ae7b2 [ticket/17139] Fix PHP fatal error for file transfer tool of updater
Uncaught TypeError: ftp_delete(): Argument #1 ($ftp) must be of type
FTP\\Connection, bool given
Stack trace:
#0 [ROOT]/includes/functions_transfer.php(427): ftp_delete(false, '...')

PHPBB3-17139
2023-05-24 22:39:16 +07:00
rxu
c2c7c271e7 [ticket/17139] Fix PHP fatal error for file transfer tool of updater
PHPBB3-17139
2023-05-24 20:49:01 +07:00
rxu
dfe6421da8 [ticket/17107] Fix docblock issues
PHPBB3-17107
2023-05-24 20:27:53 +07:00
rxu
60d267893c [ticket/17107] Fix viewonline functional test
PHPBB3-17107
2023-05-24 19:35:37 +07:00
Marc Alexander
e0361fe9fe Merge pull request #6469 from Crizz0/ticket/17004
[ticket/17004] Repair pagination func for global announcements in ucp front
2023-05-23 20:54:35 +02:00
rxu
130e7f7e8a [ticket/17107] Fix viewonline helper test
PHPBB3-17107
2023-05-23 19:26:45 +07:00
rxu
f5c5d7d1e6 [ticket/17107] Fix viewonline page locations for posting modes
PHPBB3-17107
2023-05-23 19:09:13 +07:00
Marc Alexander
bddb4decfb Merge pull request #6480 from rxu/ticket/17132
[ticket/17132] Restore language entries missing in phpBB 2.0 converter
2023-05-16 20:49:25 +02:00
Marc Alexander
3cde5974d2 Merge pull request #6482 from marc1706/ticket/15129
[ticket/15129] Ensure link to installation guide is correct
2023-05-16 20:46:34 +02:00
Marc Alexander
5655febb8d [ticket/15129] Ensure link to installation guide is correct
PHPBB3-15129
2023-04-26 21:42:54 +02:00
Marc Alexander
437839ba72 [ticket/17129] Update contact url template
PHPBB3-17129
2023-04-26 20:54:24 +02:00
rxu
4f49fb1f98 [ticket/17132] Restore language entries missing in phpBB 2.0 converter
PHPBB3-17132
2023-04-21 00:23:35 +07:00
Marc Alexander
6e77ca50ae [ticket/17129] Update social media profile types to support latest URLs
PHPBB3-17129
2023-04-17 21:40:27 +02:00
Christian Schnegelberger
015c038d92 [ticket/17004] Remove not needed if and topic_count
PHPBB3-17004
2023-04-17 18:44:03 +02:00
Marc Alexander
bd55fe7e8c [ticket/17129] Update youtube profile field to be up to date with migrations
PHPBB3-17129
2023-04-16 10:01:45 +02:00
Marc Alexander
6e66f1505c Merge pull request #6392 from lionel-rowe/ticket/8071
[ticket/8071] Add sql_last_inserted_id alias for sql_nextid
2023-04-11 22:18:57 +02:00
Marc Alexander
640a2221a5 Merge pull request #6477 from rxu/ticket/17127
[ticket/17127] Do not purge guest sessions when resetting password
2023-04-11 21:17:28 +02:00
Marc Alexander
c27214495c [ticket/17127] Remove redundant check for changed password
user_password will have been updated if u_chgpasswd is yes and new password
has been set, no need to check password against old hash again.

PHPBB3-17127
2023-04-10 19:39:23 +02:00
rxu
98f6a1a300 [ticket/17127] Do not purge guest sessions when resetting password
PHPBB3-17127
2023-04-07 18:37:57 +07:00
Marc Alexander
0260fcd6a7 Merge pull request #6474 from andrew-demb/patch-2
Fix filename in instructions about running all tests
2023-04-05 21:40:02 +02:00
Marc Alexander
f2d004a881 Merge pull request #6472 from rxu/ticket/17115
[ticket/17115] Fix PHP warning for space+hyphen ending search query - 3.3.x
2023-04-04 21:32:39 +02:00
Andrii Dembitskyi
31654e728f [ticket/17126] Fix filename in instructions about running all tests
PHPBB3-17126
2023-04-04 20:45:03 +02:00
Marc Alexander
c879d9380f Merge pull request #6475 from iMattPro/ticket/17125
[ticket/17125] use box-sizing for message box text areas
2023-04-04 20:34:49 +02:00
Matt Friedman
9db5da5b3d [ticket/17125] Use box-sizing to fix message box
PHPBB3-17125
2023-04-02 14:27:35 +00:00
Matt Friedman
d5aa6189b6 [ticket/17125] Use FlexBox for message and smileys
PHPBB3-17125
2023-03-31 19:05:18 +00:00
Marc Alexander
389cca5402 Merge pull request #6468 from Crizz0/ticket/17040
[ticket/17040] Include bidi.css to pm print only in RTL languages
2023-03-19 20:50:38 +01:00
rxu
defb807dbc [ticket/17115] Fix PHP warning for space+hyphen ending search query
PHPBB3-17115
2023-03-16 20:57:43 +07:00
Marc Alexander
9fb7a9108a Merge pull request #6467 from Crizz0/ticket/17041
[ticket/17041] Add if to show other arrow for RTL languages
2023-03-02 21:04:22 +01:00
Marc Alexander
4bf78fd7fd Merge pull request #6465 from LukeWCS/ticket/17076
[ticket/17076] Fix signature length calculation
2023-02-28 20:26:07 +01:00
Marc Alexander
261aa0e6aa Merge pull request #6466 from Crizz0/ticket/17042
[ticket/17042] Add CSS rules for group desc and list
2023-02-14 20:59:47 +01:00
Marc Alexander
41b8ec0470 Merge pull request #6464 from Crizz0/ticket/17043
[ticket/17043] Remove unnecessary cp navi CSS rule in bidi.css
2023-02-06 22:44:10 +01:00
Marc Alexander
984596ffd3 Merge pull request #6463 from Crizz0/ticket/17045
[ticket/17045] Use NUM_ATTACHMENTS in UCP and right css classes
2023-02-06 21:08:04 +01:00
Marc Alexander
1416e25cfd Merge pull request #6462 from Crizz0/ticket/17046
[ticket/17046] Use tweaks.css for IE9 in overall_ and simple_header
2023-02-06 21:03:49 +01:00
Marc Alexander
3584d79e87 Merge pull request #6460 from Crizz0/ticket/17089
[ticket/17089] If user warned without post assume 0 for forum/topic_id
2023-02-06 20:05:05 +01:00
Marc Alexander
e5bbb899f7 Merge branch 'prep-release-3.3.10' into 3.3.x 2023-02-05 22:06:18 +01:00
Marc Alexander
2afc1c369a Merge pull request #6459 from Crizz0/ticket/17098
[ticket/17098] Add class S_CONTENT_DIRECTION to body in ucp_pm_viewmessage_print.html
2023-02-05 00:03:37 +01:00
Marc Alexander
81f67f3a6e [prep-release-3.3.1] Update changelog for 3.3.10 2023-02-04 20:32:52 +01:00
Marc Alexander
4a185ed02e [prep-release-3.3.1] Add migration for 3.3.10 2023-02-04 20:31:26 +01:00
Marc Alexander
cfd0fe6943 [prep-release-3.3.1] Update version numbers to 3.3.10 2023-02-04 20:31:19 +01:00
Christian Schnegelberger
3f6abe056a [ticket/17004] Repair pagination func for global announce in ucp front
PHPBB3-17004
2023-02-02 18:06:36 +01:00
Christian Schnegelberger
9b961836be [ticket/17040] Include bidi.css to pm print only in RTL languages
PHPBB3-17040
2023-02-01 21:57:13 +01:00
Christian Schnegelberger
aa5e9bf25c [ticket/17041] Add if to show other arrow for RTL languages
PHPBB3-17041
2023-02-01 20:59:14 +01:00
Christian Schnegelberger
50c3c3f0ee [ticket/17042] Add CSS rules for group desc and list
PHPBB3-17042
2023-02-01 20:36:22 +01:00
LukeWCS
1f96a2c79a [ticket/17076] Fix signature length calculation
The error occurs when BBcode is used but there is no whitespace. In this case,
a part of the RegEx that is designed to be greedy is responsible for selecting
all BBcode tag containers and their content that do not contain whitespace.
This, in combination with the replace string, effectively reduces the entire
signature to a single space. This is the explanation for the reported behavior
of phpBB.

In addition, the bug also generally prevents the correct removal of BBcode
containers if their content does not contain whitespace. In such cases, the
BBcode tags are removed along with the content, which also results in
incorrect calculation of the text length.

* Changed the corresponding RegEx part from greedy to non-greedy.
* Removed an unnecessary class definition.
* Changed an unnecessary capturing group to a non-capturing group.
* Changed the replace string from a space to an empty string. <- Here,
however, I'm not sure if the space was intentional or not!

PHPBB3-17076
2023-02-01 20:21:37 +01:00
Christian Schnegelberger
24a5972a0b [ticket/17043] Remove unnecessary cp navi CSS rule in bidi.css
PHPBB3-17043
2023-02-01 20:18:30 +01:00
Christian Schnegelberger
fc8c6acae4 [ticket/17045] Use NUM_ATTACHMENTS in UCP and right css classes
PHPBB3-17045
2023-02-01 20:11:34 +01:00
Christian Schnegelberger
0f445c73a0 [ticket/17046] Use tweeks.css for IE9 in overall_ and simple_header
PHPBB3-17046
2023-02-01 19:35:16 +01:00
Marc Alexander
0f1c62bc7b Merge pull request #6457 from marc1706/ticket/16796
[ticket/16796] Fixing misalignment of header items in category on index
2023-01-31 22:02:12 +01:00
Christian Schnegelberger
b7258788cc [ticket/17089] If user warned without post assume 0 for forum/topic_id
PHPBB3-17089
2023-01-31 18:56:58 +01:00
Christian Schnegelberger
632702e10f [ticket/17098] Add class S_CONTENT_DIRECTION to body in pm print
PHPBB3-17098
2023-01-31 18:14:41 +01:00
Marc Alexander
b5c316c9c3 [ticket/8071] Make nextid alias of sql_last_inserted_id and add deprecation
PHPBB3-8071
2023-01-31 17:17:42 +01:00
Marc Alexander
458940217b Merge pull request #6456 from battye/ticket/17025
[ticket/17025] Move post destination topic field should not be populated with a zero
2023-01-31 16:56:27 +01:00
Marc Alexander
1b82ea8a11 Merge pull request #6410 from DaRk1V0iD/ticket/16913_3.3.x
[ticket/16913] Add Search Index Progress Bar with Stats [3.3.x]
2023-01-31 16:50:59 +01:00
Marc Alexander
85cf70765d Merge pull request #6451 from battye/ticket/17086
[ticket/17086] Add GitHub Codespaces support to phpBB (3.3.x branch)
2023-01-31 16:46:29 +01:00
MannixMD
9794a84f3a [ticket/16796] Fixing misalignment of header items in category on index
This is a fix for the Posts and Views alignment on index page in the header
of category/forum.

PHPBB3-16796
2023-01-29 09:26:27 +01:00
battye
33ba9f3392 [ticket/17025] Fix MCP move posts topic ID 0
PHPBB3-17025
2023-01-22 16:55:39 +08:00
Marc Alexander
09820dfdfa Merge branch 'prep-release-3.3.10' into 3.3.x 2023-01-18 19:52:44 +01:00
Marc Alexander
6590827316 Merge pull request #6453 from Noxwizard/ticket/17092
[ticket/17092] Check for Spamhaus error codes
2023-01-18 19:52:18 +01:00
Marc Alexander
738dd786ba [ticket/17092] Clean up docblock and remove redundant check
PHPBB3-17092
2023-01-17 20:44:05 +01:00
Patrick Webster
17f2d6e03a [ticket/17092] Check for Spamhaus error codes
Fix indentation

PHPBB3-17092
2023-01-17 20:37:49 +01:00
Patrick Webster
20c3371460 [ticket/17092] Check for Spamhaus error codes
Remove leftover logging

PHPBB3-17092
2023-01-17 20:37:49 +01:00
Patrick Webster
aa523eadf1 [ticket/17092] Check for Spamhaus error codes
Switches to using callbacks for each DNSBL so that special cases can be
handled when needed. Adds support for Spamhaus error codes and disables DNSBL
checking if errors are encountered since they probably won't be resolved in a
timely manner by the owner or host.

PHPBB3-17092
2023-01-17 20:37:48 +01:00
Marc Alexander
d76f5132db Merge branch 'prep-release-3.3.10' into 3.3.x 2023-01-17 20:36:18 +01:00
Marc Alexander
179dcd9642 Merge pull request #6452 from marc1706/ticket/17091
[ticket/17091] Limit doctrine/instantiator to 1.x versions
2023-01-17 20:35:30 +01:00
Marc Alexander
8ebb64a92a [ticket/17091] Ensure session length is int
PHPBB3-17091
2023-01-16 16:56:12 +01:00
Marc Alexander
e091adcc9c [ticket/17091] Add kernel terminate logic and exit to cron response handling
PHPBB3-17091
2023-01-16 16:56:11 +01:00
Marc Alexander
61a7e0fdfc [ticket/17091] Update windows build commands as well
PHPBB3-17091
2023-01-15 22:00:21 +01:00
Marc Alexander
ad794c17ed [ticket/17091] Limit doctrine/instantiator to 1.x versions
PHPBB3-17091
2023-01-15 21:36:53 +01:00
battye
b5f8251b3f [ticket/17086] Remove trailing slash in Dockerfile
PHPBB3-17086
2023-01-14 17:17:54 +00:00
Marc Alexander
b5f10f844f [ticket/17086] Add missing empty lines and remove extra whitespace
PHPBB3-17086
2023-01-14 08:40:49 +01:00
Marc Alexander
a1a6ff4555 [3.3.x] Update versions to 3.3.11-dev 2023-01-13 22:50:09 +01:00
Marc Alexander
eabe7e8e3c Merge branch 'prep-release-3.3.10' into 3.3.x 2023-01-13 22:47:53 +01:00
Marc Alexander
6d8468c91a [prep-release-3.3.10] Update changelog for 3.3.10-RC1 2023-01-13 21:12:01 +01:00
Marc Alexander
aff7fab65f [prep-release-3.3.10] Add migration for 3.3.10-RC1 2023-01-13 21:11:51 +01:00
Marc Alexander
be053c3381 [prep-release-3.3.10] Update version numbers to 3.3.10 2023-01-13 21:11:31 +01:00
Marc Alexander
e805a47a98 [prep-release-3.3.10] Update version numbers to 3.3.10-RC1 2023-01-13 21:11:14 +01:00
Marc Alexander
9feae900d3 Merge pull request #68 from phpbb/ticket/security/275
[ticket/security/275] Gracefully handle exceptions thrown by wrong cron route
2023-01-12 20:33:42 +01:00
Marc Alexander
34f23477ff [ticket/security/275] Use unicode quote types
SECURITY-275
2023-01-12 20:12:33 +01:00
Marc Alexander
e5f069b15b [ticket/security/275] Add language vars and proper error codes
SECURITY-275
2023-01-11 20:33:08 +01:00
Marc Alexander
fd550bc25a [ticket/security/275] Gracefully handle exceptions thrown by wrong cron route
SECURITY-275
2023-01-10 21:09:48 +01:00
Marc Alexander
378c63b002 Merge pull request #6436 from LukeWCS/ticket/17068
[ticket/17068] ALLOW_CDN_EXPLAIN: Refines and expands the description
2023-01-10 20:38:20 +01:00
Marc Alexander
51766ffaee [ticket/17068] Slight adjustment to grammar in line with previous text
PHPBB3-17068
2023-01-10 20:03:25 +01:00
battye
2c8e16cf4b [ticket/17086] Update codespaces.md
PHPBB3-17086
2023-01-10 22:46:34 +08:00
battye
279f506d69 [ticket/17086] Codespaces - change admin login
PHPBB3-17086
2023-01-10 22:46:25 +08:00
battye
8564e1eac1 [ticket/17086] Add Codespaces documentation
PHPBB3-17086
2023-01-10 22:46:14 +08:00
battye
6e45a2361d [ticket/17086] Add devcontainer configuration for Codespaces
PHPBB3-17086
2023-01-10 22:46:05 +08:00
Marc Alexander
83b53690b5 Merge pull request #6450 from marc1706/ticket/17071
[ticket/17071] Switch to jsdelivr CDN for twemoji emojis
2023-01-09 21:58:31 +01:00
Marc Alexander
191f38b9a0 Merge pull request #6449 from marc1706/ticket/17039
[ticket/17039] Use correct template var for group colour in ucp groups manage
2023-01-09 21:40:17 +01:00
Marc Alexander
96afebf969 Merge pull request #6448 from marc1706/ticket/16938
[ticket/16938] Replace invalid nowrap with white-space css
2023-01-09 21:39:22 +01:00
Marc Alexander
3ece314338 [ticket/17071] Switch to jsdelivr CDN for twemoji emojis
PHPBB3-17071
2023-01-09 21:25:46 +01:00
Marc Alexander
c62d9e4c05 Merge pull request #6446 from rubencm/ticket/17082
[ticket/17082] Remove ability to warn anonymous
2023-01-07 21:02:12 +01:00
Marc Alexander
34b56205a3 [ticket/17039] Use correct template var for group colour in ucp groups manage
PHPBB3-17039
2023-01-07 20:51:40 +01:00
Marc Alexander
a0477a10ce [ticket/16938] Replace invalid nowrap with white-space css
PHPBB3-16938
2023-01-07 15:44:29 +01:00
Marc Alexander
9e44ba096e Merge pull request #6445 from rubencm/ticket/17081
[ticket/17081] Fix accept attribute in upload input
2023-01-07 15:40:21 +01:00
Ruben Calvo
7d29f133e5 [ticket/17082] Remove ability to warn anonymous
PHPBB3-17082
2023-01-06 04:33:09 +01:00
Ruben Calvo
e535f8e054 [ticket/17081] Fix accept attribute in upload input
PHPBB3-17081
2023-01-06 04:29:32 +01:00
Marc Alexander
11e68e910b Merge pull request #6444 from iMattPro/ticket/17075
[ticket/17075] Add template events to ACP footers after $SCRIPT
2023-01-04 21:47:53 +01:00
Marc Alexander
02efbc251e Merge pull request #6443 from rubencm/ticket/17074
[ticket/17074] Don't allow to create two roles with the same name
2023-01-03 22:52:04 +01:00
Matt Friedman
7434783b07 [ticket/17075] Add template events to ACP footers after $SCRIPT
PHPBB3-17075
2023-01-03 08:24:07 -08:00
Ruben Calvo
d446030a9b [ticket/17074] Don't allow to create two roles with the same name
PHPBB3-17074
2023-01-03 01:46:56 +01:00
LukeWCS
d6e3dfff6d [ticket/17068] ALLOW_CDN_EXPLAIN: Refines and expands the description
Concerns the description of the switch "APC > GENERAL > Load settings > Allow
usage of third party content delivery networks:".

* The text gives the impression that the choice of the switch state is a
personal preference of individual administrators. In fact, this is a matter of
local privacy laws.
* Missing mention that the switch also controls the integration of Font
Awesome, part of phpBB's GUI and extensions.

PHPBB3-17068
2022-12-26 11:07:42 +01:00
Marc Alexander
369ee44b6f Merge pull request #6423 from marc1706/ticket/13291
[ticket/13291] Close notifications dropdown during mark all read
2022-12-12 19:42:22 +01:00
Marc Alexander
0543c810a7 Merge pull request #6433 from marc1706/ticket/17066
[ticket/17066] Update actions to resolve deprecation warnings
2022-12-11 22:13:00 +01:00
Marc Alexander
bb0f6d040c [ticket/17066] Use Ubuntu 20.04 instead of 18.04
PHPBB3-17066
2022-12-11 20:43:01 +01:00
Marc Alexander
02ef7c5da4 [ticket/17066] Use new way of saving to github output
PHPBB3-17066
2022-12-11 16:54:37 +01:00
Marc Alexander
90899a17dd [ticket/17066] Use version 3 of actions checkout and cache
PHPBB3-17066
2022-12-11 15:10:44 +01:00
Marc Alexander
9c70c15e1c Merge pull request #6432 from Crizz0/ticket/17065
[ticket/17065] Add utf8_encode_ucr to $usernotes
2022-12-11 14:16:42 +01:00
Marc Alexander
21374390ad Merge pull request #6428 from wordlesswind/ticket/16105
[ticket/16105] Use Google reCAPTCHA globally
2022-12-09 21:43:06 +01:00
Marc Alexander
d03a853f6e Merge branch 'prep-release-3.3.9' into 3.3.x 2022-11-28 20:40:46 +01:00
Christian Schnegelberger
014008fd48 [ticket/17065] Add utf8_encode_ucr to $usernotes
PHPBB3-17065
2022-11-28 18:24:59 +01:00
Marc Alexander
b3d593b626 [prep-release-3.3.9] Update changelog for 3.3.9 2022-11-23 20:54:42 +01:00
Marc Alexander
744009882b [prep-release-3.3.9] Add migration for 3.3.9 2022-11-23 20:53:56 +01:00
Marc Alexander
1c407e8049 [prep-release-3.3.9] Update version numbers to 3.3.9 2022-11-23 20:53:53 +01:00
Marc Alexander
e75ea6642d Merge pull request #67 from phpbb/ticket/security-274
[ticket/security/274] Reset login keys/session when resetting password
2022-11-22 21:21:24 +01:00
Marc Alexander
ad9e5e6891 [ticket/16105] Replace const with lowercase version
PHPBB3-16105
2022-11-21 17:24:11 +01:00
Marc Alexander
b828efa9e6 [ticket/16105] Use domain setting for recaptcha v2 as well
PHPBB3-16105
2022-11-21 17:24:11 +01:00
Marc Alexander
c66923bafc [ticket/16105] Add domain selection to recaptcha v2 & check against list
PHPBB3-16105
2022-11-21 17:24:10 +01:00
wordlesswind
ebc5e1ead0 [ticket/16105] Use Google reCAPTCHA globally
PHPBB3-16105
2022-11-21 17:23:39 +01:00
Marc Alexander
3db6cc98f5 [ticket/16913] Move progress bar HTML to acp_search.html
PHPBB3-16913
2022-11-17 02:20:48 +05:30
Dark❶
a45f8f0796 [ticket/16913] Add Search Index Progress Bar with Stats
- Update SQL for count of posts
- Update search index test
- Removed "Pop-up Progress Bar".
- For first run display the "Success Message".
- Display the Info from "Pop-up Progress Bar" to "Success Message".
- Only display "Redirect" & "Rate" of post refreshed "Success Message".
- Minor Language Fix.
- Use `ORDER BY post_id ASC` for progress stats.
- Removed HTML from Lang String.
- Moved HTML to PHP file.
- Increased the size of Progress-Bar by 2x.

PHPBB3-16913
2022-11-17 02:20:46 +05:30
Marc Alexander
c2968212d8 Merge branch 'prep-release-3.3.9' into 3.3.x 2022-11-14 20:07:55 +01:00
Marc Alexander
0793126dc4 Merge pull request #6426 from Crizz0/ticket/17058
[ticket/17058] Add if-sentence for $encode_eol for email headers
2022-11-14 20:07:27 +01:00
Christian Schnegelberger
9fb2dbb776 [ticket/17058] Add $encode_eol to process()
PHPBB3-17058
2022-11-11 23:15:09 +01:00
Christian Schnegelberger
6f034c5215 [ticket/17058] Replace hardcoded PHP_EOL in phpbb_mail() with var
PHPBB3-17058
2022-11-11 23:15:09 +01:00
Christian Schnegelberger
0802772f09 [ticket/17058] Add if-sentence for $encode_eol for email headers
PHPBB3-17058
2022-11-11 23:15:09 +01:00
Marc Alexander
696ff06263 Merge pull request #6425 from SagePtr/ticket/17056
[ticket/17056] Fix PHP 8.2 deprecation warning about ${var} syntax
2022-11-03 20:06:12 +01:00
SagePtr
b86d15a766 [ticket/17056] Fix PHP 8.2 deprecation warning about ${var} syntax
The "${var}" style of string interpolation is deprecated in PHP 8.2,
using "{$var}" syntax instead.

PHPBB3-17056
2022-11-02 00:30:46 +02:00
Marc Alexander
637844f264 [ticket/13291] Close notifications dropdown during mark all read
PHPBB3-13291
2022-10-27 00:01:36 +02:00
Marc Alexander
c410829a42 [3.3.x] Update versions to 3.3.10-dev 2022-10-26 22:44:56 +02:00
Marc Alexander
8ef6a5c1bc Merge branch 'prep-release-3.3.9' into 3.3.x 2022-10-26 22:43:17 +02:00
Marc Alexander
cd36a68645 [prep-release-3.3.9] Update changelog for 3.3.9-RC1 2022-10-22 20:56:04 +02:00
Marc Alexander
5225ac8a9a [prep-release-3.3.9] Add migration for 3.3.9-RC1 2022-10-22 20:55:14 +02:00
Marc Alexander
aaaef71b60 [prep-release-3.3.9] Update version numbers to 3.3.9 2022-10-22 20:55:12 +02:00
Marc Alexander
1fe8bbf47a [prep-release-3.3.9] Update version numbers to 3.3.9-RC1 2022-10-22 20:55:12 +02:00
Marc Alexander
827c135cc9 [ticket/security/274] Reset login keys/session when resetting password
SECURITY-274
2022-10-22 15:12:28 +02:00
Marc Alexander
67c41633a2 Merge pull request #6422 from marc1706/ticket/17050
[ticket/17050] Remove trailing slash from generated css includes
2022-10-22 11:34:54 +02:00
Marc Alexander
92cebdd624 Merge pull request #6421 from marc1706/ticket/17051
[ticket/17051] Fallback to default values for possible undefined user data
2022-10-22 11:21:46 +02:00
Marc Alexander
7017c73156 [ticket/17050] Remove trailing slash from generated css includes
PHPBB3-17050
2022-10-21 21:40:44 +02:00
Marc Alexander
2e025be53a [ticket/17051] Fallback to default values for possible undefined user data
PHPBB3-17051
2022-10-21 20:18:32 +02:00
Marc Alexander
2126738598 Merge pull request #6418 from marc1706/ticket/17048
[ticket/17048] Update composer dependencies for 3.3.9
2022-10-20 17:17:26 +02:00
Marc Alexander
99286b1fdd [ticket/17048] Update composer dependencies for 3.3.9
PHPBB3-17048
2022-10-15 23:29:12 +02:00
Marc Alexander
64717d0270 Merge pull request #6414 from imhunterand/patch-1
[ticket/17036] Fix failure to strip Authorization header on HTTP downgrade
2022-09-30 20:07:43 +02:00
ANDRI H.U
f197662653 [ticket/17036] Update guzzle and it's dependencies to latest version
PHPBB3-17036
2022-09-25 22:00:49 +02:00
Marc Alexander
e080a8533d Merge pull request #6415 from marc1706/ticket/17032
[ticket/17032] Prevent endlessly cycling to load user
2022-09-09 07:12:45 +02:00
Marc Alexander
f84e03f646 [ticket/17032] Prevent endlessly cycling to load user
PHPBB3-17032
2022-09-08 22:18:13 +02:00
Marc Alexander
7c02b58114 Merge pull request #6413 from rubencm/ticket/17030
[ticket/17030] Fix feed to return valid RFC-3339 dates
2022-08-26 21:46:53 +02:00
Marc Alexander
12256eabb6 Merge pull request #6412 from DaRk1V0iD/ticket/17026
[ticket/17026] Session viewonline not defined in Memberlist
2022-08-26 20:47:07 +02:00
Dark❶
9b1bae858f [ticket/17026] Session viewonline not defined in Memberlist
PHPBB3-17026
2022-08-26 10:55:20 +05:30
Ruben Calvo
db3c143b73 [ticket/17030] Fix feed to return valid RFC-3339 dates
PHPBB3-17030
2022-08-21 21:56:11 +02:00
Dark❶
ea19638f4e [ticket/17026] Session viewonline not defined in Memberlist
PHPBB3-17026
2022-08-12 20:40:52 +05:30
Marc Alexander
89b07af756 Merge pull request #6406 from Noxwizard/ticket/17003
[ticket/17003] Include topic icon on UCP front page
2022-07-28 20:11:19 +02:00
Marc Alexander
7275f9e7f1 [ticket/17003] Small code style adjustmens
PHPBB3-17003
2022-07-27 18:17:46 +02:00
Marc Alexander
8fbbaf97ab Merge pull request #6408 from Crizz0/ticket/17023
[ticket/17023] Adds PHP >=8.0  to composer require php version
2022-07-23 16:41:24 -04:00
Marc Alexander
b8a3d8f25d [ticket/17023] Update composer.lock as well
PHPBB3-17023
2022-07-22 20:16:11 -05:00
Christian Schnegelberger
495986ff5d [ticket/17023] Adds PHP >=8.0 to composer require php version
PHPBB3-17023
2022-07-19 17:47:53 +02:00
Marc Alexander
3ed3abb446 Merge pull request #6407 from Noxwizard/ticket/16917
[ticket/16917] Update phpbbcli.php's permissions in release archive
2022-07-16 19:02:52 -04:00
Marc Alexander
ca8c402796 Merge pull request #6405 from Noxwizard/ticket/16916
[ticket/16916] Include PHP version number in startup/install error
2022-07-16 18:47:56 -04:00
Marc Alexander
fafe250b0d Merge pull request #6404 from marc1706/ticket/17019
[ticket/17019] Treat removed youtube profile field as effectively installed
2022-07-16 18:44:56 -04:00
Marc Alexander
256ea96cd9 Merge pull request #6403 from marc1706/ticket/17006
[ticket/17006] Remove www. from server domain name example
2022-07-16 18:43:30 -04:00
Marc Alexander
5cdd22e058 Merge pull request #6402 from marc1706/ticket/16932
[ticket/16932] Ensure special characters are encoded for ASCII in emails
2022-07-16 18:39:02 -04:00
Patrick Webster
47e30a2e21 [ticket/16917] Update phpbbcli.php's permissions in release archive
For those employing cron on *nix, these will be the expected permissions.

PHPBB3-16917
2022-07-09 15:46:31 -05:00
Patrick Webster
040c2e9b78 [ticket/17003] Include topic icon on UCP front page
Prosilver already supports rendering topic icons on this view, but the backend
didn't populate the needed topicrow values.

PHPBB3-17003
2022-07-09 14:57:01 -05:00
Patrick Webster
2c661205e4 [ticket/16916] Include PHP version number in startup/install error
If the PHP version is too low, an error is displayed. This error does not
include the current PHP version number, which often becomes a debate with
users who believe they are running a supported version.

PHPBB3-16916
2022-07-04 21:12:43 -05:00
Marc Alexander
b5d2ff4074 [ticket/17019] Treat removed youtube profile field as effectively installed
PHPBB3-17019
2022-06-30 21:35:50 +02:00
Marc Alexander
b3d93a09f2 [ticket/17006] Remove www. from server domain name example
PHPBB3-17006
2022-06-28 21:49:01 +02:00
Marc Alexander
2f72950d2d Merge pull request #6401 from marc1706/ticket/17005
[ticket/17005] Add missing slash to li closing tag
2022-06-28 21:42:58 +02:00
Marc Alexander
064a96ec07 [ticket/16932] Ensure special characters are encoded for ASCII in emails
PHPBB3-16932
2022-06-27 22:36:25 +02:00
Marc Alexander
a8feaeafe8 [ticket/17005] Add missing slash to li closing tag
PHPBB3-17005
2022-06-27 21:00:58 +02:00
Marc Alexander
fc83f213d5 Merge branch 'prep-release-3.3.8' into 3.3.x 2022-06-26 20:28:13 +02:00
Marc Alexander
f930f8821f [3.3.x] Update versions to 3.3.9-dev 2022-06-06 22:54:43 +02:00
Marc Alexander
b84b875cd2 Merge branch 'prep-release-3.3.8' into 3.3.x 2022-06-06 22:53:26 +02:00
lionel-rowe
9fb98201f2 [ticket/8071] Add sql_last_inserted_id alias for sql_nextid
Fixes [DBAL function sql_nextid - name is
misleading](https://tracker.phpbb.com/browse/PHPBB3-8071).

Per the tracker issue:
> This function gets the ID of the last inserted row, not the ID of the next row
to be inserted (which is difficult due to different autoincrement steps and also
lends itself nicely to race conditions).

@iwisdom replied that the naming is consistent with how PHP itself names this
functionality, but the link they posted doesn't support that (I guess this is
referring to a much older version of PHP? The comment is from 2009).

PHPBB3-8071
2022-04-26 15:03:42 +01:00
164 changed files with 3343 additions and 880 deletions

20
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
# Debian version
ARG VARIANT="buster"
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
# Install PHP
RUN apt-get -y update
RUN apt-get -y install php php-xml php-mbstring php-curl php-zip php-xdebug
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Install MySQL
RUN apt-get -y install mysql-server php-mysql
# Xdebug
ADD resources/xdebug.ini /etc/php/8.1/apache2/conf.d/xdebug.ini
# Configure Apache
RUN echo "Listen 8080" >> /etc/apache2/ports.conf && \
a2enmod rewrite

View File

@@ -0,0 +1,37 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.238.1/containers/ubuntu
{
"name": "Ubuntu",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick an Ubuntu version: jammy / ubuntu-22.04, focal / ubuntu-20.04, bionic /ubuntu-18.04
// Use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon.
"args": { "VARIANT": "ubuntu-22.04" }
},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
"settings": {
// Allow Xdebug to listen to requests from remote (or container)
"remote.localPortHost": "allInterfaces"
},
//"devPort": {},
// Specify which VS Code extensions to install (List of IDs)
"extensions": ["xdebug.php-debug"]
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [80, 9003],
// Use 'postCreateCommand' to run commands after the container is created.
"postStartCommand": "bash .devcontainer/resources/setup.sh",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"features": {
"github-cli": "latest"
}
}

View File

@@ -0,0 +1,38 @@
installer:
admin:
name: admin
password: adminadmin
email: admin@example.org
board:
lang: en
name: My Board
description: My amazing new phpBB board
database:
dbms: mysqli
dbhost: 127.0.0.1
dbport: 3306
dbuser: phpbb
dbpasswd: phpbb
dbname: phpbb
table_prefix: phpbb_
email:
enabled: false
smtp_delivery : ~
smtp_host: ~
smtp_port: ~
smtp_auth: ~
smtp_user: ~
smtp_pass: ~
server:
cookie_secure: false
server_protocol: http://
force_server_vars: false
server_name: localhost
server_port: 80
script_path: /
extensions: []

View File

@@ -0,0 +1,44 @@
# setup.sh
# Commands to install and configure phpBB
# Start MySQL
echo "[Codespaces] Start MySQL"
sudo service mysql start
# Start Apache
echo "[Codespaces] Start Apache"
sudo service apache2 start
# Add SSH key
echo "[Codespaces] Add SSH key"
echo "$SSH_KEY" > /home/vscode/.ssh/id_rsa && chmod 600 /home/vscode/.ssh/id_rsa
# Create a MySQL user to use
echo "[Codespaces] Create MySQL user"
sudo mysql -u root<<EOFMYSQL
CREATE USER 'phpbb'@'localhost' IDENTIFIED BY 'phpbb';
GRANT ALL PRIVILEGES ON *.* TO 'phpbb'@'localhost' WITH GRANT OPTION;
CREATE DATABASE IF NOT EXISTS phpbb;
EOFMYSQL
# Download dependencies
echo "[Codespaces] Install Composer dependencies"
composer install --no-interaction
# Symlink the webroot so it can be viewed
echo "[Codespaces] Create Symlink of webroot"
sudo rm -rf /var/www/html
sudo ln -s /workspaces/phpbb/phpBB /var/www/html
# Copy phpBB config
echo "[Codespaces] Copy phpBB configuration"
cp /workspaces/phpbb/.devcontainer/resources/phpbb-config.yml /workspaces/phpbb/phpBB/install/install-config.yml
# Install phpBB
echo "[Codespaces] Run phpBB CLI installation"
cd /workspaces/phpbb/phpBB && composer install --no-interaction
sudo php /workspaces/phpbb/phpBB/install/phpbbcli.php install /workspaces/phpbb/phpBB/install/install-config.yml
rm -rf /workspaces/phpbb/phpBB/install
# Finished
echo "[Codespaces] phpBB installation completed"

View File

@@ -0,0 +1,10 @@
zend_extension=xdebug.so
[xdebug]
xdebug.mode=develop,debug
xdebug.discover_client_host=1
xdebug.client_port=9003
xdebug.start_with_request=yes
xdebug.log='/var/log/xdebug/xdebug.log'
xdebug.connect_timeout_ms=2000
xdebug.idekey=VSCODE

View File

@@ -5,6 +5,6 @@ Checklist:
- [ ] 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**):
Tracker ticket:
https://tracker.phpbb.com/browse/PHPBB3-12345

View File

@@ -31,6 +31,6 @@ php ../composer.phar install --dev --no-interaction
if [[ "$PHP_VERSION" =~ ^nightly$ || "$PHP_VERSION" =~ ^8 ]]
then
php ../composer.phar remove phpunit/dbunit --dev --update-with-dependencies \
&& php ../composer.phar require symfony/yaml:~4.4 misantron/dbunit:~5.0 phpunit/phpunit:^9.3 --dev --update-with-all-dependencies --ignore-platform-reqs
&& php ../composer.phar require symfony/yaml:~4.4 misantron/dbunit:~5.0 phpunit/phpunit:^9.3 doctrine/instantiator:^1.4 --dev --update-with-all-dependencies --ignore-platform-reqs
fi
cd ..

View File

@@ -17,7 +17,7 @@ on:
jobs:
# Basic checks, e.g. parse errors, commit messages, etc.
basic-checks:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
include:
@@ -29,7 +29,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 100
@@ -46,12 +46,12 @@ jobs:
PHP_VERSION: ${{ matrix.php }}
run: |
cd phpBB
echo "::set-output name=dir::$(composer config cache-files-dir)"
echo "::set-output name=version::${PHP_VERSION%.*}"
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "version=${PHP_VERSION%.*}" >> $GITHUB_OUTPUT
cd ..
- name: Cache Composer dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ steps.composer-cache.outputs.version }}-${{ hashFiles('phpBB/composer.lock') }}
@@ -88,32 +88,30 @@ jobs:
# Tests for MySQL and MariaDB
mysql-tests:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- php: '7.1'
- php: '7.2'
db: "mariadb:10.1"
- php: '7.1'
- php: '7.2'
db: "mariadb:10.2"
- php: '7.1'
- php: '7.2'
db: "mariadb:10.3"
- php: '7.1'
- php: '7.2'
db: "mariadb:10.4"
- php: '7.1'
- php: '7.2'
db: "mariadb:10.5"
- php: '7.1'
- php: '7.2'
db: "mysql:5.6"
db_alias: "MySQL Slow Tests"
SLOWTESTS: 1
- php: '7.1'
- php: '7.2'
db: "mysql:5.6"
db_alias: "MyISAM Tests"
MYISAM: 1
- php: '7.1'
- php: '7.2'
db: "mysql:5.6"
- php: '7.1'
db: "mysql:5.7"
- php: '7.2'
db: "mysql:5.7"
- php: '7.3'
@@ -157,14 +155,14 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- id: database-type
env:
MATRIX_DB: ${{ matrix.db }}
run: |
db=$(echo "${MATRIX_DB%%:*}")
echo "::set-output name=db::$db"
echo "db=$db" >> $GITHUB_OUTPUT
- name: Setup PHP
uses: shivammathur/setup-php@v2
@@ -179,12 +177,12 @@ jobs:
PHP_VERSION: ${{ matrix.php }}
run: |
cd phpBB
echo "::set-output name=dir::$(composer config cache-files-dir)"
echo "::set-output name=version::${PHP_VERSION%.*}"
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "version=${PHP_VERSION%.*}" >> $GITHUB_OUTPUT
cd ..
- name: Cache Composer dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ steps.composer-cache.outputs.version }}-${{ hashFiles('phpBB/composer.lock') }}
@@ -229,22 +227,22 @@ jobs:
# Tests for PostgreSQL
postgres-tests:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- php: '7.1'
- php: '7.2'
db: "postgres:9.3"
- php: '7.2'
db: "postgres:9.5"
- php: '7.1'
- php: '7.2'
db: "postgres:9.6"
- php: '7.1'
- php: '7.2'
db: "postgres:10"
- php: '7.1'
- php: '7.2'
db: "postgres:11"
- php: '7.1'
- php: '7.2'
db: "postgres:12"
- php: '7.1'
db: "postgres:13"
- php: '7.2'
db: "postgres:13"
- php: '7.3'
@@ -264,7 +262,7 @@ jobs:
services:
postgres:
image: ${{ matrix.db != 'postgres:9.5' && matrix.db != 'postgres:9.6' && matrix.db != 'postgres:10' && matrix.db != 'postgres:11' && matrix.db != 'postgres:12' && matrix.db != 'postgres:13' && 'postgres:10' || matrix.db }}
image: ${{ matrix.db != 'postgres:9.3' && matrix.db != 'postgres:9.5' && matrix.db != 'postgres:9.6' && matrix.db != 'postgres:10' && matrix.db != 'postgres:11' && matrix.db != 'postgres:12' && matrix.db != 'postgres:13' && 'postgres:10' || matrix.db }}
env:
POSTGRES_HOST: localhost
POSTGRES_USER: postgres
@@ -290,14 +288,14 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- id: database-type
env:
MATRIX_DB: ${{ matrix.db }}
run: |
db=$(echo "${MATRIX_DB%%:*}")
echo "::set-output name=db::$db"
echo "db=$db" >> $GITHUB_OUTPUT
- name: Setup PHP
uses: shivammathur/setup-php@v2
@@ -312,12 +310,12 @@ jobs:
PHP_VERSION: ${{ matrix.php }}
run: |
cd phpBB
echo "::set-output name=dir::$(composer config cache-files-dir)"
echo "::set-output name=version::${PHP_VERSION%.*}"
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "version=${PHP_VERSION%.*}" >> $GITHUB_OUTPUT
cd ..
- name: Cache Composer dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ steps.composer-cache.outputs.version }}-${{ hashFiles('phpBB/composer.lock') }}
@@ -345,11 +343,11 @@ jobs:
# Other database types, namely sqlite3 and mssql
other-tests:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- php: '7.1'
- php: '7.2'
db: "sqlite3"
- php: '7.2'
db: "mcr.microsoft.com/mssql/server:2017-latest"
@@ -388,7 +386,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- id: database-type
env:
@@ -400,7 +398,7 @@ jobs:
else
db=$(echo "${MATRIX_DB%%:*}")
fi
echo "::set-output name=db::$db"
echo "db=$db" >> $GITHUB_OUTPUT
- name: Setup PHP
uses: shivammathur/setup-php@v2
@@ -415,12 +413,12 @@ jobs:
PHP_VERSION: ${{ matrix.php }}
run: |
cd phpBB
echo "::set-output name=dir::$(composer config cache-files-dir)"
echo "::set-output name=version::${PHP_VERSION%.*}"
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "version=${PHP_VERSION%.*}" >> $GITHUB_OUTPUT
cd ..
- name: Cache Composer dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ steps.composer-cache.outputs.version }}-${{ hashFiles('phpBB/composer.lock') }}
@@ -485,7 +483,7 @@ jobs:
git config --system core.autocrlf false
git config --system core.eol lf
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
@@ -499,13 +497,13 @@ jobs:
id: composer-cache
run: |
cd phpBB
echo "::set-output name=dir::$(composer config cache-files-dir)"
echo "dir=$(composer config cache-files-dir)" >> $env:GITHUB_OUTPUT
$major_version="${{ matrix.php }}".substring(0,1)
echo "::set-output name=version::$major_version"
echo "version=$major_version" >> $env:GITHUB_OUTPUT
cd ..
- name: Cache Composer dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ steps.composer-cache.outputs.version }}-${{ hashFiles('phpBB/composer.lock') }}
@@ -548,7 +546,7 @@ jobs:
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
php ..\composer.phar require symfony/yaml:~4.4 misantron/dbunit:~5.0 phpunit/phpunit:^9.3 doctrine/instantiator:^1.4 --dev --update-with-all-dependencies --ignore-platform-reqs
cd ..
- name: Setup database
run: |

18
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,18 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debug phpBB",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": {
"/var/www/html": "${workspaceRoot}/phpBB/"
},
"log": true
}
]
}

3
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"php.debug.ideKey": "VSCODE"
}

View File

@@ -27,7 +27,10 @@ To run an installation from the repo (and not from a pre-built package) on a loc
php ../composer.phar install
```
Alternatively, you can read our [Vagrant documentation](phpBB/docs/vagrant.md) to find out how to use Vagrant to develop and contribute to phpBB.
Alternatively, you can read:
* Our [Vagrant documentation](phpBB/docs/vagrant.md) to find out how to use Vagrant to develop and contribute to phpBB.
* Our [GitHub Codespaces documentation](phpBB/docs/codespaces.md) to learn about phpBB's cloud-based development environment.
## 📓 Documentation

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.8" />
<property name="prevversion" value="3.3.7" />
<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.5, 3.3.6, 3.3.8-RC1" />
<property name="newversion" value="3.3.11" />
<property name="prevversion" value="3.3.10" />
<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.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9" />
<!-- no configuration should be needed beyond this point -->
<property name="oldversions" value="${olderversions}, ${prevversion}" />
@@ -362,6 +362,8 @@
<chmod mode="0777" file="${dir}/store" />
<chmod mode="0777" file="${dir}/files" />
<chmod mode="0777" file="${dir}/images/avatars/upload" />
<!-- set permissions of executable scripts to 755 -->
<chmod mode="0755" file="${dir}/bin/phpbbcli.php" />
</target>
<target name="clean-vendor-dir">

Binary file not shown.

View File

@@ -78,28 +78,31 @@
<!-- ELSEIF S_INDEX -->
<script>
// <![CDATA[
/**
* Popup search progress bar
*/
function popup_progress_bar(progress_type)
{
close_waitscreen = 0;
// no scrollbars
popup('{UA_PROGRESS_BAR}&amp;type=' + progress_type, 400, 240, '_index');
}
// ]]>
</script>
<h1>{L_ACP_SEARCH_INDEX}</h1>
<!-- IF S_CONTINUE_INDEXING -->
<p>{L_CONTINUE_EXPLAIN}</p>
<p>
{% if S_CONTINUE_INDEXING == 'create' %}
{{ lang('CONTINUE_INDEXING_EXPLAIN') }}
{% else %}
{{ lang('CONTINUE_DELETING_INDEX_EXPLAIN') }}
{% endif %}
</p>
<form id="acp_search_continue" method="post" action="{U_CONTINUE_INDEXING}">
<fieldset>
<legend>{L_ACP_SUBMIT_CHANGES}</legend>
<legend>{{ lang('CONTINUE_INDEXING') }}</legend>
{% if CONTINUE_PROGRESS %}
<div class="centered-text">
<br>
<progress
value="{{ CONTINUE_PROGRESS.VALUE }}"
max="{{ CONTINUE_PROGRESS.TOTAL }}"
style="height: 2em; width: 20em;"></progress><br>
{{ CONTINUE_PROGRESS.PERCENTAGE|number_format(2) ~ ' %' }}<br>
{{ lang('SEARCH_INDEX_PROGRESS', CONTINUE_PROGRESS.VALUE, CONTINUE_PROGRESS.REMAINING, CONTINUE_PROGRESS.TOTAL) }}
</div>
{% endif %}
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="submit" id="cancel" name="cancel" value="{L_CANCEL}" />
@@ -151,10 +154,10 @@
<p class="quick">
<!-- IF backend.S_INDEXED -->
<input type="hidden" name="action" value="delete" />
<input class="button2" type="submit" value="{L_DELETE_INDEX}" onclick="popup_progress_bar('delete');" />
<input class="button2" type="submit" name="submit" value="{{ lang('DELETE_INDEX') }}" />
<!-- ELSE -->
<input type="hidden" name="action" value="create" />
<input class="button2" type="submit" value="{L_CREATE_INDEX}" onclick="popup_progress_bar('create');" />
<input class="button2" type="submit" name="submit" value="{{ lang('CREATE_INDEX') }}" />
<!-- ENDIF -->
</p>
{S_FORM_TOKEN}
@@ -165,6 +168,24 @@
<!-- ENDIF -->
<!-- ELSEIF S_INDEX_PROGRESS -->
<div class="successbox">
<h3>{{ INDEXING_TITLE }}</h3>
<p>
{{ INDEXING_EXPLAIN }}
{% if INDEXING_PROGRESS %}<br>{{ INDEXING_PROGRESS }}{% endif %}
{% if INDEXING_RATE %}<br>{{ INDEXING_RATE }}{% endif %}
{% if INDEXING_PROGRESS_BAR %}
<br>
<progress
value="{{ INDEXING_PROGRESS_BAR.VALUE }}"
max="{{ INDEXING_PROGRESS_BAR.TOTAL }}"
style="height: 2em; width: 20em;"></progress><br>
{{ INDEXING_PROGRESS_BAR.PERCENTAGE|number_format(2) ~ ' %' }}<br>
{{ lang('SEARCH_INDEX_PROGRESS', INDEXING_PROGRESS_BAR.VALUE, INDEXING_PROGRESS_BAR.REMAINING, INDEXING_PROGRESS_BAR.TOTAL) }}
{% endif %}
</p>
</div>
<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->

View File

@@ -137,9 +137,13 @@
<td><a href="{group.U_EDIT_GROUP}">{group.GROUP_NAME}</a></td>
<td><!-- IF group.S_IS_MEMBER --><!-- IF group.S_NO_DEFAULT --><a href="{group.U_DEFAULT}">{L_GROUP_DEFAULT}</a><!-- ELSE --><strong>{L_GROUP_DEFAULT}</strong><!-- ENDIF --><!-- ELSEIF not group.S_IS_MEMBER and group.U_APPROVE --><a href="{group.U_APPROVE}">{L_GROUP_APPROVE}</a><!-- ELSE -->&nbsp;<!-- ENDIF --></td>
<td><!-- IF group.S_IS_MEMBER and not group.S_SPECIAL_GROUP --><a href="{group.U_DEMOTE_PROMOTE}">{group.L_DEMOTE_PROMOTE}</a><!-- ELSE -->&nbsp;<!-- ENDIF --></td>
<td><a href="{group.U_DELETE}">{L_GROUP_DELETE}</a></td>
<td>{% if group.U_DELETE %}<a href="{{ group.U_DELETE }}">{{ lang('GROUP_DELETE') }}</a>{% endif %}</td>
</tr>
<!-- ENDIF -->
<!-- BEGINELSE -->
<tr>
<td class="row3 centered-text" colspan="4">{{ lang('NO_GROUP') }}</td>
</tr>
<!-- END group -->
</tbody>
</table>

View File

@@ -14,7 +14,7 @@
<!-- BEGIN warn -->
<tr>
<td>{warn.USERNAME}</td>
<td style="text-align: center; nowrap: nowrap;">{warn.DATE}</td>
<td style="text-align: center; white-space: nowrap;">{warn.DATE}</td>
<td>{warn.ACTION}</td>
<td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{warn.ID}" /></td>
</tr>

View File

@@ -21,6 +21,20 @@
<dd><input id="recaptcha_privkey" name="recaptcha_privkey" value="{RECAPTCHA_PRIVKEY}" size="50" type="text" /></dd>
</dl>
<dl>
<dt>
<label>{{ lang('RECAPTCHA_V3_DOMAIN') ~ lang('COLON') }}</label>
<br><span>{{ lang('RECAPTCHA_V3_DOMAIN_EXPLAIN') }}</span>
</dt>
<dd>
{% for domain in RECAPTCHA_V2_DOMAINS %}
<label>
<input class="radio" name="recaptcha_v2_domain" type="radio" value="{{ domain }}"{{ domain == RECAPTCHA_V2_DOMAIN ? ' checked' }}>
<span>{{ domain }}</span>
</label>
{% endfor %}
</dd>
</dl>
</fieldset>
<fieldset>

View File

@@ -42,5 +42,7 @@
<!-- EVENT acp_overall_footer_after -->
{$SCRIPTS}
{% EVENT acp_overall_footer_body_after %}
</body>
</html>

View File

@@ -23,5 +23,7 @@
<!-- EVENT acp_simple_footer_after -->
{$SCRIPTS}
{% EVENT acp_simple_footer_body_after %}
</body>
</html>

View File

@@ -12,7 +12,7 @@
*/
/**
* Minimum Requirement: PHP 7.1.3
* Minimum Requirement: PHP 7.2.0
*/
if (!defined('IN_PHPBB'))
@@ -51,10 +51,10 @@ if (!defined('PHPBB_INSTALLED'))
$server_port = 443;
}
$script_name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF');
$script_name = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI');
if (!$script_name)
{
$script_name = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI');
$script_name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF');
}
// $phpbb_root_path accounts for redirects from e.g. /adm
@@ -114,6 +114,14 @@ $phpbb_class_loader_ext->register();
try
{
$phpbb_container_builder = new \phpbb\di\container_builder($phpbb_root_path, $phpEx);
// Check that cache directory is writable before trying to build container
$cache_dir = $phpbb_container_builder->get_cache_dir();
if (file_exists($cache_dir) && !is_writable($phpbb_container_builder->get_cache_dir()))
{
die('Unable to write to the cache directory path "' . $cache_dir . '". Ensure that the web server user can write to the cache folder.');
}
$phpbb_container = $phpbb_container_builder->with_config($phpbb_config_php_file)->get_container();
}
catch (InvalidArgumentException $e)

View File

@@ -26,14 +26,14 @@
"phpbb/phpbb-core": "self.version"
},
"require": {
"php": "^7.1.3",
"php": "^7.2 || ^8.0.0",
"ext-json": "*",
"ext-mbstring": "*",
"bantu/ini-get-wrapper": "~1.0",
"carlos-mg89/oauth": "^0.8.15",
"composer/package-versions-deprecated": "^1.11",
"google/recaptcha": "~1.1",
"guzzlehttp/guzzle": "~6.3",
"lusitanian/oauth": "^0.8.1",
"marc1706/fast-image-size": "^1.1",
"s9e/text-formatter": "^2.0",
"symfony/config": "~3.4",
@@ -74,7 +74,10 @@
},
"config": {
"platform": {
"php": "7.1.3"
"php": "7.2"
},
"allow-plugins": {
"composer/installers": true
}
}
}

634
phpBB/composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -71,3 +71,4 @@ services:
class: phpbb\viewonline_helper
arguments:
- '@filesystem'
- '@dbal.conn'

View File

@@ -4,6 +4,7 @@ services:
arguments:
- '@phpbb.installer.controller.helper'
- '@language'
- '@path_helper'
- '@template'
- '%core.root_path%'

View File

@@ -12,6 +12,9 @@
*/
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Exception\ExceptionInterface;
use Symfony\Component\Routing\Exception\RouteNotFoundException;
/**
*/
@@ -28,10 +31,49 @@ $cron_type = $request->variable('cron_type', '');
$get_params_array = $request->get_super_global(\phpbb\request\request_interface::GET);
/* @var $http_kernel \Symfony\Component\HttpKernel\HttpKernel */
$http_kernel = $phpbb_container->get('http_kernel');
/* @var $symfony_request \phpbb\symfony_request */
$symfony_request = $phpbb_container->get('symfony_request');
/** @var \phpbb\controller\helper $controller_helper */
$controller_helper = $phpbb_container->get('controller.helper');
$response = new RedirectResponse(
$controller_helper->route('phpbb_cron_run', $get_params_array, false),
301
$cron_route = 'phpbb_cron_run';
try
{
$response = new RedirectResponse(
$controller_helper->route($cron_route, $get_params_array, false),
Response::HTTP_MOVED_PERMANENTLY
);
$response->send();
$http_kernel->terminate($symfony_request, $response);
exit();
}
catch (RouteNotFoundException $exception)
{
$error = 'ROUTE_NOT_FOUND';
$error_parameters = $cron_route;
$error_code = Response::HTTP_NOT_FOUND;
}
catch (ExceptionInterface $exception)
{
$error = 'ROUTE_INVALID_MISSING_PARAMS';
$error_parameters = $cron_route;
$error_code = Response::HTTP_BAD_REQUEST;
}
catch (Throwable $exception)
{
$error = $exception->getMessage();
$error_parameters = [];
$error_code = Response::HTTP_INTERNAL_SERVER_ERROR;
}
$language = $phpbb_container->get('language');
$response = new Response(
$language->lang($error, $error_parameters),
$error_code
);
$response->send();
$http_kernel->terminate($symfony_request, $response);

View File

@@ -50,6 +50,11 @@
<ol>
<li><a href="#changelog">Changelog</a>
<ul>
<li><a href="#v3310">Changes since 3.3.10</a></li>
<li><a href="#v3310rc1">Changes since 3.3.10-RC1</a></li>
<li><a href="#v339">Changes since 3.3.9</a></li>
<li><a href="#v339rc1">Changes since 3.3.9-RC1</a></li>
<li><a href="#v338">Changes since 3.3.8</a></li>
<li><a href="#v337">Changes since 3.3.7</a></li>
<li><a href="#v336">Changes since 3.3.6</a></li>
<li><a href="#v336rc1">Changes since 3.3.6-RC1</a></li>
@@ -162,6 +167,149 @@
<div class="inner">
<div class="content">
<a name="v3310"></a><h3>Changes since 3.3.10</h3>
<h4>Bug</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-8777">PHPBB3-8777</a>] - Users can be removed from all groups leaving no default group</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-11184">PHPBB3-11184</a>] - ACP purports to allow editing of Founder admin permissions</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-12785">PHPBB3-12785</a>] - Redirection of URI are calculated using PHP_SELF</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-13276">PHPBB3-13276</a>] - INCLUDEJS and INCLUDECSS do not obey PHPBB_USE_BOARD_URL_PATH</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-13364">PHPBB3-13364</a>] - Index Subject not updated after moderation</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-15129">PHPBB3-15129</a>] - Wrong Installation guide link</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16796">PHPBB3-16796</a>] - misalignment on index and viewforum for topics and posts titles</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16877">PHPBB3-16877</a>] - OAuth account linking throws a PHP error - PHP 8</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17004">PHPBB3-17004</a>] - Pagination doesn't not show up in UCP &gt; Front Page</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17040">PHPBB3-17040</a>] - bidi.css is loaded when viewing LTR print view pages</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17041">PHPBB3-17041</a>] - RTL Pagination Dropdown Arrow Faces The Wrong Way</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17042">PHPBB3-17042</a>] - Group Description With BBCode List Breaks Layout</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17043">PHPBB3-17043</a>] - Remove Duplicate CP Rule From bidi.css</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17045">PHPBB3-17045</a>] - UCP attachments list page top and bottom pagination counts language strings and font size are different</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17046">PHPBB3-17046</a>] - IE tweaks in simple_header should be included the same as in overall_header</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17053">PHPBB3-17053</a>] - sql_freeresult not working for mysqli &amp; PHP 8</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17076">PHPBB3-17076</a>] - Signature length limit bug</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17086">PHPBB3-17086</a>] - phpBB / Codespaces support</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17089">PHPBB3-17089</a>] - Warning users without post causes PHP warning</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17097">PHPBB3-17097</a>] - PHP 8.2 Deprecations</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17098">PHPBB3-17098</a>] - body class {S_CONTENT_DIRECTION} is missing in ucp_pm_viewmessage_print.html</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17107">PHPBB3-17107</a>] - Who is online incorectly reports Forum location when replying/quoting </li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17115">PHPBB3-17115</a>] - PHP warning with native search backend if query ends with a space followed by hyphen</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17126">PHPBB3-17126</a>] - Filename in instructions about running all tests does not exist</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17127">PHPBB3-17127</a>] - Guest users stats got purged when resetting password</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17129">PHPBB3-17129</a>] - Youtube profile field not up to date in new installations</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17132">PHPBB3-17132</a>] - Missing language variable leads to PHP error in convertor</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17137">PHPBB3-17137</a>] - Attachments can be deleted after end of post editing or deletion time</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17139">PHPBB3-17139</a>] - PHP fatal error while updating with advanced update package</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17140">PHPBB3-17140</a>] - Required parameter phpbb_root_path missing in local_url_bbcode migration</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17141">PHPBB3-17141</a>] - Empty referrer may result in PHP error in get_web_root_path()</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17142">PHPBB3-17142</a>] - Installation errors when using MSSQL+ IIS + PHP 8.2 </li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17145">PHPBB3-17145</a>] - Field 'pf_phpbb_occupation' doesn't have a default value</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17146">PHPBB3-17146</a>] - Undefined array key in notifications code</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17148">PHPBB3-17148</a>] - phpBB3.3.10 Setup does not support PostgreSQL 8.3 </li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17150">PHPBB3-17150</a>] - Forum Image Breaks Layout If Big Image Used - (Forum List Forum Image)</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17160">PHPBB3-17160</a>] - Missing 'Mark' Column Header On MCP Front Page</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17171">PHPBB3-17171</a>] - Remove non functional responsive placeholder text rules in responsive.css</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17172">PHPBB3-17172</a>] - Hovering over a forum link / subforum link shows 'No unread posts' on the tooltip</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17189">PHPBB3-17189</a>] - Installer permission handling on PHP 8.2</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17194">PHPBB3-17194</a>] - Php version in vagrant configuration is not set correctly</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17198">PHPBB3-17198</a>] - Gravatar requires https by default</li>
</ul>
<h4>Improvement</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-8071">PHPBB3-8071</a>] - DBAL function &quot;sql_nextid&quot; - name is misleading</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-11765">PHPBB3-11765</a>] - short_ipv6() doesn't expect IPv4 embedded IPv6 addresses</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-12904">PHPBB3-12904</a>] - Required custom profile fields and asterisk</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-13399">PHPBB3-13399</a>] - Problem with plurals - 'CHARACTERS'</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-15973">PHPBB3-15973</a>] - Canonical for the index page</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16913">PHPBB3-16913</a>] - Add Search Index Progress Bar with Stats</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17025">PHPBB3-17025</a>] - Move post destination topic field should not be populated with a zero</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17125">PHPBB3-17125</a>] - Message Editor layout Broken in Latest Safari</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17128">PHPBB3-17128</a>] - Link to PHP date() function</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17152">PHPBB3-17152</a>] - Add template event to viewtopic_body.html</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17188">PHPBB3-17188</a>] - Condition to check if a utf8 string is malformed is wrong</li>
</ul>
<h4>Task</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17116">PHPBB3-17116</a>] - Useless duplicate conditions in ucp_pm_history.html</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17149">PHPBB3-17149</a>] - Update authors and pull request template</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17154">PHPBB3-17154</a>] - Update composer and dependencies to latest versions</li>
</ul>
<h4>Hardening</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/SECURITY-132">SECURITY-132</a>] - Limit CAPTCHA attempts at registration for single session</li>
<li>[<a href="https://tracker.phpbb.com/browse/SECURITY-279">SECURITY-279</a>] - Escape smilies URL and prevent paths in .pak filename</li>
</ul>
<a name="v3310rc1"></a><h3>Changes since 3.3.10-RC1</h3>
<h4>Bug</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17091">PHPBB3-17091</a>] - PHP 8.0 builds fail due to incompatible doctrine/instantiator</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17092">PHPBB3-17092</a>] - Check for error codes when querying Spamhaus</li>
</ul>
<a name="v339"></a><h3>Changes since 3.3.9</h3>
<h4>Bug</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16938">PHPBB3-16938</a>] - Unexistent css property in inline style</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17039">PHPBB3-17039</a>] - Group name not colored in manage groups due to typo</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17056">PHPBB3-17056</a>] - PHP 8.2 Deprecation warning about ${var} syntax</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17065">PHPBB3-17065</a>] - Emoji characters in MCP add feedback cause SQL error</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17074">PHPBB3-17074</a>] - Condition to avoid creation of roles with same name is broken</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17081">PHPBB3-17081</a>] - Invalid accept attribute in the post editor</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17082">PHPBB3-17082</a>] - Ability to warn Anonymous</li>
</ul>
<h4>Improvement</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-13291">PHPBB3-13291</a>] - Close notification drop down after clicking &quot;mark all read&quot;</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16105">PHPBB3-16105</a>] - Use &quot;global&quot; reCAPTCHA domain to circumvent blocking in some countries</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17068">PHPBB3-17068</a>] - ALLOW_CDN_EXPLAIN: Incomplete and imprecise description</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17075">PHPBB3-17075</a>] - Add template events to ACP footer after SCRIPTS</li>
</ul>
<h4>Task</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17066">PHPBB3-17066</a>] - Update GitHub Actions configuration to resolve deprecations</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17071">PHPBB3-17071</a>] - Update the emoji CDN</li>
</ul>
<h4>Hardening</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/SECURITY-275">SECURITY-275</a>] - Improve handling of exceptions in cron redirect</li>
</ul>
<a name="v339rc1"></a><h3>Changes since 3.3.9-RC1</h3>
<h4>Bug</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17058">PHPBB3-17058</a>] - Special character issue in emails from PHP 8.0 and higher</li>
</ul>
<h4>Hardening</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/SECURITY-274">SECURITY-274</a>] - Reset login keys/session when resetting password</li>
</ul>
<a name="v338"></a><h3>Changes since 3.3.8</h3>
<h4>Bug</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16917">PHPBB3-16917</a>] - bin/phpbb.cli requires 755 permissions</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16932">PHPBB3-16932</a>] - Invalid email To: header on notifications to users with @ in name</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17003">PHPBB3-17003</a>] - Icon of a topic do not show up in the UCP &gt; Front Page.</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17019">PHPBB3-17019</a>] - Missing &quot;youtube&quot; profilefield stops Database update</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17023">PHPBB3-17023</a>] - phpBB 3.3: PHP8 supported but not indicated by composer.json</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17026">PHPBB3-17026</a>] - Session viewonline not defined in Memberlist</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17030">PHPBB3-17030</a>] - Feed doesn't generate valid RFC-3339 dates</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17032">PHPBB3-17032</a>] - Missing or invalid user entry for anonymous user may result in stack overflow</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17036">PHPBB3-17036</a>] - Update guzzle to latest version</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17050">PHPBB3-17050</a>] - Unnecessary trailing slash in void HTML elements</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17051">PHPBB3-17051</a>] - Textformatter may generate PHP warnings if user is not fully initialized in PHP 8.1</li>
</ul>
<h4>Improvement</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16916">PHPBB3-16916</a>] - Enhance the PHP version error message on startup and install</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17005">PHPBB3-17005</a>] - List item closing tag missing slash in posting_topic_review</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17006">PHPBB3-17006</a>] - &quot;www.&quot; not needed and may lead to confusion</li>
</ul>
<h4>Task</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17048">PHPBB3-17048</a>] - Update composer and dependencies for 3.3.9</li>
</ul>
<a name="v337"></a><h3>Changes since 3.3.7</h3>
<h4>Bug</h4>
<ul>

View File

@@ -25,7 +25,6 @@ phpBB Lead Developer: Marc (Marc Alexander)
phpBB Developers: CHItA (Máté Bartus)
Derky (Derk Ruitenbeek)
Hanakin (Michael Miday)
mrgoldy (Gijs Martens)
Nicofuma (Tristan Darricau)
rubencm (Rubén Calvo)
@@ -64,6 +63,7 @@ phpBB Developers: A_Jelly_Doughnut (Josh Woody) [01/2010 - 11/2010]
imkingdavid (David King) [11/2012 - 06/2014]
kellanved (Henry Sudhof) [04/2007 - 03/2011]
MichaelC (Michael Cullum) [11/2017 - 09/2019]
mrgoldy (Gijs Martens) [03/2020 - 06/2023]
nickvergessen (Joas Schilling)[04/2010 - 12/2015]
Oleg (Oleg Pudeyev) [01/2011 - 05/2013]
prototech (Cesar Gallegos) [01/2014 - 12/2016]

View File

@@ -147,7 +147,7 @@
<li>Oracle</li>
</ul>
</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><strong>PHP 7.2.0+</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>

View File

@@ -265,7 +265,7 @@
<ul>
<li>Your server type/version, e.g. Apache 2.2.3, IIS 7, Sambar, etc.</li>
<li>PHP version and mode of operation, e.g. PHP 7.1.3 as a module, PHP 7.1.3 running as CGI, etc.</li>
<li>PHP version and mode of operation, e.g. PHP 7.2.0 as a module, PHP 7.2.7 running as CGI, etc.</li>
<li>DB type/version, e.g. MySQL 5.0.77, PostgreSQL 9.0.6, MSSQL Server 2000 (via ODBC), etc.</li>
</ul>
@@ -323,11 +323,11 @@
<div class="content">
<p>phpBB 3.3.x takes advantage of new features added in PHP 7.1. We recommend that you upgrade to the latest stable release of PHP to run phpBB. The minimum version required is PHP 7.1.3 and the maximum supported version is the latest stable version of PHP.</p>
<p>phpBB 3.3.x takes advantage of new features added in PHP 7.2. We recommend that you upgrade to the latest stable release of PHP to run phpBB. The minimum version required is PHP 7.2.0 and the maximum supported version is the latest stable version of PHP.</p>
<p>Please remember that running any application on a development (unstable, e.g. a beta release) version of PHP can lead to strange/unexpected results which may appear to be bugs in the application. Therefore, we recommend you upgrade to the newest stable version of PHP before running phpBB. If you are running a development version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
<p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQLi 4.1.3, 4.x, 5.x, MariaDB 5.x, PostgreSQL 8.x, Oracle 8 and SQLite 3. Versions of PHP used range from 7.1.3 to 7.2.x and 7.3.x without issues.</p>
<p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQLi 4.1.3, 4.x, 5.x, MariaDB 5.x, PostgreSQL 8.x, Oracle 8 and SQLite 3. Versions of PHP used range from 7.2.0 to 7.4.x, 8.0.x and 8.1.x.</p>
<a name="phpsec"></a><h3>7.i. Notice on PHP security issues</h3>

55
phpBB/docs/codespaces.md Normal file
View File

@@ -0,0 +1,55 @@
## Using GitHub Codespaces with phpBB
phpBB includes support for [Codespaces](https://docs.github.com/en/codespaces), GitHub's cloud-based software development environment. This allows developers and contributors to run and modify phpBB on a consistent environment through a GitHub account without the need to set up a local web server.
Codespaces is completely web-based and does not require any code to be downloaded locally.
Features include:
* Automatic phpBB installation
* Access to [VS Code](https://docs.github.com/en/codespaces/the-githubdev-web-based-editor) through the web browser
* [Xdebug](https://github.com/xdebug/vscode-php-debug) pre-configured to step through the phpBB code and add breakpoints
* Full LAMP stack with database access
* Commit, push and test code entirely online
## How it works
### To run phpBB in Codespaces
* On the GitHub.com website, fork the `phpbb/phpbb` repository.
* Under the `Code` button, click the `Codespaces` tab and then the `+` button to create a new Codespace.
* It may take several minutes to configure and install phpBB on the newly created virtual machine. Once it is ready, a web-based VS Code instance will appear.
* Under the `Ports` tab, click on the local address under port 80 to open the private website for the new phpBB installation.
* By default, the login details for the new phpBB installation are `admin` / `adminadmin`
* Port 9003 is also open to allow Xdebug connections.
### To use the command line
* Click on the `Terminal` tab at the bottom of VS Code and make sure the `bash` window is selected in the right sidebar.
* The `workspaces/phpbb` directory contains the code from the workspace.
* Run `mysql -h 127.0.0.1 -u phpbb -p` to log into the MySQL database. The password is `phpbb` and the database name is `phpbb`.
* Tip: type `use phpbb;` after logging in to MySQL to switch to the correct database, then queries can be run for the phpBB tables.
### To debug code
* Click the `Run and Debug` tab on the left sidebar in VS Code, then click the green play button next to the `Debug phpBB` option.
* Tip: to confirm that Xdebug is working correctly, run `lsof -i :9003` on the command line. It should show that the port is listening for connections.
* In any of the files in the `phpBB/` directory, add a breakpoint by clicking just to the left of a line number in VS Code. Then, access the private website created on port 80 (found under the VS Code `Ports` tab) through the web browser and navigate to the page with a breakpoint. VS Code will automatically pause execution where the breakpoint is hit, and under the `Run and Debug` tab a variable list will be shown.
### To commit and push code
* To save a change made using VS Code on Codespaces, click the `Source Control` tab on the left sidebar in VS Code.
* To stage changes or discard changes, right click the file(s) and select the appropriate option.
* Type a commit message and select the `Commit and Push` option.
**Remember to stop a Codespace once you are finished with it.** GitHub provides all users with a limited number of free core hours per month. A Codespace can be stopped (or deleted) from the main repository page on GitHub.com.
## Technical information
All of the Codespaces configuration can be found in the `.devcontainer/` directory. The `devcontainer.json` holds the general environment information and `Dockerfile` contains the commands to set up the LAMP stack which enables phpBB to run.
`setup.sh` is used to install phpBB from the command line, using pre-determined details from `phpbb-config.yml`.
Codespaces can run without the configuration inside the `.vscode/` directory, however by including this no manual intervention is required to set the Xdebug IDE code to `VSCode` (inside `settings.json`) and `Debug phpBB` information, such as the path mapping from the Apache webroot to the `phpbb/phpBB` directory (inside `launch.json`).
This configuration information can be safely modified to change the development environment, followed by `Ctrl+Shift+P` in VS Code and selection of the `Full Rebuild Container` option.

View File

@@ -274,6 +274,12 @@ acp_overall_footer_after
* Since: 3.1.0-a1
* Purpose: Add content below the footer in the ACP
acp_overall_footer_body_after
===
* Location: adm/style/overall_footer.html
* Since: 3.3.10-RC1
* Purpose: Add content before the `</body>` tag but after the $SCRIPTS var, i.e. after the js scripts have been loaded
acp_overall_header_body_before
===
* Location: adm/style/overall_header.html
@@ -558,6 +564,12 @@ acp_simple_footer_after
* Since: 3.1.0-a1
* Purpose: Add content below the simple footer in the ACP
acp_simple_footer_body_after
===
* Location: adm/style/simple_footer.html
* Since: 3.3.10-RC1
* Purpose: Add content before the `</body>` tag but after the $SCRIPTS var, i.e. after the js scripts have been loaded
acp_simple_header_body_before
===
* Location: adm/style/simple_header.html
@@ -3292,6 +3304,13 @@ viewtopic_body_postrow_content_after
* Since: 3.2.4-RC1
* Purpose: Add content after the message content in topics views
viewtopic_body_postrow_content_before
===
* Locations:
+ styles/prosilver/template/viewtopic_body.html
* Since: 3.3.11-RC1
* Purpose: Add content before the message content in topics views
viewtopic_body_postrow_custom_fields_after
===
* Locations:

View File

@@ -550,7 +550,7 @@ class acp_icons
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (!($pak_ary = @file($phpbb_root_path . $img_path . '/' . $pak)))
if (!($pak_ary = @file($phpbb_root_path . $img_path . '/' . utf8_basename($pak))))
{
trigger_error($user->lang['PAK_FILE_NOT_READABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
@@ -654,7 +654,7 @@ class acp_icons
{
$replace_sql = ($mode == 'smilies') ? $code : $img;
$sql = array(
$fields . '_url' => $img,
$fields . '_url' => utf8_substr(rawurlencode($img), 0, 50),
$fields . '_height' => (int) $height,
$fields . '_width' => (int) $width,
'display_on_posting' => (int) $display_on_posting,
@@ -676,7 +676,7 @@ class acp_icons
++$order;
$sql = array(
$fields . '_url' => $img,
$fields . '_url' => utf8_substr(rawurlencode($img), 0, 50),
$fields . '_height' => (int) $height,
$fields . '_width' => (int) $width,
$fields . '_order' => (int) $order,

View File

@@ -430,11 +430,11 @@ class acp_main
// Version check
$user->add_lang('install');
if ($auth->acl_get('a_server') && version_compare(PHP_VERSION, '7.1.3', '<'))
if ($auth->acl_get('a_server') && version_compare(PHP_VERSION, '7.2.0', '<'))
{
$template->assign_vars(array(
'S_PHP_VERSION_OLD' => true,
'L_PHP_VERSION_OLD' => sprintf($user->lang['PHP_VERSION_OLD'], PHP_VERSION, '7.1.3', '<a href="https://www.phpbb.com/support/docs/en/3.3/ug/quickstart/requirements">', '</a>'),
'L_PHP_VERSION_OLD' => sprintf($user->lang['PHP_VERSION_OLD'], PHP_VERSION, '7.2.0', '<a href="https://www.phpbb.com/support/docs/en/3.3/ug/quickstart/requirements">', '</a>'),
));
}

View File

@@ -179,7 +179,7 @@ class acp_permission_roles
$db->sql_freeresult($result);
// Make sure we only print out the error if we add the role or change it's name
if ($row && ($mode == 'add' || ($mode == 'edit' && $role_row['role_name'] != $role_name)))
if ($row && ($action == 'add' || ($action == 'edit' && $role_row['role_name'] != $role_name)))
{
trigger_error(sprintf($user->lang['ROLE_NAME_ALREADY_EXIST'], $role_name) . adm_back_link($this->u_action), E_USER_WARNING);
}

View File

@@ -239,7 +239,7 @@ class acp_search
function index($id, $mode)
{
global $db, $user, $template, $phpbb_log, $request;
global $db, $language, $user, $template, $phpbb_log, $request;
global $config, $phpbb_admin_path, $phpEx;
$action = $request->variable('action', '');
@@ -262,11 +262,6 @@ class acp_search
{
switch ($action)
{
case 'progress_bar':
$type = $request->variable('type', '');
$this->display_progress_bar($type);
break;
case 'delete':
$this->state[1] = 'delete';
break;
@@ -311,14 +306,29 @@ class acp_search
{
$this->state = array('');
$this->save_state();
trigger_error($error . adm_back_link($this->u_action) . $this->close_popup_js(), E_USER_WARNING);
trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
}
}
else if ($submit)
{
meta_refresh(1, append_sid($this->u_action . '&amp;action=delete&amp;skip_rows=' . $post_counter . '&amp;hash=' . generate_link_hash('acp_search')));
$template->assign_vars([
'S_INDEX_PROGRESS' => true,
'INDEXING_TITLE' => $language->lang('DELETING_INDEX_IN_PROGRESS'),
'INDEXING_EXPLAIN' => $language->lang('DELETING_INDEX_IN_PROGRESS_EXPLAIN'),
'INDEXING_PROGRESS_BAR' => $this->get_post_index_progress($post_counter),
]);
$this->tpl_name = 'acp_search';
$this->page_title = 'ACP_SEARCH_INDEX';
return;
}
else
{
$starttime = microtime(true);
$row_count = 0;
while (still_on_time() && $post_counter <= $this->max_post_id)
while (still_on_time() && $post_counter < $this->max_post_id)
{
$sql = 'SELECT post_id, poster_id, forum_id
FROM ' . POSTS_TABLE . '
@@ -350,7 +360,20 @@ class acp_search
$totaltime = microtime(true) - $starttime;
$rows_per_second = $row_count / $totaltime;
meta_refresh(1, append_sid($this->u_action . '&amp;action=delete&amp;skip_rows=' . $post_counter . '&amp;hash=' . generate_link_hash('acp_search')));
trigger_error($user->lang('SEARCH_INDEX_DELETE_REDIRECT', (int) $row_count, $post_counter) . $user->lang('SEARCH_INDEX_DELETE_REDIRECT_RATE', $rows_per_second));
$template->assign_vars([
'S_INDEX_PROGRESS' => true,
'INDEXING_TITLE' => $language->lang('DELETING_INDEX_IN_PROGRESS'),
'INDEXING_EXPLAIN' => $language->lang('DELETING_INDEX_IN_PROGRESS_EXPLAIN'),
'INDEXING_PROGRESS' => $language->lang('SEARCH_INDEX_DELETE_REDIRECT', $row_count, $post_counter),
'INDEXING_RATE' => $language->lang('SEARCH_INDEX_DELETE_REDIRECT_RATE', $rows_per_second),
'INDEXING_PROGRESS_BAR' => $this->get_post_index_progress($post_counter),
]);
$this->tpl_name = 'acp_search';
$this->page_title = 'ACP_SEARCH_INDEX';
return;
}
}
@@ -360,7 +383,7 @@ class acp_search
$this->save_state();
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_SEARCH_INDEX_REMOVED', false, array($name));
trigger_error($user->lang['SEARCH_INDEX_REMOVED'] . adm_back_link($this->u_action) . $this->close_popup_js());
trigger_error($user->lang['SEARCH_INDEX_REMOVED'] . adm_back_link($this->u_action));
break;
case 'create':
@@ -371,9 +394,25 @@ class acp_search
{
$this->state = array('');
$this->save_state();
trigger_error($error . adm_back_link($this->u_action) . $this->close_popup_js(), E_USER_WARNING);
trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
}
}
else if ($submit)
{
meta_refresh(1, append_sid($this->u_action . '&amp;action=create&amp;skip_rows=' . $post_counter . '&amp;hash=' . generate_link_hash('acp_search')));
$template->assign_vars([
'S_INDEX_PROGRESS' => true,
'INDEXING_TITLE' => $language->lang('INDEXING_IN_PROGRESS'),
'INDEXING_EXPLAIN' => $language->lang('INDEXING_IN_PROGRESS_EXPLAIN'),
'INDEXING_PROGRESS_BAR' => $this->get_post_index_progress($post_counter),
]);
$this->tpl_name = 'acp_search';
$this->page_title = 'ACP_SEARCH_INDEX';
return;
}
else
{
$sql = 'SELECT forum_id, enable_indexing
@@ -388,7 +427,7 @@ class acp_search
$starttime = microtime(true);
$row_count = 0;
while (still_on_time() && $post_counter <= $this->max_post_id)
while (still_on_time() && $post_counter < $this->max_post_id)
{
$sql = 'SELECT post_id, post_subject, post_text, poster_id, forum_id
FROM ' . POSTS_TABLE . '
@@ -437,7 +476,19 @@ class acp_search
$totaltime = microtime(true) - $starttime;
$rows_per_second = $row_count / $totaltime;
meta_refresh(1, append_sid($this->u_action . '&amp;action=create&amp;skip_rows=' . $post_counter . '&amp;hash=' . generate_link_hash('acp_search')));
trigger_error($user->lang('SEARCH_INDEX_CREATE_REDIRECT', (int) $row_count, $post_counter) . $user->lang('SEARCH_INDEX_CREATE_REDIRECT_RATE', $rows_per_second));
$template->assign_vars([
'S_INDEX_PROGRESS' => true,
'INDEXING_TITLE' => $language->lang('INDEXING_IN_PROGRESS'),
'INDEXING_EXPLAIN' => $language->lang('INDEXING_IN_PROGRESS_EXPLAIN'),
'INDEXING_PROGRESS' => $language->lang('SEARCH_INDEX_CREATE_REDIRECT', $row_count, $post_counter),
'INDEXING_RATE' => $language->lang('SEARCH_INDEX_CREATE_REDIRECT_RATE', $rows_per_second),
'INDEXING_PROGRESS_BAR' => $this->get_post_index_progress($post_counter),
]);
$this->tpl_name = 'acp_search';
$this->page_title = 'ACP_SEARCH_INDEX';
return;
}
}
@@ -447,7 +498,7 @@ class acp_search
$this->save_state();
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_SEARCH_INDEX_CREATED', false, array($name));
trigger_error($user->lang['SEARCH_INDEX_CREATED'] . adm_back_link($this->u_action) . $this->close_popup_js());
trigger_error($user->lang['SEARCH_INDEX_CREATED'] . adm_back_link($this->u_action));
break;
}
}
@@ -516,8 +567,6 @@ class acp_search
$template->assign_vars(array(
'S_INDEX' => true,
'U_ACTION' => $this->u_action . '&amp;hash=' . generate_link_hash('acp_search'),
'U_PROGRESS_BAR' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&amp;mode=$mode&amp;action=progress_bar"),
'UA_PROGRESS_BAR' => addslashes(append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&amp;mode=$mode&amp;action=progress_bar")),
));
if (isset($this->state[1]))
@@ -525,41 +574,11 @@ class acp_search
$template->assign_vars(array(
'S_CONTINUE_INDEXING' => $this->state[1],
'U_CONTINUE_INDEXING' => $this->u_action . '&amp;action=' . $this->state[1] . '&amp;hash=' . generate_link_hash('acp_search'),
'L_CONTINUE' => ($this->state[1] == 'create') ? $user->lang['CONTINUE_INDEXING'] : $user->lang['CONTINUE_DELETING_INDEX'],
'L_CONTINUE_EXPLAIN' => ($this->state[1] == 'create') ? $user->lang['CONTINUE_INDEXING_EXPLAIN'] : $user->lang['CONTINUE_DELETING_INDEX_EXPLAIN'])
);
'CONTINUE_PROGRESS' => (isset($this->state[2]) && $this->state[2] > 0) ? $this->get_post_index_progress($this->state[2]) : $this->get_post_index_progress(0)
));
}
}
function display_progress_bar($type)
{
global $template, $user;
$l_type = ($type == 'create') ? 'INDEXING_IN_PROGRESS' : 'DELETING_INDEX_IN_PROGRESS';
adm_page_header($user->lang[$l_type]);
$template->set_filenames(array(
'body' => 'progress_bar.html')
);
$template->assign_vars(array(
'L_PROGRESS' => $user->lang[$l_type],
'L_PROGRESS_EXPLAIN' => $user->lang[$l_type . '_EXPLAIN'])
);
adm_page_footer();
}
function close_popup_js()
{
return "<script type=\"text/javascript\">\n" .
"// <![CDATA[\n" .
" close_waitscreen = 1;\n" .
"// ]]>\n" .
"</script>\n";
}
function get_search_types()
{
global $phpbb_extension_manager;
@@ -586,6 +605,41 @@ class acp_search
return $max_post_id;
}
/**
* Get progress stats of search index with HTML progress bar.
*
* @param int $post_counter Post ID of last post indexed.
* @return array Returns array with progress bar data.
*/
function get_post_index_progress(int $post_counter)
{
global $db, $language;
$sql = 'SELECT COUNT(post_id) as done_count
FROM ' . POSTS_TABLE . '
WHERE post_id <= ' . (int) $post_counter;
$result = $db->sql_query($sql);
$done_count = (int) $db->sql_fetchfield('done_count');
$db->sql_freeresult($result);
$sql = 'SELECT COUNT(post_id) as remain_count
FROM ' . POSTS_TABLE . '
WHERE post_id > ' . (int) $post_counter;
$result = $db->sql_query($sql);
$remain_count = (int) $db->sql_fetchfield('remain_count');
$db->sql_freeresult($result);
$total_count = $done_count + $remain_count;
$percent = ($done_count / $total_count) * 100;
return [
'VALUE' => $done_count,
'TOTAL' => $total_count,
'PERCENTAGE' => $percent,
'REMAINING' => $remain_count,
];
}
function save_state($state = false)
{
global $config;

View File

@@ -1128,7 +1128,7 @@ class acp_users
$db->sql_freeresult($result);
$template->assign_vars(array(
'L_NAME_CHARS_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_NAME_CHARS_EXPLAIN' => $user->lang($config['allow_name_chars'] . '_EXPLAIN', $user->lang('CHARACTERS_XY', (int) $config['min_name_chars']), $user->lang('CHARACTERS_XY', (int) $config['max_name_chars'])),
'L_CHANGE_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_pass_chars'])),
'L_POSTS_IN_QUEUE' => $user->lang('NUM_POSTS_IN_QUEUE', $user_row['posts_in_queue']),
'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
@@ -2515,7 +2515,7 @@ class acp_users
'U_EDIT_GROUP' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=groups&amp;mode=manage&amp;action=edit&amp;u=$user_id&amp;g={$data['group_id']}&amp;back_link=acp_users_groups"),
'U_DEFAULT' => $this->u_action . "&amp;action=default&amp;u=$user_id&amp;g=" . $data['group_id'] . '&amp;hash=' . generate_link_hash('acp_users'),
'U_DEMOTE_PROMOTE' => $this->u_action . '&amp;action=' . (($data['group_leader']) ? 'demote' : 'promote') . "&amp;u=$user_id&amp;g=" . $data['group_id'] . '&amp;hash=' . generate_link_hash('acp_users'),
'U_DELETE' => $this->u_action . "&amp;action=delete&amp;u=$user_id&amp;g=" . $data['group_id'],
'U_DELETE' => count($id_ary) > 1 ? $this->u_action . "&amp;action=delete&amp;u=$user_id&amp;g=" . $data['group_id'] : '',
'U_APPROVE' => ($group_type == 'pending') ? $this->u_action . "&amp;action=approve&amp;u=$user_id&amp;g=" . $data['group_id'] : '',
'GROUP_NAME' => $group_helper->get_name($data['group_name']),

View File

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

View File

@@ -2918,7 +2918,7 @@ function get_censor_preg_expression($word)
/**
* Returns the first block of the specified IPv6 address and as many additional
* ones as specified in the length paramater.
* ones as specified in the length parameter.
* If length is zero, then an empty string is returned.
* If length is greater than 3 the complete IP will be returned
*/
@@ -2929,6 +2929,14 @@ function short_ipv6($ip, $length)
return '';
}
// Handle IPv4 embedded IPv6 addresses
if (preg_match('/(?:\d{1,3}\.){3}\d{1,3}$/i', $ip))
{
$binary_ip = inet_pton($ip);
$ip_v6 = $binary_ip ? inet_ntop($binary_ip) : $ip;
$ip = $ip_v6 ?: $ip;
}
// extend IPv6 addresses
$blocks = substr_count($ip, ':') + 1;
if ($blocks < 9)
@@ -3695,15 +3703,11 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
{
if ($lazy)
{
// Determine board url - we may need it later
$board_url = generate_board_url() . '/';
// This path is sent with the base template paths in the assign_vars()
// call below. We need to correct it in case we are accessing from a
// controller because the web paths will be incorrect otherwise.
$phpbb_path_helper = $phpbb_container->get('path_helper');
$corrected_path = $phpbb_path_helper->get_web_root_path();
$web_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? $board_url : $corrected_path;
$web_path = $phpbb_path_helper->get_web_root_path();
$theme = "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme';
@@ -3891,15 +3895,12 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
$db->sql_freeresult($result);
}
// Determine board url - we may need it later
$board_url = generate_board_url() . '/';
// This path is sent with the base template paths in the assign_vars()
// call below. We need to correct it in case we are accessing from a
// controller because the web paths will be incorrect otherwise.
/* @var $phpbb_path_helper \phpbb\path_helper */
$phpbb_path_helper = $phpbb_container->get('path_helper');
$corrected_path = $phpbb_path_helper->get_web_root_path();
$web_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? $board_url : $corrected_path;
$web_path = $phpbb_path_helper->get_web_root_path();
// Send a proper content-language to the output
$user_lang = $user->lang['USER_LANG'];
@@ -4002,7 +4003,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
'_SID' => $_SID,
'SESSION_ID' => $user->session_id,
'ROOT_PATH' => $web_path,
'BOARD_URL' => $board_url,
'BOARD_URL' => generate_board_url() . '/',
'L_LOGIN_LOGOUT' => $l_login_logout,
'L_INDEX' => ($config['board_index_text'] !== '') ? $config['board_index_text'] : $user->lang['FORUM_INDEX'],

View File

@@ -1088,7 +1088,7 @@ function smiley_text($text, $force_option = false)
}
else
{
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_path_helper->get_web_root_path();
$root_path = $phpbb_path_helper->get_web_root_path();
/**
* Event to override the root_path for smilies

View File

@@ -427,7 +427,7 @@ class messenger
$user->session_begin();
}
$calling_page = html_entity_decode($request->server('PHP_SELF'), ENT_COMPAT);
$calling_page = html_entity_decode($request->server('REQUEST_URI'), ENT_COMPAT);
switch ($type)
{
@@ -597,7 +597,7 @@ class messenger
$this->from = $board_contact;
}
$encode_eol = ($config['smtp_delivery']) ? "\r\n" : PHP_EOL;
$encode_eol = $config['smtp_delivery'] || PHP_VERSION_ID >= 80000 ? "\r\n" : PHP_EOL;
// Build to, cc and bcc strings
$to = $cc = $bcc = '';
@@ -629,7 +629,7 @@ class messenger
}
else
{
$result = phpbb_mail($mail_to, $this->subject, $this->msg, $headers, PHP_EOL, $err_msg);
$result = phpbb_mail($mail_to, $this->subject, $this->msg, $headers, $encode_eol, $err_msg);
}
if (!$result)
@@ -952,7 +952,8 @@ class queue
}
else
{
$result = phpbb_mail($to, $subject, $msg, $headers, PHP_EOL, $err_msg);
$encode_eol = $config['smtp_delivery'] || PHP_VERSION_ID >= 80000 ? "\r\n" : PHP_EOL;
$result = phpbb_mail($to, $subject, $msg, $headers, $encode_eol, $err_msg);
}
if (!$result)
@@ -1882,7 +1883,7 @@ function mail_encode($str, $eol = "\r\n")
{
$encoded_char = $is_quoted_printable
? $char = preg_replace_callback(
'/[=_\?\x20\x00-\x1F\x80-\xFF]/',
'/[()<>@,;:\\\\".\[\]=_?\x20\x00-\x1F\x80-\xFF]/',
function ($matches)
{
$hex = dechex(ord($matches[0]));

View File

@@ -189,7 +189,7 @@ function generate_smilies($mode, $forum_id)
if (count($smilies))
{
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_path_helper->get_web_root_path();
$root_path = $phpbb_path_helper->get_web_root_path();
foreach ($smilies as $row)
{
@@ -420,7 +420,7 @@ function update_post_information($type, $ids, $return_update_sql = false)
*/
function posting_gen_topic_icons($mode, $icon_id)
{
global $phpbb_root_path, $config, $template, $cache;
global $phpbb_root_path, $phpbb_path_helper, $config, $template, $cache;
// Grab icons
$icons = $cache->obtain_icons();
@@ -432,7 +432,7 @@ function posting_gen_topic_icons($mode, $icon_id)
if (count($icons))
{
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_root_path;
$root_path = $phpbb_path_helper->get_web_root_path();
foreach ($icons as $id => $data)
{
@@ -834,7 +834,7 @@ function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_a
'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) : '',
'ALLOWED_ATTACHMENTS' => !empty($allowed_attachments) ? '.' . implode(',.', $allowed_attachments) : '',
];
/**
@@ -1345,7 +1345,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data, $is_soft = false, $
{
$post_mode = 'delete_first_post';
}
else if ($data['topic_last_post_id'] == $post_id)
else if ($data['topic_last_post_id'] <= $post_id)
{
$post_mode = 'delete_last_post';
}
@@ -2872,7 +2872,14 @@ function phpbb_handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $
$delete_reason
));
$meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p=$next_post_id") . "#p$next_post_id";
if ($next_post_id > 0)
{
$meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p=$next_post_id") . "#p$next_post_id";
}
else
{
$meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t=$topic_id");
}
$message = $user->lang['POST_DELETED'];
if (!$request->is_ajax())

View File

@@ -281,7 +281,7 @@ class ftp extends transfer
}
// Init some needed values
$this->transfer();
parent::__construct();
return;
}
@@ -341,6 +341,11 @@ class ftp extends transfer
*/
function _mkdir($dir)
{
if (!$this->connection)
{
return false;
}
return @ftp_mkdir($this->connection, $dir);
}
@@ -350,6 +355,11 @@ class ftp extends transfer
*/
function _rmdir($dir)
{
if (!$this->connection)
{
return false;
}
return @ftp_rmdir($this->connection, $dir);
}
@@ -359,6 +369,11 @@ class ftp extends transfer
*/
function _rename($old_handle, $new_handle)
{
if (!$this->connection)
{
return false;
}
return @ftp_rename($this->connection, $old_handle, $new_handle);
}
@@ -368,6 +383,11 @@ class ftp extends transfer
*/
function _chdir($dir = '')
{
if (!$this->connection)
{
return false;
}
if ($dir && $dir !== '/')
{
if (substr($dir, -1, 1) == '/')
@@ -385,6 +405,11 @@ class ftp extends transfer
*/
function _chmod($file, $perms)
{
if (!$this->connection)
{
return false;
}
if (function_exists('ftp_chmod'))
{
$err = @ftp_chmod($this->connection, $perms, $file);
@@ -406,6 +431,11 @@ class ftp extends transfer
*/
function _put($from_file, $to_file)
{
if (!$this->connection)
{
return false;
}
// We only use the BINARY file mode to cicumvent rewrite actions from ftp server (mostly linefeeds being replaced)
$mode = FTP_BINARY;
@@ -425,6 +455,11 @@ class ftp extends transfer
*/
function _delete($file)
{
if (!$this->connection)
{
return false;
}
return @ftp_delete($this->connection, $file);
}
@@ -449,6 +484,11 @@ class ftp extends transfer
*/
function _cwd()
{
if (!$this->connection)
{
return false;
}
return @ftp_pwd($this->connection);
}
@@ -458,6 +498,11 @@ class ftp extends transfer
*/
function _ls($dir = './')
{
if (!$this->connection)
{
return false;
}
$list = @ftp_nlist($this->connection, $dir);
// See bug #46295 - Some FTP daemons don't like './'
@@ -498,6 +543,11 @@ class ftp extends transfer
*/
function _site($command)
{
if (!$this->connection)
{
return false;
}
return @ftp_site($this->connection, $command);
}
}
@@ -782,6 +832,11 @@ class ftp_fsock extends transfer
*/
function _send_command($command, $args = '', $check = true)
{
if (!$this->connection)
{
return false;
}
if (!empty($args))
{
$command = "$command $args";
@@ -871,6 +926,11 @@ class ftp_fsock extends transfer
*/
function _close_data_connection()
{
if (!$this->connection)
{
return false;
}
return @fclose($this->data_connection);
}
@@ -880,6 +940,11 @@ class ftp_fsock extends transfer
*/
function _check_command($return = false)
{
if (!$this->connection)
{
return false;
}
$response = '';
do

View File

@@ -98,7 +98,7 @@ class mcp_notes
$userrow = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$userrow)
if (!$userrow || (int) $userrow['user_id'] === ANONYMOUS)
{
trigger_error('NO_USER');
}
@@ -162,16 +162,16 @@ class mcp_notes
{
if (check_form_key('mcp_notes'))
{
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_USER_FEEDBACK', false, array($userrow['username']));
$phpbb_log->add('mod', $user->data['user_id'], $user->ip, 'LOG_USER_FEEDBACK', false, array(
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_USER_FEEDBACK', false, [$userrow['username']]);
$phpbb_log->add('mod', $user->data['user_id'], $user->ip, 'LOG_USER_FEEDBACK', false, [
'forum_id' => 0,
'topic_id' => 0,
$userrow['username']
));
$phpbb_log->add('user', $user->data['user_id'], $user->ip, 'LOG_USER_GENERAL', false, array(
]);
$phpbb_log->add('user', $user->data['user_id'], $user->ip, 'LOG_USER_GENERAL', false, [
'reportee_id' => $user_id,
$usernote
));
utf8_encode_ucr($usernote)
]);
$msg = $user->lang['USER_FEEDBACK_ADDED'];
}

View File

@@ -383,7 +383,7 @@ function mcp_topic_view($id, $mode, $action)
'TOPIC_TITLE' => $topic_info['topic_title'],
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $topic_info['topic_id']),
'TO_TOPIC_ID' => $to_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", 't=' . $to_topic_id) . '">' . $to_topic_info['topic_title'] . '</a>') : '',
'SPLIT_SUBJECT' => $subject,
@@ -638,9 +638,13 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
$topic_info['topic_title']
));
// Change topic title of first post
$sql = 'UPDATE ' . POSTS_TABLE . "
SET post_subject = '" . $db->sql_escape($subject) . "'
// Change topic title of first post and write icon_id to post
$sql_ary = [
'post_subject' => $subject,
'icon_id' => $icon_id,
];
$sql = 'UPDATE ' . POSTS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
WHERE post_id = {$post_id_list[0]}";
$db->sql_query($sql);
@@ -732,6 +736,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
// Update forum statistics
$config->increment('num_topics', 1, false);
sync('forum', 'forum_id', [$to_forum_id], true, true);
// Link back to both topics
$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>');

View File

@@ -386,7 +386,7 @@ class mcp_warn
$user_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$user_row)
if (!$user_row || (int) $user_row['user_id'] === ANONYMOUS)
{
trigger_error('NO_USER');
}
@@ -603,8 +603,8 @@ function add_warning($user_row, $warning, $send_pm = true, $post_id = 0)
$db->sql_freeresult($result);
$phpbb_log->add('mod', $user->data['user_id'], $user->ip, 'LOG_USER_WARNING', false, array(
'forum_id' => $row['forum_id'],
'topic_id' => $row['topic_id'],
'forum_id' => $row['forum_id'] ?? 0,
'topic_id' => $row['topic_id'] ?? 0,
'post_id' => $post_id,
$user_row['username']
));

View File

@@ -1154,7 +1154,7 @@ class parse_message extends bbcode_firstpass
}
// Store message length...
$message_length = ($mode == 'post') ? utf8_strlen($this->message) : utf8_strlen(preg_replace('#\[\/?[a-z\*\+\-]+(=[\S]+)?\]#ius', ' ', $this->message));
$message_length = ($mode == 'post') ? utf8_strlen($this->message) : utf8_strlen(preg_replace('#\[\/?[a-z\*\+\-]+(?:=\S+?)?\]#ius', '', $this->message));
// Maximum message length check. 0 disables this check completely.
if ((int) $config['max_' . $mode . '_chars'] > 0 && $message_length > (int) $config['max_' . $mode . '_chars'])

View File

@@ -23,11 +23,11 @@ $level = E_ALL & ~E_NOTICE & ~E_DEPRECATED;
error_reporting($level);
/**
* Minimum Requirement: PHP 7.1.3
* Minimum Requirement: PHP 7.2.0
*/
if (version_compare(PHP_VERSION, '7.1.3', '<'))
if (version_compare(PHP_VERSION, '7.2.0', '<'))
{
die('You are running an unsupported PHP version. Please upgrade to PHP 7.1.3 or higher before trying to install or update to phpBB 3.3');
die('You are running an unsupported PHP version (' . PHP_VERSION . '). Please upgrade to PHP 7.2.0 or higher before trying to install or update to phpBB 3.3');
}
// Register globals and magic quotes have been dropped in PHP 5.4 so no need for extra checks

View File

@@ -41,7 +41,7 @@ class ucp_attachments
if ($delete && count($delete_ids))
{
// Validate $delete_ids...
$sql = 'SELECT a.attach_id, p.post_edit_locked, t.topic_status, f.forum_id, f.forum_status
$sql = 'SELECT a.attach_id, a.in_message, p.post_edit_locked, p.post_time, t.topic_status, f.forum_id, f.forum_status, pt.folder_id
FROM ' . ATTACHMENTS_TABLE . ' a
LEFT JOIN ' . POSTS_TABLE . ' p
ON (a.post_msg_id = p.post_id AND a.in_message = 0)
@@ -49,6 +49,10 @@ class ucp_attachments
ON (t.topic_id = p.topic_id AND a.in_message = 0)
LEFT JOIN ' . FORUMS_TABLE . ' f
ON (f.forum_id = t.forum_id AND a.in_message = 0)
LEFT JOIN ' . PRIVMSGS_TABLE . ' pr
ON (a.post_msg_id = pr.msg_id AND a.in_message = 1)
LEFT JOIN ' . PRIVMSGS_TO_TABLE . ' pt
ON (a.post_msg_id = pt.msg_id AND a.poster_id = pt.author_id AND a.poster_id = pt.user_id AND a.in_message = 1)
WHERE a.poster_id = ' . $user->data['user_id'] . '
AND a.is_orphan = 0
AND ' . $db->sql_in_set('a.attach_id', $delete_ids);
@@ -57,7 +61,7 @@ class ucp_attachments
$delete_ids = array();
while ($row = $db->sql_fetchrow($result))
{
if (!$auth->acl_get('m_edit', $row['forum_id']) && ($row['forum_status'] == ITEM_LOCKED || $row['topic_status'] == ITEM_LOCKED || $row['post_edit_locked']))
if (!$this->can_delete_file($row))
{
continue;
}
@@ -135,12 +139,13 @@ class ucp_attachments
$pagination = $phpbb_container->get('pagination');
$start = $pagination->validate_start($start, $config['topics_per_page'], $num_attachments);
$sql = 'SELECT a.*, t.topic_title, pr.message_subject as message_title, p.post_edit_locked, t.topic_status, f.forum_id, f.forum_status
$sql = 'SELECT a.*, t.topic_title, pr.message_subject as message_title, pr.message_time as message_time, pt.folder_id, p.post_edit_locked, p.post_time, t.topic_status, f.forum_id, f.forum_status
FROM ' . ATTACHMENTS_TABLE . ' a
LEFT JOIN ' . POSTS_TABLE . ' p ON (a.post_msg_id = p.post_id AND a.in_message = 0)
LEFT JOIN ' . TOPICS_TABLE . ' t ON (a.topic_id = t.topic_id AND a.in_message = 0)
LEFT JOIN ' . FORUMS_TABLE . ' f ON (f.forum_id = t.forum_id AND a.in_message = 0)
LEFT JOIN ' . PRIVMSGS_TABLE . ' pr ON (a.post_msg_id = pr.msg_id AND a.in_message = 1)
LEFT JOIN ' . PRIVMSGS_TO_TABLE . ' pt ON (a.post_msg_id = pt.msg_id AND a.poster_id = pt.author_id AND a.poster_id = pt.user_id AND a.in_message = 1)
WHERE a.poster_id = ' . $user->data['user_id'] . "
AND a.is_orphan = 0
ORDER BY $order_by";
@@ -177,7 +182,7 @@ class ucp_attachments
'TOPIC_ID' => $row['topic_id'],
'S_IN_MESSAGE' => $row['in_message'],
'S_LOCKED' => !$row['in_message'] && !$auth->acl_get('m_edit', $row['forum_id']) && ($row['forum_status'] == ITEM_LOCKED || $row['topic_status'] == ITEM_LOCKED || $row['post_edit_locked']),
'S_LOCKED' => !$this->can_delete_file($row),
'U_VIEW_ATTACHMENT' => append_sid("{$phpbb_root_path}download/file.$phpEx", 'id=' . $row['attach_id']),
'U_VIEW_TOPIC' => $view_topic)
@@ -216,4 +221,29 @@ class ucp_attachments
$this->tpl_name = 'ucp_attachments';
$this->page_title = 'UCP_ATTACHMENTS';
}
/**
* Check if the user can delete the file
*
* @param array $row
*
* @return bool True if user can delete the file, false if not
*/
private function can_delete_file(array $row): bool
{
global $auth, $config;
if ($row['in_message'])
{
return ($row['message_time'] > (time() - ($config['pm_edit_time'] * 60)) || !$config['pm_edit_time']) && $row['folder_id'] == PRIVMSGS_OUTBOX && $auth->acl_get('u_pm_edit');
}
else
{
$can_edit_time = !$config['edit_time'] || $row['post_time'] > (time() - ($config['edit_time'] * 60));
$can_delete_time = !$config['delete_time'] || $row['post_time'] > (time() - ($config['delete_time'] * 60));
$item_locked = !$auth->acl_get('m_edit', $row['forum_id']) && ($row['forum_status'] == ITEM_LOCKED || $row['topic_status'] == ITEM_LOCKED || $row['post_edit_locked']);
return !$item_locked && $can_edit_time && $can_delete_time;
}
}
}

View File

@@ -35,8 +35,14 @@ class ucp_main
function main($id, $mode)
{
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx, $phpbb_dispatcher;
global $request;
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx, $phpbb_dispatcher, $cache;
global $request, $phpbb_container, $language;
/* @var $pagination \phpbb\pagination */
$pagination = $phpbb_container->get('pagination');
/* @var $phpbb_content_visibility \phpbb\content_visibility */
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
switch ($mode)
{
@@ -44,8 +50,8 @@ class ucp_main
$user->add_lang('memberlist');
$sql_from = TOPICS_TABLE . ' t ';
$sql_select = '';
$sql_from = TOPICS_TABLE . ' t LEFT JOIN ' . FORUMS_TABLE . ' f ON (f.forum_id = t.forum_id) ';
$sql_select = ', f.enable_icons';
if ($config['load_db_track'])
{
@@ -137,6 +143,9 @@ class ucp_main
}
unset($topic_forum_list);
// Grab icons
$icons = $cache->obtain_icons();
foreach ($topic_list as $topic_id)
{
$row = &$rowset[$topic_id];
@@ -149,6 +158,9 @@ class ucp_main
$folder_img = ($unread_topic) ? $folder_new : $folder;
$folder_alt = ($unread_topic) ? 'UNREAD_POSTS' : (($row['topic_status'] == ITEM_LOCKED) ? 'TOPIC_LOCKED' : 'NO_UNREAD_POSTS');
// Replies
$replies = $phpbb_content_visibility->get_count('topic_posts', $row, $forum_id) - 1;
if ($row['topic_status'] == ITEM_LOCKED)
{
$folder_img .= '_locked';
@@ -176,10 +188,14 @@ class ucp_main
'TOPIC_TITLE' => censor_text($row['topic_title']),
'TOPIC_TYPE' => $topic_type,
'TOPIC_ICON_IMG' => !empty($icons[$row['icon_id']]) ? $icons[$row['icon_id']]['img'] : '',
'TOPIC_ICON_IMG_WIDTH' => !empty($icons[$row['icon_id']]) ? $icons[$row['icon_id']]['width'] : '',
'TOPIC_ICON_IMG_HEIGHT' => !empty($icons[$row['icon_id']]) ? $icons[$row['icon_id']]['height'] : '',
'TOPIC_IMG_STYLE' => $folder_img,
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', '') : '',
'S_TOPIC_ICONS' => $row['enable_icons'] ? true : false,
'S_USER_POSTED' => (!empty($row['topic_posted']) && $row['topic_posted']) ? true : false,
'S_UNREAD' => $unread_topic,
@@ -211,6 +227,8 @@ class ucp_main
extract($phpbb_dispatcher->trigger_event('core.ucp_main_front_modify_template_vars', compact($vars)));
$template->assign_block_vars('topicrow', $topicrow);
$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);
}
if ($config['load_user_activity'])

View File

@@ -213,6 +213,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
$u_jabber = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=jabber&amp;u=' . $author_id);
}
$can_edit_pm = ($message_row['message_time'] > time() - ($config['pm_edit_time'] * 60) || !$config['pm_edit_time']) && $folder_id == PRIVMSGS_OUTBOX && $auth->acl_get('u_pm_edit');
$msg_data = array(
'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
@@ -253,7 +255,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'U_EMAIL' => $user_info['email'],
'U_REPORT' => ($config['allow_pm_report']) ? $phpbb_container->get('controller.helper')->route('phpbb_report_pm_controller', array('id' => $message_row['msg_id'])) : '',
'U_QUOTE' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&amp;mode=compose&amp;action=quote&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
'U_EDIT' => (($message_row['message_time'] > time() - ($config['pm_edit_time'] * 60) || !$config['pm_edit_time']) && $folder_id == PRIVMSGS_OUTBOX && $auth->acl_get('u_pm_edit')) ? "$url&amp;mode=compose&amp;action=edit&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
'U_EDIT' => $can_edit_pm ? "$url&amp;mode=compose&amp;action=edit&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
'U_POST_REPLY_PM' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&amp;mode=compose&amp;action=reply&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
'U_POST_REPLY_ALL' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&amp;mode=compose&amp;action=reply&amp;f=$folder_id&amp;reply_to_all=1&amp;p=" . $message_row['msg_id'] : '',
'U_PREVIOUS_PM' => "$url&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] . "&amp;view=previous",

View File

@@ -143,7 +143,7 @@ class ucp_profile
));
}
if ($auth->acl_get('u_chgpasswd') && $data['new_password'] && !$passwords_manager->check($data['new_password'], $user->data['user_password']))
if ($auth->acl_get('u_chgpasswd') && $data['new_password'])
{
$sql_ary['user_passchg'] = time();
@@ -265,7 +265,7 @@ class ucp_profile
'NEW_PASSWORD' => $data['new_password'],
'CUR_PASSWORD' => '',
'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_USERNAME_EXPLAIN' => $user->lang($config['allow_name_chars'] . '_EXPLAIN', $user->lang('CHARACTERS_XY', (int) $config['min_name_chars']), $user->lang('CHARACTERS_XY', (int) $config['max_name_chars'])),
'L_CHANGE_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_pass_chars'])),
'S_FORCE_PASSWORD' => ($auth->acl_get('u_chgpasswd') && $config['chg_passforce'] && $user->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400)) ? true : false,

View File

@@ -300,7 +300,7 @@ class ucp_register
if ($config['max_reg_attempts'] && $captcha->get_attempt_count() > $config['max_reg_attempts'])
{
$error[] = $user->lang['TOO_MANY_REGISTERS'];
trigger_error('TOO_MANY_REGISTERS');
}
}
@@ -644,8 +644,8 @@ class ucp_register
'EMAIL' => $data['email'],
'L_REG_COND' => $l_reg_cond,
'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'])),
'L_USERNAME_EXPLAIN' => $user->lang($config['allow_name_chars'] . '_EXPLAIN', $user->lang('CHARACTERS_XY', (int) $config['min_name_chars']), $user->lang('CHARACTERS_XY', (int) $config['max_name_chars'])),
'L_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS_XY', (int) $config['min_pass_chars'])),
'S_LANG_OPTIONS' => (count($lang_row) > 1) ? language_select($data['lang'], $lang_row) : '',
'S_TZ_PRESELECT' => !$submit,

View File

@@ -227,6 +227,7 @@ $template->assign_vars(array(
'S_DISPLAY_BIRTHDAY_LIST' => $show_birthdays,
'S_INDEX' => true,
'U_CANONICAL' => generate_board_url() . '/',
'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&amp;mark=forums&amp;mark_time=' . time()) : '',
'U_MCP' => ($auth->acl_get('m_') || $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=front', true, $user->session_id) : '')
);

View File

@@ -20,9 +20,9 @@ define('IN_INSTALL', true);
$phpbb_root_path = '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
if (version_compare(PHP_VERSION, '7.1.3', '<'))
if (version_compare(PHP_VERSION, '7.2.0', '<'))
{
die('You are running an unsupported PHP version. Please upgrade to PHP 7.1.3 or higher before trying to install or update to phpBB 3.3');
die('You are running an unsupported PHP version (' . PHP_VERSION . '). Please upgrade to PHP 7.2.0 or higher before trying to install or update to phpBB 3.3');
}
$startup_new_path = $phpbb_root_path . 'install/update/update/new/install/startup.' . $phpEx;

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

View File

@@ -316,7 +316,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('update_hashes_lock
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('use_system_cron', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.3.8');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.3.11');
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');
@@ -834,10 +834,10 @@ INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_len
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_occupation', 'profilefields.type.text', 'phpbb_occupation', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, '', '');
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_icq', 'profilefields.type.string', 'phpbb_icq', '20', '3', '15', '', '', '[0-9]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 6, 1, 'SEND_ICQ_MESSAGE', 'https://www.icq.com/people/%s/');
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_yahoo', 'profilefields.type.string', 'phpbb_yahoo', '40', '5', '255', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 8, 1, 'SEND_YIM_MESSAGE', 'ymsgr:sendim?%s');
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_facebook', 'profilefields.type.string', 'phpbb_facebook', '20', '5', '50', '', '', '[\w.]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 9, 1, 'VIEW_FACEBOOK_PROFILE', 'http://facebook.com/%s/');
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_twitter', 'profilefields.type.string', 'phpbb_twitter', '20', '1', '15', '', '', '[\w_]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 10, 1, 'VIEW_TWITTER_PROFILE', 'http://twitter.com/%s');
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_facebook', 'profilefields.type.string', 'phpbb_facebook', '20', '5', '50', '', '', '[\w.]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 9, 1, 'VIEW_FACEBOOK_PROFILE', 'https://facebook.com/%s/');
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_twitter', 'profilefields.type.string', 'phpbb_twitter', '20', '1', '15', '', '', '[\w_]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 10, 1, 'VIEW_TWITTER_PROFILE', 'https://twitter.com/%s');
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_skype', 'profilefields.type.string', 'phpbb_skype', '20', '6', '32', '', '', '[a-zA-Z][\w\.,\-_]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 11, 1, 'VIEW_SKYPE_PROFILE', 'skype:%s?userinfo');
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_youtube', 'profilefields.type.string', 'phpbb_youtube', '20', '3', '60', '', '', '[a-zA-Z][\w\.,\-_]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 12, 1, 'VIEW_YOUTUBE_CHANNEL', 'http://youtube.com/user/%s');
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_youtube', 'profilefields.type.string', 'phpbb_youtube', '20', '3', '60', '', '', '(@[a-zA-Z0-9_.-]{3,30}|c/[a-zA-Z][\w\.,\-_]+|(channel|user)/[a-zA-Z][\w\.,\-_]+)', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 12, 1, 'VIEW_YOUTUBE_PROFILE', 'https://youtube.com/%s');
# User Notification Options (for first user)
INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('notification.type.post', 0, 2, 'notification.method.board');

View File

@@ -159,9 +159,9 @@ function installer_shutdown_function($display_errors)
installer_class_loader($phpbb_root_path, $phpEx);
$supported_error_levels = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_USER_DEPRECATED;
$cache = new \phpbb\cache\driver\file(__DIR__ . '/../cache/installer');
$cache = new \phpbb\cache\driver\file(__DIR__ . '/../cache/installer/');
$filesystem = new \phpbb\filesystem\filesystem();
if (strpos($error['file'], $filesystem->realpath($cache->cache_dir)) !== false)
if (strpos($error['file'], $filesystem->realpath($cache->cache_dir)) !== false && is_writable($cache->cache_dir))
{
$file_age = @filemtime($error['file']);

View File

@@ -44,7 +44,7 @@ $lang = array_merge($lang, array(
'BOARD_STYLE' => 'Board style',
'CUSTOM_DATEFORMAT' => 'Custom…',
'DEFAULT_DATE_FORMAT' => 'Date format',
'DEFAULT_DATE_FORMAT_EXPLAIN' => 'The date format is the same as the PHP <code><a href="https://secure.php.net/manual/function.date.php">date()</a></code> function.',
'DEFAULT_DATE_FORMAT_EXPLAIN' => 'The syntax uses the same format as the PHP <a href="https://www.php.net/manual/datetime.format.php">date functions</a>.',
'DEFAULT_LANGUAGE' => 'Default language',
'DEFAULT_STYLE' => 'Default style',
'DEFAULT_STYLE_EXPLAIN' => 'The default style for new users.',
@@ -386,7 +386,7 @@ $lang = array_merge($lang, array(
'ACP_LOAD_SETTINGS_EXPLAIN' => 'Here you can enable and disable certain board functions to reduce the amount of processing required. On most servers there is no need to disable any functions. However on certain systems or in shared hosting environments it may be beneficial to disable capabilities you do not really need. You can also specify limits for system load and active sessions beyond which the board will go offline.',
'ALLOW_CDN' => 'Allow usage of third party content delivery networks',
'ALLOW_CDN_EXPLAIN' => 'If this setting is enabled, some files will be served from external third party servers instead of your server. This reduces the network bandwidth required by your server, but may present a privacy issue for some board administrators. In a default phpBB installation, this includes loading “jQuery” and the font “Open Sans” from Googles content delivery network.',
'ALLOW_CDN_EXPLAIN' => 'If this setting is enabled, some files will be served from external third party servers instead of your server. This reduces the network bandwidth used by your server, but may present a privacy issue in some countries. In a default phpBB installation, this includes loading “jQuery” and the font “Open Sans” from Googles content delivery network. This also applies to the “Font Awesome” font, which phpBB and some extensions use to render icons.',
'ALLOW_LIVE_SEARCHES' => 'Allow live searches',
'ALLOW_LIVE_SEARCHES_EXPLAIN' => 'If this setting is enabled, users are provided with keyword suggestions as they type in certain fields throughout the board.',
'CUSTOM_PROFILE_FIELDS' => 'Custom profile fields',
@@ -483,7 +483,7 @@ $lang = array_merge($lang, array(
'SCRIPT_PATH' => 'Script path',
'SCRIPT_PATH_EXPLAIN' => 'The path where phpBB is located relative to the domain name, e.g. <samp>/phpBB3</samp>.',
'SERVER_NAME' => 'Domain name',
'SERVER_NAME_EXPLAIN' => 'The domain name this board runs from (for example: <samp>www.example.com</samp>).',
'SERVER_NAME_EXPLAIN' => 'The domain name this board runs from (for example: <samp>example.com</samp>).',
'SERVER_PORT' => 'Server port',
'SERVER_PORT_EXPLAIN' => 'The port your server is running on, usually 80, only change if different.',
'SERVER_PROTOCOL' => 'Server protocol',

View File

@@ -738,6 +738,10 @@ $lang = array_merge($lang, array(
'LOG_SEARCH_INDEX_CREATED' => '<strong>Created search index for</strong><br />» %s',
'LOG_SEARCH_INDEX_REMOVED' => '<strong>Removed search index for</strong><br />» %s',
'LOG_SPHINX_ERROR' => '<strong>Sphinx Error</strong><br />» %s',
'LOG_SPAMHAUS_OPEN_RESOLVER' => 'Spamhaus does not allow queries using an open resolver. Blacklist checking has been disabled. For more information, see https://www.spamhaus.com/product/help-for-spamhaus-public-mirror-users/.',
'LOG_SPAMHAUS_VOLUME_LIMIT' => 'Spamhaus query volume limit has been exceeded. Blacklist checking has been disabled. For more information, see https://www.spamhaus.com/product/help-for-spamhaus-public-mirror-users/.',
'LOG_STYLE_ADD' => '<strong>Added new style</strong><br />» %s',
'LOG_STYLE_DELETE' => '<strong>Deleted style</strong><br />» %s',
'LOG_STYLE_EDIT_DETAILS' => '<strong>Edited style</strong><br />» %s',

View File

@@ -59,7 +59,7 @@ $lang = array_merge($lang, array(
'ACL_NEVER' => 'Never',
'ACL_SET' => 'Setting permissions',
'ACL_SET_EXPLAIN' => 'Permissions are based on a simple <strong>YES</strong>/<strong>NO</strong> system. Setting an option to <strong>NEVER</strong> for a user or usergroup overrides any other value assigned to it. If you do not wish to assign a value for an option for this user or group select <strong>NO</strong>. If values are assigned for this option elsewhere they will be used in preference, else <strong>NEVER</strong> is assumed. All objects marked (with the checkbox in front of them) will copy the permission set you defined.',
'ACL_SET_EXPLAIN' => 'Permissions are based on a simple <strong>YES</strong>/<strong>NO</strong> system. Setting an option to <strong>NEVER</strong> for a user or usergroup overrides any other value assigned to it. If you do not wish to assign a value for an option for this user or group select <strong>NO</strong>. If values are assigned for this option elsewhere they will be used in preference, else <strong>NEVER</strong> is assumed. All objects marked (with the checkbox in front of them) will copy the permission set you defined. Please note that setting administrative permissions for founder accounts does not have any effect as admin permissions are always set to <strong>YES</strong> for founders.',
'ACL_SETTING' => 'Setting',
'ACL_TYPE_A_' => 'Administrative permissions',

View File

@@ -52,7 +52,7 @@ $lang = array_merge($lang, array(
'DEFAULT_SEARCH_RETURN_CHARS' => 'Default number of returned characters',
'DEFAULT_SEARCH_RETURN_CHARS_EXPLAIN' => 'The default number of characters that will be returned while searching. A value of 0 will return the entire post.',
'DELETE_INDEX' => 'Delete index',
'DELETING_INDEX_IN_PROGRESS' => 'Deleting the index in progress',
'DELETING_INDEX_IN_PROGRESS' => 'Deletion of index is in progress',
'DELETING_INDEX_IN_PROGRESS_EXPLAIN' => 'The search backend is currently cleaning its index. This can take a few minutes.',
'FULLTEXT_MYSQL_INCOMPATIBLE_DATABASE' => 'The MySQL fulltext backend can only be used with MySQL4 and above.',
@@ -92,7 +92,7 @@ $lang = array_merge($lang, array(
'GO_TO_SEARCH_INDEX' => 'Go to search index page',
'INDEX_STATS' => 'Index statistics',
'INDEXING_IN_PROGRESS' => 'Indexing in progress',
'INDEXING_IN_PROGRESS' => 'Indexing in progress',
'INDEXING_IN_PROGRESS_EXPLAIN' => 'The search backend is currently indexing all posts on the board. This can take from a few minutes to a few hours depending on your boards size.',
'LIMIT_SEARCH_LOAD' => 'Search page system load limit',
@@ -112,18 +112,19 @@ $lang = array_merge($lang, array(
'SEARCH_GUEST_INTERVAL' => 'Guest search flood interval',
'SEARCH_GUEST_INTERVAL_EXPLAIN' => 'Number of seconds guests must wait between searches. If one guest searches all others have to wait until the time interval passed.',
'SEARCH_INDEX_CREATE_REDIRECT' => array(
2 => 'All posts up to post id %2$d have now been indexed, of which %1$d posts were within this step.<br />',
2 => 'All posts up to post id %2$d have now been indexed, of which %1$d posts were within this step.',
),
'SEARCH_INDEX_CREATE_REDIRECT_RATE' => array(
2 => 'The current rate of indexing is approximately %1$.1f posts per second.<br />Indexing in progress…',
2 => 'The current rate of indexing is approximately %1$.1f posts per second.',
),
'SEARCH_INDEX_DELETE_REDIRECT' => array(
2 => 'All posts up to post id %2$d have been removed from the search index, of which %1$d posts were within this step.<br />',
2 => 'All posts up to post id %2$d have been removed from the search index, of which %1$d posts were within this step.',
),
'SEARCH_INDEX_DELETE_REDIRECT_RATE' => array(
2 => 'The current rate of deleting is approximately %1$.1f posts per second.<br />Deleting in progress…',
2 => 'The current rate of deleting is approximately %1$.1f posts per second.',
),
'SEARCH_INDEX_CREATED' => 'Successfully indexed all posts in the board database.',
'SEARCH_INDEX_PROGRESS' => 'Done: %1$d | Pending: %2$d | Total: %3$d',
'SEARCH_INDEX_REMOVED' => 'Successfully deleted the search index for this backend.',
'SEARCH_INTERVAL' => 'User search flood interval',
'SEARCH_INTERVAL_EXPLAIN' => 'Number of seconds users must wait between searches. This interval is checked independently for each user.',

View File

@@ -169,6 +169,11 @@ $lang = array_merge($lang, array(
1 => '%d character',
2 => '%d characters',
),
// Special version to be used when describing ranges e.g. "min x characters and max y characters"
'CHARACTERS_XY' => array(
1 => '%d character',
2 => '%d characters',
),
'COLLAPSE_VIEW' => 'Collapse view',
'CLOSE_WINDOW' => 'Close window',
'CODE' => 'Code',
@@ -678,6 +683,10 @@ $lang = array_merge($lang, array(
'RETURN_TOPIC' => '%sReturn to the topic last visited%s',
'RETURN_TO' => 'Return to “%s”',
'RETURN_TO_INDEX' => 'Return to Board Index',
'ROUTE_NOT_FOUND' => 'The requested route “%s” could not be found.',
'ROUTE_INVALID_MISSING_PARAMS' => 'Invalid or missing parameters passed for route “%s”.',
'FEED' => 'Feed',
'FEED_NEWS' => 'News',
'FEED_TOPICS_ACTIVE' => 'Active Topics',

View File

@@ -45,7 +45,7 @@ $lang = array_merge($lang, array(
// Introduction page
'INTRODUCTION_TITLE' => 'Introduction',
'INTRODUCTION_BODY' => 'Welcome to phpBB3!<br /><br />phpBB® is the most widely used open source bulletin board solution in the world. phpBB3 is the latest installment in a package line started in 2000. Like its predecessors, phpBB3 is feature-rich, user-friendly, and fully supported by the phpBB Team. phpBB3 greatly improves on what made phpBB2 popular, and adds commonly requested features that were not present in previous versions. We hope it exceeds your expectations.<br /><br />This installation system will guide you through installing phpBB3, updating to the latest version of phpBB3 from past releases, as well as converting to phpBB3 from a different discussion board system (including phpBB2). For more information, we encourage you to read <a href="../docs/INSTALL.html">the installation guide</a>.<br /><br />To read the phpBB3 license or learn about obtaining support and our stance on it, please select the respective options from the side menu. To continue, please select the appropriate tab above.',
'INTRODUCTION_BODY' => 'Welcome to phpBB3!<br /><br />phpBB® is the most widely used open source bulletin board solution in the world. phpBB3 is the latest installment in a package line started in 2000. Like its predecessors, phpBB3 is feature-rich, user-friendly, and fully supported by the phpBB Team. phpBB3 greatly improves on what made phpBB2 popular, and adds commonly requested features that were not present in previous versions. We hope it exceeds your expectations.<br /><br />This installation system will guide you through installing phpBB3, updating to the latest version of phpBB3 from past releases, as well as converting to phpBB3 from a different discussion board system (including phpBB2). For more information, we encourage you to read <a href="%1$s">the installation guide</a>.<br /><br />To read the phpBB3 license or learn about obtaining support and our stance on it, please select the respective options from the side menu. To continue, please select the appropriate tab above.',
// Support page
'SUPPORT_TITLE' => 'Support',
@@ -105,7 +105,7 @@ $lang = array_merge($lang, array(
// Server requirements
'PHP_VERSION_REQD' => 'PHP version',
'PHP_VERSION_REQD_EXPLAIN' => 'phpBB requires PHP version 7.1.3 or higher.',
'PHP_VERSION_REQD_EXPLAIN' => 'phpBB requires PHP version 7.2.0 or higher.',
'PHP_GETIMAGESIZE_SUPPORT' => 'PHP getimagesize() function is required',
'PHP_GETIMAGESIZE_SUPPORT_EXPLAIN' => 'In order for phpBB to function correctly, the getimagesize function needs to be available.',
'PCRE_UTF_SUPPORT' => 'PCRE UTF-8 support',
@@ -508,10 +508,12 @@ $lang = array_merge($lang, array(
'CHECK_TABLE_PREFIX' => 'Please check your table prefix and try again.',
// Conversion in progress
'CATEGORY' => 'Category',
'CONTINUE_CONVERT' => 'Continue conversion',
'CONTINUE_CONVERT_BODY' => 'A previous conversion attempt has been determined. You are now able to choose between starting a new conversion or continuing the conversion.',
'CONVERT_NEW_CONVERSION' => 'New conversion',
'CONTINUE_OLD_CONVERSION' => 'Continue previously started conversion',
'POST_ID' => 'Post ID',
// Start conversion
'SUB_INTRO' => 'Introduction',
@@ -568,6 +570,10 @@ $lang = array_merge($lang, array(
'CONVERT_COMPLETE' => 'Conversion completed',
'CONVERT_COMPLETE_EXPLAIN' => 'You have now successfully converted your board to phpBB 3.3. You can now login and <a href="../">access your board</a>. Please ensure that the settings were transferred correctly before enabling your board by deleting the install directory. Remember that help on using phpBB is available online via the <a href="https://www.phpbb.com/support/docs/en/3.3/ug/">Documentation</a> and the <a href="https://www.phpbb.com/community/viewforum.php?f=661">support forums</a>.',
'COLLIDING_CLEAN_USERNAME' => '<strong>%s</strong> is the clean username for:',
'COLLIDING_USER' => '» user id: <strong>%d</strong> username: <strong>%s</strong> (%d posts)',
'COLLIDING_USERNAMES_FOUND' => 'Colliding usernames were found on your old board. In order to complete the conversion please delete or rename these users so that there is only one user on your old board for each clean username.',
'CONV_ERR_FATAL' => 'Fatal conversion error',
'CONV_ERROR_ATTACH_FTP_DIR' => 'FTP upload for attachments is enabled at the old board. Please disable the FTP upload option and make sure a valid upload directory is specified, then copy all attachment files to this new web accessible directory. Once you have done this, restart the convertor.',
'CONV_ERROR_CONFIG_EMPTY' => 'There is no configuration information available for the conversion.',
'CONV_ERROR_FORUM_ACCESS' => 'Unable to get forum access information.',

View File

@@ -149,5 +149,5 @@ $lang = array_merge($lang, array(
'VIEW_FACEBOOK_PROFILE' => 'View Facebook Profile',
'VIEW_SKYPE_PROFILE' => 'View Skype Profile',
'VIEW_TWITTER_PROFILE' => 'View Twitter Profile',
'VIEW_YOUTUBE_CHANNEL' => 'View YouTube Channel',
'VIEW_YOUTUBE_PROFILE' => 'View YouTube Profile',
));

View File

@@ -116,7 +116,7 @@ $lang = array_merge($lang, array(
'BIRTHDAY' => 'Birthday',
'BIRTHDAY_EXPLAIN' => 'Setting a year will list your age when it is your birthday.',
'BOARD_DATE_FORMAT' => 'My date format',
'BOARD_DATE_FORMAT_EXPLAIN' => 'The syntax used is identical to the PHP <a href="https://secure.php.net/manual/function.date.php">date()</a> function.',
'BOARD_DATE_FORMAT_EXPLAIN' => 'The syntax uses the same format as the PHP <a href="https://www.php.net/manual/datetime.format.php">date functions</a>.',
'BOARD_LANGUAGE' => 'My language',
'BOARD_STYLE' => 'My board style',
'BOARD_TIMEZONE' => 'My timezone',

View File

@@ -1634,17 +1634,20 @@ switch ($mode)
if (count($user_list))
{
// Session time?! Session time...
$sql = 'SELECT session_user_id, MAX(session_time) AS session_time
$sql = 'SELECT session_user_id, MAX(session_time) AS session_time, MIN(session_viewonline) AS session_viewonline
FROM ' . SESSIONS_TABLE . '
WHERE session_time >= ' . (time() - $config['session_length']) . '
AND ' . $db->sql_in_set('session_user_id', $user_list) . '
GROUP BY session_user_id';
$result = $db->sql_query($sql);
$session_times = array();
$session_ary = [];
while ($row = $db->sql_fetchrow($result))
{
$session_times[$row['session_user_id']] = $row['session_time'];
$session_ary[$row['session_user_id']] = [
'session_time' => $row['session_time'],
'session_viewonline' => $row['session_viewonline'],
];
}
$db->sql_freeresult($result);
@@ -1708,7 +1711,8 @@ switch ($mode)
$id_cache = array();
while ($row = $db->sql_fetchrow($result))
{
$row['session_time'] = (!empty($session_times[$row['user_id']])) ? $session_times[$row['user_id']] : 0;
$row['session_time'] = $session_ary[$row['user_id']]['session_time'] ?? 0;
$row['session_viewonline'] = $session_ary[$row['user_id']]['session_viewonline'] ?? 0;
$row['last_visit'] = (!empty($row['session_time'])) ? $row['session_time'] : $row['user_lastvisit'];
$id_cache[$row['user_id']] = $row;

View File

@@ -48,6 +48,9 @@ class upload
/** @var dispatcher */
protected $phpbb_dispatcher;
/** @var string */
protected $phpbb_root_path;
/** @var plupload Plupload */
protected $plupload;

View File

@@ -524,19 +524,19 @@ class auth
ORDER BY role_id ASC';
$result = $db->sql_query($sql);
$this->role_cache = array();
$role_cache = array();
while ($row = $db->sql_fetchrow($result))
{
$this->role_cache[$row['role_id']][$row['auth_option_id']] = (int) $row['auth_setting'];
$role_cache[$row['role_id']][$row['auth_option_id']] = (int) $row['auth_setting'];
}
$db->sql_freeresult($result);
foreach ($this->role_cache as $role_id => $role_options)
foreach ($role_cache as $role_id => $role_options)
{
$this->role_cache[$role_id] = serialize($role_options);
$role_cache[$role_id] = serialize($role_options);
}
$cache->put('_role_cache', $this->role_cache);
$cache->put('_role_cache', $role_cache);
// Now empty user permissions
$where_sql = '';
@@ -828,9 +828,9 @@ class auth
global $db, $cache;
// Check if the role-cache is there
if (($this->role_cache = $cache->get('_role_cache')) === false)
if (($role_cache = $cache->get('_role_cache')) === false)
{
$this->role_cache = array();
$role_cache = array();
// We pre-fetch roles
$sql = 'SELECT *
@@ -840,16 +840,16 @@ class auth
while ($row = $db->sql_fetchrow($result))
{
$this->role_cache[$row['role_id']][$row['auth_option_id']] = (int) $row['auth_setting'];
$role_cache[$row['role_id']][$row['auth_option_id']] = (int) $row['auth_setting'];
}
$db->sql_freeresult($result);
foreach ($this->role_cache as $role_id => $role_options)
foreach ($role_cache as $role_id => $role_options)
{
$this->role_cache[$role_id] = serialize($role_options);
$role_cache[$role_id] = serialize($role_options);
}
$cache->put('_role_cache', $this->role_cache);
$cache->put('_role_cache', $role_cache);
}
$hold_ary = array();
@@ -865,7 +865,7 @@ class auth
// If a role is assigned, assign all options included within this role. Else, only set this one option.
if ($row['auth_role_id'])
{
$hold_ary[$row['forum_id']] = (empty($hold_ary[$row['forum_id']])) ? unserialize($this->role_cache[$row['auth_role_id']]) : $hold_ary[$row['forum_id']] + unserialize($this->role_cache[$row['auth_role_id']]);
$hold_ary[$row['forum_id']] = (empty($hold_ary[$row['forum_id']])) ? unserialize($role_cache[$row['auth_role_id']]) : $hold_ary[$row['forum_id']] + unserialize($role_cache[$row['auth_role_id']]);
}
else
{
@@ -890,9 +890,9 @@ class auth
{
$this->_set_group_hold_ary($hold_ary[$row['forum_id']], $row['auth_option_id'], $row['auth_setting']);
}
else if (!empty($this->role_cache[$row['auth_role_id']]))
else if (!empty($role_cache[$row['auth_role_id']]))
{
foreach (unserialize($this->role_cache[$row['auth_role_id']]) as $option_id => $setting)
foreach (unserialize($role_cache[$row['auth_role_id']]) as $option_id => $setting)
{
$this->_set_group_hold_ary($hold_ary[$row['forum_id']], $option_id, $setting);
}

View File

@@ -23,7 +23,7 @@ class local extends \phpbb\avatar\driver\driver
*/
public function get_data($row)
{
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $this->path_helper->get_web_root_path();
$root_path = $this->path_helper->get_web_root_path();
return array(
'src' => $root_path . $this->config['avatar_gallery_path'] . '/' . $row['avatar'],

View File

@@ -62,7 +62,7 @@ class remote extends \phpbb\avatar\driver\driver
if (!preg_match('#^(http|https|ftp)://#i', $url))
{
$url = 'http://' . $url;
$url = 'https://' . $url;
}
if (!function_exists('validate_data'))

View File

@@ -62,7 +62,7 @@ class upload extends \phpbb\avatar\driver\driver
*/
public function get_data($row)
{
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $this->path_helper->get_web_root_path();
$root_path = $this->path_helper->get_web_root_path();
return array(
'src' => $root_path . 'download/file.' . $this->php_ext . '?avatar=' . $row['avatar'],

View File

@@ -115,6 +115,7 @@ abstract class base implements \phpbb\cache\driver\driver_interface
*/
function sql_exists($query_id)
{
$query_id = $this->clean_query_id($query_id);
return isset($this->sql_rowset[$query_id]);
}
@@ -123,6 +124,7 @@ abstract class base implements \phpbb\cache\driver\driver_interface
*/
function sql_fetchrow($query_id)
{
$query_id = $this->clean_query_id($query_id);
if ($this->sql_row_pointer[$query_id] < count($this->sql_rowset[$query_id]))
{
return $this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]++];
@@ -136,6 +138,7 @@ abstract class base implements \phpbb\cache\driver\driver_interface
*/
function sql_fetchfield($query_id, $field)
{
$query_id = $this->clean_query_id($query_id);
if ($this->sql_row_pointer[$query_id] < count($this->sql_rowset[$query_id]))
{
return (isset($this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]][$field])) ? $this->sql_rowset[$query_id][$this->sql_row_pointer[$query_id]++][$field] : false;
@@ -149,6 +152,7 @@ abstract class base implements \phpbb\cache\driver\driver_interface
*/
function sql_rowseek($rownum, $query_id)
{
$query_id = $this->clean_query_id($query_id);
if ($rownum >= count($this->sql_rowset[$query_id]))
{
return false;
@@ -163,6 +167,7 @@ abstract class base implements \phpbb\cache\driver\driver_interface
*/
function sql_freeresult($query_id)
{
$query_id = $this->clean_query_id($query_id);
if (!isset($this->sql_rowset[$query_id]))
{
return false;
@@ -231,4 +236,21 @@ abstract class base implements \phpbb\cache\driver\driver_interface
@rmdir($dir);
}
/**
* {@inheritDoc}
*/
public function clean_query_id($query_id)
{
// Some DBMS functions accept/return objects and/or resources instead of integer identifier
// 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

@@ -164,4 +164,13 @@ interface driver_interface
* @return bool
*/
public function sql_freeresult($query_id);
/**
* Ensure query ID can be used by cache
*
* @param object|resource|int|string $query_id Mixed type query id
*
* @return int|string Query id in string or integer format
*/
public function clean_query_id($query_id);
}

View File

@@ -37,9 +37,9 @@ class file extends \phpbb\cache\driver\base
$this->cache_dir = !is_null($cache_dir) ? $cache_dir : $phpbb_container->getParameter('core.cache_dir');
$this->filesystem = new \phpbb\filesystem\filesystem();
if (!is_dir($this->cache_dir))
if ($this->filesystem->is_writable(dirname($this->cache_dir)) && !is_dir($this->cache_dir))
{
@mkdir($this->cache_dir, 0777, true);
mkdir($this->cache_dir, 0777, true);
}
}

View File

@@ -15,18 +15,13 @@ namespace phpbb\captcha\plugins;
class recaptcha extends captcha_abstract
{
var $recaptcha_server = 'http://www.google.com/recaptcha/api';
var $recaptcha_server_secure = 'https://www.google.com/recaptcha/api'; // class constants :(
var $response;
private $response;
/**
* Constructor
*/
public function __construct()
{
global $request;
$this->recaptcha_server = $request->is_secure() ? $this->recaptcha_server_secure : $this->recaptcha_server;
}
function init($type)
@@ -94,6 +89,12 @@ class recaptcha extends captcha_abstract
}
}
$recaptcha_domain = $request->variable('recaptcha_v2_domain', '', true);
if (in_array($recaptcha_domain, recaptcha_v3::$supported_domains))
{
$config->set('recaptcha_v2_domain', $recaptcha_domain);
}
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_CONFIG_VISUAL');
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($module->u_action));
}
@@ -110,9 +111,11 @@ class recaptcha extends captcha_abstract
}
$template->assign_vars(array(
'CAPTCHA_PREVIEW' => $this->get_demo_template($id),
'CAPTCHA_NAME' => $this->get_service_name(),
'U_ACTION' => $module->u_action,
'CAPTCHA_PREVIEW' => $this->get_demo_template($id),
'CAPTCHA_NAME' => $this->get_service_name(),
'RECAPTCHA_V2_DOMAIN' => $config['recaptcha_v2_domain'] ?? recaptcha_v3::GOOGLE,
'RECAPTCHA_V2_DOMAINS' => recaptcha_v3::$supported_domains,
'U_ACTION' => $module->u_action,
));
}
@@ -140,9 +143,10 @@ class recaptcha extends captcha_abstract
{
$contact_link = phpbb_get_board_contact_link($config, $phpbb_root_path, $phpEx);
$explain = $user->lang(($this->type != CONFIRM_POST) ? 'CONFIRM_EXPLAIN' : 'POST_CONFIRM_EXPLAIN', '<a href="' . $contact_link . '">', '</a>');
$domain = $config['recaptcha_v2_domain'] ?? recaptcha_v3::GOOGLE;
$template->assign_vars(array(
'RECAPTCHA_SERVER' => $this->recaptcha_server,
'RECAPTCHA_SERVER' => sprintf('//%1$s/recaptcha/api', $domain),
'RECAPTCHA_PUBKEY' => isset($config['recaptcha_pubkey']) ? $config['recaptcha_pubkey'] : '',
'S_RECAPTCHA_AVAILABLE' => self::is_available(),
'S_CONFIRM_CODE' => true,

View File

@@ -30,6 +30,14 @@ class recaptcha_v3 extends captcha_abstract
*/
const GOOGLE = 'google.com';
const RECAPTCHA = 'recaptcha.net';
const RECAPTCHA_CN = 'recaptcha.google.cn';
/** @var string[] List of supported domains */
static public $supported_domains = [
self::GOOGLE,
self::RECAPTCHA,
self::RECAPTCHA_CN
];
/** @var array CAPTCHA types mapped to their action */
static protected $actions = [
@@ -180,9 +188,14 @@ class recaptcha_v3 extends captcha_abstract
trigger_error($language->lang('EMPTY_RECAPTCHA_V3_REQUEST_METHOD') . adm_back_link($module->u_action), E_USER_WARNING);
}
$recaptcha_domain = $request->variable('recaptcha_v3_domain', '', true);
if (in_array($recaptcha_domain, self::$supported_domains))
{
$config->set('recaptcha_v3_domain', $recaptcha_domain);
}
$config->set('recaptcha_v3_key', $request->variable('recaptcha_v3_key', '', true));
$config->set('recaptcha_v3_secret', $request->variable('recaptcha_v3_secret', '', true));
$config->set('recaptcha_v3_domain', $request->variable('recaptcha_v3_domain', '', true));
$config->set('recaptcha_v3_method', $recaptcha_v3_method);
foreach (self::$actions as $action)
@@ -211,7 +224,7 @@ class recaptcha_v3 extends captcha_abstract
'RECAPTCHA_V3_SECRET' => $config['recaptcha_v3_secret'] ?? '',
'RECAPTCHA_V3_DOMAIN' => $config['recaptcha_v3_domain'] ?? self::GOOGLE,
'RECAPTCHA_V3_DOMAINS' => [self::GOOGLE, self::RECAPTCHA],
'RECAPTCHA_V3_DOMAINS' => self::$supported_domains,
'RECAPTCHA_V3_METHOD' => $config['recaptcha_v3_method'] ?? '',
'RECAPTCHA_V3_METHODS' => [

View File

@@ -50,6 +50,7 @@ class config implements \ArrayAccess, \IteratorAggregate, \Countable
* @param string $key The configuration option's name.
* @return bool Whether the configuration option exists.
*/
#[\ReturnTypeWillChange]
public function offsetExists($key)
{
return isset($this->config[$key]);
@@ -61,6 +62,7 @@ class config implements \ArrayAccess, \IteratorAggregate, \Countable
* @param string $key The configuration option's name.
* @return string The configuration value
*/
#[\ReturnTypeWillChange]
public function offsetGet($key)
{
return (isset($this->config[$key])) ? $this->config[$key] : '';
@@ -75,6 +77,7 @@ class config implements \ArrayAccess, \IteratorAggregate, \Countable
* @param string $key The configuration option's name.
* @param string $value The temporary value.
*/
#[\ReturnTypeWillChange]
public function offsetSet($key, $value)
{
$this->config[$key] = $value;
@@ -85,6 +88,7 @@ class config implements \ArrayAccess, \IteratorAggregate, \Countable
*
* @param string $key The configuration option's name.
*/
#[\ReturnTypeWillChange]
public function offsetUnset($key)
{
trigger_error('Config values have to be deleted explicitly with the \phpbb\config\config::delete($key) method.', E_USER_ERROR);

View File

@@ -501,11 +501,15 @@ class content_visibility
$postcounts[$num_posts][] = $poster_id;
}
$postcount_change = 0;
// Update users postcounts
foreach ($postcounts as $num_posts => $poster_ids)
{
if (in_array($visibility, array(ITEM_REAPPROVE, ITEM_DELETED)))
{
$postcount_change -= $num_posts;
$sql = 'UPDATE ' . $this->users_table . '
SET user_posts = 0
WHERE ' . $this->db->sql_in_set('user_id', $poster_ids) . '
@@ -520,6 +524,8 @@ class content_visibility
}
else
{
$postcount_change += $num_posts;
$sql = 'UPDATE ' . $this->users_table . '
SET user_posts = user_posts + ' . $num_posts . '
WHERE ' . $this->db->sql_in_set('user_id', $poster_ids);
@@ -527,6 +533,11 @@ class content_visibility
}
}
if ($postcount_change != 0)
{
$this->config->increment('num_posts', $postcount_change, false);
}
$update_topic_postcount = true;
// Sync the first/last topic information if needed

View File

@@ -57,6 +57,7 @@ class datetime extends \DateTime
* @param boolean $force_absolute Force output of a non relative date
* @return string Formatted date time
*/
#[\ReturnTypeWillChange]
public function format($format = '', $force_absolute = false)
{
$format = $format ? $format : $this->user->date_format;

View File

@@ -634,6 +634,14 @@ abstract class driver implements driver_interface
return $expression;
}
/**
* {@inheritDoc}
*/
public function sql_nextid()
{
return $this->sql_last_inserted_id();
}
/**
* {@inheritDoc}
*/
@@ -1237,4 +1245,21 @@ abstract class driver implements driver_interface
return $rows_total;
}
/**
* {@inheritDoc}
*/
public function clean_query_id($query_id)
{
// Some DBMS functions accept/return objects and/or resources instead if identifiers
// Attempting to use objects/resources as array keys 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

@@ -289,12 +289,34 @@ interface driver_interface
public function cast_expr_to_bigint($expression);
/**
* Get last inserted id after insert statement
*
* @return string Autoincrement value of the last inserted row
*/
* Gets the ID of the **last** inserted row immediately after an INSERT
* statement.
*
* **Note**: Despite the name, the returned ID refers to the row that has
* just been inserted, rather than the hypothetical ID of the next row if a
* new one was to be inserted.
*
* The returned value can be used for selecting the item that has just been
* inserted or for updating another table with an ID pointing to that item.
*
* Alias of `sql_last_inserted_id`.
*
* @deprecated 3.3.11-RC1 Replaced by sql_last_inserted_id(), to be removed in 4.1.0-a1
*
* @return string|false Auto-incremented value of the last inserted row
*/
public function sql_nextid();
/**
* Gets the ID of the last inserted row immediately after an INSERT
* statement. The returned value can be used for selecting the item that has
* just been inserted or for updating another table with an ID pointing to
* that item.
*
* @return string|false Auto-incremented value of the last inserted row
*/
public function sql_last_inserted_id();
/**
* Add to query count
*
@@ -472,4 +494,13 @@ interface driver_interface
* @return string Quoted version of $msg
*/
public function sql_quote($msg);
/**
* Ensure query ID can be used by cache
*
* @param resource|int|string $query_id Mixed type query id
*
* @return int|string Query id in string or integer format
*/
public function clean_query_id($query_id);
}

View File

@@ -314,11 +314,19 @@ class factory implements driver_interface
}
/**
* {@inheritdoc}
*/
* {@inheritdoc}
*/
public function sql_nextid()
{
return $this->get_driver()->sql_nextid();
return $this->get_driver()->sql_last_inserted_id();
}
/**
* {@inheritdoc}
*/
public function sql_last_inserted_id()
{
return $this->get_driver()->sql_last_inserted_id();
}
/**
@@ -464,4 +472,12 @@ class factory implements driver_interface
{
return $this->get_driver()->sql_quote($msg);
}
/**
* {@inheritDoc}
*/
public function clean_query_id($query_id)
{
return $this->get_driver()->clean_query_id($query_id);
}
}

View File

@@ -185,14 +185,16 @@ class mssql_odbc extends \phpbb\db\driver\mssql_base
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)
@@ -260,18 +262,19 @@ class mssql_odbc extends \phpbb\db\driver\mssql_base
$query_id = $this->query_result;
}
if ($cache && $cache->sql_exists($query_id))
$safe_query_id = $this->clean_query_id($query_id);
if ($cache && $cache->sql_exists($safe_query_id))
{
return $cache->sql_fetchrow($query_id);
return $cache->sql_fetchrow($safe_query_id);
}
return ($query_id) ? odbc_fetch_array($query_id) : false;
}
/**
* {@inheritDoc}
*/
function sql_nextid()
* {@inheritdoc}
*/
public function sql_last_inserted_id()
{
$result_id = @odbc_exec($this->db_connect_id, 'SELECT @@IDENTITY');
@@ -301,14 +304,15 @@ class mssql_odbc extends \phpbb\db\driver\mssql_base
$query_id = $this->query_result;
}
if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
$safe_query_id = $this->clean_query_id($query_id);
if ($cache && $cache->sql_exists($safe_query_id))
{
return $cache->sql_freeresult($query_id);
return $cache->sql_freeresult($safe_query_id);
}
if (isset($this->open_queries[(int) $query_id]))
if (isset($this->open_queries[$safe_query_id]))
{
unset($this->open_queries[(int) $query_id]);
unset($this->open_queries[$safe_query_id]);
return odbc_free_result($query_id);
}

View File

@@ -159,14 +159,16 @@ class mssqlnative extends \phpbb\db\driver\mssql_base
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)
@@ -242,9 +244,10 @@ class mssqlnative extends \phpbb\db\driver\mssql_base
$query_id = $this->query_result;
}
if ($cache && $cache->sql_exists($query_id))
$safe_query_id = $this->clean_query_id($query_id);
if ($cache && $cache->sql_exists($safe_query_id))
{
return $cache->sql_fetchrow($query_id);
return $cache->sql_fetchrow($safe_query_id);
}
if (!$query_id)
@@ -271,9 +274,9 @@ class mssqlnative extends \phpbb\db\driver\mssql_base
}
/**
* {@inheritDoc}
*/
function sql_nextid()
* {@inheritdoc}
*/
public function sql_last_inserted_id()
{
$result_id = @sqlsrv_query($this->db_connect_id, 'SELECT @@IDENTITY');
@@ -302,14 +305,15 @@ class mssqlnative extends \phpbb\db\driver\mssql_base
$query_id = $this->query_result;
}
if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
$safe_query_id = $this->clean_query_id($query_id);
if ($cache && $cache->sql_exists($safe_query_id))
{
return $cache->sql_freeresult($query_id);
return $cache->sql_freeresult($safe_query_id);
}
if (isset($this->open_queries[(int) $query_id]))
if (isset($this->open_queries[$safe_query_id]))
{
unset($this->open_queries[(int) $query_id]);
unset($this->open_queries[$safe_query_id]);
return sqlsrv_free_stmt($query_id);
}

View File

@@ -254,9 +254,10 @@ class mysqli extends \phpbb\db\driver\mysql_base
$query_id = $this->query_result;
}
if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
$safe_query_id = $this->clean_query_id($query_id);
if ($cache && $cache->sql_exists($safe_query_id))
{
return $cache->sql_fetchrow($query_id);
return $cache->sql_fetchrow($safe_query_id);
}
if ($query_id)
@@ -280,18 +281,19 @@ class mysqli extends \phpbb\db\driver\mysql_base
$query_id = $this->query_result;
}
if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
$safe_query_id = $this->clean_query_id($query_id);
if ($cache && $cache->sql_exists($safe_query_id))
{
return $cache->sql_rowseek($rownum, $query_id);
return $cache->sql_rowseek($rownum, $safe_query_id);
}
return ($query_id) ? @mysqli_data_seek($query_id, $rownum) : false;
}
/**
* {@inheritDoc}
*/
function sql_nextid()
* {@inheritdoc}
*/
public function sql_last_inserted_id()
{
return ($this->db_connect_id) ? @mysqli_insert_id($this->db_connect_id) : false;
}
@@ -308,9 +310,10 @@ class mysqli extends \phpbb\db\driver\mysql_base
$query_id = $this->query_result;
}
if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
$safe_query_id = $this->clean_query_id($query_id);
if ($cache && $cache->sql_exists($safe_query_id))
{
return $cache->sql_freeresult($query_id);
return $cache->sql_freeresult($safe_query_id);
}
if (!$query_id)

View File

@@ -441,14 +441,16 @@ class oracle 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)
@@ -496,9 +498,10 @@ class oracle extends \phpbb\db\driver\driver
$query_id = $this->query_result;
}
if ($cache && $cache->sql_exists($query_id))
$safe_query_id = $this->clean_query_id($query_id);
if ($cache && $cache->sql_exists($safe_query_id))
{
return $cache->sql_fetchrow($query_id);
return $cache->sql_fetchrow($safe_query_id);
}
if ($query_id)
@@ -544,9 +547,10 @@ class oracle extends \phpbb\db\driver\driver
$query_id = $this->query_result;
}
if ($cache && $cache->sql_exists($query_id))
$safe_query_id = $this->clean_query_id($query_id);
if ($cache && $cache->sql_exists($safe_query_id))
{
return $cache->sql_rowseek($rownum, $query_id);
return $cache->sql_rowseek($rownum, $safe_query_id);
}
if (!$query_id)
@@ -570,9 +574,9 @@ class oracle extends \phpbb\db\driver\driver
}
/**
* {@inheritDoc}
*/
function sql_nextid()
* {@inheritdoc}
*/
public function sql_last_inserted_id()
{
$query_id = $this->query_result;
@@ -619,14 +623,15 @@ class oracle extends \phpbb\db\driver\driver
$query_id = $this->query_result;
}
if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
$safe_query_id = $this->clean_query_id($query_id);
if ($cache && $cache->sql_exists($safe_query_id))
{
return $cache->sql_freeresult($query_id);
return $cache->sql_freeresult($safe_query_id);
}
if (isset($this->open_queries[(int) $query_id]))
if (isset($this->open_queries[$safe_query_id]))
{
unset($this->open_queries[(int) $query_id]);
unset($this->open_queries[$safe_query_id]);
return oci_free_statement($query_id);
}

View File

@@ -342,9 +342,9 @@ class postgres extends \phpbb\db\driver\driver
}
/**
* {@inheritDoc}
*/
function sql_nextid()
* {@inheritdoc}
*/
public function sql_last_inserted_id()
{
$query_id = $this->query_result;
@@ -547,25 +547,4 @@ class postgres extends \phpbb\db\driver\driver
{
return '"' . $msg . '"';
}
/**
* Ensure query ID can be used by cache
*
* @param resource|int|string $query_id Mixed type query id
*
* @return int|string Query id in string or integer format
*/
private function clean_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

@@ -233,18 +233,19 @@ class sqlite3 extends \phpbb\db\driver\driver
$query_id = $this->query_result;
}
if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
$safe_query_id = $this->clean_query_id($query_id);
if ($cache && $cache->sql_exists($safe_query_id))
{
return $cache->sql_fetchrow($query_id);
return $cache->sql_fetchrow($safe_query_id);
}
return is_object($query_id) ? @$query_id->fetchArray(SQLITE3_ASSOC) : false;
}
/**
* {@inheritDoc}
*/
public function sql_nextid()
* {@inheritdoc}
*/
public function sql_last_inserted_id()
{
return ($this->db_connect_id) ? $this->dbo->lastInsertRowID() : false;
}
@@ -261,9 +262,10 @@ class sqlite3 extends \phpbb\db\driver\driver
$query_id = $this->query_result;
}
if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
$safe_query_id = $this->clean_query_id($query_id);
if ($cache && $cache->sql_exists($safe_query_id))
{
return $cache->sql_freeresult($query_id);
return $cache->sql_freeresult($safe_query_id);
}
if ($query_id)

View File

@@ -46,7 +46,7 @@ class local_url_bbcode extends \phpbb\db\migration\migration
{
if (function_exists('phpbb_require_updated'))
{
phpbb_require_updated('includes/acp/acp_bbcodes.' . $this->php_ext);
phpbb_require_updated('includes/acp/acp_bbcodes.' . $this->php_ext, $this->phpbb_root_path);
}
else
{

View File

@@ -15,7 +15,7 @@ namespace phpbb\db\migration\data\v33x;
class profilefield_youtube_update extends \phpbb\db\migration\migration
{
protected $youtube_url_matcher = 'https:\\/\\/(www\\.)?youtube\\.com\\/.+';
public static $youtube_url_matcher = 'https:\\/\\/(www\\.)?youtube\\.com\\/.+';
public function effectively_installed()
{
@@ -30,7 +30,7 @@ class profilefield_youtube_update extends \phpbb\db\migration\migration
$row = $this->db->sql_fetchrow($result);
$this->db->sql_freeresult($result);
return $row['field_validation'] === $this->youtube_url_matcher;
return !$row || $row['field_validation'] === self::$youtube_url_matcher;
}
public static function depends_on()
@@ -48,19 +48,18 @@ class profilefield_youtube_update extends \phpbb\db\migration\migration
$profile_fields = $this->table_prefix . 'profile_fields';
$profile_fields_data = $this->table_prefix . 'profile_fields_data';
$field_validation = $this->db->sql_escape($this->youtube_url_matcher);
$field_data = [
'field_length' => 40,
'field_minlen' => strlen('https://youtube.com/c/') + 1,
'field_maxlen' => 255,
'field_validation' => self::$youtube_url_matcher,
'field_contact_url' => '%s'
];
$min_length = strlen('https://youtube.com/c/') + 1;
$this->db->sql_query(
"UPDATE $profile_fields SET
field_length = '40',
field_minlen = '$min_length',
field_maxlen = '255',
field_validation = '$field_validation',
field_contact_url = '%s'
WHERE field_name = 'phpbb_youtube'"
);
$sql = 'UPDATE ' . $profile_fields . '
SET ' . $this->db->sql_build_array('UPDATE', $field_data) . "
WHERE field_name = 'phpbb_youtube'";
$this->db->sql_query($sql);
$yt_profile_field = 'pf_phpbb_youtube';
$prepend_legacy_youtube_url = $this->db->sql_concatenate(

View File

@@ -0,0 +1,194 @@
<?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.
*
*/
namespace phpbb\db\migration\data\v33x;
class profilefields_update extends \phpbb\db\migration\migration
{
/** @var string YouTube URLs matcher: handle or custom URL or channel URL */
protected $youtube_url_matcher = '(@[a-zA-Z0-9_.-]{3,30}|c/[a-zA-Z][\w\.,\-_]+|(channel|user)/[a-zA-Z][\w\.,\-_]+)';
public static function depends_on(): array
{
return [
'\phpbb\db\migration\data\v33x\v3310',
'\phpbb\db\migration\data\v33x\profilefield_youtube_update',
];
}
public function update_schema(): array
{
return [
'change_columns' => [
$this->table_prefix . 'profile_fields' => [
'field_validation' => ['VCHAR_UNI:128', ''],
],
]
];
}
public function revert_schema(): array
{
return [
'change_columns' => [
$this->table_prefix . 'profile_fields' => [
'field_validation' => ['VCHAR_UNI:64', ''],
],
]
];
}
public function update_data(): array
{
return [
['custom', [[$this, 'update_youtube_profile_field']]],
['custom', [[$this, 'update_other_profile_fields']]],
];
}
public function revert_data(): array
{
return [
['custom', [[$this, 'revert_youtube_profile_field']]],
['custom', [[$this, 'revert_other_profile_fields']]],
];
}
public function update_youtube_profile_field(): bool
{
$profile_fields = $this->table_prefix . 'profile_fields';
$profile_fields_data = $this->table_prefix . 'profile_fields_data';
$end_time = time() + 5; // allow up to 5 seconds for migration to run
$field_data = [
'field_length' => 20,
'field_minlen' => 3,
'field_maxlen' => 60,
'field_validation' => $this->youtube_url_matcher,
'field_contact_url' => 'https://youtube.com/%s',
'field_contact_desc' => 'VIEW_YOUTUBE_PROFILE',
];
$sql = 'UPDATE ' . $profile_fields . '
SET ' . $this->db->sql_build_array('UPDATE', $field_data) . "
WHERE field_name = 'phpbb_youtube'";
$this->db->sql_query($sql);
$yt_profile_field = 'pf_phpbb_youtube';
$has_youtube_url = $this->db->sql_like_expression($this->db->get_any_char() . 'youtube.com/' . $this->db->get_any_char());
$update_aborted = false;
$sql = 'SELECT user_id, pf_phpbb_youtube
FROM ' . $profile_fields_data . "
WHERE $yt_profile_field <> ''
AND $yt_profile_field $has_youtube_url";
$result = $this->db->sql_query($sql);
while ($row = $this->db->sql_fetchrow($result))
{
$updated_youtube_url_part = $this->get_youtube_url_part($row['pf_phpbb_youtube']);
if ($updated_youtube_url_part != $row['pf_phpbb_youtube'])
{
$this->db->sql_query(
"UPDATE $profile_fields_data
SET $yt_profile_field = '$updated_youtube_url_part'
WHERE user_id = {$row['user_id']}"
);
}
if (time() > $end_time)
{
$update_aborted = true;
break;
}
}
$this->db->sql_freeresult($result);
return $update_aborted != true;
}
public function update_other_profile_fields(): void
{
$profile_fields = $this->table_prefix . 'profile_fields';
$this->db->sql_query(
"UPDATE $profile_fields
SET field_contact_url = 'https://facebook.com/%s/'
WHERE field_name = 'phpbb_facebook'"
);
$this->db->sql_query(
"UPDATE $profile_fields
SET field_contact_url = 'https://twitter.com/%s'
WHERE field_name = 'phpbb_twitter'"
);
}
public function revert_youtube_profile_field(): void
{
$profile_fields = $this->table_prefix . 'profile_fields';
$profile_fields_data = $this->table_prefix . 'profile_fields_data';
$field_data = [
'field_length' => 40,
'field_minlen' => strlen('https://youtube.com/c/') + 1,
'field_maxlen' => 255,
'field_validation' => profilefield_youtube_update::$youtube_url_matcher,
'field_contact_url' => '%s'
];
$sql = 'UPDATE ' . $profile_fields . '
SET ' . $this->db->sql_build_array('UPDATE', $field_data) . "
WHERE field_name = 'phpbb_youtube'";
$this->db->sql_query($sql);
$yt_profile_field = 'pf_phpbb_youtube';
$prepend_legacy_youtube_url = $this->db->sql_concatenate(
"'https://youtube.com/'", $yt_profile_field
);
$is_not_already_youtube_url = $this->db->sql_not_like_expression(
$this->db->get_any_char()
. 'youtube.com/'
. $this->db->get_any_char()
);
$this->db->sql_query(
"UPDATE $profile_fields_data SET
$yt_profile_field = $prepend_legacy_youtube_url
WHERE $yt_profile_field <> ''
AND $yt_profile_field $is_not_already_youtube_url"
);
}
public function revert_other_profile_fields(): void
{
$profile_fields = $this->table_prefix . 'profile_fields';
$this->db->sql_query(
"UPDATE $profile_fields
SET field_contact_url = 'http://facebook.com/%s/'
WHERE field_name = 'phpbb_facebook'"
);
$this->db->sql_query(
"UPDATE $profile_fields
SET field_contact_url = 'http://twitter.com/%s'
WHERE field_name = 'phpbb_twitter'"
);
}
protected function get_youtube_url_part(string $profile_field_string): string
{
return preg_replace('#^https://(?:www\.)?youtube\.com/(.+)$#iu', '$1', $profile_field_string);
}
}

View File

@@ -0,0 +1,36 @@
<?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.
*
*/
namespace phpbb\db\migration\data\v33x;
class v3310 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
return version_compare($this->config['version'], '3.3.10', '>=');
}
public static function depends_on()
{
return [
'\phpbb\db\migration\data\v33x\v3310rc1',
];
}
public function update_data()
{
return [
['config.update', ['version', '3.3.10']],
];
}
}

View File

@@ -0,0 +1,36 @@
<?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.
*
*/
namespace phpbb\db\migration\data\v33x;
class v3310rc1 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
return version_compare($this->config['version'], '3.3.10-RC1', '>=');
}
public static function depends_on()
{
return [
'\phpbb\db\migration\data\v33x\v339',
];
}
public function update_data()
{
return [
['config.update', ['version', '3.3.10-RC1']],
];
}
}

View File

@@ -0,0 +1,36 @@
<?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.
*
*/
namespace phpbb\db\migration\data\v33x;
class v3311 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
return version_compare($this->config['version'], '3.3.11', '>=');
}
public static function depends_on()
{
return [
'\phpbb\db\migration\data\v33x\profilefields_update',
];
}
public function update_data()
{
return [
['config.update', ['version', '3.3.11']],
];
}
}

View File

@@ -0,0 +1,36 @@
<?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.
*
*/
namespace phpbb\db\migration\data\v33x;
class v339 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
return version_compare($this->config['version'], '3.3.9', '>=');
}
public static function depends_on()
{
return [
'\phpbb\db\migration\data\v33x\v339rc1',
];
}
public function update_data()
{
return [
['config.update', ['version', '3.3.9']],
];
}
}

View File

@@ -0,0 +1,36 @@
<?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.
*
*/
namespace phpbb\db\migration\data\v33x;
class v339rc1 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
return version_compare($this->config['version'], '3.3.9-RC1', '>=');
}
public static function depends_on()
{
return [
'\phpbb\db\migration\data\v33x\v338',
];
}
public function update_data()
{
return [
['config.update', ['version', '3.3.9-RC1']],
];
}
}

View File

@@ -40,6 +40,8 @@ abstract class profilefield_base_migration extends container_aware_migration
protected $user_column_name;
private $profile_row;
public function effectively_installed()
{
return $this->db_tools->sql_column_exists($this->table_prefix . 'profile_fields_data', 'pf_' . $this->profilefield_name);
@@ -234,15 +236,13 @@ abstract class profilefield_base_migration extends container_aware_migration
protected function get_insert_sql_array()
{
static $profile_row;
if ($profile_row === null)
if ($this->profile_row === null)
{
/* @var $manager \phpbb\profilefields\manager */
$manager = $this->container->get('profilefields.manager');
$profile_row = $manager->build_insert_sql_array(array());
$this->profile_row = $manager->build_insert_sql_array(array());
}
return $profile_row;
return $this->profile_row;
}
}

View File

@@ -182,7 +182,7 @@ class mssql extends tools
if (isset($prepared_column['auto_increment']) && $prepared_column['auto_increment'] && strlen($column_name) > 26) // "${column_name}_gen"
{
trigger_error("Index name '${column_name}_gen' on table '$table_name' is too long. The maximum auto increment column length is 26 characters.", E_USER_ERROR);
trigger_error("Index name '{$column_name}_gen' on table '$table_name' is too long. The maximum auto increment column length is 26 characters.", E_USER_ERROR);
}
// here we add the definition of the new column to the list of columns

View File

@@ -102,7 +102,7 @@ class postgres extends tools
function sql_table_exists($table_name)
{
$sql = "SELECT CAST(EXISTS(
SELECT FROM information_schema.tables
SELECT * FROM information_schema.tables
WHERE table_schema = 'public'
AND table_name = '" . $this->db->sql_escape($table_name) . "'
) AS INTEGER)";
@@ -147,7 +147,7 @@ class postgres extends tools
if (isset($prepared_column['auto_increment']) && $prepared_column['auto_increment'] && strlen($column_name) > 26) // "${column_name}_gen"
{
trigger_error("Index name '${column_name}_gen' on table '$table_name' is too long. The maximum auto increment column length is 26 characters.", E_USER_ERROR);
trigger_error("Index name '{$column_name}_gen' on table '$table_name' is too long. The maximum auto increment column length is 26 characters.", E_USER_ERROR);
}
// here we add the definition of the new column to the list of columns

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