Compare commits

...

278 commits

Author SHA1 Message Date
rxu
3a5247d01b
[ticket/15214] Get event dispatcher from environment rather than as dependency
Also this will allow to significantly reduce unrelated tests changes.

PHPBB3-15214
2025-05-20 17:36:15 +07:00
rxu
5e0dc9ef2e
[ticket/15214] Fix rebasing and some other issues
PHPBB3-15214
2025-05-20 16:24:38 +07:00
rxu
8338ff9e56
[ticket/15214] Fix Windows tests
PHPBB3-15214
2025-05-20 16:24:37 +07:00
toxyy
84e7e34a66
[ticket/15214] Fix tests again
Adding per rxu's recommendation

PHPBB3-15214
2025-05-20 16:24:37 +07:00
rxu
18bae795f0
[ticket/15214] Fix Windows tests
Purge Twig compiled cache in Windows.
Set appropriate folder access control options to do that.

PHPBB3-15214
2025-05-20 16:24:36 +07:00
rxu
09fd86ffb0
[ticket/15214] Fix test foo/foo extension listener
PHPBB3-15214
2025-05-20 16:24:34 +07:00
rxu
4a00212f2d
[ticket/15214] Optimize event node code and add template event order tests
PHPBB3-15214
2025-05-20 16:24:34 +07:00
toxyy
cb47d78d26
[ticket/15214] Update block, restart tests
Make docblock look a bit cleaner and restart the tests

PHPBB3-15214
2025-05-20 16:24:33 +07:00
toxyy
0eb98d51e2
[ticket/15214] Provide usage example within event docblock
Adds similar usage examples like the event core.permissions has

PHPBB3-15214
2025-05-20 16:24:32 +07:00
toxyy
82a5e20f3e
[ticket/15214] Replace arrow functions with anonymous functions
Arrow functions aren't added until PHP 7.4, so we can't use them yet.
Anonymous functions have been added since PHP 5.3

PHPBB3-15214
2025-05-20 16:24:32 +07:00
toxyy
71fe9d60c4
[ticket/15214] Add fixes for various other tests
Add new dispatch parameter to the template\twig\extension calls

PHPBB3-15214
2025-05-20 16:24:31 +07:00
toxyy
59b482a222
[ticket/15214] Test fix for test_bbcode_firstpass
Add new dispatch parameter to the template\twig\extension call

PHPBB3-15214
2025-05-20 16:24:30 +07:00
toxyy
d934c8c4b7
[ticket/15214] Test fix for test_helper_url_no_rewrite
Add new dispatch parameter to the template\twig\extension call

PHPBB3-15214
2025-05-20 16:24:29 +07:00
toxyy
d07aeb00d8
[ticket/15214] Add event & functionality for assigning template event priority
Event added to allow template events to be assigned priority per extension,
event location chosen so that it only fires once.
Twig node event class refactored to allow template event priority assignment,
compile calls are deferred until all locations are processed
per extension namespace.
Priority precedence mirrors Symfony priority, with higher numbers
being placed at the beginning of the array.
Duplicate priority assignment will currently have the later events
compiled before the others.

PHPBB3-15214
2025-05-20 16:24:24 +07:00
Marc Alexander
9adb7eb9fe Merge branch '3.3.x' 2025-05-19 16:19:02 +00:00
Marc Alexander
29a74db9ec
Merge pull request #6815 from rxu/ticket/17512
[ticket/17512] Add PHP Sniffer coding standard for union types
2025-05-19 18:01:10 +02:00
Marc Alexander
5e12e8b6e9
Merge pull request #6816 from marc1706/ticket/17510-master
[ticket/17510] Fix Code Sniffer deprecations -- master version
2025-05-19 17:53:21 +02:00
Marc Alexander
478d119d42
Merge pull request #6814 from iMattPro/ticket/17510
[ticket/17510] Fix Code Sniffer deprecations
2025-05-19 17:53:18 +02:00
Marc Alexander
1f6f0a3547
Merge pull request #6806 from marc1706/ticket/17501
[ticket/17501] Adjust navbar and breadcrumbs, improve usability
2025-05-19 17:51:27 +02:00
Marc Alexander
5281807e1f Merge branch '3.3.x' 2025-05-19 15:45:56 +00:00
Marc Alexander
e2554d1fb0
Merge pull request #6812 from rxu/ticket/17506-master
[ticket/17506] Ensure superglobal variables are arrays before applying addition - master
2025-05-19 17:44:50 +02:00
Marc Alexander
b3478d83d1
Merge pull request #6811 from rxu/ticket/17506
[ticket/17506] Ensure superglobal variables are arrays before applying addition - 3.3.x
2025-05-19 17:44:47 +02:00
Marc Alexander
ff6f3b2a8c
Merge branch 'ticket/17510' into ticket/17510-master 2025-05-18 09:37:37 +02:00
rxu
1cd17caf87
[ticket/17512] Fix the code layout error reported
PHPBB-17512
2025-05-15 20:42:24 +07:00
rxu
6a0c949ed1
[ticket/17512] Fix sorting types check logic
PHPBB-17512
2025-05-15 20:34:16 +07:00
rxu
146f917d19
[ticket/17512] Fix sniffer error
The error message was: $stackPtr is not a class member var

PHPBB-17512
2025-05-15 20:17:27 +07:00
rxu
c01d1967dd
[ticket/17512] Fix handling tokens with no/empty type hint
PHPBB-17512
2025-05-15 17:02:03 +07:00
rxu
7a4b3f52ae
[ticket/17512] Refactor PHP Sniffer coding standard logic
PHPBB-17512
2025-05-15 16:50:51 +07:00
rxu
b3ff1d7e34
[ticket/17512] Add PHP Sniffer coding standard for union types
PHPBB-17512
2025-05-15 11:47:47 +07:00
Matt Friedman
7268859226
[ticket/17510] Fix Code Sniffer deprecations
PHPBB-17510
2025-05-13 18:03:10 -07:00
Marc Alexander
61bede748a
Merge pull request #6813 from rxu/ticket/17508
[ticket/17508] Fix PHP warning on custom profile fields edit
2025-05-12 21:33:09 +02:00
rxu
0562984999
[ticket/17508] Fix PHP warning on custom profile fields edit
PHPBB-17508
2025-05-13 00:02:56 +07:00
rxu
83e1886e27
Merge branch 'ticket/17506' into ticket/17506-master 2025-05-09 17:04:57 +07:00
rxu
10947f3d49
[ticket/17506] Ensure superglobal variables are arrays before applying addition
PHPBB-17506
2025-05-09 16:58:36 +07:00
Marc Alexander
f94423d491 Merge branch '3.3.x' 2025-05-07 18:16:11 +00:00
Marc Alexander
b6200d6690
Merge pull request #6800 from rxu/ticket/17491-master
[ticket/17491] Fix caching search results - master
2025-05-07 20:15:57 +02:00
Marc Alexander
04f2141a7d
Merge pull request #6799 from rxu/ticket/17491
[ticket/17491] Fix caching search results - 3.3.x
2025-05-07 20:15:53 +02:00
rxu
4b7d7c2fc7
Merge branch 'ticket/17491' into ticket/17491-master 2025-05-07 00:40:32 +07:00
rxu
3d76a8bd09
[ticket/17491] Fix rows duplication in search results
PHPBB-17491
2025-05-07 00:31:21 +07:00
rxu
1c399dcab7
[ticket/17491] Consistently apply array_unique to search results
PHPBB-17491
2025-05-06 00:11:45 +07:00
rxu
e91c7d42a9
[ticket/17491] Add test
PHPBB-17491
2025-05-05 23:46:09 +07:00
Marc Alexander
b7db1b0844
Merge pull request #6803 from rxu/ticket/17496
[ticket/17496] Fix Implicitly marking parameters as nullable PHP deprecations
2025-05-02 20:20:57 +02:00
rxu
0066d53c08
[ticket/17496] Fix recently added changes
PHPBB-17496
2025-05-02 22:48:59 +07:00
rxu
1b08a74508
[ticket/17496] Sniffer to support question mark nullable type syntax
PHPBB-17496
2025-05-02 22:48:59 +07:00
rxu
a5113d7cd3
[ticket/17496] Correctly restore willReturn()
PHPBB-17496
2025-05-02 22:48:59 +07:00
rxu
0f94e1cb13
[ticket/17496] Fix tests
PHPBB-17496
2025-05-02 22:48:58 +07:00
rxu
c6dcf474d3
[ticket/17496] Upgrade to the most recent GuzzleHTTP 7.9
PHPBB-17496
2025-05-02 22:48:58 +07:00
rxu
d0cb7d6389
[ticket/17496] Fix tests
PHPUnit will automatically create a test double
of required return type to be returned

PHPBB-17496
2025-05-02 22:48:57 +07:00
rxu
118ab73c37
[ticket/17496] Upgrade to GuzzleHTTP 7.8 as PHP 8.4-compatible
PHPBB-17496
2025-05-02 22:48:57 +07:00
rxu
91aaadbc6d
[ticket/17496] Unused use statements sniffer to check union types
PHPBB-17496
2025-05-02 22:48:57 +07:00
rxu
7d1ae5bf19
[ticket/17496] Fix Implicitly marking parameters as nullable PHP deprecations
Also use union types consistently instead of question marks.
Fixed with php-cs-fixer.

PHPBB-17496
2025-05-02 22:48:46 +07:00
Marc Alexander
bdbd0be548
Merge branch '3.3.x' 2025-05-02 08:32:19 +02:00
Marc Alexander
1b2ac50cfd
Merge pull request #6810 from rxu/ticket/17504
[ticket/17504] Fix tests failure caused by ondrej/php PPA repo label changed
2025-04-28 21:17:23 +02:00
rxu
779bec5fcf
[ticket/17504] Run apt-get update on runner lever rather than in bash scripts
PHPBB-17504
2025-04-28 23:28:05 +07:00
rxu
f512af1823
[ticket/17504] Fix tests
Fix the following apt-get update issue with ondrej/php PPA repo:
Repository 'https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble InRelease'
changed its 'Label' value from '***** The main PPA for supported PHP versions
with many PECL extensions *****' to 'PPA for PHP'

Alternative fix might be: sudo apt update && sudo apt full-upgrade -y

PHPBB-17504
2025-04-28 21:17:57 +07:00
Marc Alexander
bc1e1732cf
Merge pull request #6809 from marc1706/ticket/17503
[ticket/17503] Update composer dependencies to latest versions
2025-04-26 08:43:46 +02:00
Marc Alexander
ee889ac98b Merge branch '3.3.x' 2025-04-26 06:34:28 +00:00
Marc Alexander
b7d2243f6c
Merge pull request #6808 from rxu/ticket/16941-master
[ticket/16941] Add sphinx tests - master
2025-04-26 08:34:14 +02:00
Marc Alexander
59e8875fa8
Merge pull request #6807 from rxu/ticket/16941
[ticket/16941] Add sphinx tests to 3.3.x
2025-04-26 08:34:09 +02:00
rxu
f11512b580
Merge branch 'ticket/16941' into ticket/16941-master 2025-04-25 22:12:50 +07:00
rxu
1ae9a49811
[ticket/16941] Remove ending slash from binlog_path
PHPBB3-14401
2025-04-25 21:28:36 +07:00
Marc Alexander
5ef1a40083
[ticket/17503] Update lock to latest composer format
PHPBB-17503
2025-04-24 21:45:53 +02:00
Marc Alexander
d95437682e
[ticket/17503] Update composer to its latest version
PHPBB-17503
2025-04-24 21:45:17 +02:00
Marc Alexander
99ffd9205f
[ticket/17503] Update composer dependencies to their latest versions
PHPBB-17503
2025-04-24 21:44:43 +02:00
Marc Alexander
3eaf4829bb
[ticket/17501] Adjust notification dropdown color and spacing
PHPBB-17501
2025-04-24 21:03:44 +02:00
Marc Alexander
e85b25122a
Merge pull request #6802 from marc1706/ticket/17493
[ticket/17493] Drop support for jabber
2025-04-24 19:47:48 +02:00
rxu
80a08d9c54
[ticket/16941] Add sphinx tests to 3.3.x
Also adjust Sphinx keywords splitting to be consistent with other search
backends when it comes to handling hyphen (like ignoring hyphen when it hasn't
NOT meaning and ignoring hyphen wrapped with "plus" signs)

PHPBB3-16941
2025-04-24 23:17:26 +07:00
Marc Alexander
3d9ecba1b1
[ticket/17493] Remove Jabber library from CREDITS
PHPBB-17493
2025-04-24 17:32:29 +02:00
Marc Alexander
83508b415b
[ticket/17493] Remove more jabber remainders
PHPBB-17493
2025-04-24 17:32:04 +02:00
Marc Alexander
3b233d9c28
[ticket/17501] Update events docs
PHPBB-17501
2025-04-21 21:44:22 +02:00
Marc Alexander
3801eb0946
[ticket/17501] Remove not needed parentheses
PHPBB-17501
2025-04-21 20:38:59 +02:00
Marc Alexander
3a553f07bc
[ticket/17501] Remove unused CSS properties
PHPBB-17501
2025-04-21 20:36:04 +02:00
Marc Alexander
b666bc9e0a
[ticket/17501] Add to top button to viewtopic and add missing title in FAQ
PHPBB-17501
2025-04-21 20:33:36 +02:00
Marc Alexander
81c49aa6a5
[ticket/17501] Remove max width from subforums
PHPBB-17501
2025-04-21 20:18:40 +02:00
Marc Alexander
6fd9a78872
[ticket/17501] Adjust CSS for moved navbar & breadcrumbs
PHPBB-17501
2025-04-21 17:37:53 +02:00
Marc Alexander
7f3b37560e
[ticket/17501] Move navbar above header and breadcrumbs below
PHPBB-17501
2025-04-21 17:37:38 +02:00
Marc Alexander
68e941ac21
Merge pull request #6787 from marc1706/ticket/17481
[ticket/17481] Make build package directory version independent
2025-04-21 17:27:30 +02:00
Marc Alexander
2bbc013d83
[ticket/17481] Stop creating update packages for all except last 3.1 and 3.2
PHPBB-17481
2025-04-21 15:47:24 +02:00
Marc Alexander
c0504c2e01
[ticket/17481] Make build package directory version independent
PHPBB-17481
2025-04-21 15:46:28 +02:00
Marc Alexander
75a24ae484
[ticket/17493] Explicitly use email in acp/ucp modules
PHPBB-17493
2025-04-21 15:42:59 +02:00
Marc Alexander
3125f3e1d3
[ticket/17493] Remove unused methods and use statements
PHPBB-17493
2025-04-21 15:24:07 +02:00
Marc Alexander
3caab55e81
[ticket/17493] Remove remnants of notify type
PHPBB-17493
2025-04-21 15:16:41 +02:00
Marc Alexander
bde52e28f8
[ticket/17493] Move cpf update outside if
PHPBB-17493
2025-04-21 11:44:49 +02:00
Marc Alexander
52f04a3c2c
[ticket/17493] Remove "short" email templates as they were jabber only
PHPBB-17493
2025-04-21 11:40:32 +02:00
Marc Alexander
54d8a49e70
[ticket/17493] Improve handling of nullable start parameter
PHPBB-17493
2025-04-21 11:40:32 +02:00
Marc Alexander
27550ce59b
[ticket/17493] Remove not needed function in migration and fix type hinting
PHPBB-17493
2025-04-21 11:40:32 +02:00
Marc Alexander
5ab0446eb1
[ticket/17493] Remove unused use statements
PHPBB-17493
2025-04-21 11:40:32 +02:00
Marc Alexander
d985c8be60
[ticket/17493] Remove unused notify type in add_recipient
PHPBB-17493
2025-04-21 11:40:31 +02:00
Marc Alexander
da32d51a81
[ticket/17493] Remove remnants of user_notify_type
PHPBB-17493
2025-04-21 11:40:25 +02:00
Marc Alexander
ef010db26c
Merge pull request #6795 from rxu/ticket/17488
[ticket/17488] Fix PHP error when MySQL PDO driver is not enabled
2025-04-19 08:51:45 +02:00
Marc Alexander
3081db5f0b Merge branch '3.3.x' 2025-04-15 20:00:22 +00:00
Marc Alexander
81e9f46a55
Merge pull request #6805 from rxu/ticket/17498-master
[ticket/17498] Move to Ubuntu 22.04 runner images for SQLite and MSSQL tests - master
2025-04-15 22:00:08 +02:00
Marc Alexander
4140d50f6a
Merge pull request #6804 from rxu/ticket/17498
[ticket/17498] Move to Ubuntu 22.04 runner images for SQLite and MSSQL tests - 3.3.x
2025-04-15 22:00:00 +02:00
Marc Alexander
d5ac95f79f
Merge pull request #6801 from iMattPro/ticket/17494
[ticket/17494] Handle boolean attributes in checkbox assertions tests
2025-04-15 21:07:17 +02:00
rxu
b5ac26a394
Merge branch 'ticket/17498' into ticket/17498-master 2025-04-16 01:03:07 +07:00
rxu
dd53db1625
[ticket/17498] Move to Ubuntu 22.04 runner images for SQLite and MSSQL tests
PHPBB-17498
2025-04-16 00:48:48 +07:00
Marc Alexander
bb26658a00
[ticket/17493] Remove jabber data in queue test
PHPBB-17493
2025-04-14 21:39:06 +02:00
Marc Alexander
1e73dcc2a2 Merge branch '3.3.x' 2025-04-14 18:49:47 +00:00
Marc Alexander
531c4f2c17
Merge pull request #6798 from marc1706/ticket/17492-master
[ticket/17492] Show current state of topic subscription in dropdown -- master version
2025-04-14 20:49:31 +02:00
Marc Alexander
e5f599c43b
Merge pull request #6797 from LukeWCS/ticket/17492
[ticket/17492] Unintuitive checkbox status inverted for forum/topic subscriptions
2025-04-14 20:49:26 +02:00
Marc Alexander
610fa67928
[ticket/17493] Remove jabber as messenger method
PHPBB-17493
2025-04-14 20:33:13 +02:00
Marc Alexander
ef47c69155
[ticket/17493] Remove notification method jabber
PHPBB-17493
2025-04-14 20:27:03 +02:00
Marc Alexander
3128b3fa9b
[ticket/17493] Remove more jabber permissions and elements
PHPBB-17493
2025-04-13 21:00:19 +02:00
Marc Alexander
a7c7c38bfb
[ticket/17493] Remove settings, values, and lang vars for jabber
PHPBB-17493
2025-04-13 20:48:15 +02:00
Marc Alexander
e32ebda982
[ticket/17493] Remove memberlist IM page
PHPBB-17493
2025-04-13 16:17:25 +02:00
Marc Alexander
30178ee443
[ticket/17493] Start removing jabber from acp
PHPBB-17493
2025-04-13 16:16:31 +02:00
Marc Alexander
8c6731ffb9
[ticket/17493] Remove jabber permission and effectively_installed
PHPBB-17493
2025-04-13 13:13:38 +02:00
Marc Alexander
afbc0794d2
[ticket/17493] Remove jabber settings from schema data
PHPBB-17493
2025-04-13 13:02:51 +02:00
Marc Alexander
e33c1746c1
Merge branch 'ticket/17492' into ticket/17492-master 2025-04-13 13:01:35 +02:00
LukeWCS
705b5ca572
[ticket/17492] Unintuitive checkbox status inverted for forum subscriptions
PHPBB-17492
2025-04-13 12:58:09 +02:00
Marc Alexander
a5c34234da
[ticket/17493] Update migration with module to remove
PHPBB-17493
2025-04-13 12:56:03 +02:00
Marc Alexander
860c2fe601
[ticket/17493] Start adding migration for removing jabber
PHPBB-17493
2025-04-13 10:26:30 +02:00
Matt Friedman
f04f07f265
[ticket/17494] Handle boolean attributes in checkbox assertions tests
PHPBB-17494
2025-04-12 14:00:31 -07:00
Marc Alexander
d47262dbd9
Merge pull request #6796 from marc1706/ticket/17490
[ticket/17490] Add unit tests for symfony mailer classes
2025-04-12 10:02:55 +02:00
rxu
8d0d6c012c
[ticket/17491] Fix caching search results
PHPBB-17491
2025-04-12 14:35:40 +07:00
Marc Alexander
e13c465ad5
Merge branch 'ticket/17492' into ticket/17492-master 2025-04-12 09:23:10 +02:00
LukeWCS
8c5e22f4d5
[ticket/17492] Update viewtopic_topic_tools.html
Changed compact but icon-specific code to neutral code for easier changing.

PHPBB-17492
2025-04-12 09:17:39 +02:00
LukeWCS
cac3d81e73
[ticket/17492] Unintuitive checkbox status inverted for topic subscriptions
PHPBB-17492
2025-04-12 09:17:24 +02:00
Marc Alexander
bf2dd2cd75
[ticket/17490] Remove not needed isset
PHPBB-17490
2025-04-12 09:02:14 +02:00
Marc Alexander
6fcac2c40f
[ticket/17490] Add unit tests for messenger queue
PHPBB-17490
2025-04-10 20:59:30 +02:00
Marc Alexander
a63d423c86
[ticket/17490] Start implementing unit tests for jabber
PHPBB-17490
2025-04-08 22:37:03 +02:00
Marc Alexander
63203f42f7
[ticket/17490] Add test coverage for remainder of base test
PHPBB-17490
2025-04-07 20:37:52 +02:00
Marc Alexander
aa2da5b916
[ticket/17490] Add missing property declaration in test
PHPBB-17490
2025-04-07 19:39:37 +02:00
Marc Alexander
5bc4c5765e
[ticket/17490] Use isset instead of !empty()
PHPBB-17490
2025-04-07 19:39:23 +02:00
Marc Alexander
e4c8984bf3
[ticket/17490] Remove not needed returns
PHPBB-17490
2025-04-07 19:39:07 +02:00
Marc Alexander
d5717b541e
[ticket/17490] Remove name handling for mails on windows
PHPBB-17490
2025-04-07 17:11:31 +02:00
Marc Alexander
8dbe499e3d
[ticket/17490] Add extra method to support unit testing mailer
Also increased unit test coverage of email method to 100%.

PHPBB-17490
2025-04-06 21:25:16 +02:00
Marc Alexander
91c325174f
[ticket/17490] Add type hints to enforce some types
PHPBB-17490
2025-04-06 14:20:04 +02:00
Marc Alexander
930c87e97a
[ticket/17490] Improve expected types and docblock info
PHPBB-17490
2025-04-06 14:16:59 +02:00
Marc Alexander
2e08d01b5e
[ticket/17490] Add unit tests file for email method
PHPBB-17490
2025-04-06 14:16:11 +02:00
rxu
692c96978a
[ticket/17488] Fix PHP error when MySQL PDO driver is not enabled
Check pdo_mysql extension for being loaded
to use respective \PDO::MYSQL_ATTR_FOUND_ROWS constant.

PHPBB-17488
2025-04-04 12:26:08 +07:00
Marc Alexander
6ecb41f01a
Merge pull request #6794 from rxu/ticket/17489
[ticket/17489] Fix various messenger issues
2025-04-03 21:02:40 +02:00
rxu
43d34880ac
[ticket/17489] Remove unneeded headers check
PHPBB-17487
PHPBB-17489
2025-04-04 00:50:15 +07:00
Marc Alexander
10cb4991a0 Merge branch '3.3.x' 2025-04-03 17:44:46 +00:00
Marc Alexander
40608777f0
Merge pull request #6789 from rxu/ticket/17475
[ticket/17475] Fix MSSQL arithmetic overflow error on counting attachments size
2025-04-03 19:39:24 +02:00
Marc Alexander
3b7d98bf0f Merge branch '3.3.x' 2025-04-03 17:35:34 +00:00
Marc Alexander
84a835a995
Merge pull request #6792 from rxu/ticket/17486
[ticket/17486] Fix SQL error on phpBB v.3.0 to v.3.3 upgrade
2025-04-03 19:35:16 +02:00
rxu
f9e6385e84
[ticket/17489] Further queue logic adjustments
Saving queue is not needed if use_queue flag is set to false
as in this case the message should be set immediately in the runtime.

PHPBB-17487
PHPBB-17489
2025-04-04 00:04:45 +07:00
rxu
cebc19f2ed
[ticket/17487] Add wrapper method to add headers to interface
PHPBB-17487
2025-04-03 23:10:33 +07:00
rxu
21314a34a6
[ticket/17487] Add functional test for sending email via board
PHPBB-17487
2025-04-03 23:10:23 +07:00
rxu
67265efc0d
[ticket/17487] Fix PHP uncaught exception on sending email via board
PHPBB-17487
2025-04-03 23:10:09 +07:00
rxu
d99c3838df
[ticket/17489] Ignore Psalm UndefinedMethod issue
Psalm fails with UndefinedMethod issue when a method of a child class
does not exist in parent/abstract/interface class. Ignore the issue.

PHPBB-17489
2025-04-03 21:18:28 +07:00
rxu
c23504e3c7
[ticket/17489] Fix queue for ucp_resend, add type hints to $messenger_method
PHPBB-17489
2025-04-03 19:55:41 +07:00
rxu
7467b567e8
[ticket/17489] Do not always set use_queue flag to true
PHPBB-17489
2025-04-03 16:03:33 +07:00
rxu
1f1a02d086
[ticket/17489] Fix messenger queue won't be saved
PHPBB-17489
2025-04-03 15:46:14 +07:00
Marc Alexander
3dc1e6fc8e
Merge branch '3.3.x' 2025-04-02 16:54:43 +02:00
Marc Alexander
b8ea36a70f
Merge branch 'prep-release-3.3.15' into 3.3.x 2025-04-02 16:50:53 +02:00
rxu
98a8999283
[ticket/17486] Fix SQL error on phpBB v.3.0 to v.3.3 upgrade
Ensure v310/bot_update runs after v310/avatars migration which changes
user_avatar_type column type from tinyint(2) to varchar(255).

PHPBB-17486
2025-04-01 10:46:29 +07:00
Marc Alexander
b92ca5d1f8
[prep-release-3.3.15] Update changelog for 3.3.15 2025-03-23 20:20:03 +01:00
Marc Alexander
fb46aa38b8
[prep-release-3.3.15] Add migration for 3.3.15 2025-03-23 19:41:47 +01:00
Marc Alexander
51465670f6
[prep-release-3.3.15] Update version numbers to 3.3.15 2025-03-23 19:39:07 +01:00
rxu
14a6322b4f
[ticket/17475] Fix MSSQL arithmetic overflow error on counting attachments size
PHPBB-17475
2025-03-10 21:24:15 +07:00
Marc Alexander
cfa3a21e20
Merge pull request #73 from phpbb/ticket/security-283
[ticket/security-283] Use jQuery to generate HTML for page from page data
2025-03-08 11:23:40 +01:00
Marc Alexander
023f56dff9
Merge branch '3.3.x' 2025-03-08 09:07:58 +01:00
Marc Alexander
64dd8b668e
Merge branch 'prep-release-3.3.15' into 3.3.x 2025-03-08 09:07:41 +01:00
Marc Alexander
57abba6be0
Merge pull request #6788 from rxu/ticket/17480-2
[ticket/17480] Properly catch RuntimeException if no http handler is available
2025-03-08 09:00:35 +01:00
rxu
0826a41da8
[ticket/17480] Adjust message wording
PHPBB-17480
2025-03-08 11:05:39 +07:00
rxu
1ea59731f0
[ticket/17480] Use phpBB error message text instead of thrown by GuzzleHTTP
PHPBB-17480
2025-03-05 10:18:23 +07:00
rxu
9bdb88879d
[ticket/17480] Properly catch RuntimeException if no http handler is available
PHPBB-17480
2025-03-04 13:03:18 +07:00
Marc Alexander
79ff5b18ce
Merge branch '3.3.x' 2025-03-03 21:55:31 +01:00
Marc Alexander
430200cbf6
Merge branch 'prep-release-3.3.15' into 3.3.x 2025-03-03 21:55:21 +01:00
Marc Alexander
d8aa6873b2
Merge pull request #6786 from rxu/ticket/17480
[ticket/17480] Fix PHP fatal error in version check failure
2025-03-03 21:53:51 +01:00
rxu
d9136469ea
[ticket/17480] Catch runtime_exception instead of exception_interface
Catch runtime_exception instead of exception_interface
for extensions version check failures.

PHPBB-17480
2025-03-04 01:06:46 +07:00
rxu
7fd634b420
[ticket/17480] Fix PHP fatal error in version check failure
PHPBB-17480
2025-03-03 23:33:58 +07:00
Marc Alexander
9e5abf3d6e
Merge branch '3.3.x' 2025-03-02 17:13:25 +01:00
Marc Alexander
bb3d41e193
[3.3.x] Update version numbers to 3.3.16-dev 2025-03-02 17:11:26 +01:00
Marc Alexander
94fde8fa23
Merge branch 'prep-release-3.3.15' into 3.3.x 2025-03-02 17:09:49 +01:00
Marc Alexander
66650cb0e2
[prep-release-3.3.15] Update changelog for 3.3.15-RC1 2025-03-01 21:55:15 +01:00
Marc Alexander
d9e4ce6dde
[prep-release-3.3.15] Add migration for 3.3.15-RC1 2025-03-01 21:45:21 +01:00
Marc Alexander
24fc7d5388
[prep-release-3.3.15] Update version numbers to 3.3.15 2025-03-01 21:41:36 +01:00
Marc Alexander
ae40c6365e
[prep-release-3.3.15] Update version numbers to 3.3.15-RC1 2025-03-01 21:41:28 +01:00
Marc Alexander
7c3c49486c Merge branch '3.3.x' 2025-03-01 17:12:36 +00:00
Marc Alexander
63c110b511
Merge pull request #6785 from marc1706/ticket/17478
[ticket/17478] Add security policy file
2025-03-01 18:12:17 +01:00
Marc Alexander
be67bfbe63
[ticket/17478] Remove versions and reword reporting section
[skip ci]

PHPBB-17478
2025-03-01 17:04:16 +01:00
Marc Alexander
cedbbb0c76
[ticket/17478] Add security policy file
PHPBB-17478
2025-03-01 16:45:36 +01:00
Marc Alexander
3533185cdf Merge branch '3.3.x' 2025-03-01 15:41:50 +00:00
Marc Alexander
a5bf1ff165
Merge pull request #6758 from battye/ticket/17381
[ticket/17381] Topic view count validation
2025-03-01 15:55:40 +01:00
Marc Alexander
328d6f1714 Merge branch '3.3.x' 2025-03-01 14:48:17 +00:00
Marc Alexander
08fd9caa11
Merge pull request #6772 from rxu/ticket/17227
[ticket/17227] Fix rows duplication in memberlist
2025-03-01 15:47:55 +01:00
Marc Alexander
38cb3761af Merge branch '3.3.x' 2025-03-01 09:32:11 +00:00
Marc Alexander
746133d005
Merge pull request #6783 from rxu/ticket/17461
[ticket/17461] Add core events to acp_main
2025-03-01 10:23:35 +01:00
Marc Alexander
17480d7d07
[ticket/security-283] Unify behavior between adm and prosilver, clean up
SECURITY-283
2025-03-01 09:22:23 +01:00
Marc Alexander
c3bb5e1bec
[ticket/security-283] Ensure text is properly handled for responsiveness
SECURITY-283
2025-02-28 20:33:41 +01:00
battye
29730e49ce [ticket/17381] Add migration for topic_views to ULINT
PHPBB-17381
2025-02-28 03:22:08 +00:00
Marc Alexander
3584ef7eca
Merge pull request #6753 from rubencm/ticket/17361
[ticket/17361] Improve storage
2025-02-22 15:06:48 +01:00
rxu
8adc853dea
[ticket/17461] Add core events to acp_main
PHPBB-17461
2025-02-22 13:28:43 +07:00
Marc Alexander
2a0f1896aa Merge branch '3.3.x' 2025-02-19 16:15:41 +00:00
Marc Alexander
a223da37fb
Merge pull request #6782 from rxu/ticket/17470
[ticket/17470] Fix feed functional tests for master
2025-02-19 17:15:15 +01:00
Marc Alexander
1ba909d99f
Merge branch '3.3.x' 2025-02-19 17:12:30 +01:00
Marc Alexander
7181c4d591
Merge pull request #6781 from cabot/fix_forumlist_feed_link
[ticket/17471] Fix feed link href for feed icon
2025-02-19 17:11:39 +01:00
rxu
2fa5da1454
[ticket/17470] Fix feed functional tests for master
Symfony DomCrawler component validates form values and throws
InvalidArgumentException for impossible values set.

PHPBB-17470
2025-02-19 21:45:47 +07:00
cabot
77f83306b5
[ticket/17471] Fix feed link href for feed icon
PHPBB-17471
2025-02-18 17:33:30 +01:00
Marc Alexander
f54f82f071 Merge branch '3.3.x' 2025-02-16 17:00:50 +00:00
Marc Alexander
4f5ace858d
Merge pull request #6780 from Neo-CTC/ticket/17470
[ticket/17470] Feed enable config not enforced
2025-02-16 18:00:31 +01:00
Marc Alexander
f42c4be939
[ticket/17470] Check feed enabled in each handler and add tests
PHPBB-17470
2025-02-16 12:00:36 +01:00
Marc Alexander
85c6954f07
Merge pull request #6657 from danieltj27/ticket/17326
[ticket/17326] Add font icon field for custom BBCodes
2025-02-16 11:05:22 +01:00
Marc Alexander
183110789a
[ticket/17326] Add changed info for core.acp_bbcodes_modify_create event
PHPBB-17326
2025-02-16 09:13:26 +01:00
Neo-CTC
bfdf172992 [ticket/17470] Feed enable config not enforced
The 'feed_enable' config is never checked before generating the feeds. The
effective result is that feeds are always enabled, regardless of the setting.

PHPBB-17470
2025-02-16 00:09:45 -06:00
Marc Alexander
1e76b0df0e
[ticket/17326] Use same regex in icon name validation in PHP
PHPBB-17326
2025-02-15 20:24:07 +01:00
Marc Alexander
67e2b32816
[ticket/17326] Ignore invalid class names
PHPBB-17326
2025-02-15 20:21:25 +01:00
Marc Alexander
68c4e22886
[ticket/17326] Extend acp bbcodes test for font icon
PHPBB-17326
2025-02-15 15:43:43 +01:00
Marc Alexander
29c19bb764
[ticket/17326] Differentiate between invalid and too long icon name
PHPBB-17326
2025-02-15 15:43:28 +01:00
Marc Alexander
bf15d1ea42
[ticket/17326] Check for existence of font icon element before use
PHPBB-17326
2025-02-15 15:42:54 +01:00
Daniel James
220b655150
[ticket/17326] Updated js to use same as pages ext and fixed icon bug
PHPBB-17326
2025-02-15 15:42:41 +01:00
Daniel James
97728da9be
[ticket/17326] Replace language string for invalid icon names
PHPBB-17326
2025-02-15 15:40:41 +01:00
Marc Alexander
fe3750bfb2
[ticket/17326] Move HTML to acp_bbcodes.html
PHPBB-17326
2025-02-15 15:40:21 +01:00
Daniel James
53d7fff391
[ticket/17326] Update regex checks for font icon in php and js files
PHPBB-17326
2025-02-15 15:39:29 +01:00
Daniel James
bb956539a4
[ticket/17326] Add php preg check on bbcode font icon name
PHPBB-17326
2025-02-15 15:39:19 +01:00
Daniel James
c2725b441c
[ticket/17326] Change column length of icon and update ACP language
PHPBB-17326
2025-02-15 15:39:10 +01:00
Daniel James
1729e3f52b
[ticket/17326] Add missing ending tag from template file
PHPBB-17326
2025-02-15 15:39:01 +01:00
Daniel James
f5bb065a4d
[ticket/17326] Add font icon field for custom BBCodes
Adds a new field to the custom BBCode add/edit form that
allows admins to define a Font Awesome icon to be displayed
instead of the BBCodes name on the posting.php editor page.

PHPBB-17326
2025-02-15 15:38:52 +01:00
Marc Alexander
f6c9d15b0c
Merge pull request #6768 from marc1706/ticket/17459
[ticket/17459] Improve prosilver font sizes and backgrounds
2025-02-14 16:58:09 +01:00
Marc Alexander
e0bcea9000
Merge pull request #6544 from CHItA/ticket/15851
[ticket/15851] Automatic update downloader
2025-02-13 21:07:50 +01:00
Marc Alexander
8b1ee790d6
[ticket/15851] Fix lock file hash
PHPBB-15851
2025-02-13 19:58:26 +01:00
Marc Alexander
6eacf68047
[ticket/15851] Add controller error_response and tests
PHPBB-15851
2025-02-13 19:47:44 +01:00
Marc Alexander
cc488c8b7d
[ticket/15851] Modify language variables
PHPBB-15851
2025-02-13 19:47:43 +01:00
Marc Alexander
1157c41410
[ticket/15851] Skip unreadable file tests on windows
PHPBB-15851
2025-02-13 19:47:43 +01:00
Marc Alexander
feb7d6f34e
[ticket/15851] Add unit tests for get_updates
PHPBB-15851
2025-02-13 19:47:43 +01:00
Marc Alexander
525924b2fc
[ticket/15851] Improve validate checks and change visibility for unit testing
PHPBB-15851
2025-02-13 19:47:42 +01:00
Marc Alexander
3506883c75
[ticket/15851] Use raw values for verifying signature
PHPBB-15851
2025-02-13 19:47:42 +01:00
Marc Alexander
dacabf0537
[ticket/15851] Add sodium extension to windows runner on github actions
PHPBB-15851
2025-02-13 19:47:42 +01:00
Marc Alexander
573c6c87b2
[ticket/15851] Add prefix to parameter for public key
PHPBB-15851
2025-02-13 19:47:42 +01:00
Marc Alexander
1ba58768f3
[ticket/15851] Add zip extension to required extensions
PHPBB-15851
2025-02-13 19:47:42 +01:00
Máté Bartus
d2c402f038
[ticket/15851] Automatic update downloader
PHPBB3-15851
2025-02-13 19:47:12 +01:00
Marc Alexander
84ec3dc6c3 Merge branch '3.3.x' 2025-02-11 20:28:19 +00:00
Marc Alexander
6b5bb4d51f
Merge pull request #6741 from phpbbtr/patch-5
[ticket/17417] Day selection not visible when no results
2025-02-11 21:28:00 +01:00
phpBB TR
736ef320ed
[ticket/17417] Show display options even without search results
PHPBB-17417
2025-02-11 20:59:28 +01:00
Marc Alexander
04031a9acc Merge branch '3.3.x' 2025-02-10 19:01:44 +00:00
Marc Alexander
a75ecae0b0
Merge pull request #6776 from rxu/ticket/17467-master
[ticket/17467] Provide TLS v.1.3 support for SMTP connections - master
2025-02-10 20:01:34 +01:00
Marc Alexander
bf29596bad
Merge pull request #6775 from rxu/ticket/17467
[ticket/17467] Provide TLS v.1.3 support for SMTP connections
2025-02-10 20:01:24 +01:00
Marc Alexander
353aa653b4
[ticket/17459] Adjust spacing of blocks on index
PHPBB-17459
2025-02-10 19:32:13 +01:00
Marc Alexander
d4ce544748
Merge pull request #6779 from marc1706/ticket/17465
[ticket/17465] Add unit tests for handling of web push notifications
2025-02-10 16:06:27 +01:00
Marc Alexander
ccbf2e6265 Merge branch '3.3.x' 2025-02-06 20:10:13 +00:00
Marc Alexander
24385a47d1
Merge pull request #6778 from rxu/ticket/17468-master
[ticket/17468] Send reset password link to email only - master
2025-02-06 20:29:19 +01:00
Marc Alexander
120ae90636
Merge pull request #6777 from rxu/ticket/17468
[ticket/17468] Send reset password link to email only
2025-02-06 20:29:00 +01:00
Marc Alexander
8eb2958382
Merge pull request #6773 from iMattPro/ticket/17464
[ticket/17464] Update PWA-related meta tags
2025-02-06 20:01:37 +01:00
Marc Alexander
e75d7a8410
[ticket/17465] Remove obsolete json_decode
PHPBB-17465
2025-02-06 19:48:42 +01:00
Marc Alexander
8ba7ecd3ba Merge branch '3.3.x' 2025-02-04 19:33:52 +00:00
Marc Alexander
b157e1b0d2
Merge pull request #6771 from Neo-CTC/ticket/17463
[ticket/17463] Remove extraneous '&' from search page urls
2025-02-04 20:33:30 +01:00
Marc Alexander
c937b8f7ab
[ticket/17465] Add unit tests for all functions in webpush controller
PHPBB-17465
2025-02-02 17:15:34 +01:00
rxu
5df8eb5822
Merge branch 'ticket/17468' into ticket/17468-master 2025-02-02 19:49:50 +07:00
rxu
cd47344ee2
[ticket/17468] Send reset password link to email only
PHPBB-17468
2025-02-02 19:46:49 +07:00
rxu
a1a6e17a72
Merge branch 'ticket/17467' into ticket/17467-master 2025-02-02 10:48:31 +07:00
rxu
a86f368f3d
[ticket/17467] Provide TLS v.1.3 support for SMTP connections
PHPBB-17467
2025-02-02 10:42:29 +07:00
Marc Alexander
c5c6c96a50
[ticket/17465] Cover more exceptions when handling notification
PHPBB-17465
2025-01-28 21:15:33 +01:00
Marc Alexander
ac3e9f64d8
[ticket/17465] Throw bad request exceptions on invalid data requests
PHPBB-17465
2025-01-28 20:50:29 +01:00
Marc Alexander
0c1aeb862b
[ticket/17465] Start implementation of unit tests for webpush controller
PHPBB-17465
2025-01-28 20:49:56 +01:00
Matt Friedman
6a47e3628c
[ticket/17464] Update PWA-related meta tags
PHPBB-17464
2025-01-25 08:07:52 -08:00
rxu
f9def4a725
[ticket/17227] Fix rows duplication in memberlist
PHPBB-17227
2025-01-23 11:15:47 +07:00
NeoDev
3d6e63154f [ticket/17463] Remove extraneous '&' from search page urls
Normally $u_show_results always starts with '&' as it is appended to the
$u_sort_param variable. Which is fine if $u_sort_param is always populated,
which it is, except when searching for new or unread posts. This fix adds a
check for when $u_sort_param is empty and adds '&' as needed.

PHPBB-17463
2025-01-22 19:31:25 -06:00
Marc Alexander
f0181cc681
[ticket/17459] Use rem for font size variables
PHPBB-17459
2025-01-22 17:36:18 +01:00
Ruben Calvo
c9ff5a09f6
[ticket/17361] Fix file not deleted when there is an error
PHPBB-17361
2025-01-19 21:09:36 +01:00
Ruben Calvo
921505ca3b
[ticket/17361] Fix code style
PHPBB-17361
2025-01-18 23:24:34 +01:00
Ruben Calvo
598d1c7f49
[ticket/17361] Change order of arguments
PHPBB-17361
2025-01-18 23:15:18 +01:00
Ruben Calvo
90bd9d006e
[ticket/17361] Add method to track multiple files in a single query
PHPBB-17361
2025-01-18 23:08:52 +01:00
Marc Alexander
a9efd4a234
Merge pull request #6769 from rxu/ticket/17460
[ticket/17460] Fix fa-arrow-circle-up icon rendering in Quote BBCode
2025-01-14 21:08:27 +01:00
Marc Alexander
b404606a9f
[ticket/17459] Add support for deprecated events to md_exporter
PHPBB-17459
2025-01-09 20:22:48 +01:00
rxu
353ea362f0
[ticket/17460] Fix fa-arrow-circle-up icon rendering in Quote BBCode
PHPBB3-17460
2025-01-09 21:27:54 +07:00
Marc Alexander
555c760a4c
[ticket/17459] Adjust postprofile sizing
PHPBB-17459
2025-01-08 21:32:24 +01:00
Marc Alexander
58b5c8f5cf
[ticket/17459] Get rid of weird margin on small screens
PHPBB-17459
2025-01-08 21:32:16 +01:00
Marc Alexander
31f9ffd56b
[ticket/17459] Fix incorrect breadcrumbs spacing
PHPBB-17459
2025-01-08 21:32:08 +01:00
Marc Alexander
c0ae7ccb3e
[ticket/17459] Display PM and notification icon without text
PHPBB-17459
2025-01-08 21:32:01 +01:00
Marc Alexander
79fc90dce3
[ticket/17459] Extend usage of css variables
PHPBB-17459
2025-01-08 21:31:52 +01:00
Marc Alexander
d32970348f
[ticket/17459] Use css variables in content.css
PHPBB-17459
2025-01-08 21:31:42 +01:00
Marc Alexander
74084107ed
[ticket/17459] Start using CSS variables
PHPBB-17459
2025-01-08 21:31:34 +01:00
Marc Alexander
14d889f74f
[ticket/17459] Add to top button to FAQ
PHPBB-17459
2025-01-08 21:31:25 +01:00
Marc Alexander
2d392791ad
[ticket/17459] Move mark forums read to quick links
PHPBB-17459
2025-01-08 21:31:16 +01:00
Marc Alexander
23010abcb8
[ticket/17459] Increase font sizes
PHPBB-17459
2025-01-08 21:30:47 +01:00
Ruben Calvo
b33f17e7ce
[ticket/17361] Use filesystem classes for tempnam and temp dir. Code reviews.
PHPBB-17361
2024-12-26 22:06:42 +01:00
Ruben Calvo
d6953a0422
[ticket/17361] Use new adapter options format in acp_storage
PHPBB-17361
2024-12-24 18:29:49 +01:00
Ruben Calvo
1f7ae9e2b0
[ticket/17361] Fix migrations
PHPBB-17361
2024-12-24 18:29:49 +01:00
Ruben Calvo
a44295a1ba
[ticket/17361] Move language keys to storage adapters
PHPBB-17361
2024-12-24 18:29:49 +01:00
Ruben Calvo
be3966c0cb
[ticket/17361] Remove temp files always
PHPBB-17361
2024-12-24 18:29:49 +01:00
Ruben Calvo
9bf9538dc6
[ticket/17361] Update thumbnail_test test
PHPBB-17361
2024-12-24 18:29:48 +01:00
Ruben Calvo
4becf438e1
[ticket/17361] Remove temp files
PHPBB-17361
2024-12-24 18:29:48 +01:00
Ruben Calvo
a8399c1431
[ticket/17361] Use storage in commands create and delete thumbnail
PHPBB-17361
2024-12-24 18:29:48 +01:00
Ruben Calvo
6d9a8ae8af
[ticket/17361] Remove fclose after write
PHPBB-17361
2024-12-24 18:29:48 +01:00
Ruben Calvo
e9c445925b
[ticket/17361] Rewrite storage
PHPBB-17361
2024-12-24 18:29:48 +01:00
287 changed files with 6692 additions and 4543 deletions

View file

@ -10,5 +10,4 @@
#
set -e
sudo apt-get update
sudo apt-get install -y parallel libimage-exiftool-perl

View file

@ -11,7 +11,6 @@
set -e
set -x
sudo apt-get update
sudo apt-get install -q -y sphinxsearch
DIR=$(dirname "$0")
@ -135,7 +134,7 @@ searchd
read_timeout = 5
max_children = 30
pid_file = $SPHINX_DATA_DIR/searchd.pid
binlog_path = $SPHINX_DATA_DIR/
binlog_path = $SPHINX_DATA_DIR
}
" > $SPHINX_CONF

View file

@ -10,5 +10,4 @@
#
set -e
sudo apt-get update
sudo apt-get install -y expect-dev

View file

@ -11,7 +11,6 @@
set -e
set -x
sudo apt-get update
sudo apt-get install -y nginx coreutils
sudo service nginx stop

View file

@ -28,6 +28,10 @@ jobs:
name: PHP ${{ matrix.php }} - ${{ matrix.db }}
steps:
- name: Update Ubuntu package lists
run: |
sudo apt-get update -y --allow-releaseinfo-change
- name: Checkout repository
uses: actions/checkout@v4
with:
@ -169,6 +173,10 @@ jobs:
- 6379:6379
steps:
- name: Update Ubuntu package lists
run: |
sudo apt-get update -y --allow-releaseinfo-change
- name: Checkout repository
uses: actions/checkout@v4
@ -308,6 +316,10 @@ jobs:
- 6379:6379
steps:
- name: Update Ubuntu package lists
run: |
sudo apt-get update -y --allow-releaseinfo-change
- name: Checkout repository
uses: actions/checkout@v4
@ -370,15 +382,12 @@ jobs:
# Other database types, namely sqlite3 and mssql
other-tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- php: '8.1'
db: "sqlite3"
- php: '8.1'
db: "mcr.microsoft.com/mssql/server:2017-latest"
db_alias: 'MSSQL 2017'
- php: '8.1'
db: "mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04"
db_alias: 'MSSQL 2019'
@ -390,7 +399,7 @@ jobs:
services:
mssql:
image: ${{ matrix.db != 'mcr.microsoft.com/mssql/server:2017-latest' && matrix.db != 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' && matrix.db != 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' && 'mcr.microsoft.com/mssql/server:2017-latest' || matrix.db }}
image: ${{ matrix.db != 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' && matrix.db != 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' && 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' || matrix.db }}
env:
SA_PASSWORD: "Pssw0rd_12"
ACCEPT_EULA: "y"
@ -415,6 +424,10 @@ jobs:
steps:
- name: Update Ubuntu package lists
run: |
sudo apt-get update -y --allow-releaseinfo-change
- name: Checkout repository
uses: actions/checkout@v4
@ -422,7 +435,7 @@ jobs:
env:
MATRIX_DB: ${{ matrix.db }}
run: |
if [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2017-latest' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' ]
if [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' ]
then
db='mssql'
else
@ -503,7 +516,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, intl, gd, exif, iconv, pgsql, pdo_pgsql
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, intl, gd, exif, iconv, pgsql, pdo_pgsql, sodium
ini-values: upload_tmp_dir=${{ runner.temp }}, sys_temp_dir=${{ runner.temp }}
coverage: none

13
SECURITY.md Normal file
View file

@ -0,0 +1,13 @@
# Security Policy
## Reporting a Vulnerability
Please do not post potential security vulnerabilities publicly. Instead, report them to the phpBB team.
We take security very seriously and will respond to reports about potential security vulnerabilities as quickly as possible.
There are multiple ways a potential security vulnerability can be reported:
- HackerOne: [phpBB | Vulnerability Disclosure Program | HackerOne](https://hackerone.com/phpbb)
- Create a report in the security tracker: [Security Tracker](https://www.phpbb.com/security/)
- Send an email: [security@phpbb.com](mailto:security@phpbb.com)
Please provide as much detail as possible when reporting a vulnerability. You can expect to receive an update on your report within a few days. If the vulnerability is accepted, we will work on a fix and keep you informed of the progress. If the vulnerability is declined, we will provide an explanation.

View file

@ -3,8 +3,8 @@
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
<!-- a few settings for the build -->
<property name="newversion" value="4.0.0-a1-dev" />
<property name="prevversion" value="3.3.14" />
<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, 3.3.10, 3.3.11, 3.3.12, 3.3.13" />
<property name="prevversion" value="3.3.15" />
<property name="olderversions" value="3.1.12, 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, 3.3.10, 3.3.11, 3.3.12, 3.3.13, 3.3.14" />
<!-- no configuration should be needed beyond this point -->
<property name="oldversions" value="${olderversions}, ${prevversion}" />
@ -166,32 +166,32 @@
<target name="prepare-new-version">
<!-- select the currently checked out commit (HEAD) for packaging -->
<mkdir dir="build/new_version/phpBB3" />
<mkdir dir="build/new_version/phpBB" />
<phingcall target="export">
<property name="revision" value="HEAD" />
<property name="dir" value="build/new_version/phpBB3" />
<property name="dir" value="build/new_version/phpBB" />
</phingcall>
<!-- copy into directory for diffs -->
<exec dir="build" command="cp -rp new_version/phpBB3 old_versions/release-${newversion}" />
<exec dir="build" command="cp -rp new_version/phpBB old_versions/release-${newversion}" />
<!-- and clean up -->
<phingcall target="clean-diff-dir">
<property name="dir" value="build/old_versions/release-${newversion}" />
</phingcall>
<!-- create an empty config.php file (not for diffs) -->
<touch file="build/new_version/phpBB3/config.php" />
<copy file="build/new_version/phpBB3/vendor-ext/.htaccess" tofile="build/new_version/phpBB3/vendor/.htaccess" />
<touch file="build/new_version/phpBB/config.php" />
<copy file="build/new_version/phpBB/vendor-ext/.htaccess" tofile="build/new_version/phpBB/vendor/.htaccess" />
</target>
<target name="package" depends="clean,prepare,prepare-new-version,old-version-diffs">
<exec dir="build" command="php -f package.php '${versions}' > logs/package.log" escape="false" />
<exec dir="build" escape="false"
command="LC_ALL=C diff -crNEBZbd old_versions/release-${prevversion}/language new_version/phpBB3/language >
command="LC_ALL=C diff -crNEBZbd old_versions/release-${prevversion}/language new_version/phpBB/language >
save/phpbb-${prevversion}_to_${newversion}_language.patch" />
<exec dir="build" escape="false"
command="LC_ALL=C diff -crNEBZbd old_versions/release-${prevversion}/styles/prosilver new_version/phpBB3/styles/prosilver >
command="LC_ALL=C diff -crNEBZbd old_versions/release-${prevversion}/styles/prosilver new_version/phpBB/styles/prosilver >
save/phpbb-${prevversion}_to_${newversion}_prosilver.patch" />
<exec dir="build" escape="false"

View file

@ -29,7 +29,7 @@ else
{
$fixVersion = $_SERVER['argv'][1];
$query = 'project IN (PHPBB3, SECURITY)
$query = 'project IN (PHPBB, PHPBB3, SECURITY)
AND resolution = Fixed
AND fixVersion = "' . $fixVersion . '"
AND status IN ("Unverified Fix", Closed)';

View file

@ -50,7 +50,7 @@ class build_package
);
$this->package_infos = array(
'package_name' => 'phpBB3',
'package_name' => 'phpBB',
'name_prefix' => 'phpbb',
'simple_name' => 'release-' . $_latest,
'new_version_number' => $_latest,

View file

@ -0,0 +1,116 @@
<?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\Sniffs\CodeLayout;
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff;
/**
* Checks that union type declarations follows the coding guidelines.
*/
class UnionTypesCheckSniff implements Sniff
{
/**
* {@inheritdoc}
*/
public function register()
{
return [
T_FUNCTION,
T_CLASS,
];
}
/**
* {@inheritdoc}
*/
public function process(File $phpcsFile, $stackPtr)
{
$tokens = $phpcsFile->getTokens();
if ($tokens[$stackPtr]['type'] === 'T_FUNCTION')
{
$method_params = $phpcsFile->getMethodParameters($stackPtr);
$method_params_array = array_column($method_params, 'type_hint', 'token');
foreach ($method_params_array as $stack_pointer => $type_hint)
{
$this->check_union_type($phpcsFile, $stack_pointer, $type_hint);
}
$method_properties = $phpcsFile->getMethodProperties($stackPtr);
$this->check_union_type($phpcsFile, $stackPtr, $method_properties['return_type']);
}
else if ($tokens[$stackPtr]['type'] === 'T_CLASS')
{
$class_token = $tokens[$stackPtr];
$class_closer_pointer = $class_token['scope_closer'];
$first_method_pointer = $phpcsFile->findNext(T_FUNCTION, $stackPtr);
$class_members_declarations_end_pointer = $first_method_pointer ?: $class_closer_pointer;
$stack_pointer = $stackPtr;
while(($class_member_pointer = $phpcsFile->findNext(T_VARIABLE, $stack_pointer)) !== false && ($class_member_pointer < $class_members_declarations_end_pointer))
{
$properties = $phpcsFile->getMemberProperties($class_member_pointer);
$this->check_union_type($phpcsFile, $class_member_pointer, $properties['type']);
$stack_pointer = $class_member_pointer + 1;
}
}
}
public function check_union_type(File $phpcsFile, $stack_pointer, $type_hint)
{
if (empty($type_hint))
{
return;
}
if (!strpos($type_hint, '|') && $type_hint[0] == '?') // Check nullable shortcut syntax
{
$type = substr($type_hint, 1);
$error = 'Nullable shortcut syntax must not be used. Use union type instead: %1$s|null; found %2$s';
$data = [$type, $type_hint];
$phpcsFile->addError($error, $stack_pointer, 'ShortNullableSyntax', $data);
}
else if ((count($types_array = explode('|', $type_hint))) > 1) // Check union type layout
{
$types_array_null_less = $types_array;
// Check 'null' to be the last element
$null_position = array_search('null', $types_array);
if ($null_position !== false && $null_position != array_key_last($types_array))
{
$error = 'The "null" type hint must be the last of the union type elements; found %s';
$data = [implode('|', $types_array)];
$phpcsFile->addError($error, $stack_pointer, 'NullAlwaysLast', $data);
}
// Check types excepting 'null' to follow alphabetical order
if ($null_position !== false)
{
array_splice($types_array_null_less, $null_position, 1);
}
if (count($types_array_null_less) > 1)
{
$types_array_null_less_sorted = $types_array_null_less;
sort($types_array_null_less_sorted);
if (!empty(array_diff_assoc($types_array_null_less, $types_array_null_less_sorted)))
{
$error = 'Union type elements must be sorted alphabetically excepting the "null" type hint must be the last if any; found %s';
$data = [implode('|', $types_array)];
$phpcsFile->addError($error, $stack_pointer, 'AlphabeticalSort', $data);
}
}
}
}
}

View file

@ -11,6 +11,8 @@
*
*/
namespace phpbb\Sniffs\Commenting;
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff;
@ -21,7 +23,7 @@ use PHP_CodeSniffer\Sniffs\Sniff;
* @package code_sniffer
* @author Manuel Pichler <mapi@phpundercontrol.org>
*/
class phpbb_Sniffs_Commenting_FileCommentSniff implements Sniff
class FileCommentSniff implements Sniff
{
/**
* Returns an array of tokens this test wants to listen for.

View file

@ -11,6 +11,8 @@
*
*/
namespace phpbb\Sniffs\ControlStructures;
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff;
@ -18,7 +20,7 @@ use PHP_CodeSniffer\Sniffs\Sniff;
* Checks that the opening brace of a control structures is on the line after.
* From Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff
*/
class phpbb_Sniffs_ControlStructures_OpeningBraceBsdAllmanSniff implements Sniff
class OpeningBraceBsdAllmanSniff implements Sniff
{
/**
* Registers the tokens that this sniff wants to listen for.

View file

@ -10,6 +10,7 @@
* the docs/CREDITS.txt file.
*
*/
namespace phpbb\Sniffs\ControlStructures;
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff;
@ -18,7 +19,7 @@ use PHP_CodeSniffer\Sniffs\Sniff;
* Checks that there is exactly one space between the keyword and the opening
* parenthesis of a control structures.
*/
class phpbb_Sniffs_ControlStructures_OpeningParenthesisSniff implements Sniff
class OpeningParenthesisSniff implements Sniff
{
/**
* Registers the tokens that this sniff wants to listen for.

View file

@ -11,6 +11,8 @@
*
*/
namespace phpbb\Sniffs\ControlStructures;
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff;
@ -18,7 +20,7 @@ use PHP_CodeSniffer\Sniffs\Sniff;
* Checks that the visibility qualifiers are placed after the static keyword
* according to the coding guidelines
*/
class phpbb_Sniffs_ControlStructures_StaticKeywordSniff implements Sniff
class StaticKeywordSniff implements Sniff
{
/**
* Registers the tokens that this sniff wants to listen for.

View file

@ -11,13 +11,15 @@
*
*/
namespace phpbb\Sniffs\Namespaces;
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff;
/**
* Checks that each use statement is used.
*/
class phpbb_Sniffs_Namespaces_UnusedUseSniff implements Sniff
class UnusedUseSniff implements Sniff
{
const FIND = [
T_NS_SEPARATOR,
@ -49,9 +51,20 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements Sniff
$phpcsFile->addError($error, $stack_pointer, 'FullName');
}
if ($found_name === $short_name)
/*
* Check for possible union types (like string|MyType|null)
* and question mark nullable type syntax (like ?MyType)
*/
$types = explode('|', $found_name);
foreach ($types as $type)
{
return true;
// Nullable type syntax
$type = (strpos($type, '?') === 0) ? substr($type, 1) : $type;
if ($short_name === $type)
{
return true;
}
}
return false;

View file

@ -17,9 +17,6 @@
<!-- There MUST not be more than one statement per line. -->
<rule ref="Generic.Formatting.DisallowMultipleStatements" />
<!-- Call-time pass-by-reference MUST not be used. -->
<rule ref="Generic.Functions.CallTimePassByReference.NotAllowed" />
<!-- Filenames MUST be lowercase. -->
<rule ref="Generic.Files.LowercasedFilename" />

View file

@ -45,4 +45,8 @@
<!-- There MUST NOT be unused use statements. -->
<rule ref="./phpbb/Sniffs/Namespaces/UnusedUseSniff.php" />
<!-- The null type SHALL be the last union type element, other types SHALL follow alphabetical order.
No nullable type shortcut syntax should be used. -->
<rule ref="./phpbb/Sniffs/CodeLayout/UnionTypesCheckSniff.php" />
</ruleset>

View file

@ -19,9 +19,9 @@ do
$command "$1.$ext"
for file in `find phpBB3 -name '.svn' -prune -o -type f -print`
for file in `find phpBB -name '.svn' -prune -o -type f -print`
do
orig_file="${file/#phpBB3/$orig_dir}"
orig_file="${file/#phpBB/$orig_dir}"
diff_result=`diff $orig_file $file`
if [ -n "$diff_result" ]
@ -31,7 +31,7 @@ do
fi
done
rm -rf phpBB3
rm -rf phpBB
done
cd ..

Binary file not shown.

View file

@ -14,7 +14,7 @@
<fieldset>
<legend>{L_BBCODE_USAGE}</legend>
<p>{L_BBCODE_USAGE_EXPLAIN}</p>
<p>{{ lang('BBCODE_USAGE_EXPLAIN', '<a href="#down">', '</a>') }}</p>
<dl>
<dt><label for="bbcode_match">{L_EXAMPLES}</label><br /><br /><span>{L_BBCODE_USAGE_EXAMPLE}</span></dt>
<dd><textarea id="bbcode_match" name="bbcode_match" cols="60" rows="5">{BBCODE_MATCH}</textarea></dd>
@ -47,6 +47,17 @@
</dl>
</fieldset>
<fieldset>
<legend>{{ lang('APPEARANCE') }}</legend>
<dl>
<dt><label for="bbcode_font_icon">{{ lang('BBCODE_FONT_ICON') }}</label><br><span>{{ lang('BBCODE_FONT_ICON_EXPLAIN', '<a href="https://fontawesome.com/v6/icons/" target="_blank">', '</a>') }}</span></dt>
<dd>
<input type="text" name="bbcode_font_icon" id="bbcode_font_icon" value="{{ BBCODE_FONT_ICON }}" />
{{ Icon('font', ' ', '', false, '', {'id':'bbcode_icon_preview'}) }}
</dd>
</dl>
</fieldset>
<!-- EVENT acp_bbcodes_edit_fieldsets_after -->
<fieldset class="submit-buttons">

View file

@ -1,83 +0,0 @@
<!-- INCLUDE overall_header.html -->
<a id="maincontent"></a>
<h1>{L_ACP_JABBER_SETTINGS}</h1>
<p>{L_ACP_JABBER_SETTINGS_EXPLAIN}</p>
<!-- IF S_WARNING -->
<div class="errorbox">
<h3>{L_WARNING}</h3>
<p>{WARNING_MSG}</p>
</div>
<!-- ENDIF -->
<form id="acp_jabber" method="post" action="{U_ACTION}">
<fieldset>
<legend>{L_ACP_JABBER_SETTINGS}</legend>
<!-- IF S_GTALK_NOTE -->
<p>{L_JAB_GTALK_NOTE}</p>
<!-- ENDIF -->
<dl>
<dt><label for="jab_enable">{L_JAB_ENABLE}{L_COLON}</label><br /><span>{L_JAB_ENABLE_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" id="jab_enable" name="jab_enable" value="1"<!-- IF JAB_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_ENABLED}</label>
<label><input type="radio" class="radio" name="jab_enable" value="0"<!-- IF not JAB_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_DISABLED}</label></dd>
</dl>
<dl>
<dt><label for="jab_host">{L_JAB_SERVER}{L_COLON}</label><br /><span>{L_JAB_SERVER_EXPLAIN}</span></dt>
<dd><input type="text" id="jab_host" name="jab_host" value="{JAB_HOST}" /></dd>
</dl>
<dl>
<dt><label for="jab_port">{L_JAB_PORT}{L_COLON}</label><br /><span>{L_JAB_PORT_EXPLAIN}</span></dt>
<dd><input type="number" id="jab_port" name="jab_port" value="{JAB_PORT}" min="0" max="99999" /></dd>
</dl>
<dl>
<dt><label for="jab_username">{L_JAB_USERNAME}{L_COLON}</label><br /><span>{L_JAB_USERNAME_EXPLAIN}</span></dt>
<dd><input type="text" id="jab_username" name="jab_username" value="{JAB_USERNAME}" /></dd>
</dl>
<dl>
<dt><label for="jab_password">{L_JAB_PASSWORD}{L_COLON}</label><br /><span>{L_JAB_PASSWORD_EXPLAIN}</span></dt>
<dd><input type="password" id="jab_password" name="jab_password" value="{JAB_PASSWORD}" autocomplete="off" /></dd>
</dl>
<!-- IF S_CAN_USE_SSL -->
<dl>
<dt><label for="jab_use_ssl">{L_JAB_USE_SSL}{L_COLON}</label><br /><span>{L_JAB_USE_SSL_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" id="jab_use_ssl" name="jab_use_ssl" value="1"<!-- IF JAB_USE_SSL --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="jab_use_ssl" value="0"<!-- IF not JAB_USE_SSL --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="jab_verify_peer">{L_JAB_VERIFY_PEER}{L_COLON}</label><br /><span>{L_JAB_VERIFY_PEER_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" id="jab_verify_peer" name="jab_verify_peer" value="1"<!-- IF JAB_VERIFY_PEER --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="jab_verify_peer" value="0"<!-- IF not JAB_VERIFY_PEER --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="jab_verify_peer_name">{L_JAB_VERIFY_PEER_NAME}{L_COLON}</label><br /><span>{L_JAB_VERIFY_PEER_NAME_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" id="jab_verify_peer_name" name="jab_verify_peer_name" value="1"<!-- IF JAB_VERIFY_PEER_NAME --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="jab_verify_peer_name" value="0"<!-- IF not JAB_VERIFY_PEER_NAME --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="jab_allow_self_signed">{L_JAB_ALLOW_SELF_SIGNED}{L_COLON}</label><br /><span>{L_JAB_ALLOW_SELF_SIGNED_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" id="jab_allow_self_signed" name="jab_allow_self_signed" value="1"<!-- IF JAB_ALLOW_SELF_SIGNED --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="jab_allow_self_signed" value="0"<!-- IF not JAB_ALLOW_SELF_SIGNED --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<!-- ENDIF -->
<dl>
<dt><label for="jab_package_size">{L_JAB_PACKAGE_SIZE}{L_COLON}</label><br /><span>{L_JAB_PACKAGE_SIZE_EXPLAIN}</span></dt>
<dd><input type="number" id="jab_package_size" name="jab_package_size" value="{JAB_PACKAGE_SIZE}" min="0" max="99999" /></dd>
</dl>
</fieldset>
<fieldset>
<legend>{L_ACP_SUBMIT_CHANGES}</legend>
<p class="submit-buttons">
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</p>
{S_FORM_TOKEN}
</fieldset>
</form>
<!-- INCLUDE overall_footer.html -->

View file

@ -47,7 +47,7 @@
{% for provider in PROVIDERS %}
{% if provider.is_available %}
<option value="{{ get_class(provider) }}"{{ attribute(config, 'storage\\' ~ storage.get_name ~ '\\provider') == get_class(provider) ? ' selected' : '' }} data-toggle-setting="#{{ storage.get_name }}_{{ provider.get_name }}_settings">
{{ lang('STORAGE_ADAPTER_' ~ provider.get_name | upper ~ '_NAME') }}
{{ provider.get_title }}
</option>
{% endif %}
{% endfor %}
@ -59,43 +59,42 @@
{% for provider in PROVIDERS %}
{% if provider.is_available %}
<fieldset id="{{ storage.get_name }}_{{ provider.get_name }}_settings">
<legend>{{ lang('STORAGE_' ~ storage.get_name | upper ~ '_TITLE') }} - {{ lang('STORAGE_ADAPTER_' ~ provider.get_name | upper ~ '_NAME') }}</legend>
<legend>{{ lang('STORAGE_' ~ storage.get_name | upper ~ '_TITLE') }} - {{ provider.get_title }}</legend>
{% for name, options in provider.get_options %}
<dl>
<dt>
{% set title = 'STORAGE_ADAPTER_' ~ provider.get_name | upper ~ '_OPTION_' ~ name | upper %}
{% set description = 'STORAGE_ADAPTER_' ~ provider.get_name | upper ~ '_OPTION_' ~ name | upper ~ '_EXPLAIN' %}
<label>{{ lang(title) ~ lang('COLON') }}</label>
{% if lang_defined(description) %}
<br /><span>{{ lang(description) }}</span>
<label>{{ options.title ~ lang('COLON') }}</label>
{% if options.description %}
<br /><span>{{ options.description }}</span>
{% endif %}
</dt>
<dd>
{% set input_name = storage.get_name ~ '[' ~ name ~ ']' %}
{% set input_value = attribute(config, 'storage\\' ~ storage.get_name ~ '\\config\\' ~ name) %}
{% set form_macro = options.form_macro %}
{% if options.tag == 'input' %}
{{ FormsInput(options | merge({"name": input_name, "value": input_value})) }}
{% elseif options.tag == 'textarea' %}
{{ FormsTextarea(options | merge({"name": input_name, "content": input_value})) }}
{% elseif options.tag == 'radio' %}
{% if form_macro.tag == 'input' %}
{{ FormsInput(form_macro | merge({"name": input_name, "value": input_value})) }}
{% elseif form_macro.tag == 'textarea' %}
{{ FormsTextarea(form_macro | merge({"name": input_name, "content": input_value})) }}
{% elseif form_macro.tag == 'radio' %}
{% set buttons = [] %}
{% for button in options.buttons %}
{% for button in form_macro.buttons %}
{% set new_button = button | merge({"name": input_name, "checked": button.value == input_value}) %}
{% set buttons = buttons | merge([new_button]) %}
{% endfor %}
{{ FormsRadioButtons(options | merge({"buttons": buttons})) }}
{% elseif options.tag == 'select' %}
{{ FormsRadioButtons(form_macro | merge({"buttons": buttons})) }}
{% elseif form_macro.tag == 'select' %}
{% set select_options = [] %}
{% for option in options.options %}
{% for option in form_macro.options %}
{% set new_option = option | merge({"selected": option.value == input_value}) %}
{% set select_options = select_options | merge([new_option]) %}
{% endfor %}
{{ FormsSelect(options | merge({"name": input_name, "options": select_options})) }}
{{ FormsSelect(form_macro | merge({"name": input_name, "options": select_options})) }}
{% endif %}
</dd>
</dl>
@ -109,9 +108,9 @@
<dl>
<dt><label for="update_type">{{ lang('STORAGE_UPDATE_TYPE') ~ lang('COLON') }}</label></dt>
<dd>
<label><input id="update_type" class="radio" name="update_type" value="{{ STORAGE_UPDATE_TYPE_CONFIG }}" checked="checked" type="radio"> {{ lang('STORAGE_UPDATE_TYPE_CONFIG') }}</label>
<label><input class="radio" name="update_type" value="{{ STORAGE_UPDATE_TYPE_CONFIG }}" type="radio"> {{ lang('STORAGE_UPDATE_TYPE_CONFIG') }}</label>
<label><input class="radio" name="update_type" value="{{ STORAGE_UPDATE_TYPE_COPY }}" type="radio"> {{ lang('STORAGE_UPDATE_TYPE_COPY') }}</label>
<label><input class="radio" name="update_type" value="{{ STORAGE_UPDATE_TYPE_MOVE }}" type="radio"> {{ lang('STORAGE_UPDATE_TYPE_MOVE') }}</label>
<label><input class="radio" name="update_type" value="{{ STORAGE_UPDATE_TYPE_MOVE }}" type="radio" checked="checked" id="update_type"> {{ lang('STORAGE_UPDATE_TYPE_MOVE') }}</label>
</dd>
</dl>
</fieldset>

View file

@ -29,12 +29,6 @@
<dd><label><input type="radio" class="radio" name="hideonline" value="1"<!-- IF HIDE_ONLINE --> id="hideonline" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="hideonline" value="0"<!-- IF not HIDE_ONLINE --> id="hideonline" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="notifymethod">{L_NOTIFY_METHOD}{L_COLON}</label><br /><span>{L_NOTIFY_METHOD_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="notifymethod" value="0"<!-- IF NOTIFY_EMAIL --> id="notifymethod" checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_EMAIL}</label>
<label><input type="radio" class="radio" name="notifymethod" value="1"<!-- IF NOTIFY_IM --> id="notifymethod" checked="checked"<!-- ENDIF --><!-- IF S_JABBER_DISABLED --> disabled="disabled"<!-- ENDIF --> /> {L_NOTIFY_METHOD_IM}</label>
<label><input type="radio" class="radio" name="notifymethod" value="2"<!-- IF NOTIFY_BOTH --> id="notifymethod" checked="checked"<!-- ENDIF --><!-- IF S_JABBER_DISABLED --> disabled="disabled"<!-- ENDIF --> /> {L_NOTIFY_METHOD_BOTH}</label></dd>
</dl>
<dl>
<dt><label for="notifypm">{L_NOTIFY_ON_PM}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="notifypm" value="1"<!-- IF NOTIFY_PM --> id="notifypm" checked="checked"<!-- ENDIF --> /> {L_YES}</label>

View file

@ -3,10 +3,6 @@
<fieldset>
<legend>{L_USER_PROFILE}</legend>
<!-- EVENT acp_users_profile_before -->
<dl>
<dt><label for="jabber">{L_UCP_JABBER}{L_COLON}</label></dt>
<dd><input type="email" id="jabber" name="jabber" value="{JABBER}" /></dd>
</dl>
<dl>
<dt><label for="birthday">{L_BIRTHDAY}{L_COLON}</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
<dd>{L_DAY}{L_COLON} <select id="birthday" name="bday_day">{S_BIRTHDAY_DAY_OPTIONS}</select> {L_MONTH}{L_COLON} <select name="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select> {L_YEAR}{L_COLON} <select name="bday_year">{S_BIRTHDAY_YEAR_OPTIONS}</select></dd>

View file

@ -123,8 +123,8 @@ function parse_document(container)
}
if ((text.length && text !== '-') || cell.children().length) {
if (headers[column] != '') {
cell.prepend('<dfn style="display: none;">' + headers[column] + '</dfn>');
if (headers[column].length) {
cell.prepend($("<dfn>").css('display', 'none').text(headers[column]));
}
}
else {
@ -145,7 +145,7 @@ function parse_document(container)
*/
container.find('table.responsive > tbody').each(function() {
var items = $(this).children('tr');
if (items.length == 0)
if (!items.length)
{
$(this).parent('table:first').addClass('responsive-hide');
}
@ -159,7 +159,6 @@ function parse_document(container)
if ($this.html() == '&nbsp;') {
$this.addClass('responsive-hide');
}
});
/**
@ -175,7 +174,6 @@ function parse_document(container)
$this.value = inputChars.slice(0, maxLength).join('');
}
});
});
/**
@ -202,7 +200,7 @@ function parse_document(container)
var width = $body.width(),
height = $this.height();
if (arguments.length == 0 && (!responsive || width <= lastWidth) && height <= maxHeight) {
if (!arguments.length && (!responsive || width <= lastWidth) && height <= maxHeight) {
return;
}
@ -277,5 +275,34 @@ function parse_document(container)
$('.actions a:has(i.acp-icon)').mouseover(function () {
$(this).css("text-decoration", "none");
});
// Live update BBCode font icon preview
const updateIconClass = (element, newClass) => {
// Ignore invalid class names
const faIconRegex = /^(?!-)(?!.*--)[a-z0-9-]+(?<!-)$/;
if (!faIconRegex.test(newClass)) {
return;
}
element.classList.forEach(className => {
if (className.startsWith('fa-') && className !== 'fa-fw') {
element.classList.remove(className);
}
});
element.classList.add(`fa-${newClass}`);
};
const pageIconFont = document.getElementById('bbcode_font_icon');
if (pageIconFont) {
pageIconFont.addEventListener('keyup', function () {
updateIconClass(this.nextElementSibling, this.value);
});
pageIconFont.addEventListener('blur', function () {
updateIconClass(this.nextElementSibling, this.value);
});
}
});
})(jQuery);

View file

@ -284,14 +284,20 @@ function submitPermissions() {
if ($alertBoxLink) {
// Remove forum_id[] from URL
$alertBoxLink.attr('href', $alertBoxLink.attr('href').replace(/(&forum_id\[\]=[0-9]+)/g, ''));
var previousPageForm = '<form action="' + $alertBoxLink.attr('href') + '" method="post">';
$.each(forumIds, function (key, value) {
previousPageForm += '<input type="text" name="forum_id[]" value="' + value + '" />';
const $previousPageForm = $('<form>').attr({
action: $alertBoxLink.attr('href'),
method: 'post'
});
$.each(forumIds, function (key, value) {
$previousPageForm.append($('<input>').attr({
type: 'text',
name: 'forum_id[]',
value: value
}));
});
previousPageForm += '</form>';
$alertBoxLink.on('click', function (e) {
var $previousPageForm = $(previousPageForm);
$('body').append($previousPageForm);
e.preventDefault();
$previousPageForm.submit();
@ -306,12 +312,19 @@ function submitPermissions() {
setTimeout(function () {
// Create forum to submit using POST. This will prevent
// exceeding the maximum length of URLs
var form = '<form action="' + res.REFRESH_DATA.url.replace(/(&forum_id\[\]=[0-9]+)/g, '') + '" method="post">';
$.each(forumIds, function (key, value) {
form += '<input type="text" name="forum_id[]" value="' + value + '" />';
const $form = $('<form>').attr({
action: res.REFRESH_DATA.url.replace(/(&forum_id\[\]=[0-9]+)/g, ''),
method: 'post'
});
form += '</form>';
$form = $(form);
$.each(forumIds, function (key, value) {
$form.append($('<input>').attr({
type: 'text',
name: 'forum_id[]',
value: value
}));
});
$('body').append($form);
// Hide the alert even if we refresh the page, in case the user

View file

@ -28,7 +28,9 @@
"require": {
"php": "^8.1",
"ext-pdo": "*",
"ext-zip": "*",
"ext-zlib": "*",
"ext-sodium": "*",
"bantu/ini-get-wrapper": "~1.0",
"carlos-mg89/oauth": "^0.8.15",
"chita/topological_sort": "^3.0",
@ -37,7 +39,7 @@
"composer/package-versions-deprecated": "^1.11",
"doctrine/dbal": "~3.3.6",
"google/recaptcha": "~1.1",
"guzzlehttp/guzzle": "~6.3",
"guzzlehttp/guzzle": " ^7.0",
"marc1706/fast-image-size": "^1.1",
"minishlink/web-push": "^8.0",
"s9e/text-formatter": "^2.0",

707
phpBB/composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -20,3 +20,5 @@ parameters:
- passwords.driver.bcrypt
- passwords.driver.salted_md5
- passwords.driver.phpass
packages.public_key: 'auJX0pGetfYatE7t/rX5hAkCLZv9s78TwKkLfR3YGuQ='

View file

@ -37,6 +37,7 @@ imports:
- { resource: services_twig.yml }
- { resource: services_twig_extensions.yml }
- { resource: services_ucp.yml }
- { resource: services_updater.yml }
- { resource: services_user.yml }
- { resource: tables.yml }

View file

@ -284,20 +284,22 @@ services:
console.command.thumbnail.delete:
class: phpbb\console\command\thumbnail\delete
arguments:
- '@config'
- '@user'
- '@dbal.conn'
- '%core.root_path%'
- '@language'
- '@storage.attachment'
tags:
- { name: console.command }
console.command.thumbnail.generate:
class: phpbb\console\command\thumbnail\generate
arguments:
- '@config'
- '@user'
- '@dbal.conn'
- '@cache'
- '@language'
- '@storage.attachment'
- '@filesystem.temp'
- '%core.root_path%'
- '%core.php_ext%'
tags:
@ -307,6 +309,7 @@ services:
class: phpbb\console\command\thumbnail\recreate
arguments:
- '@user'
- '@language'
tags:
- { name: console.command }

View file

@ -38,15 +38,6 @@ services:
tags:
- { name: messenger.method }
messenger.method.jabber:
class: phpbb\messenger\method\jabber
shared: false
parent: messenger.method.base
calls:
- [init, []]
tags:
- { name: messenger.method }
messenger.queue:
class: phpbb\messenger\queue
shared: false

View file

@ -233,19 +233,6 @@ services:
tags:
- { name: notification.method }
notification.method.jabber:
class: phpbb\notification\method\jabber
shared: false
arguments:
- '@user_loader'
- '@user'
- '@config'
- '%core.root_path%'
- '%core.php_ext%'
- '@messenger.method_collection'
tags:
- { name: notification.method }
notification.method.webpush:
class: phpbb\notification\method\webpush
shared: false

View file

@ -4,33 +4,27 @@ services:
storage.attachment:
class: phpbb\storage\storage
arguments:
- '@dbal.conn'
- '@cache.driver'
- '@storage.adapter.factory'
- '@storage.file_tracker'
- 'attachment'
- '%tables.storage%'
tags:
- { name: storage }
storage.avatar:
class: phpbb\storage\storage
arguments:
- '@dbal.conn'
- '@cache.driver'
- '@storage.adapter.factory'
- '@storage.file_tracker'
- 'avatar'
- '%tables.storage%'
tags:
- { name: storage }
storage.backup:
class: phpbb\storage\storage
arguments:
- '@dbal.conn'
- '@cache.driver'
- '@storage.adapter.factory'
- '@storage.file_tracker'
- 'backup'
- '%tables.storage%'
tags:
- { name: storage }
@ -78,6 +72,7 @@ services:
storage.provider.local:
class: phpbb\storage\provider\local
arguments:
- '@language'
tags:
- { name: storage.provider }
@ -124,3 +119,11 @@ services:
- '@storage.state_helper'
- '@storage.provider_collection'
- '@storage.adapter_collection'
storage.file_tracker:
class: phpbb\storage\file_tracker
arguments:
- '@cache.driver'
- '@dbal.conn'
- '%tables.storage%'

View file

@ -0,0 +1,14 @@
services:
updater.get_updates:
class: phpbb\update\get_updates
arguments:
- '@filesystem'
- '%packages.public_key%'
- '%core.root_path%'
updater.controller:
class: phpbb\update\controller
arguments:
- '@filesystem'
- '@updater.get_updates'
- '%core.root_path%'

View file

@ -140,7 +140,6 @@ $u_permissions = array(
'u_sendemail' => array(0, 1),
'u_readpm' => array(0, 1),
'u_sendpm' => array(0, 1),
'u_sendim' => array(0, 1),
'u_hideonline' => array(0, 1),
'u_viewonline' => array(0, 1),
'u_viewprofile' => array(0, 1),
@ -247,7 +246,7 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
{
if (!isset($group_ids[$ug_id]))
{
$sql = 'SELECT group_id FROM ' . GROUPS_TABLE . "
$sql = 'SELECT group_id FROM ' . GROUPS_TABLE . "
WHERE group_name = '" . strtoupper($ug_id) . "'";
$result = $db->sql_query_limit($sql, 1);
$id = (int) $db->sql_fetchfield('group_id', 0, $result);
@ -340,7 +339,7 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
case ACL_NO:
if (isset($cur_auth[$forum][$auth_option_id]))
{
$sql_ary['delete'][] = "DELETE FROM $table
$sql_ary['delete'][] = "DELETE FROM $table
WHERE forum_id = $forum
AND auth_option_id = $auth_option_id
AND $id_field = $ug_id";
@ -354,10 +353,10 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
}
else if ($cur_auth[$forum][$auth_option_id] != $setting)
{
$sql_ary['update'][] = "UPDATE " . $table . "
SET auth_setting = $setting
WHERE $id_field = $ug_id
AND forum_id = $forum
$sql_ary['update'][] = "UPDATE " . $table . "
SET auth_setting = $setting
WHERE $id_field = $ug_id
AND forum_id = $forum
AND auth_option_id = $auth_option_id";
}
}

View file

@ -50,6 +50,8 @@
<ol>
<li><a href="#changelog">Changelog</a>
<ul>
<li><a href="#v3315rc1">Changes since 3.3.15-RC1</a></li>
<li><a href="#v3314">Changes since 3.3.14</a></li>
<li><a href="#v3314rc1">Changes since 3.3.14-RC1</a></li>
<li><a href="#v3313">Changes since 3.3.13</a></li>
<li><a href="#v3313rc1">Changes since 3.3.13-RC1</a></li>
@ -173,6 +175,42 @@
<div class="inner">
<div class="content">
<a name="v3315rc1"></a><h3>Changes since 3.3.15-RC1</h3>
<h4>Bug</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17480">PHPBB-17480</a>] - PHP fatal error in version check failure</li>
</ul>
<h4>Security Issue</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/SECURITY-283">SECURITY-283</a>] - Use jQuery to generate HTML from page data</li>
</ul>
<a name="v3314"></a><h3>Changes since 3.3.14</h3>
<h4>Bug</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17227">PHPBB-17227</a>] - Member list sorting bug - repeating users on several pages</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17381">PHPBB-17381</a>] - 'topic_views' column overflow blocks access to the topic</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17417">PHPBB-17417</a>] - Day selection not visible when no results</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17422">PHPBB-17422</a>] - Ascending posts pagination</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17436">PHPBB-17436</a>] - PHP fatal error while converting from phpBB 2.0 with Attachment MOD</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17455">PHPBB-17455</a>] - PHP warning on MySQLi connection failure</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17463">PHPBB-17463</a>] - Extra &amp; in unread posts search pagination </li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17468">PHPBB-17468</a>] - Reset password feature is not restricted to email</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17470">PHPBB-17470</a>] - Enable feeds setting not enforced</li>
</ul>
<h4>Improvement</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17429">PHPBB-17429</a>] - Adding event before users have been added to a group</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17431">PHPBB-17431</a>] - Add more vars to memberlist event</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17433">PHPBB-17433</a>] - Unclear instructions in ACP, Server settings</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17443">PHPBB-17443</a>] - Various Guzzle client issues for version checks</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17446">PHPBB-17446</a>] - Add acp_account_activation_edit_add event</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17461">PHPBB-17461</a>] - Add php events for ACP main actions</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17467">PHPBB-17467</a>] - Add TLS v.1.3 support to email messenger connection</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17471">PHPBB-17471</a>] - Forum feed link in forumlist_body does not return the correct URL</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17478">PHPBB-17478</a>] - Add security policy to repository</li>
</ul>
<a name="v3314rc1"></a><h3>Changes since 3.3.14-RC1</h3>
<h4>Improvement</h4>
<ul>

View file

@ -90,7 +90,6 @@ Smarty (c) 2001, 2002 by ispi of Lincoln, Inc, http://smarty.php.net/
GPL licensed:
phpMyAdmin (c) 2001, 2003 phpMyAdmin Devel team, http://www.phpmyadmin.net/
Jabber Class (c) 2006 Flyspray.org, http://www.flyspray.org/
Chora (c) 2000-2006, The Horde Project. http://horde.org/chora/
Horde Project (c) 2000-2006, The Horde Project. http://horde.org/
jQuery (c) 2011, John Resig. http://jquery.com/

View file

@ -953,11 +953,19 @@ index_body_forumlist_body_after
* Since: 3.1.1
* Purpose: Add content after the forum list body on the index page
index_body_forumlist_body_before
===
* Locations:
+ styles/prosilver/template/index_body.html
* Since: 4.0.0-a1
* Purpose: Add content before the forum list body on the index page
index_body_markforums_after
===
* Locations:
+ styles/prosilver/template/index_body.html
* Since: 3.1.0-RC2
* Deprecated: 4.0.0-a1 Use index_body_forumlist_body_before instead
* Purpose: Add content after the mark-read link above the forum list on Board index
index_body_markforums_before
@ -965,6 +973,7 @@ index_body_markforums_before
* Locations:
+ styles/prosilver/template/index_body.html
* Since: 3.1.0-RC2
* Deprecated: 4.0.0-a1 Use index_body_forumlist_body_before instead
* Purpose: Add content before the mark-read link above the forum list on Board index
index_body_stat_blocks_after
@ -1737,29 +1746,33 @@ overall_header_body_before
overall_header_breadcrumb_append
===
* Locations:
+ styles/prosilver/template/navbar_header.html
+ styles/prosilver/template/breadcrumbs.html
* Since: 3.1.0-a1
* Changed: 4.0.0-a1 Moved to breadcrumbs.html
* Purpose: Add links to the list of breadcrumbs in the header
overall_header_breadcrumb_prepend
===
* Locations:
+ styles/prosilver/template/navbar_header.html
+ styles/prosilver/template/breadcrumbs.html
* Since: 3.1.0-RC3
* Changed: 4.0.0-a1 Moved to breadcrumbs.html
* Purpose: Add links to the list of breadcrumbs in the header (after site-home, but before board-index)
overall_header_breadcrumbs_after
===
* Locations:
+ styles/prosilver/template/navbar_header.html
+ styles/prosilver/template/breadcrumbs.html
* Since: 3.1.0-RC3
* Changed: 4.0.0-a1 Moved to breadcrumbs.html
* Purpose: Add content after the breadcrumbs (outside of the breadcrumbs container)
overall_header_breadcrumbs_before
===
* Locations:
+ styles/prosilver/template/navbar_header.html
+ styles/prosilver/template/breadcrumbs.html
* Since: 3.1.0-RC3
* Changed: 4.0.0-a1 Moved to breadcrumbs.html
* Purpose: Add content before the breadcrumbs (outside of the breadcrumbs container)
overall_header_content_before
@ -1821,15 +1834,17 @@ overall_header_navigation_prepend
overall_header_navlink_append
===
* Locations:
+ styles/prosilver/template/navbar_header.html
+ styles/prosilver/template/breadcrumbs.html
* Since: 3.1.0-b3
* Changed: 4.0.0-a1 Moved to breadcrumbs.html
* Purpose: Add content after each individual navlink (breadcrumb)
overall_header_navlink_prepend
===
* Locations:
+ styles/prosilver/template/navbar_header.html
+ styles/prosilver/template/breadcrumbs.html
* Since: 3.1.0-b3
* Changed: 4.0.0-a1 Moved to breadcrumbs.html
* Purpose: Add content before each individual navlink (breadcrumb)
overall_header_page_body_before

View file

@ -1079,7 +1079,7 @@ class acp_attachments
$attachments_per_page = (int) $config['topics_per_page'];
// Get total number or orphans older than 3 hours
$sql = 'SELECT COUNT(attach_id) as num_files, SUM(filesize) as total_size
$sql = 'SELECT COUNT(attach_id) as num_files, SUM(' . $this->db->cast_expr_to_bigint('filesize') . ') as total_size
FROM ' . ATTACHMENTS_TABLE . '
WHERE is_orphan = 1
AND filetime < ' . (time() - 3*60*60);

View file

@ -44,12 +44,12 @@ class acp_bbcodes
switch ($action)
{
case 'add':
$bbcode_match = $bbcode_tpl = $bbcode_helpline = '';
$bbcode_match = $bbcode_tpl = $bbcode_helpline = $bbcode_font_icon = '';
$display_on_posting = 0;
break;
case 'edit':
$sql = 'SELECT bbcode_match, bbcode_tpl, display_on_posting, bbcode_helpline
$sql = 'SELECT bbcode_match, bbcode_tpl, display_on_posting, bbcode_helpline, bbcode_font_icon
FROM ' . BBCODES_TABLE . '
WHERE bbcode_id = ' . $bbcode_id;
$result = $db->sql_query($sql);
@ -65,6 +65,7 @@ class acp_bbcodes
$bbcode_tpl = htmlspecialchars($row['bbcode_tpl'], ENT_COMPAT);
$display_on_posting = $row['display_on_posting'];
$bbcode_helpline = $row['bbcode_helpline'];
$bbcode_font_icon = $row['bbcode_font_icon'];
break;
case 'modify':
@ -88,6 +89,7 @@ class acp_bbcodes
$bbcode_match = $request->variable('bbcode_match', '');
$bbcode_tpl = html_entity_decode($request->variable('bbcode_tpl', '', true), ENT_COMPAT);
$bbcode_helpline = $request->variable('bbcode_helpline', '', true);
$bbcode_font_icon = $request->variable('bbcode_font_icon', '');
break;
}
@ -101,12 +103,12 @@ class acp_bbcodes
'S_EDIT_BBCODE' => true,
'U_BACK' => $this->u_action,
'U_ACTION' => $this->u_action . '&amp;action=' . (($action == 'add') ? 'create' : 'modify') . (($bbcode_id) ? "&amp;bbcode=$bbcode_id" : ''),
'L_BBCODE_USAGE_EXPLAIN'=> sprintf($user->lang['BBCODE_USAGE_EXPLAIN'], '<a href="#down">', '</a>'),
'BBCODE_MATCH' => $bbcode_match,
'BBCODE_TPL' => $bbcode_tpl,
'BBCODE_HELPLINE' => $bbcode_helpline,
'DISPLAY_ON_POSTING' => $display_on_posting,
'L_BBCODE_USAGE_EXPLAIN' => sprintf($user->lang['BBCODE_USAGE_EXPLAIN'], '<a href="#down">', '</a>'),
'BBCODE_MATCH' => $bbcode_match,
'BBCODE_TPL' => $bbcode_tpl,
'BBCODE_HELPLINE' => $bbcode_helpline,
'BBCODE_FONT_ICON' => $bbcode_font_icon,
'DISPLAY_ON_POSTING' => $display_on_posting,
);
$bbcode_tokens = array('TEXT', 'SIMPLETEXT', 'INTTEXT', 'IDENTIFIER', 'NUMBER', 'EMAIL', 'URL', 'LOCAL_URL', 'RELATIVE_URL', 'COLOR');
@ -157,9 +159,11 @@ class acp_bbcodes
* @var string bbcode_match The bbcode usage string to match
* @var string bbcode_tpl The bbcode HTML replacement string
* @var string bbcode_helpline The bbcode help line string
* @var string bbcode_font_icon The name of the Font Awesome BBCode icon
* @var array hidden_fields Array of hidden fields for use when
* submitting form when $warn_unsafe is true
* @since 3.1.0-a3
* @changed 4.0.0-a1 Added bbcode_font_icon
*/
$vars = array(
'action',
@ -169,6 +173,7 @@ class acp_bbcodes
'bbcode_match',
'bbcode_tpl',
'bbcode_helpline',
'bbcode_font_icon',
'hidden_fields',
);
extract($phpbb_dispatcher->trigger_event('core.acp_bbcodes_modify_create', compact($vars)));
@ -232,6 +237,16 @@ class acp_bbcodes
trigger_error($user->lang['BBCODE_HELPLINE_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (strlen($bbcode_font_icon) > 64)
{
trigger_error($user->lang['BBCODE_FONT_ICON_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (!empty($bbcode_font_icon) && !preg_match('/^(?!-)(?!.*--)[a-z0-9-]+(?<!-)$/', $bbcode_font_icon))
{
trigger_error($user->lang['BBCODE_FONT_ICON_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
/**
* Replace Emojis and other 4bit UTF-8 chars not allowed by MySQL to UCR/NCR.
* Using their Numeric Character Reference's Hexadecimal notation.
@ -244,6 +259,7 @@ class acp_bbcodes
'bbcode_tpl' => $bbcode_tpl,
'display_on_posting' => $display_on_posting,
'bbcode_helpline' => $bbcode_helpline,
'bbcode_font_icon' => $bbcode_font_icon,
'first_pass_match' => $data['first_pass_match'],
'first_pass_replace' => $data['first_pass_replace'],
'second_pass_match' => $data['second_pass_match'],
@ -328,6 +344,7 @@ class acp_bbcodes
'bbcode_match' => $bbcode_match,
'bbcode_tpl' => htmlspecialchars($bbcode_tpl, ENT_COMPAT),
'bbcode_helpline' => $bbcode_helpline,
'bbcode_font_icon' => $bbcode_font_icon,
'display_on_posting' => $display_on_posting,
)))
, 'confirm_bbcode.html');

View file

@ -162,12 +162,7 @@ class acp_database
throw new \phpbb\exception\runtime_exception('CANNOT_OPEN_FILE');
}
$storage->write_stream($file, $fp);
if (is_resource($fp))
{
fclose($fp);
}
$storage->write($file, $fp);
// Remove file from tmp
@unlink($temp_dir . '/' . $file);
@ -279,7 +274,7 @@ class acp_database
try
{
$stream = $storage->read_stream($backup_info['file_name']);
$stream = $storage->read($backup_info['file_name']);
$fp = fopen($temp_file_name, 'w+b');
stream_copy_to_stream($stream, $fp);

View file

@ -76,13 +76,13 @@ class acp_email
{
// If giving usernames the admin is able to email inactive users too...
$sql_ary = array(
'SELECT' => 'user_id, username, user_email, user_jabber, user_notify_type, user_lang',
'SELECT' => 'user_id, username, user_email, user_lang',
'FROM' => array(
USERS_TABLE => '',
),
'WHERE' => $db->sql_in_set('username_clean', array_map('utf8_clean_string', $usernames)) . '
AND user_allow_massemail = 1',
'ORDER_BY' => 'user_lang, user_notify_type',
'ORDER_BY' => 'user_lang',
);
}
else
@ -90,7 +90,7 @@ class acp_email
if ($group_id)
{
$sql_ary = array(
'SELECT' => 'u.user_id, u.user_email, u.username, u.username_clean, u.user_lang, u.user_jabber, u.user_notify_type',
'SELECT' => 'u.user_id, u.user_email, u.username, u.username_clean, u.user_lang',
'FROM' => array(
USERS_TABLE => 'u',
USER_GROUP_TABLE => 'ug',
@ -100,19 +100,19 @@ class acp_email
AND u.user_id = ug.user_id
AND u.user_allow_massemail = 1
AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')',
'ORDER_BY' => 'u.user_lang, u.user_notify_type',
'ORDER_BY' => 'u.user_lang',
);
}
else
{
$sql_ary = array(
'SELECT' => 'u.user_id, u.username, u.username_clean, u.user_email, u.user_jabber, u.user_lang, u.user_notify_type',
'SELECT' => 'u.user_id, u.username, u.username_clean, u.user_email, u.user_lang',
'FROM' => array(
USERS_TABLE => 'u',
),
'WHERE' => 'u.user_allow_massemail = 1
AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')',
'ORDER_BY' => 'u.user_lang, u.user_notify_type',
'ORDER_BY' => 'u.user_lang',
);
}
}
@ -154,15 +154,12 @@ class acp_email
$max_chunk_size = (int) $config['email_max_chunk_size'];
$email_list = array();
$old_lang = $rows[0]['user_lang'];
$old_notify_type = $rows[0]['user_notify_type'];
foreach ($rows as $row)
{
if (($row['user_notify_type'] == messenger_interface::NOTIFY_EMAIL && $row['user_email']) ||
($row['user_notify_type'] == messenger_interface::NOTIFY_IM && $row['user_jabber']) ||
($row['user_notify_type'] == messenger_interface::NOTIFY_BOTH && ($row['user_email'] || $row['user_jabber'])))
if ($row['user_email'])
{
if ($i == $max_chunk_size || $row['user_lang'] != $old_lang || $row['user_notify_type'] != $old_notify_type)
if ($i == $max_chunk_size || $row['user_lang'] != $old_lang)
{
$i = 0;
@ -172,14 +169,11 @@ class acp_email
}
$old_lang = $row['user_lang'];
$old_notify_type = $row['user_notify_type'];
}
$email_list[$j][$i]['lang'] = $row['user_lang'];
$email_list[$j][$i]['method'] = $row['user_notify_type'];
$email_list[$j][$i]['email'] = $row['user_email'];
$email_list[$j][$i]['name'] = $row['username'];
$email_list[$j][$i]['jabber'] = $row['user_jabber'];
$i++;
}
}
@ -219,65 +213,41 @@ class acp_email
);
extract($phpbb_dispatcher->trigger_event('core.acp_email_send_before', compact($vars)));
/** @var \phpbb\di\service_collection */
$messenger = $phpbb_container->get('messenger.method_collection');
$messenger_collection_iterator = $messenger->getIterator();
/** @var \phpbb\di\service_collection $messenger_collection */
$messenger_collection = $phpbb_container->get('messenger.method_collection');
/** @var \phpbb\messenger\method\messenger_interface $messenger_method */
$messenger_method = $messenger_collection->offsetGet('messenger.method.email');
for ($i = 0, $size = count($email_list); $i < $size; $i++)
{
$used_lang = $email_list[$i][0]['lang'];
$used_method = $email_list[$i][0]['method'];
foreach ($messenger_collection_iterator as $messenger_method)
$messenger_method->set_use_queue($use_queue);
$messenger_method->template($email_template, $used_lang);
$messenger_method->subject(html_entity_decode($subject, ENT_COMPAT));
$messenger_method->assign_vars($template_data);
for ($j = 0, $list_size = count($email_list[$i]); $j < $list_size; $j++)
{
$notify_method = $messenger_method->get_id();
if ($notify_method == $used_method || $used_method == messenger_interface::NOTIFY_BOTH)
$email_row = $email_list[$i][$j];
if (count($email_list[$i]) == 1)
{
$messenger_method->set_use_queue($use_queue);
$messenger_method->template($email_template, $used_lang);
$messenger_method->subject(html_entity_decode($subject, ENT_COMPAT));
$messenger_method->assign_vars($template_data);
if ($notify_method == messenger_interface::NOTIFY_EMAIL)
{
for ($j = 0, $list_size = count($email_list[$i]); $j < $list_size; $j++)
{
$email_row = $email_list[$i][$j];
if (count($email_list[$i]) == 1)
{
$messenger_method->to($email_row['email'], $email_row['name']);
}
else
{
$messenger_method->bcc($email_row['email'], $email_row['name']);
}
}
$messenger_method->anti_abuse_headers($config, $user);
$messenger_method->set_mail_priority($priority);
}
else if ($notify_method == messenger_interface::NOTIFY_IM)
{
for ($j = 0, $list_size = count($email_list[$i]); $j < $list_size; $j++)
{
$email_row = $email_list[$i][$j];
$messenger_method->to($email_row['jabber'], $email_row['name']);
}
}
$errored = !$messenger_method->send() || $errored;
$messenger_method->to($email_row['email'], $email_row['name']);
}
else
{
$messenger_method->bcc($email_row['email'], $email_row['name']);
}
}
$messenger_method->anti_abuse_headers($config, $user);
$messenger_method->set_mail_priority($priority);
$errored = !$messenger_method->send() || $errored;
$messenger_method->save_queue();
}
unset($email_list);
if ($use_queue)
{
foreach ($messenger_collection_iterator as $messenger_method)
{
$messenger_method->save_queue();
}
}
if ($generate_log_entry)
{
if (!empty($usernames))

View file

@ -12,6 +12,7 @@
*/
use phpbb\exception\exception_interface;
use phpbb\exception\runtime_exception;
use phpbb\exception\version_check_exception;
/**
@ -388,7 +389,7 @@ class acp_extensions
$this->template->assign_block_vars('updates_available', $updates_available);
}
catch (exception_interface $e)
catch (runtime_exception $e)
{
$message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
@ -797,7 +798,7 @@ class acp_extensions
$enabled_extension_meta_data[$name]['S_VERSIONCHECK'] = true;
$enabled_extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = $this->u_action . '&amp;action=details&amp;versioncheck_force=1&amp;ext_name=' . urlencode($md_manager->get_metadata('name'));
}
catch (exception_interface $e)
catch (runtime_exception $e)
{
// Ignore exceptions due to the version check
}
@ -807,7 +808,7 @@ class acp_extensions
$enabled_extension_meta_data[$name]['S_VERSIONCHECK'] = false;
}
}
catch (exception_interface $e)
catch (runtime_exception $e)
{
$message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
$this->template->assign_block_vars('disabled', array(
@ -887,7 +888,7 @@ class acp_extensions
{
$disabled_extension_meta_data[$name]['S_VERSIONCHECK'] = false;
}
catch (exception_interface $e)
catch (runtime_exception $e)
{
$message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
$this->template->assign_block_vars('disabled', array(
@ -969,7 +970,7 @@ class acp_extensions
{
$available_extension_meta_data[$name]['S_VERSIONCHECK'] = false;
}
catch (exception_interface $e)
catch (runtime_exception $e)
{
$message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
$this->template->assign_block_vars('not_installed', array(

View file

@ -2048,7 +2048,7 @@ class acp_forums
$config->set('num_files', (int) $row['stat'], false);
$sql = 'SELECT SUM(filesize) as stat
$sql = 'SELECT SUM(' . $db->cast_expr_to_bigint('filesize') . ') as stat
FROM ' . ATTACHMENTS_TABLE;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);

View file

@ -185,7 +185,7 @@ class acp_inactive
trigger_error($user->lang['EMAIL_DISABLED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type, user_regdate, user_actkey
$sql = 'SELECT user_id, username, user_email, user_lang, user_regdate, user_actkey
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('user_id', $mark) . '
AND user_inactive_reason';
@ -194,9 +194,10 @@ class acp_inactive
$result = $db->sql_query($sql);
/** @var \phpbb\di\service_collection */
$messenger = $phpbb_container->get('messenger.method_collection');
$messenger_collection_iterator = $messenger->getIterator();
/** @var \phpbb\di\service_collection $messenger_collection */
$messenger_collection = $phpbb_container->get('messenger.method_collection');
/** @var \phpbb\messenger\method\messenger_interface $messenger_method */
$messenger_method = $messenger_collection->offsetGet('messenger.method.email');
if ($row = $db->sql_fetchrow($result))
{
@ -205,33 +206,23 @@ class acp_inactive
do
{
foreach ($messenger_collection_iterator as $messenger_method)
{
if ($messenger_method->get_id() == $user_row['user_notify_type'] || $user_row['user_notify_type'] == $messenger_method::NOTIFY_BOTH)
{
$messenger_method->template('user_remind_inactive', $row['user_lang']);
$messenger_method->set_addresses($row);
$messenger_method->anti_abuse_headers($config, $user);
$messenger_method->assign_vars([
'USERNAME' => html_entity_decode($row['username'], ENT_COMPAT),
'REGISTER_DATE' => $user->format_date($row['user_regdate'], false, true),
'U_ACTIVATE' => generate_board_url() . "/ucp.$phpEx?mode=activate&u=" . $row['user_id'] . '&k=' . $row['user_actkey'],
]);
$messenger_method->template('user_remind_inactive', $row['user_lang']);
$messenger_method->set_addresses($row);
$messenger_method->anti_abuse_headers($config, $user);
$messenger_method->assign_vars([
'USERNAME' => html_entity_decode($row['username'], ENT_COMPAT),
'REGISTER_DATE' => $user->format_date($row['user_regdate'], false, true),
'U_ACTIVATE' => generate_board_url() . "/ucp.$phpEx?mode=activate&u=" . $row['user_id'] . '&k=' . $row['user_actkey'],
]);
$messenger_method->send();
}
}
$messenger_method->send();
$messenger_method->save_queue();
$usernames[] = $row['username'];
$user_ids[] = (int) $row['user_id'];
}
while ($row = $db->sql_fetchrow($result));
foreach ($messenger_collection_iterator as $messenger_method)
{
$messenger_method->save_queue();
}
// Add the remind state to the database and increase activation expiration by one day
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_reminded = user_reminded + 1,

View file

@ -1,139 +0,0 @@
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
/**
* @todo Check/enter/update transport info
*/
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
class acp_jabber
{
var $u_action;
function main($id, $mode)
{
global $db, $user, $template, $phpbb_log, $request;
global $config, $phpbb_container, $phpbb_root_path, $phpEx;
$jabber = $phpbb_container->get('messenger.method.jabber');
$user->add_lang('acp/board');
$submit = (isset($_POST['submit'])) ? true : false;
if ($mode != 'settings')
{
return;
}
$this->tpl_name = 'acp_jabber';
$this->page_title = 'ACP_JABBER_SETTINGS';
$jab_enable = $request->variable('jab_enable', (bool) $config['jab_enable']);
$jab_host = $request->variable('jab_host', (string) $config['jab_host']);
$jab_port = $request->variable('jab_port', (int) $config['jab_port']);
$jab_username = $request->variable('jab_username', (string) $config['jab_username']);
$jab_password = $request->variable('jab_password', (string) $config['jab_password']);
$jab_package_size = $request->variable('jab_package_size', (int) $config['jab_package_size']);
$jab_use_ssl = $request->variable('jab_use_ssl', (bool) $config['jab_use_ssl']);
$jab_verify_peer = $request->variable('jab_verify_peer', (bool) $config['jab_verify_peer']);
$jab_verify_peer_name = $request->variable('jab_verify_peer_name', (bool) $config['jab_verify_peer_name']);
$jab_allow_self_signed = $request->variable('jab_allow_self_signed', (bool) $config['jab_allow_self_signed']);
$form_name = 'acp_jabber';
add_form_key($form_name);
if ($submit)
{
if (!check_form_key($form_name))
{
trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
}
$message = $user->lang['JAB_SETTINGS_CHANGED'];
$log = 'JAB_SETTINGS_CHANGED';
// Is this feature enabled? Then try to establish a connection
if ($jabber->is_enabled())
{
if (!$jabber->connect())
{
trigger_error($user->lang['ERR_JAB_CONNECT'] . '<br /><br />' . $jabber->get_log() . adm_back_link($this->u_action), E_USER_WARNING);
}
// We'll try to authorise using this account
if (!$jabber->login())
{
trigger_error($user->lang['ERR_JAB_AUTH'] . '<br /><br />' . $jabber->get_log() . adm_back_link($this->u_action), E_USER_WARNING);
}
$jabber->disconnect();
}
else
{
// This feature is disabled.
// We update the user table to be sure all users that have IM as notify type are set to both as notify type
// We set this to both because users still have their jabber address entered and may want to receive jabber notifications again once it is re-enabled.
$sql_ary = array(
'user_notify_type' => $jabber::NOTIFY_BOTH,
);
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE user_notify_type = ' . $jabber::NOTIFY_IM;
$db->sql_query($sql);
}
$config->set('jab_enable', $jab_enable);
$config->set('jab_host', $jab_host);
$config->set('jab_port', $jab_port);
$config->set('jab_username', $jab_username);
if ($jab_password !== '********')
{
$config->set('jab_password', $jab_password);
}
$config->set('jab_package_size', $jab_package_size);
$config->set('jab_use_ssl', $jab_use_ssl);
$config->set('jab_verify_peer', $jab_verify_peer);
$config->set('jab_verify_peer_name', $jab_verify_peer_name);
$config->set('jab_allow_self_signed', $jab_allow_self_signed);
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_' . $log);
trigger_error($message . adm_back_link($this->u_action));
}
$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'JAB_ENABLE' => $jab_enable,
'L_JAB_SERVER_EXPLAIN' => sprintf($user->lang['JAB_SERVER_EXPLAIN'], '<a href="http://www.jabber.org/">', '</a>'),
'JAB_HOST' => $jab_host,
'JAB_PORT' => ($jab_port) ? $jab_port : '',
'JAB_USERNAME' => $jab_username,
'JAB_PASSWORD' => $jab_password !== '' ? '********' : '',
'JAB_PACKAGE_SIZE' => $jab_package_size,
'JAB_USE_SSL' => $jab_use_ssl,
'JAB_VERIFY_PEER' => $jab_verify_peer,
'JAB_VERIFY_PEER_NAME' => $jab_verify_peer_name,
'JAB_ALLOW_SELF_SIGNED' => $jab_allow_self_signed,
'S_CAN_USE_SSL' => $jabber::can_use_ssl(),
'S_GTALK_NOTE' => (!@function_exists('dns_get_record')) ? true : false,
));
}
}

View file

@ -107,6 +107,20 @@ class acp_main
default:
$confirm = true;
$confirm_lang = 'CONFIRM_OPERATION';
/**
* Event to add confirm box for custom ACP quick actions
*
* @event core.acp_main_add_actions_confirm
* @var string id The module ID
* @var string mode The module mode
* @var string action Custom action type name
* @var boolean confirm Do we display the confirm box to run the custom action
* @var string confirm_lang Lang var name to display in confirm box
* @since 3.3.15-RC1
*/
$vars = ['id', 'mode', 'action', 'confirm', 'confirm_lang'];
extract($phpbb_dispatcher->trigger_event('core.acp_main_add_actions_confirm', compact($vars)));
}
if ($confirm)
@ -175,7 +189,7 @@ class acp_main
$config->set('num_files', (int) $db->sql_fetchfield('stat'), false);
$db->sql_freeresult($result);
$sql = 'SELECT SUM(filesize) as stat
$sql = 'SELECT SUM(' . $db->cast_expr_to_bigint('filesize') . ') as stat
FROM ' . ATTACHMENTS_TABLE . '
WHERE is_orphan = 0';
$result = $db->sql_query($sql);
@ -414,6 +428,19 @@ class acp_main
trigger_error('PURGE_SESSIONS_SUCCESS');
}
break;
default:
/**
* Event to add custom ACP quick actions
*
* @event core.acp_main_add_actions
* @var string id The module ID
* @var string mode The module mode
* @var string action Custom action type name
* @since 3.3.15-RC1
*/
$vars = ['id', 'mode', 'action'];
extract($phpbb_dispatcher->trigger_event('core.acp_main_add_actions', compact($vars)));
}
}
}
@ -449,7 +476,7 @@ class acp_main
'UPGRADE_INSTRUCTIONS' => !empty($upgrades_available) ? $user->lang('UPGRADE_INSTRUCTIONS', $upgrades_available['current'], $upgrades_available['announcement']) : false,
));
}
catch (\RuntimeException $e)
catch (\phpbb\exception\runtime_exception $e)
{
$message = call_user_func_array(array($user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
$template->assign_vars(array(
@ -496,7 +523,7 @@ class acp_main
$upload_dir_size = get_formatted_filesize($config['upload_dir_size']);
$storage_avatar = $phpbb_container->get('storage.avatar');
$avatar_dir_size = get_formatted_filesize($storage_avatar->get_size());
$avatar_dir_size = get_formatted_filesize($storage_avatar->total_size());
if ($posts_per_day > $total_posts)
{

View file

@ -475,6 +475,41 @@ class acp_profile
$cp->vars[$key] = $var;
}
// step 3 - all arrays
if ($action == 'edit')
{
// Get language entries
$sql = 'SELECT *
FROM ' . PROFILE_FIELDS_LANG_TABLE . '
WHERE lang_id <> ' . $this->edit_lang_id . "
AND field_id = $field_id
ORDER BY option_id ASC";
$result = $db->sql_query($sql);
$l_lang_options = [];
while ($row = $db->sql_fetchrow($result))
{
$l_lang_options[$row['lang_id']][$row['option_id']] = $row['lang_value'];
}
$db->sql_freeresult($result);
$sql = 'SELECT lang_id, lang_name, lang_explain, lang_default_value
FROM ' . PROFILE_LANG_TABLE . '
WHERE lang_id <> ' . $this->edit_lang_id . "
AND field_id = $field_id
ORDER BY lang_id ASC";
$result = $db->sql_query($sql);
$l_lang_name = $l_lang_explain = $l_lang_default_value = [];
while ($row = $db->sql_fetchrow($result))
{
$l_lang_name[$row['lang_id']] = $row['lang_name'];
$l_lang_explain[$row['lang_id']] = $row['lang_explain'];
$l_lang_default_value[$row['lang_id']] = $row['lang_default_value'];
}
$db->sql_freeresult($result);
}
foreach ($exclude[3] as $key)
{
$cp->vars[$key] = $request->variable($key, array(0 => ''), true);

View file

@ -378,7 +378,6 @@ class acp_storage
foreach ($this->storage_collection as $storage)
{
$storage_name = $storage->get_name();
$options = $this->storage_helper->get_provider_options($this->storage_helper->get_current_provider($storage_name));
$modified = false;
@ -389,6 +388,8 @@ class acp_storage
}
else
{
$options = $this->storage_helper->get_provider_options($this->storage_helper->get_current_provider($storage_name));
// Check if options have been modified
foreach (array_keys($options) as $definition)
{
@ -431,8 +432,8 @@ class acp_storage
$storage_stats[] = [
'name' => $this->lang->lang('STORAGE_' . strtoupper($storage->get_name()) . '_TITLE'),
'files' => $storage->get_num_files(),
'size' => get_formatted_filesize($storage->get_size()),
'files' => $storage->total_files(),
'size' => get_formatted_filesize($storage->total_size()),
'free_space' => $free_space,
];
}
@ -535,30 +536,29 @@ class acp_storage
$this->validate_path($storage_name, $messages);
// Check options
$new_options = $this->storage_helper->get_provider_options($this->request->variable([$storage_name, 'provider'], ''));
$new_provider = $this->provider_collection->get_by_class($this->request->variable([$storage_name, 'provider'], ''));
foreach ($new_options as $definition_key => $definition_value)
foreach ($new_provider->get_options() as $definition_key => $definition_value)
{
$provider = $this->provider_collection->get_by_class($this->request->variable([$storage_name, 'provider'], ''));
$definition_title = $this->lang->lang('STORAGE_ADAPTER_' . strtoupper($provider->get_name()) . '_OPTION_' . strtoupper($definition_key));
$definition_title = $definition_value['title'];
$value = $this->request->variable([$storage_name, $definition_key], '');
switch ($definition_value['tag'])
switch ($definition_value['form_macro']['tag'])
{
case 'text':
if ($definition_value['type'] == 'email' && filter_var($value, FILTER_VALIDATE_EMAIL))
if ($definition_value['form_macro']['type'] === 'email' && filter_var($value, FILTER_VALIDATE_EMAIL))
{
$messages[] = $this->lang->lang('STORAGE_FORM_TYPE_EMAIL_INCORRECT_FORMAT', $definition_title, $storage_title);
}
$maxlength = $definition_value['max'] ?? 255;
$maxlength = $definition_value['form_macro']['max'] ?? 255;
if (strlen($value) > $maxlength)
{
$messages[] = $this->lang->lang('STORAGE_FORM_TYPE_TEXT_TOO_LONG', $definition_title, $storage_title);
}
if ($provider->get_name() == 'local' && $definition_key == 'path')
if ($new_provider->get_name() === 'local' && $definition_key === 'path')
{
$path = $value;
@ -575,7 +575,7 @@ class acp_storage
case 'radio':
$found = false;
foreach ($definition_value['buttons'] as $button)
foreach ($definition_value['form_macro']['buttons'] as $button)
{
if ($button['value'] == $value)
{
@ -592,7 +592,7 @@ class acp_storage
case 'select':
$found = false;
foreach ($definition_value['options'] as $option)
foreach ($definition_value['form_macro']['options'] as $option)
{
if ($option['value'] == $value)
{
@ -619,10 +619,18 @@ class acp_storage
*/
protected function validate_path(string $storage_name, array &$messages) : void
{
$current_provider = $this->storage_helper->get_current_provider($storage_name);
$options = $this->storage_helper->get_provider_options($current_provider);
if ($this->request->is_set_post('submit'))
{
$provider = $this->request->variable([$storage_name, 'provider'], '');
}
else
{
$provider = $this->storage_helper->get_current_provider($storage_name);
}
if ($this->provider_collection->get_by_class($current_provider)->get_name() == 'local' && isset($options['path']))
$options = $this->storage_helper->get_provider_options($provider);
if ($this->provider_collection->get_by_class($provider)->get_name() === 'local' && isset($options['path']))
{
$path = $this->request->is_set_post('submit') ? $this->request->variable([$storage_name, 'path'], '') : $this->storage_helper->get_current_definition($storage_name, 'path');

View file

@ -38,12 +38,32 @@ class acp_update
try
{
$recheck = $request->variable('versioncheck_force', false);
$do_update = $request->variable('do_update', false);
$updates_available = $version_helper->get_update_on_branch($recheck);
$upgrades_available = $version_helper->get_suggested_updates();
$branch = '';
if (!empty($upgrades_available))
{
$branch = array_key_last($upgrades_available);
$upgrades_available = array_pop($upgrades_available);
}
if ($do_update && !empty($updates_available))
{
$updater = $phpbb_container->get('updater.controller');
$current_version = $config['version'];
$new_version = $upgrades_available['current'];
$download_url = 'https://download.phpbb.com/pub/release/';
$download_url .= $branch . '/' . $new_version . '/';
$download_url .= 'phpBB-' . $current_version . '_to_' . $new_version . '.zip';
$data = $updater->handle(
$download_url
);
$response = new \phpbb\json_response();
$response->send($data);
}
}
catch (\RuntimeException $e)
{

View file

@ -1426,7 +1426,6 @@ class acp_users
$user_row['iso_lang_id'] = $row['lang_id'];
$data = array(
'jabber' => $request->variable('jabber', $user_row['user_jabber'], true),
'bday_day' => 0,
'bday_month' => 0,
'bday_year' => 0,
@ -1458,9 +1457,6 @@ class acp_users
if ($submit)
{
$error = validate_data($data, array(
'jabber' => array(
array('string', true, 5, 255),
array('jabber')),
'bday_day' => array('num', true, 1, 31),
'bday_month' => array('num', true, 1, 12),
'bday_year' => array('num', true, 1901, gmdate('Y', time())),
@ -1496,7 +1492,6 @@ class acp_users
if (!count($error))
{
$sql_ary = array(
'user_jabber' => $data['jabber'],
'user_birthday' => $data['user_birthday'],
);
@ -1553,7 +1548,6 @@ class acp_users
unset($now);
$template->assign_vars(array(
'JABBER' => $data['jabber'],
'S_BIRTHDAY_DAY_OPTIONS' => $s_birthday_day_options,
'S_BIRTHDAY_MONTH_OPTIONS' => $s_birthday_month_options,
'S_BIRTHDAY_YEAR_OPTIONS' => $s_birthday_year_options,
@ -1583,7 +1577,6 @@ class acp_users
'viewemail' => $request->variable('viewemail', $user_row['user_allow_viewemail']),
'massemail' => $request->variable('massemail', $user_row['user_allow_massemail']),
'hideonline' => $request->variable('hideonline', !$user_row['user_allow_viewonline']),
'notifymethod' => $request->variable('notifymethod', $user_row['user_notify_type']),
'notifypm' => $request->variable('notifypm', $user_row['user_notify_pm']),
'allowpm' => $request->variable('allowpm', $user_row['user_allow_pm']),
@ -1654,7 +1647,6 @@ class acp_users
'user_allow_viewemail' => $data['viewemail'],
'user_allow_massemail' => $data['massemail'],
'user_allow_viewonline' => !$data['hideonline'],
'user_notify_type' => $data['notifymethod'],
'user_notify_pm' => $data['notifypm'],
'user_dateformat' => $data['dateformat'],
@ -1787,15 +1779,11 @@ class acp_users
$user_prefs_data = array(
'S_PREFS' => true,
'S_JABBER_DISABLED' => ($config['jab_enable'] && $user_row['user_jabber'] && @extension_loaded('xml')) ? false : true,
'VIEW_EMAIL' => $data['viewemail'],
'MASS_EMAIL' => $data['massemail'],
'ALLOW_PM' => $data['allowpm'],
'HIDE_ONLINE' => $data['hideonline'],
'NOTIFY_EMAIL' => ($data['notifymethod'] == messenger_interface::NOTIFY_EMAIL) ? true : false,
'NOTIFY_IM' => ($data['notifymethod'] == messenger_interface::NOTIFY_IM) ? true : false,
'NOTIFY_BOTH' => ($data['notifymethod'] == messenger_interface::NOTIFY_BOTH) ? true : false,
'NOTIFY_PM' => $data['notifypm'],
'BBCODE' => $data['bbcode'],
'SMILIES' => $data['smilies'],

View file

@ -1,34 +0,0 @@
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
class acp_jabber_info
{
function module()
{
return array(
'filename' => 'acp_jabber',
'title' => 'ACP_JABBER_SETTINGS',
'modes' => array(
'settings' => array('title' => 'ACP_JABBER_SETTINGS', 'auth' => 'acl_a_jabber', 'cat' => array('ACP_CLIENT_COMMUNICATION')),
),
);
}
function install()
{
}
function uninstall()
{
}
}

View file

@ -119,14 +119,6 @@ define('POST_STICKY', 1);
define('POST_ANNOUNCE', 2);
define('POST_GLOBAL', 3);
// Notify methods
/** @deprecated 4.0.0-a1 Replaced by \phpbb\messenger\method\messenger_interface::NOTIFY_EMAIL, to be removed in 5.0.0-a1 */
define('NOTIFY_EMAIL', 0);
/** @deprecated 4.0.0-a1 Replaced by \phpbb\messenger\method\messenger_interface::NOTIFY_IM, to be removed in 5.0.0-a1 */
define('NOTIFY_IM', 1);
/** @deprecated 4.0.0-a1 Replaced by \phpbb\messenger\method\messenger_interface::NOTIFY_BOTH, to be removed in 5.0.0-a1 */
define('NOTIFY_BOTH', 2);
// Notify status
define('NOTIFY_YES', 0);
define('NOTIFY_NO', 1);

View file

@ -130,7 +130,7 @@ function phpbb_gmgetdate($time = false)
*
* @return array|string data array if $string_only is false
*/
function get_formatted_filesize($value, bool $string_only = true, array $allowed_units = null)
function get_formatted_filesize($value, bool $string_only = true, array|null $allowed_units = null)
{
global $user;
@ -253,7 +253,7 @@ function still_on_time($extra_time = 15)
* @return mixed Boolean (true, false) if comparison operator is specified.
* Integer (-1, 0, 1) otherwise.
*/
function phpbb_version_compare(string $version1, string $version2, string $operator = null)
function phpbb_version_compare(string $version1, string $version2, string|null $operator = null)
{
$version1 = strtolower($version1);
$version2 = strtolower($version2);
@ -3806,6 +3806,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
$template->assign_vars(array(
'SITENAME' => $config['sitename'],
'SITE_DESCRIPTION' => $config['site_desc'],
'SITE_SHORTNAME' => (!empty($config['sitename_short'])) ? $config['sitename_short'] : utf8_substr($config['sitename'], 0, 12),
'PAGE_TITLE' => $page_title,
'SCRIPT_NAME' => str_replace('.' . $phpEx, '', $user->page['page_name']),
'LAST_VISIT_DATE' => sprintf($user->lang['YOU_LAST_VISIT'], $s_last_visit),

View file

@ -215,7 +215,7 @@ function adm_back_link($u_action)
*
* @return array
*/
function build_select(array $options_ary, int|string|bool $option_default = false): array
function build_select(array $options_ary, bool|int|string $option_default = false): array
{
global $language;

View file

@ -1845,7 +1845,7 @@ function update_dynamic_config()
$config->set('num_files', (int) $db->sql_fetchfield('stat'), false);
$db->sql_freeresult($result);
$sql = 'SELECT SUM(filesize) as stat
$sql = 'SELECT SUM(' . $db->cast_expr_to_bigint('filesize') . ') as stat
FROM ' . ATTACHMENTS_TABLE . '
WHERE is_orphan = 0';
$result = $db->sql_query($sql);

View file

@ -1081,7 +1081,7 @@ function display_custom_bbcodes()
$num_predefined_bbcodes = NUM_PREDEFINED_BBCODES;
$sql_ary = [
'SELECT' => 'b.bbcode_id, b.bbcode_tag, b.bbcode_helpline, b.bbcode_match',
'SELECT' => 'b.bbcode_id, b.bbcode_tag, b.bbcode_helpline, b.bbcode_font_icon, b.bbcode_match',
'FROM' => [BBCODES_TABLE => 'b'],
'WHERE' => 'b.display_on_posting = 1',
'ORDER_BY' => 'b.bbcode_tag',
@ -1124,6 +1124,7 @@ function display_custom_bbcodes()
'BBCODE_TAG' => $row['bbcode_tag'],
'BBCODE_TAG_CLEAN' => str_replace('=', '-', $row['bbcode_tag']),
'BBCODE_HELPLINE' => $row['bbcode_helpline'],
'BBCODE_FONT_ICON' => $row['bbcode_font_icon'],
];
/**
@ -1680,7 +1681,6 @@ function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabl
'S_ONLINE' => ($config['load_onlinetrack'] && $online) ? true : false,
'RANK_IMG' => $user_rank_data['img'],
'RANK_IMG_SRC' => $user_rank_data['img_src'],
'S_JABBER_ENABLED' => ($config['jab_enable']) ? true : false,
'S_WARNINGS' => ($auth->acl_getf_global('m_') || $auth->acl_get('m_warn')) ? true : false,
@ -1689,10 +1689,6 @@ function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabl
'U_WARN' => ($warn_user_enabled && $auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $user_id) : '',
'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && $can_receive_pm) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;u=' . $user_id) : '',
'U_EMAIL' => $email,
'U_JABBER' => ($data['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=jabber&amp;u=' . $user_id) : '',
'USER_JABBER' => ($config['jab_enable'] && $auth->acl_get('u_sendim')) ? $data['user_jabber'] : '',
'USER_JABBER_IMG' => ($config['jab_enable'] && $auth->acl_get('u_sendim') && $data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '',
'L_SEND_EMAIL_USER' => $user->lang('SEND_EMAIL_USER', $username),
'L_CONTACT_USER' => $user->lang('CONTACT_USER', $username),

View file

@ -2381,7 +2381,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
VALUES (' . $user->data['user_id'] . ', ' . $data_ary['topic_id'] . ')';
$db->sql_query($sql);
}
else if (($config['email_enable'] || $config['jab_enable']) && $data_ary['notify_set'] && !$data_ary['notify'])
else if ($config['email_enable'] && $data_ary['notify_set'] && !$data_ary['notify'])
{
$sql = 'DELETE FROM ' . TOPICS_WATCH_TABLE . '
WHERE user_id = ' . $user->data['user_id'] . '

View file

@ -246,7 +246,6 @@ function user_add($user_row, $cp_data = false, $notifications_data = null)
'user_notify' => 0,
'user_notify_pm' => 1,
'user_notify_type' => messenger_interface::NOTIFY_EMAIL,
'user_allow_pm' => 1,
'user_allow_viewonline' => 1,
'user_allow_viewemail' => 1,
@ -1514,208 +1513,6 @@ function validate_user_email($email, $allowed_email = false)
return false;
}
/**
* Validate jabber address
* Taken from the jabber class within flyspray (see author notes)
*
* @author flyspray.org
*/
function validate_jabber($jid)
{
if (!$jid)
{
return false;
}
$separator_pos = strpos($jid, '@');
if ($separator_pos === false)
{
return 'WRONG_DATA';
}
$username = substr($jid, 0, $separator_pos);
$realm = substr($jid, $separator_pos + 1);
if (strlen($username) == 0 || strlen($realm) < 3)
{
return 'WRONG_DATA';
}
$arr = explode('.', $realm);
if (count($arr) == 0)
{
return 'WRONG_DATA';
}
foreach ($arr as $part)
{
if (substr($part, 0, 1) == '-' || substr($part, -1, 1) == '-')
{
return 'WRONG_DATA';
}
if (!preg_match("@^[a-zA-Z0-9-.]+$@", $part))
{
return 'WRONG_DATA';
}
}
$boundary = array(array(0, 127), array(192, 223), array(224, 239), array(240, 247), array(248, 251), array(252, 253));
// Prohibited Characters RFC3454 + RFC3920
$prohibited = array(
// Table C.1.1
array(0x0020, 0x0020), // SPACE
// Table C.1.2
array(0x00A0, 0x00A0), // NO-BREAK SPACE
array(0x1680, 0x1680), // OGHAM SPACE MARK
array(0x2000, 0x2001), // EN QUAD
array(0x2001, 0x2001), // EM QUAD
array(0x2002, 0x2002), // EN SPACE
array(0x2003, 0x2003), // EM SPACE
array(0x2004, 0x2004), // THREE-PER-EM SPACE
array(0x2005, 0x2005), // FOUR-PER-EM SPACE
array(0x2006, 0x2006), // SIX-PER-EM SPACE
array(0x2007, 0x2007), // FIGURE SPACE
array(0x2008, 0x2008), // PUNCTUATION SPACE
array(0x2009, 0x2009), // THIN SPACE
array(0x200A, 0x200A), // HAIR SPACE
array(0x200B, 0x200B), // ZERO WIDTH SPACE
array(0x202F, 0x202F), // NARROW NO-BREAK SPACE
array(0x205F, 0x205F), // MEDIUM MATHEMATICAL SPACE
array(0x3000, 0x3000), // IDEOGRAPHIC SPACE
// Table C.2.1
array(0x0000, 0x001F), // [CONTROL CHARACTERS]
array(0x007F, 0x007F), // DELETE
// Table C.2.2
array(0x0080, 0x009F), // [CONTROL CHARACTERS]
array(0x06DD, 0x06DD), // ARABIC END OF AYAH
array(0x070F, 0x070F), // SYRIAC ABBREVIATION MARK
array(0x180E, 0x180E), // MONGOLIAN VOWEL SEPARATOR
array(0x200C, 0x200C), // ZERO WIDTH NON-JOINER
array(0x200D, 0x200D), // ZERO WIDTH JOINER
array(0x2028, 0x2028), // LINE SEPARATOR
array(0x2029, 0x2029), // PARAGRAPH SEPARATOR
array(0x2060, 0x2060), // WORD JOINER
array(0x2061, 0x2061), // FUNCTION APPLICATION
array(0x2062, 0x2062), // INVISIBLE TIMES
array(0x2063, 0x2063), // INVISIBLE SEPARATOR
array(0x206A, 0x206F), // [CONTROL CHARACTERS]
array(0xFEFF, 0xFEFF), // ZERO WIDTH NO-BREAK SPACE
array(0xFFF9, 0xFFFC), // [CONTROL CHARACTERS]
array(0x1D173, 0x1D17A), // [MUSICAL CONTROL CHARACTERS]
// Table C.3
array(0xE000, 0xF8FF), // [PRIVATE USE, PLANE 0]
array(0xF0000, 0xFFFFD), // [PRIVATE USE, PLANE 15]
array(0x100000, 0x10FFFD), // [PRIVATE USE, PLANE 16]
// Table C.4
array(0xFDD0, 0xFDEF), // [NONCHARACTER CODE POINTS]
array(0xFFFE, 0xFFFF), // [NONCHARACTER CODE POINTS]
array(0x1FFFE, 0x1FFFF), // [NONCHARACTER CODE POINTS]
array(0x2FFFE, 0x2FFFF), // [NONCHARACTER CODE POINTS]
array(0x3FFFE, 0x3FFFF), // [NONCHARACTER CODE POINTS]
array(0x4FFFE, 0x4FFFF), // [NONCHARACTER CODE POINTS]
array(0x5FFFE, 0x5FFFF), // [NONCHARACTER CODE POINTS]
array(0x6FFFE, 0x6FFFF), // [NONCHARACTER CODE POINTS]
array(0x7FFFE, 0x7FFFF), // [NONCHARACTER CODE POINTS]
array(0x8FFFE, 0x8FFFF), // [NONCHARACTER CODE POINTS]
array(0x9FFFE, 0x9FFFF), // [NONCHARACTER CODE POINTS]
array(0xAFFFE, 0xAFFFF), // [NONCHARACTER CODE POINTS]
array(0xBFFFE, 0xBFFFF), // [NONCHARACTER CODE POINTS]
array(0xCFFFE, 0xCFFFF), // [NONCHARACTER CODE POINTS]
array(0xDFFFE, 0xDFFFF), // [NONCHARACTER CODE POINTS]
array(0xEFFFE, 0xEFFFF), // [NONCHARACTER CODE POINTS]
array(0xFFFFE, 0xFFFFF), // [NONCHARACTER CODE POINTS]
array(0x10FFFE, 0x10FFFF), // [NONCHARACTER CODE POINTS]
// Table C.5
array(0xD800, 0xDFFF), // [SURROGATE CODES]
// Table C.6
array(0xFFF9, 0xFFF9), // INTERLINEAR ANNOTATION ANCHOR
array(0xFFFA, 0xFFFA), // INTERLINEAR ANNOTATION SEPARATOR
array(0xFFFB, 0xFFFB), // INTERLINEAR ANNOTATION TERMINATOR
array(0xFFFC, 0xFFFC), // OBJECT REPLACEMENT CHARACTER
array(0xFFFD, 0xFFFD), // REPLACEMENT CHARACTER
// Table C.7
array(0x2FF0, 0x2FFB), // [IDEOGRAPHIC DESCRIPTION CHARACTERS]
// Table C.8
array(0x0340, 0x0340), // COMBINING GRAVE TONE MARK
array(0x0341, 0x0341), // COMBINING ACUTE TONE MARK
array(0x200E, 0x200E), // LEFT-TO-RIGHT MARK
array(0x200F, 0x200F), // RIGHT-TO-LEFT MARK
array(0x202A, 0x202A), // LEFT-TO-RIGHT EMBEDDING
array(0x202B, 0x202B), // RIGHT-TO-LEFT EMBEDDING
array(0x202C, 0x202C), // POP DIRECTIONAL FORMATTING
array(0x202D, 0x202D), // LEFT-TO-RIGHT OVERRIDE
array(0x202E, 0x202E), // RIGHT-TO-LEFT OVERRIDE
array(0x206A, 0x206A), // INHIBIT SYMMETRIC SWAPPING
array(0x206B, 0x206B), // ACTIVATE SYMMETRIC SWAPPING
array(0x206C, 0x206C), // INHIBIT ARABIC FORM SHAPING
array(0x206D, 0x206D), // ACTIVATE ARABIC FORM SHAPING
array(0x206E, 0x206E), // NATIONAL DIGIT SHAPES
array(0x206F, 0x206F), // NOMINAL DIGIT SHAPES
// Table C.9
array(0xE0001, 0xE0001), // LANGUAGE TAG
array(0xE0020, 0xE007F), // [TAGGING CHARACTERS]
// RFC3920
array(0x22, 0x22), // "
array(0x26, 0x26), // &
array(0x27, 0x27), // '
array(0x2F, 0x2F), // /
array(0x3A, 0x3A), // :
array(0x3C, 0x3C), // <
array(0x3E, 0x3E), // >
array(0x40, 0x40) // @
);
$pos = 0;
$result = true;
while ($pos < strlen($username))
{
$len = $uni = 0;
for ($i = 0; $i <= 5; $i++)
{
if (ord($username[$pos]) >= $boundary[$i][0] && ord($username[$pos]) <= $boundary[$i][1])
{
$len = $i + 1;
$uni = (ord($username[$pos]) - $boundary[$i][0]) * pow(2, $i * 6);
for ($k = 1; $k < $len; $k++)
{
$uni += (ord($username[$pos + $k]) - 128) * pow(2, ($i - $k) * 6);
}
break;
}
}
if ($len == 0)
{
return 'WRONG_DATA';
}
foreach ($prohibited as $pval)
{
if ($uni >= $pval[0] && $uni <= $pval[1])
{
$result = false;
break 2;
}
}
$pos = $pos + $len;
}
if (!$result)
{
return 'WRONG_DATA';
}
return false;
}
/**
* Validate hex colour value
*
@ -2126,7 +1923,8 @@ function group_correct_avatar($group_id, $old_entry)
try
{
$storage->rename($old_filename, $new_filename);
$storage->write($new_filename, $storage->read($old_filename));
$storage->delete($old_filename);
$sql = 'UPDATE ' . GROUPS_TABLE . '
SET group_avatar = \'' . $db->sql_escape($new_entry) . "'
@ -2729,7 +2527,7 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
case 'approve':
// Make sure we only approve those which are pending ;)
$sql = 'SELECT u.user_id, u.user_email, u.username, u.username_clean, u.user_notify_type, u.user_jabber, u.user_lang
$sql = 'SELECT u.user_id
FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . ' ug
WHERE ug.group_id = ' . $group_id . '
AND ug.user_pending = 1

View file

@ -661,7 +661,7 @@ function close_report($report_id_list, $mode, $action, $pm = false)
{
$post_info = ($pm) ? phpbb_get_pm_data($post_id_list) : phpbb_get_post_data($post_id_list, 'm_report');
$sql = "SELECT r.report_id, r.$id_column, r.report_closed, r.user_id, r.user_notify, u.username, u.username_clean, u.user_email, u.user_jabber, u.user_lang, u.user_notify_type
$sql = "SELECT r.report_id, r.$id_column, r.report_closed, r.user_id, r.user_notify, u.username, u.username_clean, u.user_email, u.user_lang
FROM " . REPORTS_TABLE . ' r, ' . USERS_TABLE . ' u
WHERE ' . $db->sql_in_set('r.report_id', $report_id_list) . '
' . (($action == 'close') ? 'AND r.report_closed = 0' : '') . '

View file

@ -366,9 +366,6 @@ class phpbb_questionnaire_phpbb_data_provider
'img_max_width' => true,
'img_min_thumb_filesize' => true,
'ip_check' => true,
'jab_enable' => true,
'jab_package_size' => true,
'jab_use_ssl' => true,
'limit_load' => true,
'limit_search_load' => true,
'load_anon_lastread' => true,

View file

@ -35,7 +35,7 @@ class ucp_activate
$user_id = $request->variable('u', 0);
$key = $request->variable('k', '');
$sql = 'SELECT user_id, username, user_type, user_email, user_newpasswd, user_lang, user_notify_type, user_actkey, user_inactive_reason
$sql = 'SELECT user_id, username, user_type, user_email, user_newpasswd, user_lang, user_actkey, user_inactive_reason
FROM ' . USERS_TABLE . "
WHERE user_id = $user_id";
$result = $db->sql_query($sql);
@ -131,23 +131,20 @@ class ucp_activate
$phpbb_notifications = $phpbb_container->get('notification_manager');
$phpbb_notifications->delete_notifications('notification.type.admin_activate_user', $user_row['user_id']);
$messenger = $phpbb_container->get('messenger.method_collection');
$messenger_collection_iterator = $messenger->getIterator();
foreach ($messenger_collection_iterator as $messenger_method)
{
if ($messenger_method->get_id() == $user_row['user_notify_type'] || $user_row['user_notify_type'] == $messenger_method::NOTIFY_BOTH)
{
$messenger_method->set_use_queue(false);
$messenger_method->template('admin_welcome_activated', $user_row['user_lang']);
$messenger_method->set_addresses($user_row);
$messenger_method->anti_abuse_headers($config, $user);
$messenger_method->assign_vars([
'USERNAME' => html_entity_decode($user_row['username'], ENT_COMPAT),
]);
/** @var \phpbb\di\service_collection $messenger_collection */
$messenger_collection = $phpbb_container->get('messenger.method_collection');
/** @var \phpbb\messenger\method\messenger_interface $messenger_method */
$messenger_method = $messenger_collection->offsetGet('messenger.method.email');
$messenger_method->send();
}
}
$messenger_method->set_use_queue(false);
$messenger_method->template('admin_welcome_activated', $user_row['user_lang']);
$messenger_method->set_addresses($user_row);
$messenger_method->anti_abuse_headers($config, $user);
$messenger_method->assign_vars([
'USERNAME' => html_entity_decode($user_row['username'], ENT_COMPAT),
]);
$messenger_method->send();
$message = 'ACCOUNT_ACTIVE_ADMIN';
}

View file

@ -201,18 +201,13 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
}
}
$u_pm = $u_jabber = '';
$u_pm = '';
if ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_info['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_')))
{
$u_pm = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;u=' . $author_id);
}
if ($config['jab_enable'] && $user_info['user_jabber'] && $auth->acl_get('u_sendim'))
{
$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(
@ -248,7 +243,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'MESSAGE_ID' => $message_row['msg_id'],
'U_PM' => $u_pm,
'U_JABBER' => $u_jabber,
'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&amp;mode=compose&amp;action=delete&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
'U_EMAIL' => $user_info['email'],
@ -358,11 +352,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'NAME' => $user->lang['SEND_EMAIL'],
'U_CONTACT' => $user_info['email'],
),
array(
'ID' => 'jabber',
'NAME' => $user->lang['JABBER'],
'U_CONTACT' => $u_jabber,
),
);
foreach ($contact_fields as $field)

View file

@ -42,7 +42,6 @@ class ucp_prefs
case 'personal':
add_form_key('ucp_prefs_personal');
$data = array(
'notifymethod' => $request->variable('notifymethod', $user->data['user_notify_type']),
'dateformat' => $request->variable('dateformat', $user->data['user_dateformat'], true),
'lang' => basename($request->variable('lang', $user->data['user_lang'])),
'user_style' => $request->variable('user_style', (int) $user->data['user_style']),
@ -54,12 +53,6 @@ class ucp_prefs
'allowpm' => $request->variable('allowpm', (bool) $user->data['user_allow_pm']),
);
if ($data['notifymethod'] == messenger_interface::NOTIFY_IM && (!$config['jab_enable'] || !$user->data['user_jabber'] || !@extension_loaded('xml')))
{
// Jabber isnt enabled, or no jabber field filled in. Update the users table to be sure its correct.
$data['notifymethod'] = messenger_interface::NOTIFY_BOTH;
}
/**
* Add UCP edit global settings data before they are assigned to the template or submitted
*
@ -105,7 +98,6 @@ class ucp_prefs
'user_allow_viewemail' => $data['viewemail'],
'user_allow_massemail' => $data['massemail'],
'user_allow_viewonline' => ($auth->acl_get('u_hideonline')) ? !$data['hideonline'] : $user->data['user_allow_viewonline'],
'user_notify_type' => $data['notifymethod'],
'user_options' => $user->data['user_options'],
'user_dateformat' => $data['dateformat'],
@ -184,9 +176,6 @@ class ucp_prefs
$template->assign_vars([
'ERROR' => (count($error)) ? implode('<br />', $error) : '',
'S_NOTIFY_EMAIL' => ($data['notifymethod'] == messenger_interface::NOTIFY_EMAIL) ? true : false,
'S_NOTIFY_IM' => ($data['notifymethod'] == messenger_interface::NOTIFY_IM) ? true : false,
'S_NOTIFY_BOTH' => ($data['notifymethod'] == messenger_interface::NOTIFY_BOTH) ? true : false,
'S_VIEW_EMAIL' => $data['viewemail'],
'S_MASS_EMAIL' => $data['massemail'],
'S_ALLOW_PM' => $data['allowpm'],
@ -218,7 +207,6 @@ class ucp_prefs
'options' => $timezone_select,
],
'S_CAN_HIDE_ONLINE' => (bool) $auth->acl_get('u_hideonline'),
'S_SELECT_NOTIFY' => (bool) ($config['jab_enable'] && $user->data['user_jabber'] && @extension_loaded('xml')),
]);
break;

View file

@ -284,9 +284,7 @@ class ucp_profile
$cp_data = $cp_error = array();
$data = array(
'jabber' => $request->variable('jabber', $user->data['user_jabber'], true),
);
$data = [];
if ($config['allow_birthdays'])
{
@ -318,11 +316,7 @@ class ucp_profile
if ($submit)
{
$validate_array = array(
'jabber' => array(
array('string', true, 5, 255),
array('jabber')),
);
$validate_array = [];
if ($config['allow_birthdays'])
{
@ -363,19 +357,7 @@ class ucp_profile
if (!count($error))
{
$data['notify'] = $user->data['user_notify_type'];
if ($data['notify'] == messenger_interface::NOTIFY_IM && (!$config['jab_enable'] || !$data['jabber'] || !@extension_loaded('xml')))
{
// User has not filled in a jabber address (Or one of the modules is disabled or jabber is disabled)
// Disable notify by Jabber now for this user.
$data['notify'] = messenger_interface::NOTIFY_EMAIL;
}
$sql_ary = array(
'user_jabber' => $data['jabber'],
'user_notify_type' => $data['notify'],
);
$sql_ary = [];
if ($config['allow_birthdays'])
{
@ -394,12 +376,16 @@ class ucp_profile
$vars = array('cp_data', 'data', 'sql_ary');
extract($phpbb_dispatcher->trigger_event('core.ucp_profile_info_modify_sql_ary', compact($vars)));
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE user_id = ' . $user->data['user_id'];
$db->sql_query($sql);
// Skip query if no data to update
if (count($sql_ary))
{
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE user_id = ' . $user->data['user_id'];
$db->sql_query($sql);
}
// Update Custom Fields
// Always update custom fields
$cp->update_profile_field_data($user->data['user_id'], $cp_data);
meta_refresh(3, $this->u_action);
@ -446,8 +432,6 @@ class ucp_profile
$template->assign_vars(array(
'ERROR' => (count($error)) ? implode('<br />', $error) : '',
'S_JABBER_ENABLED' => $config['jab_enable'],
'JABBER' => $data['jabber'],
));
// Get additional profile fields and assign them to the template block var 'profile_fields'

View file

@ -128,41 +128,31 @@ class ucp_resend
// Grab an array of user_id's with a_user permissions ... these users can activate a user
$admin_ary = $auth->acl_get_list(false, 'a_user', false);
$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type
$sql = 'SELECT user_id, username, user_email, user_lang
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('user_id', $admin_ary[0]['a_user']);
$result = $db->sql_query($sql);
/** @var \phpbb\di\service_collection */
$messenger = $phpbb_container->get('messenger.method_collection');
$messenger_collection_iterator = $messenger->getIterator();
/** @var \phpbb\di\service_collection $messenger_collection */
$messenger_collection = $phpbb_container->get('messenger.method_collection');
/** @var \phpbb\messenger\method\messenger_interface $messenger_method */
$messenger_method = $messenger_collection->offsetGet('messenger.method.email');
while ($row = $db->sql_fetchrow($result))
{
foreach ($messenger_collection_iterator as $messenger_method)
{
$messenger_method->set_use_queue(false);
if ($messenger_method->get_id() == $row['user_notify_type'] || $row['user_notify_type'] == $messenger_method::NOTIFY_BOTH)
{
$messenger_method->template('admin_activate', $row['user_lang']);
$messenger_method->set_addresses($row);
$messenger_method->anti_abuse_headers($config, $user);
$messenger_method->assign_vars([
'USERNAME' => html_entity_decode($user_row['username'], ENT_COMPAT),
'U_USER_DETAILS' => $board_url . "/memberlist.$phpEx?mode=viewprofile&u={$user_row['user_id']}",
'U_ACTIVATE' => $board_url . "/ucp.$phpEx?mode=activate&u={$user_row['user_id']}&k={$user_row['user_actkey']}",
]);
$messenger_method->set_use_queue(false);
$messenger_method->template('admin_activate', $row['user_lang']);
$messenger_method->set_addresses($row);
$messenger_method->anti_abuse_headers($config, $user);
$messenger_method->assign_vars([
'USERNAME' => html_entity_decode($user_row['username'], ENT_COMPAT),
'U_USER_DETAILS' => $board_url . "/memberlist.$phpEx?mode=viewprofile&u={$user_row['user_id']}",
'U_ACTIVATE' => $board_url . "/ucp.$phpEx?mode=activate&u={$user_row['user_id']}&k={$user_row['user_actkey']}",
]);
$messenger_method->send();
}
}
$messenger_method->send();
}
$db->sql_freeresult($result);
// Save the queue in the messenger method class (has to be called or these messages could be lost)
foreach ($messenger_collection_iterator as $messenger_method)
{
$messenger_method->save_queue();
}
}
$this->update_activation_expiration();

View file

@ -923,7 +923,6 @@ if (!$get_info)
array('user_inactive_reason', '', 'phpbb_inactive_reason'),
array('user_inactive_time', '', 'phpbb_inactive_time'),
array('user_jabber', '', ''),
array('user_rank', 'users.user_rank', 'intval'),
array('user_permissions', '', ''),
@ -938,7 +937,6 @@ if (!$get_info)
array('user_emailtime', 'users.user_emailtime', 'null_to_zero'),
array('user_notify', 'users.user_notify', 'intval'),
array('user_notify_pm', 'users.user_notify_pm', 'intval'),
array('user_notify_type', $messenger_method::NOTIFY_EMAIL, ''),
array('user_allow_pm', 'users.user_allow_pm', 'intval'),
array('user_allow_viewonline', 'users.user_allow_viewonline', 'intval'),
array('user_allow_viewemail', 'users.user_viewemail', 'intval'),

View file

@ -168,16 +168,6 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_check', '3');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_login_limit_max', '50');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_login_limit_time', '21600');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_login_limit_use_forwarded', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_allow_self_signed', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_enable', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_host', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_package_size', '20');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_password', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_port', '5222');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_use_ssl', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_username', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_verify_peer', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_verify_peer_name', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_base_dn', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_email', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_password', '');
@ -439,7 +429,6 @@ INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_group', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_groupadd', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_groupdel', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_icons', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_jabber', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_language', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_mauth', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_modules', 1);
@ -493,7 +482,6 @@ INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_readpm', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_savedrafts', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_search', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_sendemail', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_sendim', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_sendpm', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_sig', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_viewonline', 1);
@ -539,10 +527,10 @@ INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id,
INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts_approved, forum_posts_unapproved, forum_posts_softdeleted, forum_topics_approved, forum_topics_unapproved, forum_topics_softdeleted, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_subject, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_freq, prune_days, prune_viewed, forum_parents, forum_flags) VALUES ('{L_FORUMS_TEST_FORUM_TITLE}', '{L_FORUMS_TEST_FORUM_DESC}', 2, 3, 1, 1, 1, 0, 0, 1, 0, 0, 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, '', '', '', '', '', '', '', 1, 7, 7, '', 48);
# -- Users / Anonymous user
INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_jabber, user_actkey, user_actkey_expiration, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', 0, '', 0);
INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_actkey, user_actkey_expiration, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', 0, '', 0);
# -- username: Admin password: admin (change this or remove it once everything is working!)
INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_jabber, user_actkey, user_actkey_expiration, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', 0, '');
INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_actkey, user_actkey_expiration, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', 0, '');
# -- Groups
INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('GUESTS', 3, 0, '', 0, '', '', '', 5);
@ -569,7 +557,7 @@ INSERT INTO phpbb_ranks (rank_title, rank_min, rank_special, rank_image) VALUES
# -- Roles data
# Standard Admin (a_)
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 1, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'a_%' AND auth_option NOT IN ('a_switchperm', 'a_jabber', 'a_phpinfo', 'a_server', 'a_backup', 'a_styles', 'a_clearlogs', 'a_modules', 'a_language', 'a_email', 'a_bots', 'a_search', 'a_aauth', 'a_roles');
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 1, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'a_%' AND auth_option NOT IN ('a_switchperm', 'a_phpinfo', 'a_server', 'a_backup', 'a_styles', 'a_clearlogs', 'a_modules', 'a_language', 'a_email', 'a_bots', 'a_search', 'a_aauth', 'a_roles');
# Forum admin (a_)
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 2, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'a_%' AND auth_option IN ('a_', 'a_authgroups', 'a_authusers', 'a_fauth', 'a_forum', 'a_forumadd', 'a_forumdel', 'a_mauth', 'a_prune', 'a_uauth', 'a_viewauth', 'a_viewlogs');
@ -587,14 +575,14 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 6, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_forward');
# Limited Features (u_)
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 7, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_attach', 'u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_attach', 'u_pm_emailpm', 'u_savedrafts', 'u_search', 'u_sendemail', 'u_sendim', 'u_masspm', 'u_masspm_group');
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 7, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_attach', 'u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_attach', 'u_pm_emailpm', 'u_savedrafts', 'u_search', 'u_sendemail', 'u_masspm', 'u_masspm_group');
# No Private Messages (u_)
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 8, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_', 'u_chgavatar', 'u_chgcensors', 'u_chgemail', 'u_chgpasswd', 'u_download', 'u_hideonline', 'u_mention', 'u_sig', 'u_viewprofile');
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 8, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_readpm', 'u_sendpm', 'u_masspm', 'u_masspm_group');
# No Avatar (u_)
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 9, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_attach', 'u_chgavatar', 'u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_attach', 'u_pm_emailpm', 'u_savedrafts', 'u_search', 'u_sendemail', 'u_sendim', 'u_masspm', 'u_masspm_group');
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 9, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_attach', 'u_chgavatar', 'u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_attach', 'u_pm_emailpm', 'u_savedrafts', 'u_search', 'u_sendemail', 'u_masspm', 'u_masspm_group');
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 9, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_chgavatar');
# Full Moderator (m_)

View file

@ -586,31 +586,3 @@ $lang = array_merge($lang, [
'WEBPUSH_DROPDOWN_SUBSCRIBE' => 'Show “Subscribe” button in notification dropdown',
'WEBPUSH_DROPDOWN_SUBSCRIBE_EXPLAIN' => 'Display a “Subscribe” button in the Notification dropdown, allowing users to easily subscribe to push notifications from anywhere in the forum.',
]);
// Jabber settings
$lang = array_merge($lang, array(
'ACP_JABBER_SETTINGS_EXPLAIN' => 'Here you can enable and control the use of Jabber for instant messaging and board notifications. Jabber is an open source protocol and therefore available for use by anyone. Some Jabber servers include gateways or transports which allow you to contact users on other networks. Not all servers offer all transports and changes in protocols can prevent transports from operating. Please be sure to enter already registered account details - phpBB will use the details you enter here as is.',
'JAB_ALLOW_SELF_SIGNED' => 'Allow self-signed SSL certificates',
'JAB_ALLOW_SELF_SIGNED_EXPLAIN' => 'Allow connections to Jabber server with self-signed SSL certificate. <br><em><strong>Warning:</strong> Allowing self-signed SSL certificates may cause security implications.</em>',
'JAB_ENABLE' => 'Enable Jabber',
'JAB_ENABLE_EXPLAIN' => 'Enables use of Jabber messaging and notifications.',
'JAB_GTALK_NOTE' => 'Please note that GTalk will not work because the <samp>dns_get_record</samp> function could not be found. This function is not available in PHP4, and is not implemented on Windows platforms. It currently does not work on BSD-based systems, including Mac OS.',
'JAB_PACKAGE_SIZE' => 'Jabber package size',
'JAB_PACKAGE_SIZE_EXPLAIN' => 'This is the number of messages sent in one package. If set to 0 the message is sent immediately and will not be queued for later sending.',
'JAB_PASSWORD' => 'Jabber password',
'JAB_PASSWORD_EXPLAIN' => '<em><strong>Warning:</strong> This password will be stored as plain text in the database, visible to everybody who can access your database or who can view this configuration page.</em>',
'JAB_PORT' => 'Jabber port',
'JAB_PORT_EXPLAIN' => 'Leave blank unless you know it is not port 5222.',
'JAB_SERVER' => 'Jabber server',
'JAB_SERVER_EXPLAIN' => 'See %sjabber.org%s for a list of servers.',
'JAB_SETTINGS_CHANGED' => 'Jabber settings changed successfully.',
'JAB_USE_SSL' => 'Use SSL to connect',
'JAB_USE_SSL_EXPLAIN' => 'If enabled a secure connection is tried to be established. The Jabber port will be modified to 5223 if port 5222 is specified.',
'JAB_USERNAME' => 'Jabber username or JID',
'JAB_USERNAME_EXPLAIN' => 'Specify a registered username or a valid JID. The username will not be checked for validity. If you only specify a username, then your JID will be the username and the server you specified above. Else, specify a valid JID, for example user@jabber.org.',
'JAB_VERIFY_PEER' => 'Verify SSL certificate',
'JAB_VERIFY_PEER_EXPLAIN' => 'Require verification of SSL certificate used by Jabber server. <br><em><strong>Warning:</strong> Connecting peers with unverified SSL certificates may cause security implications.</em>',
'JAB_VERIFY_PEER_NAME' => 'Verify Jabber peer name',
'JAB_VERIFY_PEER_NAME_EXPLAIN' => 'Require verification of peer name for Jabber servers using SSL / TLS connections. <br><em><strong>Warning:</strong> Connecting to unverified peers may cause security implications.</em>',
));

View file

@ -120,8 +120,6 @@ $lang = array_merge($lang, array(
'ACP_INACTIVE_USERS' => 'Inactive users',
'ACP_INDEX' => 'ACP index',
'ACP_JABBER_SETTINGS' => 'Jabber settings',
'ACP_LANGUAGE' => 'Language management',
'ACP_LANGUAGE_PACKS' => 'Language packs',
'ACP_LOAD_SETTINGS' => 'Load settings',
@ -642,7 +640,6 @@ $lang = array_merge($lang, array(
'LOG_DOWNLOAD_IP' => '<strong>Added IP/hostname to download list</strong><br />» %s',
'LOG_DOWNLOAD_REMOVE_IP' => '<strong>Removed IP/hostname from download list</strong><br />» %s',
'LOG_ERROR_JABBER' => '<strong>Jabber error</strong><br />» %s',
'LOG_ERROR_EMAIL' => '<strong>Email error</strong><br />» %s',
'LOG_ERROR_CAPTCHA' => '<strong>CAPTCHA error</strong><br />» %s',
@ -686,11 +683,6 @@ $lang = array_merge($lang, array(
'LOG_IP_BROWSER_FORWARDED_CHECK' => '<strong>Session IP/browser/X_FORWARDED_FOR check failed</strong><br />»User IP “<em>%1$s</em>” checked against session IP “<em>%2$s</em>”, user browser string “<em>%3$s</em>” checked against session browser string “<em>%4$s</em>” and user X_FORWARDED_FOR string “<em>%5$s</em>” checked against session X_FORWARDED_FOR string “<em>%6$s</em>”.',
'LOG_JAB_CHANGED' => '<strong>Jabber account changed</strong>',
'LOG_JAB_PASSCHG' => '<strong>Jabber password changed</strong>',
'LOG_JAB_REGISTER' => '<strong>Jabber account registered</strong>',
'LOG_JAB_SETTINGS_CHANGED' => '<strong>Jabber settings changed</strong>',
'LOG_LANGUAGE_PACK_DELETED' => '<strong>Deleted language pack</strong><br />» %s',
'LOG_LANGUAGE_PACK_INSTALLED' => '<strong>Installed language pack</strong><br />» %s',
'LOG_LANGUAGE_PACK_UPDATED' => '<strong>Updated language pack details</strong><br />» %s',

View file

@ -98,7 +98,6 @@ $lang = array_merge($lang, array(
'ACL_U_PM_IMG' => 'Can use [img] BBCode tag in private messages',
'ACL_U_SENDEMAIL' => 'Can send emails',
'ACL_U_SENDIM' => 'Can send instant messages',
'ACL_U_IGNOREFLOOD' => 'Can ignore flood limit',
'ACL_U_HIDEONLINE' => 'Can hide online status',
'ACL_U_VIEWONLINE' => 'Can view hidden online users',
@ -168,7 +167,6 @@ $lang = array_merge($lang, array(
$lang = array_merge($lang, array(
'ACL_A_BOARD' => 'Can alter board settings/check for updates',
'ACL_A_SERVER' => 'Can alter server/communication settings',
'ACL_A_JABBER' => 'Can alter Jabber settings',
'ACL_A_PHPINFO' => 'Can view php settings',
'ACL_A_FORUM' => 'Can manage forums',

View file

@ -53,7 +53,10 @@ $lang = array_merge($lang, array(
'BBCODE_HELPLINE_EXPLAIN' => 'This field contains the mouse over text of the BBCode.',
'BBCODE_HELPLINE_TEXT' => 'Help line text',
'BBCODE_HELPLINE_TOO_LONG' => 'The help line you entered is too long.',
'BBCODE_FONT_ICON' => 'BBCode icon',
'BBCODE_FONT_ICON_EXPLAIN' => 'Enter the name of a Font Awesome icon (without the fa prefix) to display instead of the BBCode name appearing on the button. %1$sClick here%2$s to view the list of available icons. Only solid style icons are supported.',
'BBCODE_FONT_ICON_INVALID' => 'The icon name you have entered is invalid.',
'BBCODE_FONT_ICON_TOO_LONG' => 'The icon name you have entered is too long.',
'BBCODE_INVALID_TAG_NAME' => 'The BBCode tag name that you selected already exists.',
'BBCODE_INVALID' => 'Your BBCode is constructed in an invalid form.',
'BBCODE_INVALID_TEMPLATE' => 'Your BBCodes template is invalid.',

View file

@ -65,6 +65,7 @@ $lang = array_merge($lang, [
// Local adapter
'STORAGE_ADAPTER_LOCAL_NAME' => 'Local',
'STORAGE_ADAPTER_LOCAL_OPTION_PATH' => 'Path',
'STORAGE_ADAPTER_LOCAL_OPTION_PATH_EXPLAIN' => 'Storage path for files.<br>For example: <samp>files</samp>, <samp>images/avatars/upload</samp> or <samp>store</samp>.',
// Form validation
'STORAGE_UPDATE_SUCCESSFUL' => 'All storage types were successfully updated.',

View file

@ -78,6 +78,7 @@ $lang = array_merge($lang, array(
'ALL_TOPICS' => 'All Topics',
'ALT_TEXT' => 'Alternative text',
'AND' => 'And',
'APPEARANCE' => 'Appearance',
'ARE_WATCHING_FORUM' => 'You have subscribed to be notified of new posts in this forum.',
'ARE_WATCHING_TOPIC' => 'You have subscribed to be notified of new posts in this topic.',
'ASCENDING' => 'Ascending',
@ -231,8 +232,6 @@ $lang = array_merge($lang, array(
'ENTER_USERNAME' => 'Enter username',
'ERR_CHANGING_DIRECTORY' => 'Unable to change directory.',
'ERR_CONNECTING_SERVER' => 'Error connecting to the server.',
'ERR_JAB_AUTH' => 'Could not authorise on Jabber server.',
'ERR_JAB_CONNECT' => 'Could not connect to Jabber server.',
'ERR_UNABLE_TO_LOGIN' => 'The specified username or password is incorrect.',
'ERR_UNWATCHING' => 'An error occurred while trying to unsubscribe.',
'ERR_WATCHING' => 'An error occurred while trying to subscribe.',
@ -351,6 +350,7 @@ $lang = array_merge($lang, array(
'HIDE_ME' => 'Hide my online status this session',
'HOURS' => 'Hours',
'HOME' => 'Home',
'HTTP_HANDLER_NOT_FOUND' => 'The operation could not be completed because the cURL PHP extension and allow_url_fopen PHP ini setting have been disabled and no other HTTP handler could be found.',
'ICQ' => 'ICQ',
'IF' => 'If',
@ -370,7 +370,6 @@ $lang = array_merge($lang, array(
'IP' => 'IP',
'IP_BLACKLISTED' => 'Your IP %1$s has been blocked because it is blacklisted. For details please see <a href="%2$s">%2$s</a>.',
'JABBER' => 'Jabber',
'JOINED' => 'Joined',
'JUMP_PAGE' => 'Enter the page number you wish to go to',
'JUMP_TO' => 'Jump to',
@ -799,7 +798,6 @@ $lang = array_merge($lang, array(
'TOO_LONG_CONFIRM_CODE' => 'The confirm code you entered is too long.',
'TOO_LONG_DATEFORMAT' => 'The date format you entered is too long.',
'TOO_LONG_JABBER' => 'The Jabber account name you entered is too long.',
'TOO_LONG_NEW_PASSWORD' => 'The password you entered is too long.',
'TOO_LONG_PASSWORD_CONFIRM' => 'The password confirmation you entered is too long.',
'TOO_LONG_USER_PASSWORD' => 'The password you entered is too long.',
@ -812,7 +810,6 @@ $lang = array_merge($lang, array(
'TOO_SHORT_CONFIRM_CODE' => 'The confirm code you entered is too short.',
'TOO_SHORT_DATEFORMAT' => 'The date format you entered is too short.',
'TOO_SHORT_JABBER' => 'The Jabber account name you entered is too short.',
'TOO_SHORT_NEW_PASSWORD' => 'The password you entered is too short.',
'TOO_SHORT_PASSWORD_CONFIRM' => 'The password confirmation you entered is too short.',
'TOO_SHORT_USER_PASSWORD' => 'The password you entered is too short.',
@ -941,7 +938,6 @@ $lang = array_merge($lang, array(
'WRONG_PASSWORD' => 'You entered an incorrect password.',
'WRONG_DATA_COLOUR' => 'The colour value you entered is invalid.',
'WRONG_DATA_JABBER' => 'The name you entered is not a valid Jabber account name.',
'WRONG_DATA_LANG' => 'The language you specified is not valid.',
'WRONG_DATA_POST_SD' => 'The post sort direction you specified is not valid.',
'WRONG_DATA_POST_SK' => 'The post sort option you specified is not valid.',

View file

@ -1,13 +0,0 @@
Subject: Reply in "{TOPIC_TITLE}"
Hello {USERNAME},
Your bookmarked topic "{TOPIC_TITLE}" received a new reply since your last visit to "{SITENAME}". No more notifications will be sent until you visit the topic.
If you want to view the newest post made since your last visit, click the following link:
{U_NEWEST_POST}
If you no longer wish to receive updates about replies to bookmarks, please update your notification settings here:
{U_NOTIFICATION_SETTINGS}
{EMAIL_SIG}

View file

@ -1,11 +0,0 @@
Subject: New topic in "{FORUM_NAME}"
Hello {USERNAME},
The forum "{FORUM_NAME}" received a new topic "{TOPIC_TITLE}"<!-- IF AUTHOR_NAME != '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit to "{SITENAME}". No more notifications will be sent until you visit the forum.
{U_FORUM}
If you no longer wish to watch this forum click the following link:
{U_STOP_WATCHING_FORUM}
{EMAIL_SIG}

View file

@ -1,13 +0,0 @@
Subject: Post approved - "{POST_SUBJECT}"
Hello {USERNAME},
Your post "{POST_SUBJECT}" at "{SITENAME}" was approved by a moderator or administrator.
If you want to view the post, click the following link:
{U_VIEW_POST}
If you want to view the topic, click the following link:
{U_VIEW_TOPIC}
{EMAIL_SIG}

View file

@ -1,11 +0,0 @@
Subject: Post disapproved - "{POST_SUBJECT}"
Hello {USERNAME},
Your post "{POST_SUBJECT}" at "{SITENAME}" was disapproved by a moderator or administrator.
The following reason was given for the disapproval:
{REASON}
{EMAIL_SIG}

View file

@ -1,13 +0,0 @@
Subject: Post needs approval - "{TOPIC_TITLE}"
Hello {USERNAME},
The post "{POST_SUBJECT}" at "{SITENAME}" needs approval.
If you want to view the post, click the following link:
{U_VIEW_POST}
If you want to view the topic, click the following link:
{U_TOPIC}
{EMAIL_SIG}

View file

@ -1,13 +0,0 @@
Subject: New private message
Hello {USERNAME},
A new private message from "{AUTHOR_NAME}" to your account on "{SITENAME}" with the following subject has arrived:
{SUBJECT}
You can view your new message by clicking on the following link:
{U_VIEW_MESSAGE}
You have requested that you be notified on this event, remember that you can always choose not to be notified of new messages by changing the appropriate setting in your profile.
{EMAIL_SIG}

View file

@ -1,13 +0,0 @@
Subject: Quoted in "{TOPIC_TITLE}"
Hello {USERNAME},
"{AUTHOR_NAME}" quoted you in the topic "{TOPIC_TITLE}" at "{SITENAME}".
If you want to view the quoted post, click the following link:
{U_VIEW_POST}
If you no longer wish to receive updates about replies quoting you, please update your notification settings here:
{U_NOTIFICATION_SETTINGS}
{EMAIL_SIG}

View file

@ -1,10 +0,0 @@
Subject: Private Message report - "{SUBJECT}"
Hello {USERNAME},
A Private Message titled "{SUBJECT}" by "{AUTHOR_NAME}" at "{SITENAME}" was reported.
If you want to view the report, click the following link:
{U_VIEW_REPORT}
{EMAIL_SIG}

View file

@ -1,13 +0,0 @@
Subject: Post report - "{TOPIC_TITLE}"
Hello {USERNAME},
The post "{POST_SUBJECT}" at "{SITENAME}" was reported.
If you want to view the report, click the following link:
{U_VIEW_REPORT}
If you want to view the post, click the following link:
{U_VIEW_POST}
{EMAIL_SIG}

View file

@ -1,10 +0,0 @@
Subject: Topic approved - "{TOPIC_TITLE}"
Hello {USERNAME},
Your topic "{TOPIC_TITLE}" at "{SITENAME}" was approved by a moderator or administrator.
If you want to view the topic, click the following link:
{U_VIEW_TOPIC}
{EMAIL_SIG}

View file

@ -1,11 +0,0 @@
Subject: Topic disapproved - "{TOPIC_TITLE}"
Hello {USERNAME},
Your topic "{TOPIC_TITLE}" at "{SITENAME}" was disapproved by a moderator or administrator.
The following reason was given for the disapproval:
{REASON}
{EMAIL_SIG}

View file

@ -1,13 +0,0 @@
Subject: Topic needs approval - "{TOPIC_TITLE}"
Hello {USERNAME},
The topic "{TOPIC_TITLE}" at "{SITENAME}" needs approval.
If you want to view the topic, click the following link:
{U_VIEW_TOPIC}
If you want to view the forum, click the following link:
{U_FORUM}
{EMAIL_SIG}

View file

@ -1,13 +0,0 @@
Subject: Reply in "{TOPIC_TITLE}"
Hello {USERNAME},
The topic "{TOPIC_TITLE}" received a new reply<!-- IF AUTHOR_NAME != '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit to "{SITENAME}". No more emails will be sent until you visit the topic.
If you want to view the newest post made since your last visit, click the following link:
{U_NEWEST_POST}
If you no longer wish to watch this topic click the following link:
{U_STOP_WATCHING_TOPIC}
{EMAIL_SIG}

View file

@ -221,6 +221,13 @@ $lang = array_merge($lang, array(
<p>We noticed that the last update of your phpBB installation hasnt been completed. Visit the <a href="%1$s" title="%1$s">database updater</a>, ensure <em>Update database only</em> is selected and click on <strong>Submit</strong>. Don\'t forget to delete the "install"-directory after you have updated the database successfully.</p>',
// Auto update
'UPDATE_PACKAGE_DOWNLOAD_FAILURE' => 'Failed to download the update package.',
'UPDATE_SIGNATURE_DOWNLOAD_FAILURE' => 'Failed to download the update package signature.',
'UPDATE_SIGNATURE_INVALID' => 'The update package is corrupted.',
'UPDATE_PACKAGE_EXTRACT_FAILURE' => 'Could not extract files from the update package.',
'UPDATE_FILES_COPY_FAILURE' => 'Could not copy files from the update package.',
//
// Server data
//

View file

@ -78,16 +78,12 @@ $lang = array_merge($lang, array(
'IM_ADD_CONTACT' => 'Add Contact',
'IM_DOWNLOAD_APP' => 'Download application',
'IM_JABBER' => 'Please note that users may have selected to not receive unsolicited instant messages.',
'IM_JABBER_SUBJECT' => 'This is an automated message please do not reply! Message from user %1$s at %2$s.',
'IM_MESSAGE' => 'Your message',
'IM_NAME' => 'Your Name',
'IM_NO_DATA' => 'There is no suitable contact information for this user.',
'IM_NO_JABBER' => 'Sorry, direct messaging of Jabber users is not supported on this board. You will need a Jabber client installed on your system to contact the recipient above.',
'IM_RECIPIENT' => 'Recipient',
'IM_SEND' => 'Send message',
'IM_SEND_MESSAGE' => 'Send message',
'IM_SENT_JABBER' => 'Your message to %1$s has been sent successfully.',
'IM_USER' => 'Send an instant message',
'LAST_ACTIVE' => 'Last active',
@ -125,7 +121,6 @@ $lang = array_merge($lang, array(
'SENDER_NAME' => 'Your name',
'SEND_ICQ_MESSAGE' => 'Send ICQ message',
'SEND_IM' => 'Instant messaging',
'SEND_JABBER_MESSAGE' => 'Send Jabber message',
'SEND_MESSAGE' => 'Message',
'SEND_YIM_MESSAGE' => 'Send YIM message',
'SORT_EMAIL' => 'Email',

View file

@ -331,7 +331,6 @@ $lang = array_merge($lang, array(
'NOTIFICATION_GROUP_POSTING' => 'Posting Notifications',
'NOTIFICATION_METHOD_BOARD' => 'Notifications',
'NOTIFICATION_METHOD_EMAIL' => 'Email',
'NOTIFICATION_METHOD_JABBER' => 'Jabber',
'NOTIFICATION_METHOD_WEBPUSH' => 'Web Push',
'NOTIFICATION_TYPE' => 'Notification type',
'NOTIFICATION_TYPE_BOOKMARK' => 'Someone replies to a topic you have bookmarked',
@ -354,7 +353,6 @@ $lang = array_merge($lang, array(
'NOTIFY_METHOD_BOTH' => 'Both',
'NOTIFY_METHOD_EMAIL' => 'Email only',
'NOTIFY_METHOD_EXPLAIN' => 'Method for sending messages sent via this board.',
'NOTIFY_METHOD_IM' => 'Jabber only',
'NOTIFY_ON_PM' => 'Notify me on new private messages',
'NOTIFY_WEBPUSH_ENABLE' => 'Enable receiving Web Push notifications',
'NOTIFY_WEBPUSH_ENABLE_EXPLAIN' => 'Enable receiving browser-based push notifications.<br>The notifications can be turned off at any time in your browser settings, by unsubscribing, or by disabling the push notifications below.',
@ -534,7 +532,6 @@ $lang = array_merge($lang, array(
'UCP_COPPA_BEFORE' => 'Before %s',
'UCP_COPPA_ON_AFTER' => 'On or after %s',
'UCP_EMAIL_ACTIVATE' => 'Please note that you will need to enter a valid email address before your account is activated. You will receive an email at the address you provide that contains an account activation link.',
'UCP_JABBER' => 'Jabber address',
'UCP_LOGIN_LINK' => 'Set up an external account association',
'UCP_MAIN' => 'Overview',

View file

@ -373,120 +373,6 @@ switch ($mode)
);
break;
case 'contact':
$page_title = $user->lang['IM_USER'];
$template_html = 'memberlist_im.html';
if (!$auth->acl_get('u_sendim'))
{
send_status_line(403, 'Forbidden');
trigger_error('NOT_AUTHORISED');
}
$presence_img = '';
switch ($action)
{
case 'jabber':
$lang = 'JABBER';
$sql_field = 'user_jabber';
$s_select = (@extension_loaded('xml') && $config['jab_enable']) ? 'S_SEND_JABBER' : 'S_NO_SEND_JABBER';
$s_action = append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&amp;action=$action&amp;u=$user_id");
break;
default:
trigger_error('NO_MODE', E_USER_ERROR);
break;
}
// Grab relevant data
$sql = "SELECT user_id, username, user_email, user_lang, $sql_field
FROM " . USERS_TABLE . "
WHERE user_id = $user_id
AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$row)
{
trigger_error('NO_USER');
}
else if (empty($row[$sql_field]))
{
trigger_error('IM_NO_DATA');
}
// Post data grab actions
switch ($action)
{
case 'jabber':
add_form_key('memberlist_messaging');
if ($submit && @extension_loaded('xml') && $config['jab_enable'])
{
if (check_form_key('memberlist_messaging'))
{
$subject = sprintf($user->lang['IM_JABBER_SUBJECT'], $user->data['username'], $config['server_name']);
$message = $request->variable('message', '', true);
if (empty($message))
{
trigger_error('EMPTY_MESSAGE_IM');
}
$jabber = $phpbb_container->get('messenger.method.jabber');
$jabber->set_use_queue(false);
$jabber->template('profile_send_im', $row['user_lang']);
$jabber->subject(html_entity_decode($subject, ENT_COMPAT));
$jabber->set_addresses($row);
$jabber->assign_vars([
'BOARD_CONTACT' => phpbb_get_board_contact($config, $phpEx),
'FROM_USERNAME' => html_entity_decode($user->data['username'], ENT_COMPAT),
'TO_USERNAME' => html_entity_decode($row['username'], ENT_COMPAT),
'MESSAGE' => html_entity_decode($message, ENT_COMPAT),
]);
$jabber->send();
$s_select = 'S_SENT_JABBER';
}
else
{
trigger_error('FORM_INVALID');
}
}
break;
}
$template->assign_block_vars('navlinks', array(
'BREADCRUMB_NAME' => $page_title,
'U_BREADCRUMB' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&amp;action=$action&amp;u=$user_id"),
));
// Send vars to the template
$template->assign_vars(array(
'IM_CONTACT' => $row[$sql_field],
'A_IM_CONTACT' => addslashes($row[$sql_field]),
'USERNAME' => $row['username'],
'CONTACT_NAME' => $row[$sql_field],
'SITENAME' => $config['sitename'],
'PRESENCE_IMG' => $presence_img,
'L_SEND_IM_EXPLAIN' => $user->lang['IM_' . $lang],
'L_IM_SENT_JABBER' => sprintf($user->lang['IM_SENT_JABBER'], $row['username']),
$s_select => true,
'S_IM_ACTION' => $s_action)
);
break;
case 'viewprofile':
// Display a profile
if ($user_id == ANONYMOUS && !$username)
@ -783,7 +669,6 @@ switch ($mode)
'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']),
'L_SEND_EMAIL_USER' => $user->lang('SEND_EMAIL_USER', $member['username']),
'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['EMAIL']),
'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']),
'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']),
'S_PROFILE_ACTION' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group'),
@ -950,8 +835,8 @@ switch ($mode)
{
// Generate the navlinks based on the selected topic
$navlinks_sql_array = [
'SELECT' => 'f.parent_id, f.forum_parents, f.left_id, f.right_id, f.forum_type, f.forum_name,
f.forum_id, f.forum_desc, f.forum_desc_uid, f.forum_desc_bitfield, f.forum_desc_options,
'SELECT' => 'f.parent_id, f.forum_parents, f.left_id, f.right_id, f.forum_type, f.forum_name,
f.forum_id, f.forum_desc, f.forum_desc_uid, f.forum_desc_bitfield, f.forum_desc_options,
f.forum_options, t.topic_title',
'FROM' => [
FORUMS_TABLE => 'f',
@ -1037,12 +922,6 @@ switch ($mode)
$sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT']);
$sort_key_sql = array('a' => 'u.username_clean', 'c' => 'u.user_regdate', 'd' => 'u.user_posts');
if ($config['jab_enable'] && $auth->acl_get('u_sendim'))
{
$sort_key_text['k'] = $user->lang['JABBER'];
$sort_key_sql['k'] = 'u.user_jabber';
}
if ($auth->acl_get('a_user'))
{
$sort_key_text['e'] = $user->lang['SORT_EMAIL'];
@ -1084,7 +963,7 @@ switch ($mode)
$select_single = $request->variable('select_single', false);
// Search URL parameters, if any of these are in the URL we do a search
$search_params = array('username', 'email', 'jabber', 'search_group_id', 'joined_select', 'active_select', 'count_select', 'joined', 'active', 'count', 'ip');
$search_params = array('username', 'email', 'search_group_id', 'joined_select', 'active_select', 'count_select', 'joined', 'active', 'count', 'ip');
// We validate form and field here, only id/class allowed
$form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form;
@ -1093,7 +972,6 @@ switch ($mode)
{
$username = $request->variable('username', '', true);
$email = strtolower($request->variable('email', ''));
$jabber = $request->variable('jabber', '');
$search_group_id = $request->variable('search_group_id', 0);
// when using these, make sure that we actually have values defined in $find_key_match
@ -1133,7 +1011,6 @@ switch ($mode)
$sql_where .= ($username) ? ' AND u.username_clean ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), utf8_clean_string($username))) : '';
$sql_where .= ($auth->acl_get('a_user') && $email) ? ' AND u.user_email ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), $email)) . ' ' : '';
$sql_where .= ($jabber) ? ' AND u.user_jabber ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), $jabber)) . ' ' : '';
$sql_where .= (is_numeric($count) && isset($find_key_match[$count_select])) ? ' AND u.user_posts ' . $find_key_match[$count_select] . ' ' . (int) $count . ' ' : '';
if (isset($find_key_match[$joined_select]) && count($joined) == 3)
@ -1385,10 +1262,10 @@ switch ($mode)
$order_by .= $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC');
// Unfortunately we must do this here for sorting by rank, else the sort order is applied wrongly
if ($sort_key == 'm')
// For sorting by non-unique columns (rank, posts) add unique sort key to avoid duplicated rows in results
if ($sort_key == 'm' || $sort_key == 'd')
{
$order_by .= ', u.user_posts DESC';
$order_by .= ', u.user_id ASC';
}
/**
@ -1439,7 +1316,6 @@ switch ($mode)
'select_single' => array('select_single', $select_single),
'username' => array('username', '', true),
'email' => array('email', ''),
'jabber' => array('jabber', ''),
'search_group_id' => array('search_group_id', 0),
'joined_select' => array('joined_select', 'lt'),
'active_select' => array('active_select', 'lt'),
@ -1594,7 +1470,6 @@ switch ($mode)
$template->assign_vars(array(
'USERNAME' => $username,
'EMAIL' => $email,
'JABBER' => $jabber,
'JOINED' => implode('-', $joined),
'ACTIVE' => implode('-', $active),
'COUNT' => $count,
@ -1602,7 +1477,6 @@ switch ($mode)
'S_IP_SEARCH_ALLOWED' => ($auth->acl_getf_global('m_info')) ? true : false,
'S_EMAIL_SEARCH_ALLOWED'=> ($auth->acl_get('a_user')) ? true : false,
'S_JABBER_ENABLED' => $config['jab_enable'],
'S_IN_SEARCH_POPUP' => ($form && $field) ? true : false,
'S_SEARCH_USER' => ($mode == 'searchuser' || ($mode == '' && $submit)),
'S_FORM_NAME' => $form,
@ -1830,7 +1704,6 @@ switch ($mode)
'PROFILE_IMG' => $user->img('icon_user_profile', $user->lang['PROFILE']),
'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']),
'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['EMAIL']),
'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']),
'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']),
'U_FIND_MEMBER' => ($config['load_search'] || $auth->acl_get('a_')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser' . (($start) ? "&amp;start=$start" : '') . (!empty($params) ? '&amp;' . implode('&amp;', $params) : '')) : '',

View file

@ -245,12 +245,7 @@ class upload
// Move the thumbnail from temp folder to the storage
$fp = fopen($destination, 'rb');
$this->storage->write_stream($destination_name, $fp);
if (is_resource($fp))
{
fclose($fp);
}
$this->storage->write($destination_name, $fp);
}
else
{

View file

@ -82,7 +82,7 @@ abstract class driver implements \phpbb\avatar\driver\driver_interface
* @param \phpbb\path_helper $path_helper phpBB path helper
* @param \phpbb\cache\driver\driver_interface|null $cache Cache driver
*/
public function __construct(\phpbb\config\config $config, \FastImageSize\FastImageSize $imagesize, $phpbb_root_path, $php_ext, \phpbb\path_helper $path_helper, \phpbb\cache\driver\driver_interface $cache = null)
public function __construct(\phpbb\config\config $config, \FastImageSize\FastImageSize $imagesize, $phpbb_root_path, $php_ext, \phpbb\path_helper $path_helper, \phpbb\cache\driver\driver_interface|null $cache = null)
{
$this->config = $config;
$this->imagesize = $imagesize;

View file

@ -28,7 +28,7 @@ class email extends base
/**
* {@inheritDoc}
*/
public function get_user_column(): ?string
public function get_user_column(): string|null
{
return 'user_email';
}

View file

@ -31,7 +31,7 @@ class ip extends base
/**
* @inheritDoc
*/
public function get_user_column(): ?string
public function get_user_column(): string|null
{
return null;
}

View file

@ -33,7 +33,7 @@ interface type_interface
*
* @return string|null
*/
public function get_user_column(): ?string;
public function get_user_column(): string|null;
/**
* Sets a user object to the ban type to have it excluded

View file

@ -48,7 +48,7 @@ class class_loader
* @param string $php_ext The file extension for PHP files
* @param \phpbb\cache\driver\driver_interface|null $cache An implementation of the phpBB cache interface.
*/
public function __construct($namespace, $path, $php_ext = 'php', \phpbb\cache\driver\driver_interface $cache = null)
public function __construct($namespace, $path, $php_ext = 'php', \phpbb\cache\driver\driver_interface|null $cache = null)
{
if ($namespace[0] !== '\\')
{
@ -69,7 +69,7 @@ class class_loader
*
* @param \phpbb\cache\driver\driver_interface|null $cache An implementation of the phpBB cache interface.
*/
public function set_cache(\phpbb\cache\driver\driver_interface $cache = null)
public function set_cache(\phpbb\cache\driver\driver_interface|null $cache = null)
{
if ($cache)
{

View file

@ -29,7 +29,7 @@ class runtime_exception extends base
* @param \Exception|null $previous The previous runtime_exception used for the runtime_exception chaining.
* @param integer $code The Exception code.
*/
public function __construct($prefix, $message = '', array $parameters = [], \Exception $previous = null, $code = 0)
public function __construct($prefix, $message = '', array $parameters = [], \Exception|null $previous = null, $code = 0)
{
parent::__construct($prefix . $message, $parameters, $previous, $code);
}

View file

@ -68,7 +68,7 @@ class extension_manager extends manager
* @param string $root_path phpBB root path
* @param config|null $config Config object
*/
public function __construct(installer $installer, driver_interface $cache, ext_manager $extension_manager, filesystem $filesystem, $package_type, $exception_prefix, $root_path, config $config = null)
public function __construct(installer $installer, driver_interface $cache, ext_manager $extension_manager, filesystem $filesystem, $package_type, $exception_prefix, $root_path, config|null $config = null)
{
$this->extension_manager = $extension_manager;
$this->filesystem = $filesystem;
@ -86,7 +86,7 @@ class extension_manager extends manager
/**
* {@inheritdoc}
*/
public function pre_install(array $packages, IOInterface $io = null)
public function pre_install(array $packages, IOInterface|null $io = null)
{
$installed_manually = array_intersect(array_keys($this->extension_manager->all_available()), array_keys($packages));
if (count($installed_manually) !== 0)
@ -98,7 +98,7 @@ class extension_manager extends manager
/**
* {@inheritdoc}
*/
public function post_install(array $packages, IOInterface $io = null)
public function post_install(array $packages, IOInterface|null $io = null)
{
if ($this->enable_on_install)
{
@ -127,7 +127,7 @@ class extension_manager extends manager
/**
* {@inheritdoc}
*/
protected function pre_update(array $packages, IOInterface $io = null)
protected function pre_update(array $packages, IOInterface|null $io = null)
{
/** @psalm-suppress InvalidArgument */
$io->writeError([['DISABLING_EXTENSIONS', [], 1]]);
@ -158,7 +158,7 @@ class extension_manager extends manager
/**
* {@inheritdoc}
*/
protected function post_update(array $packages, IOInterface $io = null)
protected function post_update(array $packages, IOInterface|null $io = null)
{
/** @psalm-suppress InvalidArgument */
$io->writeError([['ENABLING_EXTENSIONS', [], 1]]);
@ -184,7 +184,7 @@ class extension_manager extends manager
/**
* {@inheritdoc}
*/
public function remove(array $packages, IOInterface $io = null)
public function remove(array $packages, IOInterface|null $io = null)
{
$packages = $this->normalize_version($packages);
@ -200,7 +200,7 @@ class extension_manager extends manager
/**
* {@inheritdoc}
*/
public function pre_remove(array $packages, IOInterface $io = null)
public function pre_remove(array $packages, IOInterface|null $io = null)
{
if ($this->purge_on_remove)
{

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