mirror of
https://github.com/phpbb/phpbb.git
synced 2025-09-10 08:10:44 +02:00
Compare commits
346 Commits
release-3.
...
release-3.
Author | SHA1 | Date | |
---|---|---|---|
|
2e37b2dc2d | ||
|
8d6a9245c1 | ||
|
1a8950d01b | ||
|
b4fa01e943 | ||
|
cd057c126a | ||
|
377ebacf0d | ||
|
fb2d1c2a28 | ||
|
da2364b2c1 | ||
|
4044900c69 | ||
|
e78664d68b | ||
|
4e5b9b23de | ||
|
9bc98278fe | ||
|
33a789e030 | ||
|
3cf83f1a62 | ||
|
d0344b9318 | ||
|
4072dd0246 | ||
|
94fe538100 | ||
|
8e4559f49f | ||
|
0fe95a032b | ||
|
893dad0297 | ||
|
d08843853e | ||
|
8a3164aaf7 | ||
|
9bf6e7f32e | ||
|
c93381ff04 | ||
|
88b79aba00 | ||
|
9c6df33e3b | ||
|
605726a4d7 | ||
|
3103e99dc7 | ||
|
a8c93ff661 | ||
|
1f4eac13b9 | ||
|
5e43f6195c | ||
|
6846eeaa48 | ||
|
b602b57b02 | ||
|
ba487a24dc | ||
|
015c9313a7 | ||
|
e7c81cd1a6 | ||
|
bf7936380a | ||
|
3f56bbb9d1 | ||
|
44d0a3a716 | ||
|
999122acdb | ||
|
c785c4b716 | ||
|
b305070e0a | ||
|
99634d4c05 | ||
|
fad1c652c0 | ||
|
1df74005a8 | ||
|
c7856ce162 | ||
|
cccf01447f | ||
|
ddc3eaa5bf | ||
|
65fa73855c | ||
|
391e4943d9 | ||
|
6801f7949f | ||
|
710aa10905 | ||
|
4a78202f96 | ||
|
d6a591cde3 | ||
|
4e447cc91a | ||
|
ec75f1741b | ||
|
af38f9d6c8 | ||
|
4614d3d92b | ||
|
866a4dc6d4 | ||
|
492352f652 | ||
|
1d05f722cb | ||
|
c1b88de806 | ||
|
89168c507b | ||
|
7a69c0f98c | ||
|
8cc6075d92 | ||
|
03b36d46c3 | ||
|
8104a446d4 | ||
|
aff3852568 | ||
|
39905eaf4b | ||
|
534cef94c9 | ||
|
a0ced790e2 | ||
|
0537365cac | ||
|
6e34e3c24e | ||
|
fecf3306f3 | ||
|
39db7005cd | ||
|
e956629735 | ||
|
89ca3f087e | ||
|
29d137cc5e | ||
|
88a11c1377 | ||
|
69b895caae | ||
|
d7f433fbf7 | ||
|
4d00c4c8af | ||
|
1e6c5cd381 | ||
|
0fbc5a3d83 | ||
|
3bfb2b3f69 | ||
|
337d876df7 | ||
|
8246023e0f | ||
|
b28b94b1f1 | ||
|
baf4bd7b5c | ||
|
81126dc97e | ||
|
391f80d480 | ||
|
febe44ed79 | ||
|
ede9a6815a | ||
|
2801415c1c | ||
|
dd029ed592 | ||
|
1d4fbd240e | ||
|
7275cdd152 | ||
|
b1e6fad38a | ||
|
9671a00214 | ||
|
d17b15a545 | ||
|
f841a0a1b8 | ||
|
7472d300b6 | ||
|
06ef03f8d6 | ||
|
40322bb1b6 | ||
|
6218c2e120 | ||
|
afbf7aadd2 | ||
|
a860a3310a | ||
|
ca24013470 | ||
|
99734fc648 | ||
|
3547f0bf0e | ||
|
01a22e7223 | ||
|
2145938d74 | ||
|
62a8741494 | ||
|
13155bf846 | ||
|
4d966d1762 | ||
|
056fb494b1 | ||
|
da7c9f6a7c | ||
|
73eb54bf54 | ||
|
6af8872ef3 | ||
|
a3070bedeb | ||
|
a12f903e93 | ||
|
d4cb357b26 | ||
|
b6e31e3664 | ||
|
7355ee623a | ||
|
a7385f0fbe | ||
|
c5814ddfaa | ||
|
96c439bf10 | ||
|
7a21a9032e | ||
|
1619014120 | ||
|
0a4d062e16 | ||
|
dda2dfecb3 | ||
|
b29c0ca153 | ||
|
c0296d10db | ||
|
4f3f91dfc3 | ||
|
52c931a8b6 | ||
|
9ca70432d9 | ||
|
1fbb807cc7 | ||
|
98f446df67 | ||
|
43b9254d1d | ||
|
97034e0776 | ||
|
02e5a7afc4 | ||
|
7efddcef54 | ||
|
ea36b83ee9 | ||
|
59cece1a0a | ||
|
e5fa23c3c0 | ||
|
9a7d88362f | ||
|
7f6c859b0d | ||
|
441a5a2175 | ||
|
ceca69d121 | ||
|
6a72d0305b | ||
|
7a8d9671c2 | ||
|
5b3d238804 | ||
|
1860a06eab | ||
|
1862992ca7 | ||
|
95fa6cceee | ||
|
19076de94c | ||
|
27289cbfad | ||
|
3d76942cdf | ||
|
51cc7202f8 | ||
|
303a933403 | ||
|
54b54c41c6 | ||
|
59e50d6d53 | ||
|
2a1656e7b3 | ||
|
12ce75b5f5 | ||
|
b82d90eb39 | ||
|
f302440297 | ||
|
848021c743 | ||
|
c4b4e1d7a9 | ||
|
ed33f06235 | ||
|
643845306a | ||
|
95511540ea | ||
|
b3b5fcc874 | ||
|
1b4ba00a73 | ||
|
8caf2e7c59 | ||
|
a87a60c108 | ||
|
5b5502390d | ||
|
1db2d9c3c1 | ||
|
5ef0105a5f | ||
|
e8421dbab1 | ||
|
e0197d711f | ||
|
11563ce971 | ||
|
bbcac37e30 | ||
|
8c25f3a9f7 | ||
|
e371f3eac7 | ||
|
dc7012864b | ||
|
cd53106ec3 | ||
|
86af3a2ba4 | ||
|
a6d4b460f1 | ||
|
975ad95bff | ||
|
61c59bdc91 | ||
|
79efbcaa4e | ||
|
8cc0e5438a | ||
|
2c8be65dcf | ||
|
c3598d0d58 | ||
|
92a2c08616 | ||
|
e5b43eabe1 | ||
|
a8be17dd4d | ||
|
170ddeaf63 | ||
|
8db200d75f | ||
|
3638b36849 | ||
|
8804cf885b | ||
|
ad23388043 | ||
|
79a8ed4677 | ||
|
5eeb213b12 | ||
|
75df7c202e | ||
|
2ef37a8e77 | ||
|
acbcb18226 | ||
|
5d0fd9f73a | ||
|
47c583516b | ||
|
91c6edf092 | ||
|
c2873cbc01 | ||
|
a1f1c0cc9d | ||
|
f46ebf5bec | ||
|
6dd7b7e8b5 | ||
|
721a39502a | ||
|
b01a956461 | ||
|
364c6d328a | ||
|
f7487e4e5c | ||
|
84b414a4f0 | ||
|
3f9e6c6013 | ||
|
e855f5cba4 | ||
|
90fccff6f1 | ||
|
a380c78e1e | ||
|
a6a18f2c59 | ||
|
6efebf7571 | ||
|
c7c3adf762 | ||
|
2e29bb48fa | ||
|
e1fc0a9059 | ||
|
c846dd5666 | ||
|
19a5900db5 | ||
|
5de8c3dc3c | ||
|
3ae0d347c9 | ||
|
2244635a41 | ||
|
68bd4e9faa | ||
|
8c12c46869 | ||
|
aecd1fa04e | ||
|
ac781e570f | ||
|
f28eed7f30 | ||
|
2869e04756 | ||
|
4446888eb2 | ||
|
7783912e93 | ||
|
ccac4c5fe8 | ||
|
a18681cfe4 | ||
|
096dad1767 | ||
|
068f8eed25 | ||
|
dd62829f96 | ||
|
be2959fbab | ||
|
7acdef7c01 | ||
|
bd0b6fbdab | ||
|
c83b4c21a4 | ||
|
9d22731d03 | ||
|
7b5ad8bb74 | ||
|
af98278590 | ||
|
bef2a4bc41 | ||
|
f24396ac0d | ||
|
b7f57eb556 | ||
|
c452c83855 | ||
|
c9b32463de | ||
|
1177f843c5 | ||
|
cdca28eb3f | ||
|
5169a947f4 | ||
|
6a95f34d0c | ||
|
11083e59ed | ||
|
6b45c7bd5f | ||
|
c5ec036b84 | ||
|
e2cfc01964 | ||
|
f007aef3d8 | ||
|
5ad1ae4e7b | ||
|
32586407d1 | ||
|
233b2fdade | ||
|
ea7e07c1a4 | ||
|
acf0885948 | ||
|
d8ef094a9a | ||
|
c925e8ef58 | ||
|
3f518c9263 | ||
|
8a746b457d | ||
|
0502b9cc22 | ||
|
6a0b1333da | ||
|
d05abc0807 | ||
|
b734fed853 | ||
|
67f80c7942 | ||
|
bb24d619d2 | ||
|
62f59fa59d | ||
|
adacf21edb | ||
|
314ab17edd | ||
|
49974a169b | ||
|
3bb58556ea | ||
|
98713a7cbe | ||
|
43e503e0ee | ||
|
37518342c6 | ||
|
81d582a2d2 | ||
|
bcea34ee7c | ||
|
3ff99a9eb1 | ||
|
20fbe0e254 | ||
|
e22f431660 | ||
|
9c8f2007d9 | ||
|
62a45d86ec | ||
|
3e0b20820a | ||
|
2dc8e61a72 | ||
|
47321954b7 | ||
|
ecc79ea2ec | ||
|
710740d6be | ||
|
de3c0f274c | ||
|
b215f13f04 | ||
|
950d8b8a13 | ||
|
31fc85153e | ||
|
7f79849146 | ||
|
db9f54bee5 | ||
|
134482f6c2 | ||
|
9051b28e14 | ||
|
1f76aa65f3 | ||
|
a641a992f6 | ||
|
8c334f0c10 | ||
|
ecd7b14171 | ||
|
65a1ed0f82 | ||
|
f6a8981028 | ||
|
bd1033be68 | ||
|
6eb357b421 | ||
|
1482efc927 | ||
|
908245686e | ||
|
70337e99fa | ||
|
1ecc2e042b | ||
|
bcc75099ab | ||
|
2c66f69c51 | ||
|
3d5639a844 | ||
|
705cc6ee6b | ||
|
95496ebd38 | ||
|
574de287e7 | ||
|
7d48254cc9 | ||
|
50a917ab4c | ||
|
a8ffd339fe | ||
|
0897d3e381 | ||
|
4721007c02 | ||
|
f6b4031a96 | ||
|
39d89c8dbc | ||
|
8f2d84f4dc | ||
|
fe49e110bd | ||
|
22f7f491c5 | ||
|
60d6727974 | ||
|
86bbd05608 | ||
|
516d0f5b27 | ||
|
40d825d1c6 | ||
|
9ff92f2c36 | ||
|
740b2ffbf2 | ||
|
6728497434 | ||
|
9d2ab88c69 |
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -2,7 +2,7 @@ Checklist:
|
||||
|
||||
- [ ] Correct branch: master for new features; 3.3.x for fixes
|
||||
- [ ] Tests pass
|
||||
- [ ] Code follows coding guidelines: [master](https://area51.phpbb.com/docs/dev/master/development/coding_guidelines.html) and [3.3.x](https://area51.phpbb.com/docs/dev/3.3.x/development/coding_guidelines.html)
|
||||
- [ ] Code follows coding guidelines: [master](https://area51.phpbb.com/docs/master/coding-guidelines.html) and [3.3.x](https://area51.phpbb.com/docs/dev/3.3.x/development/coding_guidelines.html)
|
||||
- [ ] Commit follows commit message [format](https://area51.phpbb.com/docs/dev/3.3.x/development/git.html)
|
||||
|
||||
Tracker ticket (set the ticket ID to **your ticket ID**):
|
||||
|
15
.github/check-doctum-parse-errors.sh
vendored
15
.github/check-doctum-parse-errors.sh
vendored
@@ -11,16 +11,17 @@
|
||||
set -e
|
||||
|
||||
if [ ! -f doctum.phar ]; then
|
||||
# Download the latest (5.1.x) release if the file does not exist
|
||||
# Download the latest (5.x.x) release if the file does not exist
|
||||
# Remove it to update your phar
|
||||
curl -O https://doctum.long-term.support/releases/5.1/doctum.phar
|
||||
curl -O https://doctum.long-term.support/releases/5/doctum.phar
|
||||
rm -f doctum.phar.sha256
|
||||
curl -O https://doctum.long-term.support/releases/5.1/doctum.phar.sha256
|
||||
curl -O https://doctum.long-term.support/releases/5/doctum.phar.sha256
|
||||
sha256sum --strict --check doctum.phar.sha256
|
||||
rm -f doctum.phar.sha256
|
||||
# You can fetch the latest (5.1.x) version code here:
|
||||
# https://doctum.long-term.support/releases/5.1/VERSION
|
||||
chmod +x ./doctum.phar
|
||||
# You can fetch the latest (5.x.x) version code here:
|
||||
# https://doctum.long-term.support/releases/5/VERSION
|
||||
fi
|
||||
# Show the version to inform users of the script
|
||||
php doctum.phar --version
|
||||
php doctum.phar parse build/doctum-checkout.conf.php -v
|
||||
./doctum.phar version --text
|
||||
./doctum.phar parse build/doctum-checkout.conf.php -v
|
||||
|
12
.github/setup-webserver.sh
vendored
12
.github/setup-webserver.sh
vendored
@@ -28,18 +28,12 @@ NGINX_PHP_CONF="$DIR/nginx-php.conf"
|
||||
PHP_FPM_BIN="/usr/sbin/php-fpm$PHP_VERSION"
|
||||
PHP_FPM_CONF="$DIR/php-fpm.conf"
|
||||
|
||||
if [ "$PHP_VERSION" == '8.1' ]
|
||||
if [ ! -f $PHP_FPM_BIN ] && [ -f "/usr/bin/php-fpm" ]
|
||||
then
|
||||
if [ -f "/usr/sbin/php-fpm8.0" ]
|
||||
then
|
||||
PHP_FPM_BIN="/usr/sbin/php-fpm8.0"
|
||||
elif [ ! -f $PHP_FPM_BIN ] && [ -f "/usr/bin/php-fpm" ]
|
||||
then
|
||||
PHP_FPM_BIN="/usr/bin/php-fpm"
|
||||
fi
|
||||
PHP_FPM_BIN="/usr/bin/php-fpm"
|
||||
fi
|
||||
|
||||
if [ ! -f $PHP_FPM_BIN ] && [ "$PHP_VERSION" != '8.1' ]
|
||||
if [ ! -f $PHP_FPM_BIN ]
|
||||
then
|
||||
sudo apt-get install php$PHP_VERSION-fpm php$PHP_VERSION-cli \
|
||||
php$PHP_VERSION-curl php$PHP_VERSION-xml php$PHP_VERSION-mbstring \
|
||||
|
58
.github/workflows/tests.yml
vendored
58
.github/workflows/tests.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
matrix:
|
||||
include:
|
||||
- db: 'none'
|
||||
php: '7.1'
|
||||
php: '7.2'
|
||||
NOTESTS: 1
|
||||
|
||||
name: PHP ${{ matrix.php }} - ${{ matrix.db }}
|
||||
@@ -124,8 +124,10 @@ jobs:
|
||||
db: "mysql:8.0"
|
||||
- php: '8.0'
|
||||
db: "mysql:5.7"
|
||||
#- php: '8.1'
|
||||
# db: "mysql:5.7"
|
||||
- php: '8.1'
|
||||
db: "mysql:5.7"
|
||||
- php: '8.2'
|
||||
db: "mysql:5.7"
|
||||
|
||||
name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }}
|
||||
|
||||
@@ -253,6 +255,10 @@ jobs:
|
||||
db: "postgres:12"
|
||||
- php: '8.0'
|
||||
db: "postgres:13"
|
||||
- php: '8.1'
|
||||
db: "postgres:14"
|
||||
- php: '8.2'
|
||||
db: "postgres:14"
|
||||
|
||||
name: PHP ${{ matrix.php }} - ${{ matrix.db }}
|
||||
|
||||
@@ -442,14 +448,36 @@ jobs:
|
||||
|
||||
# Test with IIS & PostgreSQL on Windows
|
||||
windows-tests:
|
||||
runs-on: windows-2016
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- php: '7.4'
|
||||
db: "postgres"
|
||||
type: 'unit'
|
||||
- php: '8.0'
|
||||
db: "postgres"
|
||||
type: 'unit'
|
||||
- php: '8.1'
|
||||
db: "postgres"
|
||||
type: 'unit'
|
||||
- php: '8.2'
|
||||
db: "postgres"
|
||||
type: 'unit'
|
||||
- php: '7.4'
|
||||
db: "postgres"
|
||||
type: 'functional'
|
||||
- php: '8.0'
|
||||
db: "postgres"
|
||||
type: 'functional'
|
||||
- php: '8.1'
|
||||
db: "postgres"
|
||||
type: 'functional'
|
||||
- php: '8.2'
|
||||
db: "postgres"
|
||||
type: 'functional'
|
||||
|
||||
name: Windows - PHP ${{ matrix.php }} - ${{ matrix.db }}
|
||||
name: Windows - PHP ${{ matrix.php }} - ${{ matrix.db }} - ${{ matrix.type }}
|
||||
|
||||
steps:
|
||||
- name: Prepare git for Windows
|
||||
@@ -519,22 +547,34 @@ jobs:
|
||||
Set-ACL -Path "${env:TEMP_DIR}" -ACLObject $acl
|
||||
cd ${env:GITHUB_WORKSPACE}\phpBB
|
||||
php ..\composer.phar install
|
||||
php ..\composer.phar remove phpunit/dbunit --dev --update-with-dependencies
|
||||
php ..\composer.phar require symfony/yaml:~4.4 misantron/dbunit:~5.0 phpunit/phpunit:^9.3 --dev --update-with-all-dependencies --ignore-platform-reqs
|
||||
cd ..
|
||||
- name: Setup database
|
||||
run: |
|
||||
$postgreSqlSvc = Get-Service "postgresql*"
|
||||
Set-Service $postgreSqlSvc.Name -StartupType manual
|
||||
$postgreSqlSvc.Start()
|
||||
$runningStatus = [System.ServiceProcess.ServiceControllerStatus]::Running
|
||||
$maxStartTimeout = New-TimeSpan -Seconds 30
|
||||
try {
|
||||
(Get-Service "postgresql*").Start()
|
||||
$postgreSqlSvc.Start()
|
||||
$postgreSqlSvc.WaitForStatus($runningStatus, $maxStartTimeout)
|
||||
} catch {
|
||||
$_ | select *
|
||||
}
|
||||
[System.Environment]::SetEnvironmentVariable('PATH',$Env:PATH+";${env:PGBIN}")
|
||||
$env:PGPASSWORD = 'root'
|
||||
psql -c 'ALTER SYSTEM SET hot_standby = on;' -U postgres
|
||||
psql -c 'ALTER SYSTEM SET wal_level = minimal;' -U postgres
|
||||
psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres
|
||||
psql -c 'create database phpbb_tests;' -U postgres
|
||||
Add-MpPreference -ExclusionPath "${env:PGDATA}" # Exclude PGDATA directory from Windows Defender
|
||||
Set-MpPreference -ExclusionPath "${env:PGDATA}" # Exclude PGDATA directory from Windows Defender
|
||||
Set-MpPreference -DisableRealtimeMonitoring $true
|
||||
- name: Run unit tests
|
||||
if: ${{ matrix.type == 'unit' }}
|
||||
run: |
|
||||
phpBB/vendor/bin/phpunit --configuration .github/phpunit-psql-windows-github.xml --verbose --stop-on-error
|
||||
phpBB/vendor/bin/phpunit --configuration .github/phpunit-psql-windows-github.xml --verbose --stop-on-error --exclude-group functional
|
||||
- name: Run unit tests
|
||||
if: ${{ matrix.type == 'functional' }}
|
||||
run: |
|
||||
phpBB/vendor/bin/phpunit --configuration .github/phpunit-psql-windows-github.xml --verbose --stop-on-error --group functional
|
||||
|
34
.gitignore
vendored
34
.gitignore
vendored
@@ -1,32 +1,54 @@
|
||||
*~
|
||||
/phpunit.xml
|
||||
# Excludes cache
|
||||
/phpBB/cache/*
|
||||
!/phpBB/cache/.htaccess
|
||||
!/phpBB/cache/index.html
|
||||
/phpBB/composer.phar
|
||||
|
||||
# Excludes user data
|
||||
/phpBB/config*.php*
|
||||
/phpBB/ext/*
|
||||
/phpBB/files/*
|
||||
/phpBB/images/avatars/gallery/*
|
||||
/phpBB/images/avatars/upload/*
|
||||
/phpBB/images/ranks/*
|
||||
/phpBB/install/schemas/schema.json
|
||||
/phpBB/store/*
|
||||
|
||||
# Excludes all custom langages
|
||||
/phpBB/language/*
|
||||
!/phpBB/language/en
|
||||
/phpBB/store/*
|
||||
|
||||
# Excludes all custom styles
|
||||
/phpBB/styles/*
|
||||
!/phpBB/styles/prosilver
|
||||
/phpBB/styles/prosilver/theme/*/
|
||||
!/phpBB/styles/prosilver/theme/en
|
||||
!/phpBB/styles/prosilver/theme/images
|
||||
!/phpBB/styles/all
|
||||
node_modules
|
||||
|
||||
# Excludes all custom env
|
||||
/phpBB/config/*
|
||||
!/phpBB/config/default
|
||||
!/phpBB/config/development
|
||||
!/phpBB/config/installer
|
||||
!/phpBB/config/production
|
||||
!/phpBB/config/test
|
||||
!/phpBB/config/.htaccess
|
||||
|
||||
# Excludes vendors
|
||||
/phpBB/vendor
|
||||
|
||||
# Excludes test / dev files
|
||||
/phpunit.xml
|
||||
/phpBB/composer.phar
|
||||
/tests/phpbb_unit_tests.sqlite*
|
||||
/tests/test_config*.php
|
||||
/tests/tmp/*
|
||||
/tests/vendor
|
||||
/vagrant/phpbb-install-config.yml
|
||||
.vagrant
|
||||
node_modules
|
||||
|
||||
# Excludes IDE / editors files
|
||||
*~
|
||||
.idea
|
||||
*.DS_Store*
|
||||
/.vscode
|
||||
|
@@ -1,4 +1,4 @@
|
||||
[](https://www.phpbb.com)
|
||||
[<img src="phpBB/styles/all/imgs/svg/phpbb_logo_large_cosmic.svg" alt="phpBB" style="max-width:40%" width="400">](https://www.phpbb.com)
|
||||
|
||||
phpBB is a free open-source bulletin board written in PHP.
|
||||
|
||||
|
@@ -2,9 +2,9 @@
|
||||
|
||||
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
|
||||
<!-- a few settings for the build -->
|
||||
<property name="newversion" value="3.3.4" />
|
||||
<property name="prevversion" value="3.3.3" />
|
||||
<property name="olderversions" value="3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9, 3.2.10, 3.2.11, 3.3.0, 3.3.1, 3.3.2, 3.3.4-RC1" />
|
||||
<property name="newversion" value="3.3.6" />
|
||||
<property name="prevversion" value="3.3.5" />
|
||||
<property name="olderversions" value="3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9, 3.2.10, 3.2.11, 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.3.4, 3.3.6-RC1" />
|
||||
<!-- no configuration should be needed beyond this point -->
|
||||
|
||||
<property name="oldversions" value="${olderversions}, ${prevversion}" />
|
||||
@@ -128,13 +128,13 @@
|
||||
<!-- Builds docs for current branch into build/api/output/master -->
|
||||
<target name="docs">
|
||||
<exec dir="."
|
||||
command="php doctum.phar update build/doctum-checkout.conf.php"
|
||||
command="./doctum.phar update build/doctum-checkout.conf.php"
|
||||
passthru="true" />
|
||||
</target>
|
||||
<!-- Builds docs for multiple branches/tags into build/api/output/$branch -->
|
||||
<target name="docs-all">
|
||||
<exec dir="."
|
||||
command="php doctum.phar update build/doctum-all.conf.php"
|
||||
command="./doctum.phar update build/doctum-all.conf.php"
|
||||
passthru="true" />
|
||||
</target>
|
||||
|
||||
|
@@ -38,6 +38,7 @@ else
|
||||
$xml = simplexml_load_string(file_get_contents($url));
|
||||
}
|
||||
|
||||
$types = [];
|
||||
foreach ($xml->xpath('//item') as $item)
|
||||
{
|
||||
$key = (string) $item->key;
|
||||
@@ -51,17 +52,20 @@ foreach ($xml->xpath('//item') as $item)
|
||||
$types[(string) $item->type][$key] = $value;
|
||||
}
|
||||
|
||||
ksort($types);
|
||||
foreach ($types as $type => $tickets)
|
||||
if (count($types))
|
||||
{
|
||||
echo "<h4>$type</h4>\n";
|
||||
echo "<ul>\n";
|
||||
|
||||
uksort($tickets, 'strnatcasecmp');
|
||||
|
||||
foreach ($tickets as $ticket)
|
||||
ksort($types);
|
||||
foreach ($types as $type => $tickets)
|
||||
{
|
||||
echo "<li>$ticket</li>\n";
|
||||
echo "<h4>$type</h4>\n";
|
||||
echo "<ul>\n";
|
||||
|
||||
uksort($tickets, 'strnatcasecmp');
|
||||
|
||||
foreach ($tickets as $ticket)
|
||||
{
|
||||
echo "<li>$ticket</li>\n";
|
||||
}
|
||||
echo "</ul>\n";
|
||||
}
|
||||
echo "</ul>\n";
|
||||
}
|
||||
|
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
use PHP_CodeSniffer\Files\File;
|
||||
use PHP_CodeSniffer\Sniffs\Sniff;
|
||||
|
||||
/**
|
||||
* Checks that the visibility qualifiers are placed after the static keyword
|
||||
* according to the coding guidelines
|
||||
*/
|
||||
class phpbb_Sniffs_ControlStructures_StaticKeywordSniff implements Sniff
|
||||
{
|
||||
/**
|
||||
* Registers the tokens that this sniff wants to listen for.
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
return [
|
||||
T_STATIC,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes this test, when one of its tokens is encountered.
|
||||
*
|
||||
* @param File $phpcsFile The file being scanned.
|
||||
* @param int $stackPtr The position of the current token in the stack passed in $tokens.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function process(File $phpcsFile, $stackPtr)
|
||||
{
|
||||
$tokens = $phpcsFile->getTokens();
|
||||
|
||||
$disallowed_after_tokens = [
|
||||
T_PUBLIC,
|
||||
T_PROTECTED,
|
||||
T_PRIVATE,
|
||||
];
|
||||
|
||||
if (in_array($tokens[$stackPtr + 2]['code'], $disallowed_after_tokens))
|
||||
{
|
||||
$error = 'Access specifier (e.g. public) should not follow static scope attribute. Encountered "' . $tokens[$stackPtr + 2]['content'] . '" after static';
|
||||
$phpcsFile->addWarning($error, $stackPtr, 'InvalidStaticFunctionDeclaration', [], 1);
|
||||
}
|
||||
}
|
||||
}
|
@@ -89,4 +89,7 @@
|
||||
<!-- There MUST be one space between control structure and opening parenthesis -->
|
||||
<rule ref="./phpbb/Sniffs/ControlStructures/OpeningParenthesisSniff.php" />
|
||||
|
||||
<!-- Static qualifier MUST be placed before the visibility qualifiers. -->
|
||||
<rule ref="./phpbb/Sniffs/ControlStructures/StaticKeywordSniff.php" />
|
||||
|
||||
</ruleset>
|
||||
|
BIN
composer.phar
BIN
composer.phar
Binary file not shown.
BIN
doctum.phar
Normal file → Executable file
BIN
doctum.phar
Normal file → Executable file
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# A hook to check syntax of a phpBB3 commit message, per:
|
||||
# * <http://wiki.phpbb.com/display/DEV/Git>
|
||||
# * <https://area51.phpbb.com/docs/dev/master/development/git.html>
|
||||
# * <http://area51.phpbb.com/phpBB/viewtopic.php?p=209919#p209919>
|
||||
#
|
||||
# This is a commit-msg hook.
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
||||
<!-- BEGIN upload -->
|
||||
:: {upload.FILE_INFO}<br />
|
||||
<!-- IF upload.S_DENIED --><span class="error">{upload.DENIED}</span><!-- ELSEIF upload.ERROR_MSG --><span class="error">{upload.ERROR_MSG}</span><!-- ELSE --><span class="success">{L_SUCCESSFULLY_UPLOADED}</span><!-- ENDIF -->
|
||||
<!-- IF upload.S_DENIED --><span class="error">{upload.L_DENIED}</span><!-- ELSEIF upload.ERROR_MSG --><span class="error">{upload.ERROR_MSG}</span><!-- ELSE --><span class="success">{L_SUCCESSFULLY_UPLOADED}</span><!-- ENDIF -->
|
||||
<br /><br />
|
||||
<!-- END upload -->
|
||||
|
||||
|
@@ -31,11 +31,11 @@
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_BBCODE_HELPLINE}</legend>
|
||||
<p>{L_BBCODE_HELPLINE_EXPLAIN}</p>
|
||||
<legend>{{ lang('BBCODE_HELPLINE') }}</legend>
|
||||
<p>{{ lang('BBCODE_HELPLINE_EXPLAIN') }}</p>
|
||||
<dl>
|
||||
<dt><label for="bbcode_helpline">{L_BBCODE_HELPLINE_TEXT}</label></dt>
|
||||
<dd><input type="text" id="bbcode_helpline" name="bbcode_helpline" size="60" maxlength="255" value="{BBCODE_HELPLINE}" /></dd>
|
||||
<dt><label for="bbcode_helpline">{{ lang('BBCODE_HELPLINE_TEXT') }}</label></dt>
|
||||
<dd><textarea id="bbcode_helpline" name="bbcode_helpline" cols="60" rows="4">{{ BBCODE_HELPLINE }}</textarea></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
|
@@ -58,7 +58,6 @@
|
||||
<dl>
|
||||
<dt><label for="type">{L_BACKUP_TYPE}{L_COLON}</label></dt>
|
||||
<dd><label><input type="radio" class="radio" name="type" value="full" id="type" checked="checked" /> {L_FULL_BACKUP}</label>
|
||||
<label><input type="radio" name="type" class="radio" value="structure" /> {L_STRUCTURE_ONLY}</label>
|
||||
<label><input type="radio" class="radio" name="type" value="data" /> {L_DATA_ONLY}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
|
@@ -105,7 +105,7 @@
|
||||
<!-- BEGIN items -->
|
||||
<tr>
|
||||
|
||||
<td style="text-align: center;"><img src="{items.IMG_SRC}" alt="{items.TEXT_ALT}" title="{items.TEXT_ALT}" /><input type="hidden" name="image[{items.IMG}]" value="1" /></td>
|
||||
<td style="text-align: center;"><img src="{items.IMG_SRC}" alt="{items.TEXT_ALT}" title="{items.TEXT_ALT}" style="max-width: 160px;"><input type="hidden" name="image[{items.IMG}]" value="1" /></td>
|
||||
<td style="vertical-align: top;">[{items.IMG}]</td>
|
||||
<!-- IF S_SMILIES -->
|
||||
<td><input class="text post" type="text" name="code[{items.IMG}]" value="{items.CODE}" size="10" maxlength="50" /></td>
|
||||
|
@@ -45,7 +45,7 @@
|
||||
</tr>
|
||||
<!-- BEGINELSE -->
|
||||
<tr>
|
||||
<td colspan="6" style="text-align: center;">{L_NO_INACTIVE_USERS}</td>
|
||||
<td colspan="7" style="text-align: center;">{L_NO_INACTIVE_USERS}</td>
|
||||
</tr>
|
||||
<!-- END inactive -->
|
||||
</tbody>
|
||||
|
@@ -140,7 +140,6 @@
|
||||
<td class="tabled"><strong>{{ PHP_VERSION_INFO }}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
{% if S_TOTAL_ORPHAN %}
|
||||
<td class="tabled">{{ lang('NUMBER_ORPHAN') ~ lang('COLON') }}</td>
|
||||
<td class="tabled">
|
||||
{% if TOTAL_ORPHAN > 0 %}
|
||||
@@ -149,8 +148,6 @@
|
||||
<strong>{{ TOTAL_ORPHAN }}</strong>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% else %}
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% if S_VERSIONCHECK %}
|
||||
<tr>
|
||||
@@ -204,10 +201,12 @@
|
||||
<td class="tabled">{{ lang('FILES_PER_DAY') ~ lang('COLON') }}</td>
|
||||
<td class="tabled"><strong>{{ FILES_PER_DAY }}</strong></td>
|
||||
</tr>
|
||||
{% if S_VERSIONCHECK %}
|
||||
<tr>
|
||||
<td class="tabled"> </td>
|
||||
<td class="tabled"> </td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@@ -85,7 +85,7 @@
|
||||
<!-- BEGIN ranks -->
|
||||
<tr>
|
||||
<!-- EVENT acp_ranks_list_column_before -->
|
||||
<td style="text-align: center;"><!-- IF ranks.S_RANK_IMAGE --><img src="{ranks.RANK_IMAGE}" alt="{ranks.RANK_TITLE}" title="{ranks.RANK_TITLE}" /><!-- ELSE --> - <!-- ENDIF --></td>
|
||||
<td style="text-align: center;"><!-- IF ranks.S_RANK_IMAGE --><img src="{ranks.RANK_IMAGE}" alt="{ranks.RANK_TITLE}" title="{ranks.RANK_TITLE}" style="max-width: 160px;"><!-- ELSE --> - <!-- ENDIF --></td>
|
||||
<td style="text-align: center;">{ranks.RANK_TITLE}</td>
|
||||
<td style="text-align: center;"><!-- IF ranks.S_SPECIAL_RANK --> - <!-- ELSE -->{ranks.MIN_POSTS}<!-- ENDIF --></td>
|
||||
<!-- EVENT acp_ranks_list_column_after -->
|
||||
|
@@ -96,10 +96,10 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{L_STYLE_NAME}</th>
|
||||
<th width="10%" style="white-space: nowrap; text-align: center;">{{ lang('STYLE_VERSION') }}</th>
|
||||
<th width="10%" style="white-space: nowrap; text-align: center;">{L_STYLE_PHPBB_VERSION}</th>
|
||||
<!-- IF not STYLES_LIST_HIDE_COUNT --><th width="10%" style="white-space: nowrap; text-align: center;">{L_STYLE_USED_BY}</th><!-- ENDIF -->
|
||||
<th width="25%" style="white-space: nowrap; text-align: center;">{L_ACTIONS}</th>
|
||||
<th style="width: 10%; white-space: nowrap; text-align: center;">{{ lang('STYLE_VERSION') }}</th>
|
||||
<th style="width: 10%; white-space: nowrap; text-align: center;">{L_STYLE_PHPBB_VERSION}</th>
|
||||
<!-- IF not STYLES_LIST_HIDE_COUNT --><th style="width: 10%; white-space: nowrap; text-align: center;">{L_STYLE_USED_BY}</th><!-- ENDIF -->
|
||||
<th style="width: 25%; white-space: nowrap; text-align: center;">{L_ACTIONS}</th>
|
||||
{STYLES_LIST_EXTRA}
|
||||
<th> </th>
|
||||
</tr>
|
||||
@@ -146,7 +146,7 @@
|
||||
<!-- END actions -->
|
||||
</td>
|
||||
{styles_list.EXTRA}
|
||||
<td class="{$ROW_CLASS} mark" width="20">
|
||||
<td class="{$ROW_CLASS} mark" style="width: 20px;">
|
||||
<!-- IF styles_list.STYLE_ID -->
|
||||
{% if styles_list.STYLE_NAME !== 'prosilver' %}
|
||||
<input class="checkbox" type="checkbox" name="ids[]" value="{styles_list.STYLE_ID}" />
|
||||
|
@@ -2,7 +2,6 @@
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
|
||||
<a href="<!-- IF U_LIST -->{U_LIST}<!-- ELSE -->{U_ACTION}<!-- ENDIF -->" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a>
|
||||
|
||||
<h1>{L_QUESTIONS}</h1>
|
||||
@@ -25,15 +24,18 @@
|
||||
<td style="vertical-align: top; width: 50px; text-align: center; white-space: nowrap;">{L_ACTION}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<!-- BEGIN questions -->
|
||||
<tr>
|
||||
<td style="text-align: left;">{questions.QUESTION_TEXT}</td>
|
||||
<td style="text-align: center;">{questions.QUESTION_LANG}</td>
|
||||
<td style="text-align: center;"><a href="{questions.U_EDIT}">{ICON_EDIT}</a> <a href="{questions.U_DELETE}">{ICON_DELETE}</a></td>
|
||||
</tr>
|
||||
<!-- END questions -->
|
||||
{% for question in questions %}
|
||||
<tr>
|
||||
{# RTL is already managed by CSS #}
|
||||
<td>{{ question.QUESTION_TEXT }}</td>
|
||||
<td style="text-align: center;">{{ question.QUESTION_LANG }}</td>
|
||||
<td style="text-align: center;"><a href="{{ question.U_EDIT }}">{{ ICON_EDIT }}</a> <a href="{{ question.U_DELETE }}">{{ ICON_DELETE }}</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
<fieldset class="quick">
|
||||
<input class="button1" type="submit" name="add" value="{L_ADD}" />
|
||||
|
@@ -23,7 +23,7 @@ installLang = {
|
||||
</script>
|
||||
|
||||
<script src="{T_JQUERY_LINK}"></script>
|
||||
<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery-3.5.1.min.js">\x3C/script>');</script><!-- ENDIF -->
|
||||
<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery-3.6.0.min.js">\x3C/script>');</script><!-- ENDIF -->
|
||||
<script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
|
||||
<!-- INCLUDEJS admin.js -->
|
||||
{$SCRIPTS}
|
||||
|
@@ -24,7 +24,7 @@
|
||||
|
||||
<div id="phpbb_alert" class="phpbb_alert" data-l-err="{L_ERROR}" data-l-timeout-processing-req="{L_TIMEOUT_PROCESSING_REQ}">
|
||||
<a href="#" class="alert_close"></a>
|
||||
<h3 class="alert_title"></h3><p class="alert_text"></p>
|
||||
<h3 class="alert_title"> </h3><p class="alert_text"></p>
|
||||
</div>
|
||||
<div id="phpbb_confirm" class="phpbb_alert">
|
||||
<a href="#" class="alert_close"></a>
|
||||
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
|
||||
<script src="{T_JQUERY_LINK}"></script>
|
||||
<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery-3.5.1.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
|
||||
<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery-3.6.0.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
|
||||
<script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
|
||||
<!-- INCLUDEJS ajax.js -->
|
||||
<!-- INCLUDEJS admin.js -->
|
||||
|
@@ -12,10 +12,10 @@
|
||||
|
||||
<script>
|
||||
// <![CDATA[
|
||||
var jump_page = '{LA_JUMP_PAGE}{L_COLON}';
|
||||
var on_page = '{CURRENT_PAGE}';
|
||||
var per_page = '{PER_PAGE}';
|
||||
var base_url = '{BASE_URL|e('js')}';
|
||||
var jump_page = "{{ lang_js('JUMP_PAGE') ~ lang_js('COLON') }}";
|
||||
var on_page = '{{ CURRENT_PAGE }}';
|
||||
var per_page = '{{ PER_PAGE }}';
|
||||
var base_url = "{{ BASE_URL|e('js') }}";
|
||||
|
||||
/**
|
||||
* Jump to page
|
||||
|
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
|
||||
<script src="{T_JQUERY_LINK}"></script>
|
||||
<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery-3.5.1.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
|
||||
<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery-3.6.0.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
|
||||
<script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
|
||||
|
||||
<!-- EVENT acp_simple_footer_after -->
|
||||
|
2
phpBB/assets/javascript/jquery-3.5.1.min.js
vendored
2
phpBB/assets/javascript/jquery-3.5.1.min.js
vendored
File diff suppressed because one or more lines are too long
2
phpBB/assets/javascript/jquery-3.6.0.min.js
vendored
Normal file
2
phpBB/assets/javascript/jquery-3.6.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
phpBB/assets/plupload/plupload.full.min.js
vendored
4
phpBB/assets/plupload/plupload.full.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -96,6 +96,8 @@ include($phpbb_root_path . 'includes/functions_compatibility.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/constants.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
|
||||
|
||||
// Registered before building the container so the development environment stay capable of intercepting
|
||||
// the container builder exceptions.
|
||||
if (PHPBB_ENVIRONMENT === 'development')
|
||||
{
|
||||
\phpbb\debug\debug::enable();
|
||||
@@ -129,6 +131,11 @@ catch (InvalidArgumentException $e)
|
||||
}
|
||||
}
|
||||
|
||||
if ($phpbb_container->getParameter('debug.error_handler'))
|
||||
{
|
||||
\phpbb\debug\debug::enable();
|
||||
}
|
||||
|
||||
$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
|
||||
$phpbb_class_loader_ext->set_cache($phpbb_container->get('cache.driver'));
|
||||
|
||||
|
@@ -15,8 +15,9 @@
|
||||
"support": {
|
||||
"issues": "https://tracker.phpbb.com",
|
||||
"forum": "https://www.phpbb.com/community/",
|
||||
"wiki": "https://wiki.phpbb.com",
|
||||
"irc": "irc://irc.freenode.org/phpbb"
|
||||
"docs": "https://www.phpbb.com/support/docs/",
|
||||
"irc": "irc://irc.libera.chat/phpbb",
|
||||
"chat": "https://www.phpbb.com/support/chat/"
|
||||
},
|
||||
"scripts": {
|
||||
"post-update-cmd": "echo 'You MUST manually modify the clean-vendor-dir target in build/build.xml when adding or upgrading dependencies.'"
|
||||
@@ -34,7 +35,6 @@
|
||||
"guzzlehttp/guzzle": "~6.3",
|
||||
"lusitanian/oauth": "^0.8.1",
|
||||
"marc1706/fast-image-size": "^1.1",
|
||||
"patchwork/utf8": "^1.1",
|
||||
"s9e/text-formatter": "^2.0",
|
||||
"symfony/config": "~3.4",
|
||||
"symfony/console": "~3.4",
|
||||
@@ -45,6 +45,9 @@
|
||||
"symfony/finder": "~3.4",
|
||||
"symfony/http-foundation": "~3.4",
|
||||
"symfony/http-kernel": "~3.4",
|
||||
"symfony/polyfill-intl-normalizer": "^1.23",
|
||||
"symfony/polyfill-mbstring": "^1.23",
|
||||
"symfony/polyfill-php72": "^1.23",
|
||||
"symfony/process": "^3.4",
|
||||
"symfony/proxy-manager-bridge": "~3.4",
|
||||
"symfony/routing": "~3.4",
|
||||
|
448
phpBB/composer.lock
generated
448
phpBB/composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -11,6 +11,7 @@ core:
|
||||
sql_explain: true
|
||||
memory: true
|
||||
show_errors: true
|
||||
error_handler: true
|
||||
|
||||
twig:
|
||||
debug: true
|
||||
|
126
phpBB/develop/export_events_for_bbcode.php
Normal file
126
phpBB/develop/export_events_for_bbcode.php
Normal file
@@ -0,0 +1,126 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
if (php_sapi_name() != 'cli')
|
||||
{
|
||||
die("This program must be run from the command line.\n");
|
||||
}
|
||||
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
$phpbb_root_path = __DIR__ . '/../';
|
||||
define('IN_PHPBB', true);
|
||||
|
||||
function usage()
|
||||
{
|
||||
echo "Usage: export_events_for_bbcode.php COMMAND [VERSION] [EXTENSION]\n";
|
||||
echo "\n";
|
||||
echo "COMMAND:\n";
|
||||
echo " diff:\n";
|
||||
echo " Generate the Event Diff for the release highlights\n";
|
||||
echo "\n";
|
||||
echo " php:\n";
|
||||
echo " Generate the PHP event section of Event_List\n";
|
||||
echo "\n";
|
||||
echo " adm:\n";
|
||||
echo " Generate the ACP Template event section of Event_List\n";
|
||||
echo "\n";
|
||||
echo " styles:\n";
|
||||
echo " Generate the Styles Template event section of Event_List\n";
|
||||
echo "\n";
|
||||
echo "VERSION (diff only):\n";
|
||||
echo " Filter events (minimum version)\n";
|
||||
echo "\n";
|
||||
echo "EXTENSION (Optional):\n";
|
||||
echo " If not given, only core events will be exported.\n";
|
||||
echo " Otherwise only events from the extension will be exported.\n";
|
||||
echo "\n";
|
||||
exit(2);
|
||||
}
|
||||
|
||||
function validate_argument_count($arguments, $count)
|
||||
{
|
||||
if ($arguments <= $count)
|
||||
{
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
validate_argument_count($argc, 1);
|
||||
|
||||
$action = $argv[1];
|
||||
$extension = isset($argv[2]) ? $argv[2] : null;
|
||||
$min_version = null;
|
||||
require __DIR__ . '/../phpbb/event/php_exporter.' . $phpEx;
|
||||
require __DIR__ . '/../phpbb/event/md_exporter.' . $phpEx;
|
||||
require __DIR__ . '/../phpbb/event/rst_exporter.' . $phpEx;
|
||||
require __DIR__ . '/../includes/functions.' . $phpEx;
|
||||
require __DIR__ . '/../phpbb/event/recursive_event_filter_iterator.' . $phpEx;
|
||||
require __DIR__ . '/../phpbb/recursive_dot_prefix_filter_iterator.' . $phpEx;
|
||||
|
||||
switch ($action)
|
||||
{
|
||||
|
||||
case 'diff':
|
||||
echo "[size=200]Event changes[/size]\n\n";
|
||||
$min_version = $extension;
|
||||
$extension = isset($argv[3]) ? $argv[3] : null;
|
||||
|
||||
case 'php':
|
||||
$exporter = new \phpbb\event\php_exporter($phpbb_root_path, $extension, $min_version);
|
||||
$exporter->crawl_phpbb_directory_php();
|
||||
echo $exporter->export_events_for_bbcode($action);
|
||||
|
||||
if ($action === 'php')
|
||||
{
|
||||
break;
|
||||
}
|
||||
echo "\n\n";
|
||||
// no break;
|
||||
|
||||
case 'styles':
|
||||
$exporter = new \phpbb\event\md_exporter($phpbb_root_path, $extension, $min_version);
|
||||
if ($min_version && $action === 'diff')
|
||||
{
|
||||
$exporter->crawl_eventsmd('docs/events.md', 'styles');
|
||||
}
|
||||
else
|
||||
{
|
||||
$exporter->crawl_phpbb_directory_styles('docs/events.md');
|
||||
}
|
||||
echo $exporter->export_events_for_bbcode($action);
|
||||
|
||||
if ($action === 'styles')
|
||||
{
|
||||
break;
|
||||
}
|
||||
echo "\n\n";
|
||||
// no break;
|
||||
|
||||
case 'adm':
|
||||
$exporter = new \phpbb\event\md_exporter($phpbb_root_path, $extension, $min_version);
|
||||
if ($min_version && $action === 'diff')
|
||||
{
|
||||
$exporter->crawl_eventsmd('docs/events.md', 'adm');
|
||||
}
|
||||
else
|
||||
{
|
||||
$exporter->crawl_phpbb_directory_adm('docs/events.md');
|
||||
}
|
||||
echo $exporter->export_events_for_bbcode($action);
|
||||
|
||||
echo "\n";
|
||||
break;
|
||||
|
||||
default:
|
||||
usage();
|
||||
}
|
140
phpBB/develop/export_events_for_rst.php
Normal file
140
phpBB/develop/export_events_for_rst.php
Normal file
@@ -0,0 +1,140 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
if (php_sapi_name() != 'cli')
|
||||
{
|
||||
die("This program must be run from the command line.\n");
|
||||
}
|
||||
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
$phpbb_root_path = __DIR__ . '/../';
|
||||
define('IN_PHPBB', true);
|
||||
|
||||
function usage()
|
||||
{
|
||||
echo "Usage: export_events_for_rst.php COMMAND [VERSION] [EXTENSION]\n";
|
||||
echo "\n";
|
||||
echo "COMMAND:\n";
|
||||
echo " all:\n";
|
||||
echo " Generate the complete rst for the Event List\n";
|
||||
echo "\n";
|
||||
echo " diff:\n";
|
||||
echo " Generate the Event Diff for the release highlights\n";
|
||||
echo "\n";
|
||||
echo " php:\n";
|
||||
echo " Generate the PHP event section of Event_List\n";
|
||||
echo "\n";
|
||||
echo " adm:\n";
|
||||
echo " Generate the ACP Template event section of Event_List\n";
|
||||
echo "\n";
|
||||
echo " styles:\n";
|
||||
echo " Generate the Styles Template event section of Event_List\n";
|
||||
echo "\n";
|
||||
echo "VERSION (diff only):\n";
|
||||
echo " Filter events (minimum version)\n";
|
||||
echo "\n";
|
||||
echo "EXTENSION (Optional):\n";
|
||||
echo " If not given, only core events will be exported.\n";
|
||||
echo " Otherwise only events from the extension will be exported.\n";
|
||||
echo "\n";
|
||||
exit(2);
|
||||
}
|
||||
|
||||
function validate_argument_count($arguments, $count)
|
||||
{
|
||||
if ($arguments <= $count)
|
||||
{
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
validate_argument_count($argc, 1);
|
||||
|
||||
$action = $argv[1];
|
||||
$extension = isset($argv[2]) ? $argv[2] : null;
|
||||
$min_version = null;
|
||||
require __DIR__ . '/../phpbb/event/php_exporter.' . $phpEx;
|
||||
require __DIR__ . '/../phpbb/event/md_exporter.' . $phpEx;
|
||||
require __DIR__ . '/../phpbb/event/rst_exporter.' . $phpEx;
|
||||
require __DIR__ . '/../includes/functions.' . $phpEx;
|
||||
require __DIR__ . '/../phpbb/event/recursive_event_filter_iterator.' . $phpEx;
|
||||
require __DIR__ . '/../phpbb/recursive_dot_prefix_filter_iterator.' . $phpEx;
|
||||
|
||||
switch ($action)
|
||||
{
|
||||
|
||||
case 'diff':
|
||||
echo '== Event changes ==' . "\n";
|
||||
echo "Event changes\n";
|
||||
echo "=============\n\n";
|
||||
$min_version = $extension;
|
||||
$extension = isset($argv[3]) ? $argv[3] : null;
|
||||
|
||||
case 'all':
|
||||
if ($action === 'all')
|
||||
{
|
||||
echo "==========================\n";
|
||||
echo "Events List\n";
|
||||
echo "==========================\n\n";
|
||||
}
|
||||
|
||||
|
||||
case 'php':
|
||||
$exporter = new \phpbb\event\php_exporter($phpbb_root_path, $extension, $min_version);
|
||||
$exporter->crawl_phpbb_directory_php();
|
||||
echo $exporter->export_events_for_rst($action);
|
||||
|
||||
if ($action === 'php')
|
||||
{
|
||||
break;
|
||||
}
|
||||
echo "\n\n";
|
||||
// no break;
|
||||
|
||||
case 'styles':
|
||||
$exporter = new \phpbb\event\md_exporter($phpbb_root_path, $extension, $min_version);
|
||||
if ($min_version && $action === 'diff')
|
||||
{
|
||||
$exporter->crawl_eventsmd('docs/events.md', 'styles');
|
||||
}
|
||||
else
|
||||
{
|
||||
$exporter->crawl_phpbb_directory_styles('docs/events.md');
|
||||
}
|
||||
echo $exporter->export_events_for_rst($action);
|
||||
|
||||
if ($action === 'styles')
|
||||
{
|
||||
break;
|
||||
}
|
||||
echo "\n\n";
|
||||
// no break;
|
||||
|
||||
case 'adm':
|
||||
$exporter = new \phpbb\event\md_exporter($phpbb_root_path, $extension, $min_version);
|
||||
if ($min_version && $action === 'diff')
|
||||
{
|
||||
$exporter->crawl_eventsmd('docs/events.md', 'adm');
|
||||
}
|
||||
else
|
||||
{
|
||||
$exporter->crawl_phpbb_directory_adm('docs/events.md');
|
||||
}
|
||||
echo $exporter->export_events_for_rst($action);
|
||||
|
||||
echo "\n";
|
||||
break;
|
||||
|
||||
default:
|
||||
usage();
|
||||
}
|
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Rebuild BOTS
|
||||
*
|
||||
* You should make a backup from your whole database. Things can and will go wrong.
|
||||
* You should make a backup from your whole database. Things can and will go wrong.
|
||||
* This will only work if no BOTs were added.
|
||||
*
|
||||
*/
|
||||
@@ -24,10 +24,14 @@ $user->setup();
|
||||
|
||||
$bots = array(
|
||||
'AdsBot [Google]' => array('AdsBot-Google', ''),
|
||||
'Ahrefs [Bot]' => array('AhrefsBot/', ''),
|
||||
'Alexa [Bot]' => array('ia_archiver', ''),
|
||||
'Alta Vista [Bot]' => array('Scooter/', ''),
|
||||
'Amazon [Bot]' => array('Amazonbot/', ''),
|
||||
'Ask Jeeves [Bot]' => array('Ask Jeeves', ''),
|
||||
'Baidu [Spider]' => array('Baiduspider+(', ''),
|
||||
'Baidu [Spider]' => array('Baiduspider', ''),
|
||||
'Bing [Bot]' => array('bingbot/', ''),
|
||||
'DuckDuckGo [Bot]' => array('DuckDuckBot/', ''),
|
||||
'Exabot [Bot]' => array('Exabot/', ''),
|
||||
'FAST Enterprise [Crawler]' => array('FAST Enterprise Crawler', ''),
|
||||
'FAST WebCrawler [Crawler]' => array('FAST-WebCrawler/', ''),
|
||||
@@ -41,7 +45,7 @@ $bots = array(
|
||||
'Heritrix [Crawler]' => array('heritrix/1.', ''),
|
||||
'IBM Research [Bot]' => array('ibm.com/cs/crawler', ''),
|
||||
'ICCrawler - ICjobs' => array('ICCrawler - ICjobs', ''),
|
||||
'ichiro [Crawler]' => array('ichiro/2', ''),
|
||||
'ichiro [Crawler]' => array('ichiro/', ''),
|
||||
'Majestic-12 [Bot]' => array('MJ12bot/', ''),
|
||||
'Metager [Bot]' => array('MetagerBot/', ''),
|
||||
'MSN NewsBlogs' => array('msnbot-NewsBlogs/', ''),
|
||||
@@ -54,6 +58,7 @@ $bots = array(
|
||||
'Online link [Validator]' => array('online link validator', ''),
|
||||
'psbot [Picsearch]' => array('psbot/0', ''),
|
||||
'Seekport [Bot]' => array('Seekbot/', ''),
|
||||
'Semrush [Bot]' => array('SemrushBot/', ''),
|
||||
'Sensis [Crawler]' => array('Sensis Web Crawler', ''),
|
||||
'SEO Crawler' => array('SEO search Crawler/', ''),
|
||||
'Seoma [Crawler]' => array('Seoma [SEO Crawler]', ''),
|
||||
@@ -63,7 +68,7 @@ $bots = array(
|
||||
'Synoo [Bot]' => array('SynooBot/', ''),
|
||||
'Telekom [Bot]' => array('crawleradmin.t-info@telekom.de', ''),
|
||||
'TurnitinBot [Bot]' => array('TurnitinBot/', ''),
|
||||
'Voyager [Bot]' => array('voyager/1.0', ''),
|
||||
'Voyager [Bot]' => array('voyager/', ''),
|
||||
'W3 [Sitesearch]' => array('W3 SiteSearch Crawler', ''),
|
||||
'W3C [Linkcheck]' => array('W3C-checklink/', ''),
|
||||
'W3C [Validator]' => array('W3C_*Validator', ''),
|
||||
@@ -74,7 +79,7 @@ $bots = array(
|
||||
'Yahoo [Bot]' => array('Yahoo! Slurp', ''),
|
||||
'YahooSeeker [Bot]' => array('YahooSeeker/', ''),
|
||||
);
|
||||
|
||||
|
||||
$bot_ids = array();
|
||||
user_get_id_name($bot_ids, array_keys($bots), USER_IGNORE);
|
||||
foreach($bot_ids as $bot)
|
||||
|
@@ -50,6 +50,10 @@
|
||||
<ol>
|
||||
<li><a href="#changelog">Changelog</a>
|
||||
<ul>
|
||||
<li><a href="#v336rc1">Changes since 3.3.6-RC1</a></li>
|
||||
<li><a href="#v335">Changes since 3.3.5</a></li>
|
||||
<li><a href="#v335rc1">Changes since 3.3.5-RC1</a></li>
|
||||
<li><a href="#v334">Changes since 3.3.4</a></li>
|
||||
<li><a href="#v334rc1">Changes since 3.3.4-RC1</a></li>
|
||||
<li><a href="#v333">Changes since 3.3.3</a></li>
|
||||
<li><a href="#v332">Changes since 3.3.2</a></li>
|
||||
@@ -156,6 +160,144 @@
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
<a name="v336rc1"></a><h3>Changes since 3.3.6-RC1</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16872">PHPBB3-16872</a>] - Create event exporter to BBCode</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16956">PHPBB3-16956</a>] - White screen after disable extention</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-15028">PHPBB3-15028</a>] - Change update instructions in ACP</li>
|
||||
</ul>
|
||||
<h4>Task</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16964">PHPBB3-16964</a>] - Update composer and composer dependencies to latest versions</li>
|
||||
</ul>
|
||||
<h4>Hardening</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/SECURITY-272">SECURITY-272</a>] - Use longer random string for activation key</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/SECURITY-273">SECURITY-273</a>] - Reset reset token info when re-activating account</li>
|
||||
</ul>
|
||||
|
||||
<a name="v335"></a><h3>Changes since 3.3.5</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16881">PHPBB3-16881</a>] - Fix ACP Statistic Table</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16883">PHPBB3-16883</a>] - Check if var is array before using count in installer diff</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16887">PHPBB3-16887</a>] - Update required PHP version</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16889">PHPBB3-16889</a>] - Postgres on windows builds keep failing</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16892">PHPBB3-16892</a>] - Duplicate entry for jav files in extension guesser</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16895">PHPBB3-16895</a>] - 'Permission' migration tool incorrectly handles role removal</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16897">PHPBB3-16897</a>] - sqlite3 drivers generates warnings when executing an explain query plan that fails</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16900">PHPBB3-16900</a>] - Invalid email subject header on long topic titles</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16904">PHPBB3-16904</a>] - Regression for topic selection in MCP in 3.3.5</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16908">PHPBB3-16908</a>] - PHP warning on non-existent post id requests</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16910">PHPBB3-16910</a>] - PHP warning if trying to attach orphaned files to non existent posts</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16914">PHPBB3-16914</a>] - Missing id in memberlist email template</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16924">PHPBB3-16924</a>] - Double escaping of config values inserted with db config</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-13508">PHPBB3-13508</a>] - Support using INCLUDEJS and INCLUDECSS in twig template format</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16828">PHPBB3-16828</a>] - Add hook event before find_users_for_notification() execute</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16859">PHPBB3-16859</a>] - Language selection option is displayed on register if only 1 language is installed</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16885">PHPBB3-16885</a>] - Add filters to Twig - INT and FLOAT</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16888">PHPBB3-16888</a>] - Add the list of allowed attachment types using accept attribute </li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16896">PHPBB3-16896</a>] - Improve .gitignore visibility</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16898">PHPBB3-16898</a>] - Do not restrict the debug error handler to the development environment</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16899">PHPBB3-16899</a>] - Add SVG and WEBP image type to ranks, smilies and topic icons</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16902">PHPBB3-16902</a>] - Improve search results count for MySQL</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16909">PHPBB3-16909</a>] - Add PHP 8.2 builds to test matrix</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16912">PHPBB3-16912</a>] - Improve mail encoding to better match RFC 2047</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16921">PHPBB3-16921</a>] - Increase PHP requirements in the DOCS</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16930">PHPBB3-16930</a>] - Remove redundant topic ID from last post URL</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16933">PHPBB3-16933</a>] - Inconsistent handling of hyphen by phpBB Native search backend</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16939">PHPBB3-16939</a>] - Wait for postgres service to start in GitHub Actions windows builds</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16940">PHPBB3-16940</a>] - Optimize phpBB Native Search</li>
|
||||
</ul>
|
||||
<h4>Task</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16927">PHPBB3-16927</a>] - Update plupload to latest version</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16928">PHPBB3-16928</a>] - Update composer and composer dependencies to latest versions</li>
|
||||
</ul>
|
||||
|
||||
<a name="v335rc1"></a><h3>Changes since 3.3.5-RC1</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16878">PHPBB3-16878</a>] - Error in password_hash() with ARGON2 + Sodium & threadcount > 1</li>
|
||||
</ul>
|
||||
<h4>Hardening</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/SECURITY-254">SECURITY-254</a>] - Disallow whitespace characters that might be invisible</li>
|
||||
</ul>
|
||||
|
||||
<a name="v334"></a><h3>Changes since 3.3.4</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-12075">PHPBB3-12075</a>] - Language file Modules needs to be added to acp_extensions</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-13700">PHPBB3-13700</a>] - Column 'field_show_on_pm' not created before migration profilefield_interests</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16292">PHPBB3-16292</a>] - Database errors during conversion not propagated</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16570">PHPBB3-16570</a>] - Automatic updater no longer handles merge conflicts</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16657">PHPBB3-16657</a>] - Encoded characters inserted from live search for usernames</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16729">PHPBB3-16729</a>] - Unknown named parameter $log_data in phpbb/log/log.php</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16730">PHPBB3-16730</a>] - Build changelog throwing PHP warnings on no changes in version</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16749">PHPBB3-16749</a>] - SQL error on installation</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16757">PHPBB3-16757</a>] - RTL problem in random question text in ACP</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16765">PHPBB3-16765</a>] - contact_admin_acp_module migration lacks effectively_installed check</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16766">PHPBB3-16766</a>] - Updater only shows truncated error messages</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16767">PHPBB3-16767</a>] - Migrator shows wrong migration as missing if unfulfillable</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16770">PHPBB3-16770</a>] - Invalid position of static qualifier in 3.3.4 migration</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16772">PHPBB3-16772</a>] - Emoji not supported in email signature</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16773">PHPBB3-16773</a>] - PostgreSQL backups are missing constraint declarations</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16784">PHPBB3-16784</a>] - Ignore .vscode files in git</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16785">PHPBB3-16785</a>] - Latest release missing from previous versions in build.xml</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16787">PHPBB3-16787</a>] - Error message when "fsockopen" is deactivated</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16789">PHPBB3-16789</a>] - user_delete documentation incorrect</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16793">PHPBB3-16793</a>] - PHP Warning when checking topic/post attachment visibility in PHP 8</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16799">PHPBB3-16799</a>] - OAuth external account linking triggers fatal error on PHP 8</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16808">PHPBB3-16808</a>] - Container used before initialization causes error in PHP8</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16810">PHPBB3-16810</a>] - The no closing tag in Custom BBCodes is still shown onclick</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16812">PHPBB3-16812</a>] - login_body.html missing dt tag for autologin</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16823">PHPBB3-16823</a>] - Datetime class incorrectly handles edge yesterday/today/tomorrow cases</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16832">PHPBB3-16832</a>] - Wrong singular language shown in UCP attachments</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16865">PHPBB3-16865</a>] - Update IRC + discord links in composer and documentation and update docs</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16870">PHPBB3-16870</a>] - Setting float config value can fail with CLI db:migrate</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-15729">PHPBB3-15729</a>] - Don't unnecessarily encode email headers in Base64</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-15925">PHPBB3-15925</a>] - Add core events for sync and mcp functions</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16138">PHPBB3-16138</a>] - Eliminate redundant f= and t= parameters from board urls</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16736">PHPBB3-16736</a>] - Enforce placement of visibility qualifiers after static</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16748">PHPBB3-16748</a>] - Update coding guidelines to place static after visibility qualifiers</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16752">PHPBB3-16752</a>] - Create event exporter to restructured text</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16754">PHPBB3-16754</a>] - Update doctum</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16771">PHPBB3-16771</a>] - Add core events to MCP</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16783">PHPBB3-16783</a>] - Remove structure only backup</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16788">PHPBB3-16788</a>] - Update s9e/text-formatter to latest</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16795">PHPBB3-16795</a>] - Add template events around signature in viewtopic</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16798">PHPBB3-16798</a>] - Scale down phpBB logo in readme</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16804">PHPBB3-16804</a>] - Extend bbcode help line tooltip</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16809">PHPBB3-16809</a>] - Reset UCP preferences at end of test</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16816">PHPBB3-16816</a>] - acp style html validation fixes</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16822">PHPBB3-16822</a>] - Replace patchwork/utf8 with symfony/polyfill</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16829">PHPBB3-16829</a>] - Add forumtitle and lastsubject text decoration hover</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16831">PHPBB3-16831</a>] - fix tabs missing delimiters and remove old commented classes</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16850">PHPBB3-16850</a>] - Update webfont.js to latest</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16851">PHPBB3-16851</a>] - Add Amazonbot, AhrefsBot and SemrushBot</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16858">PHPBB3-16858</a>] - Update to the latest version of jQuery 3.6.0</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16867">PHPBB3-16867</a>] - Update symfony and text-formatter to latest versions</li>
|
||||
</ul>
|
||||
<h4>New Feature</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16856">PHPBB3-16856</a>] - Add lang_js() function to twig as replacement for LA_</li>
|
||||
</ul>
|
||||
<h4>Task</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16769">PHPBB3-16769</a>] - Update composer to latest version</li>
|
||||
</ul>
|
||||
|
||||
<a name="v334rc1"></a><h3>Changes since 3.3.4-RC1</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
|
@@ -64,7 +64,7 @@
|
||||
<li><a href="#update_full">Full package</a></li>
|
||||
<li><a href="#update_files">Changed files</a></li>
|
||||
<li><a href="#update_patch">Patch file</a></li>
|
||||
<li><a href="#update_auto">Automatic update package</a></li>
|
||||
<li><a href="#update_advanced">Advanced update package</a></li>
|
||||
<li><a href="#update_all">All package types</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
@@ -147,7 +147,7 @@
|
||||
<li>Oracle</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>PHP 7.1.3+</strong> up to and including <strong>PHP 7.4</strong> with support for the database you intend to use.</li>
|
||||
<li><strong>PHP 7.1.3+</strong> up to and including <strong>PHP 8.1</strong> with support for the database you intend to use.</li>
|
||||
<li>The following PHP modules are required:
|
||||
<ul>
|
||||
<li>json</li>
|
||||
@@ -291,7 +291,7 @@
|
||||
|
||||
<p>The patch file package is for those wanting to update through the patch application, and should only be used by those who are comfortable with it.</p>
|
||||
|
||||
<p>The patch file is one solution for those with changes in to the phpBB core files and do not want to re-add them back to all the changed files. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application, but still want to use this update approach, we strongly recommend the <a href="#update_auto">Automatic update package</a> explained below. It is also the recommended update method.</p>
|
||||
<p>The patch file is one solution for those with changes in to the phpBB core files and do not want to re-add them back to all the changed files. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application, but still want to use this update approach, we strongly recommend the <a href="#update_full">Full package update</a> explained above. It is also the recommended update method.</p>
|
||||
|
||||
<p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is <strong>3.3.0</strong>, you need the <code>phpBB-3.3.1-patch.zip/tar.bz2</code> file. Place the correct patch in the parent directory containing the phpBB core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <code>patch -cl -d [PHPBB DIRECTORY] -p1 < [PATCH NAME]</code> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
|
||||
|
||||
@@ -299,11 +299,13 @@
|
||||
|
||||
<p>You should, of course, delete the patch file (or files) after use. As for the other update procedures, you should navigate to <code>/install/app.php/update</code>, select "Update database only" and submit the page after you have finished updating the files. This will update your database schema and data (if appropriate) and increment the version number. If you have shell access to your server, you may wish to update via the command line interface. From your board's root, execute the following command: <code>php bin/phpbbcli.php --safe-mode db:migrate</code>.</p>
|
||||
|
||||
<a name="update_auto"></a><h3>4.iv. Automatic update package</h3>
|
||||
<a name="update_advanced"></a><h3>4.iv. Advanced update package (Expert users)</h3>
|
||||
|
||||
<p>This update method is only recommended for installations with modifications to core phpBB files. This package detects changed files automatically and merges in changes if needed.</p>
|
||||
<p>This update method should only be used for installations with modifications to core phpBB files. If you simply use Extensions or custom Styles and have not modified core files, please use the Full Package update.</p>
|
||||
|
||||
<p>The automatic update package will update the board from a given version to the latest version. A number of automatic update files are available, and you should choose the one that corresponds to the version of the board that you are currently running. For example, if your current version is <strong>3.3.0</strong>, you need the <code>phpBB-3.3.0_to_3.3.1.zip/tar.bz2</code> file.</p>
|
||||
<p>This package detects changed files and merges in changes if needed. Since this type of update has a potential to cause issues while upgrading, it should only be used by expert users.</p>
|
||||
|
||||
<p>The advanced update package will update the board from a given version to the latest version. A number of advanced update files are available, and you should choose the one that corresponds to the version of the board that you are currently running. For example, if your current version is <strong>3.3.0</strong>, you need the <code>phpBB-3.3.0_to_3.3.1.zip/tar.bz2</code> file.</p>
|
||||
|
||||
<p>To perform the update, either follow the instructions from the <strong>Administration Control Panel->System</strong> Tab - this should point out that you are running an outdated version and will guide you through the update - or follow the instructions listed below.</p>
|
||||
|
||||
|
@@ -104,7 +104,7 @@
|
||||
|
||||
<ul>
|
||||
<li>Updates from phpBB 3.0 RC1, 3.1 RC1 and 3.2 RC1 to the latest version</li>
|
||||
<li>Note: if using the <em>Automatic Update Package</em>, updates are supported from phpBB 3.0.2 onward. To update a pre-3.0.2 installation, first update to 3.0.2 and then update to the current version.</li>
|
||||
<li>Note: if using the <em>Advanced Update Package</em>, updates are supported from phpBB 3.0.2 onward. To update a pre-3.0.2 installation, first update to 3.0.2 and then update to the current version.</li>
|
||||
<li>Conversions from phpBB 2.0.x to the latest version</li>
|
||||
<li>New installations of phpBB 3.2.x - only the latest released version</li>
|
||||
<li>New installations of phpBB 3.3.x - only the latest released version</li>
|
||||
@@ -204,7 +204,7 @@
|
||||
|
||||
<a name="irc"></a><h3>3.iv Internet Relay Chat</h3>
|
||||
|
||||
<p>Another place you may find help is our IRC channel. This operates on the Freenode IRC network, <a href="irc://irc.freenode.net">irc.freenode.net</a> and the channel is <em>#phpbb</em> and can be accessed by any decent IRC client such as mIRC, XChat, etc. Again, please do not abuse this service and be respectful of other users.</p>
|
||||
<p>Another place you may find help is our IRC channel. This operates on the Libera IRC network, <a href="irc://irc.libera.chat">irc.libera.chat</a> and the channel is <em>#phpbb</em> and can be accessed by any decent IRC client such as mIRC, XChat, etc. Again, please do not abuse this service and be respectful of other users.</p>
|
||||
|
||||
<p>There are other IRC channels available, please see <a href="https://www.phpbb.com/support/irc/">https://www.phpbb.com/support/irc/</a> for the complete list.</p>
|
||||
|
||||
|
@@ -718,18 +718,18 @@ switch ($mode)
|
||||
<h4>Class Members</h4>
|
||||
<p>Use the explicit visibility qualifiers <code>public</code>, <code>private</code> and <code>protected</code> for all properties instead of <code>var</code>.
|
||||
|
||||
<p>Place the <code>static</code> qualifier before the visibility qualifiers.</p>
|
||||
<p>Place the <code>static</code> qualifier after the visibility qualifiers.</p>
|
||||
|
||||
<p class="bad">//Wrong </p>
|
||||
<div class="codebox"><pre>
|
||||
var $x;
|
||||
private static function f()</pre>
|
||||
static private function f()</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// Right </p>
|
||||
<div class="codebox"><pre>
|
||||
public $x;
|
||||
static private function f()</pre>
|
||||
private static function f()</pre>
|
||||
</div>
|
||||
|
||||
<h4>Constants</h4>
|
||||
|
@@ -3359,6 +3359,20 @@ viewtopic_body_postrow_rank_before
|
||||
* Purpose: Add data before the rank on the user profile when viewing
|
||||
a post
|
||||
|
||||
viewtopic_body_postrow_signature_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
* Since: 3.3.5-RC1
|
||||
* Purpose: Add content after the signature
|
||||
|
||||
viewtopic_body_postrow_signature_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
* Since: 3.3.5-RC1
|
||||
* Purpose: Add content before the signature
|
||||
|
||||
viewtopic_body_topic_actions_before
|
||||
===
|
||||
* Locations:
|
||||
|
@@ -220,7 +220,7 @@ else
|
||||
{
|
||||
phpbb_download_handle_forum_auth($db, $auth, $attachment['topic_id']);
|
||||
|
||||
$sql = 'SELECT forum_id, post_visibility
|
||||
$sql = 'SELECT forum_id, poster_id, post_visibility
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE post_id = ' . (int) $attachment['post_msg_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
|
@@ -1000,29 +1000,45 @@ class acp_attachments
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$files_added = $space_taken = 0;
|
||||
$error_msg = '';
|
||||
$upload_row = [];
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$post_row = $post_info[$upload_list[$row['attach_id']]];
|
||||
$upload_row = [
|
||||
'FILE_INFO' => $user->lang('UPLOADING_FILE_TO', $row['real_filename'], $upload_list[$row['attach_id']]),
|
||||
];
|
||||
|
||||
$template->assign_block_vars('upload', array(
|
||||
'FILE_INFO' => sprintf($user->lang['UPLOADING_FILE_TO'], $row['real_filename'], $post_row['post_id']),
|
||||
'S_DENIED' => (!$auth->acl_get('f_attach', $post_row['forum_id'])) ? true : false,
|
||||
'L_DENIED' => (!$auth->acl_get('f_attach', $post_row['forum_id'])) ? sprintf($user->lang['UPLOAD_DENIED_FORUM'], $forum_names[$row['forum_id']]) : '')
|
||||
);
|
||||
if (isset($post_info[$upload_list[$row['attach_id']]]))
|
||||
{
|
||||
$post_row = $post_info[$upload_list[$row['attach_id']]];
|
||||
$upload_row = array_merge($upload_row, [
|
||||
'S_DENIED' => !$auth->acl_get('f_attach', $post_row['forum_id']),
|
||||
'L_DENIED' => !$auth->acl_get('f_attach', $post_row['forum_id']) ? $user->lang('UPLOAD_DENIED_FORUM', $forum_names[$row['forum_id']]) : '',
|
||||
]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$error_msg = $user->lang('UPLOAD_POST_NOT_EXIST', $row['real_filename'], $upload_list[$row['attach_id']]);
|
||||
$upload_row = array_merge($upload_row, [
|
||||
'ERROR_MSG' => $error_msg,
|
||||
]);
|
||||
};
|
||||
|
||||
if (!$auth->acl_get('f_attach', $post_row['forum_id']))
|
||||
$template->assign_block_vars('upload', $upload_row);
|
||||
|
||||
if ($error_msg || !$auth->acl_get('f_attach', $post_row['forum_id']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Adjust attachment entry
|
||||
$sql_ary = array(
|
||||
$sql_ary = [
|
||||
'in_message' => 0,
|
||||
'is_orphan' => 0,
|
||||
'poster_id' => $post_row['poster_id'],
|
||||
'post_msg_id' => $post_row['post_id'],
|
||||
'topic_id' => $post_row['topic_id'],
|
||||
);
|
||||
];
|
||||
|
||||
$sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
@@ -1042,7 +1058,7 @@ class acp_attachments
|
||||
$space_taken += $row['filesize'];
|
||||
$files_added++;
|
||||
|
||||
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTACH_FILEUPLOAD', false, array($post_row['post_id'], $row['real_filename']));
|
||||
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTACH_FILEUPLOAD', false, [$post_row['post_id'], $row['real_filename']]);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@@ -1054,9 +1070,9 @@ class acp_attachments
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_ORPHAN' => true)
|
||||
);
|
||||
$template->assign_vars([
|
||||
'S_ORPHAN' => true,
|
||||
]);
|
||||
|
||||
$attachments_per_page = (int) $config['topics_per_page'];
|
||||
|
||||
@@ -1084,15 +1100,15 @@ class acp_attachments
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$template->assign_block_vars('orphan', array(
|
||||
$template->assign_block_vars('orphan', [
|
||||
'FILESIZE' => get_formatted_filesize($row['filesize']),
|
||||
'FILETIME' => $user->format_date($row['filetime']),
|
||||
'REAL_FILENAME' => utf8_basename($row['real_filename']),
|
||||
'PHYSICAL_FILENAME' => utf8_basename($row['physical_filename']),
|
||||
'ATTACH_ID' => $row['attach_id'],
|
||||
'POST_IDS' => (!empty($post_ids[$row['attach_id']])) ? $post_ids[$row['attach_id']] : '',
|
||||
'U_FILE' => append_sid($phpbb_root_path . 'download/file.' . $phpEx, 'mode=view&id=' . $row['attach_id']))
|
||||
);
|
||||
'POST_ID' => (!empty($post_ids[$row['attach_id']])) ? $post_ids[$row['attach_id']] : '',
|
||||
'U_FILE' => append_sid($phpbb_root_path . 'download/file.' . $phpEx, 'mode=view&id=' . $row['attach_id']),
|
||||
]);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@@ -1105,10 +1121,10 @@ class acp_attachments
|
||||
$start
|
||||
);
|
||||
|
||||
$template->assign_vars(array(
|
||||
$template->assign_vars([
|
||||
'TOTAL_FILES' => $num_files,
|
||||
'TOTAL_SIZE' => get_formatted_filesize($total_size),
|
||||
));
|
||||
]);
|
||||
|
||||
break;
|
||||
|
||||
@@ -1278,7 +1294,7 @@ class acp_attachments
|
||||
|
||||
'S_IN_MESSAGE' => (bool) $row['in_message'],
|
||||
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$row['topic_id']}&p={$row['post_msg_id']}") . "#p{$row['post_msg_id']}",
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p={$row['post_msg_id']}") . "#p{$row['post_msg_id']}",
|
||||
'U_FILE' => append_sid($phpbb_root_path . 'download/file.' . $phpEx, 'mode=view&id=' . $row['attach_id']))
|
||||
);
|
||||
}
|
||||
|
@@ -235,7 +235,7 @@ class acp_bbcodes
|
||||
trigger_error($user->lang['BBCODE_TAG_DEF_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if (strlen($bbcode_helpline) > 255)
|
||||
if (strlen($bbcode_helpline) > 3000)
|
||||
{
|
||||
trigger_error($user->lang['BBCODE_HELPLINE_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
@@ -589,6 +589,7 @@ class acp_board
|
||||
'site_home_text',
|
||||
'board_index_text',
|
||||
'board_disable_msg',
|
||||
'board_email_sig',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@@ -69,20 +69,6 @@ class acp_database
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$store = true;
|
||||
$structure = false;
|
||||
$schema_data = false;
|
||||
|
||||
if ($type == 'full' || $type == 'structure')
|
||||
{
|
||||
$structure = true;
|
||||
}
|
||||
|
||||
if ($type == 'full' || $type == 'data')
|
||||
{
|
||||
$schema_data = true;
|
||||
}
|
||||
|
||||
@set_time_limit(1200);
|
||||
@set_time_limit(0);
|
||||
|
||||
@@ -92,14 +78,14 @@ class acp_database
|
||||
|
||||
/** @var phpbb\db\extractor\extractor_interface $extractor Database extractor */
|
||||
$extractor = $phpbb_container->get('dbal.extractor');
|
||||
$extractor->init_extractor($format, $filename, $time, false, $store);
|
||||
$extractor->init_extractor($format, $filename, $time, false, true);
|
||||
|
||||
$extractor->write_start($table_prefix);
|
||||
|
||||
foreach ($table as $table_name)
|
||||
{
|
||||
// Get the table structure
|
||||
if ($structure)
|
||||
if ($type == 'full')
|
||||
{
|
||||
$extractor->write_table($table_name);
|
||||
}
|
||||
@@ -123,15 +109,11 @@ class acp_database
|
||||
|
||||
default:
|
||||
$extractor->flush('TRUNCATE TABLE ' . $table_name . ";\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Data
|
||||
if ($schema_data)
|
||||
{
|
||||
$extractor->write_data($table_name);
|
||||
}
|
||||
// Only supported types are full and data, therefore always write the data
|
||||
$extractor->write_data($table_name);
|
||||
}
|
||||
|
||||
$extractor->write_end();
|
||||
|
@@ -53,7 +53,7 @@ class acp_extensions
|
||||
$this->phpbb_container = $phpbb_container;
|
||||
$this->php_ini = $this->phpbb_container->get('php_ini');
|
||||
|
||||
$this->user->add_lang(array('install', 'acp/extensions', 'migrator'));
|
||||
$this->user->add_lang(array('install', 'acp/extensions', 'acp/modules', 'migrator'));
|
||||
|
||||
$this->page_title = 'ACP_EXTENSIONS';
|
||||
|
||||
|
@@ -91,29 +91,43 @@ class acp_icons
|
||||
{
|
||||
$img_size = getimagesize($phpbb_root_path . $img_path . '/' . $path . $img);
|
||||
|
||||
if (!$img_size[0] || !$img_size[1] || strlen($img) > 255)
|
||||
if ($img_size)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (!$img_size[0] || !$img_size[1] || strlen($img) > 255)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// adjust the width and height to be lower than 128px while perserving the aspect ratio (for icons)
|
||||
if ($mode == 'icons')
|
||||
// adjust the width and height to be lower than 128px while perserving the aspect ratio (for icons)
|
||||
if ($mode == 'icons')
|
||||
{
|
||||
if ($img_size[0] > 127 && $img_size[0] > $img_size[1])
|
||||
{
|
||||
$img_size[1] = (int) ($img_size[1] * (127 / $img_size[0]));
|
||||
$img_size[0] = 127;
|
||||
}
|
||||
else if ($img_size[1] > 127)
|
||||
{
|
||||
$img_size[0] = (int) ($img_size[0] * (127 / $img_size[1]));
|
||||
$img_size[1] = 127;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($img_size[0] > 127 && $img_size[0] > $img_size[1])
|
||||
{
|
||||
$img_size[1] = (int) ($img_size[1] * (127 / $img_size[0]));
|
||||
$img_size[0] = 127;
|
||||
}
|
||||
else if ($img_size[1] > 127)
|
||||
{
|
||||
$img_size[0] = (int) ($img_size[0] * (127 / $img_size[1]));
|
||||
$img_size[1] = 127;
|
||||
}
|
||||
// getimagesize can't read the dimensions of the SVG files
|
||||
// https://bugs.php.net/bug.php?id=71517
|
||||
$xml_get = simplexml_load_file($phpbb_root_path . $img_path . '/' . $path . $img);
|
||||
|
||||
$svg_width = intval($xml_get['width']);
|
||||
$svg_height = intval($xml_get['height']);
|
||||
}
|
||||
|
||||
$_images[$path . $img]['file'] = $path . $img;
|
||||
$_images[$path . $img]['width'] = $img_size[0];
|
||||
$_images[$path . $img]['height'] = $img_size[1];
|
||||
|
||||
// Give SVG a fallback on failure
|
||||
$_images[$path . $img]['width'] = $img_size ? $img_size[0] : ($svg_width ?: 32);
|
||||
$_images[$path . $img]['height'] = $img_size ? $img_size[1] : ($svg_height ?: 32);
|
||||
}
|
||||
}
|
||||
unset($imglist);
|
||||
|
@@ -544,20 +544,13 @@ class acp_main
|
||||
$files_per_day = $total_files;
|
||||
}
|
||||
|
||||
if ($config['allow_attachments'] || $config['allow_pm_attach'])
|
||||
{
|
||||
$sql = 'SELECT COUNT(attach_id) AS total_orphan
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE is_orphan = 1
|
||||
AND filetime < ' . (time() - 3*60*60);
|
||||
$result = $db->sql_query($sql);
|
||||
$total_orphan = (int) $db->sql_fetchfield('total_orphan');
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
$total_orphan = false;
|
||||
}
|
||||
$sql = 'SELECT COUNT(attach_id) AS total_orphan
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE is_orphan = 1
|
||||
AND filetime < ' . (time() - 3*60*60);
|
||||
$result = $db->sql_query($sql);
|
||||
$total_orphan = (int) $db->sql_fetchfield('total_orphan');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$dbsize = get_database_size();
|
||||
|
||||
@@ -575,7 +568,6 @@ class acp_main
|
||||
'DBSIZE' => $dbsize,
|
||||
'UPLOAD_DIR_SIZE' => $upload_dir_size,
|
||||
'TOTAL_ORPHAN' => $total_orphan,
|
||||
'S_TOTAL_ORPHAN' => ($total_orphan === false) ? false : true,
|
||||
'GZIP_COMPRESSION' => ($config['gzip_compress'] && @extension_loaded('zlib')) ? $user->lang['ON'] : $user->lang['OFF'],
|
||||
'DATABASE_INFO' => $db->sql_server_info(),
|
||||
'PHP_VERSION_INFO' => PHP_VERSION,
|
||||
|
@@ -55,8 +55,8 @@ class acp_ranks
|
||||
$min_posts = ($special_rank) ? 0 : max(0, $request->variable('min_posts', 0));
|
||||
$rank_image = $request->variable('rank_image', '');
|
||||
|
||||
// The rank image has to be a jpg, gif or png
|
||||
if ($rank_image != '' && !preg_match('#(\.gif|\.png|\.jpg|\.jpeg)$#i', $rank_image))
|
||||
// The rank image has to be a jp(e)g, gif, png, svg or webp
|
||||
if ($rank_image != '' && !preg_match('#(\.gif|\.png|\.jpg|\.jpeg|\.svg|\.webp)$#i', $rank_image))
|
||||
{
|
||||
$rank_image = '';
|
||||
}
|
||||
|
@@ -322,9 +322,9 @@ class acp_search
|
||||
{
|
||||
$sql = 'SELECT post_id, poster_id, forum_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE post_id >= ' . (int) ($post_counter + 1) . '
|
||||
AND post_id <= ' . (int) ($post_counter + $this->batch_size);
|
||||
$result = $db->sql_query($sql);
|
||||
WHERE post_id > ' . (int) $post_counter . '
|
||||
ORDER BY post_id ASC';
|
||||
$result = $db->sql_query_limit($sql, $this->batch_size);
|
||||
|
||||
$ids = $posters = $forum_ids = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
@@ -339,14 +339,13 @@ class acp_search
|
||||
if (count($ids))
|
||||
{
|
||||
$this->search->index_remove($ids, $posters, $forum_ids);
|
||||
$post_counter = $ids[count($ids) - 1];
|
||||
}
|
||||
|
||||
$post_counter += $this->batch_size;
|
||||
}
|
||||
// save the current state
|
||||
$this->save_state();
|
||||
|
||||
if ($post_counter <= $this->max_post_id)
|
||||
if ($post_counter < $this->max_post_id)
|
||||
{
|
||||
$totaltime = microtime(true) - $starttime;
|
||||
$rows_per_second = $row_count / $totaltime;
|
||||
@@ -393,9 +392,9 @@ class acp_search
|
||||
{
|
||||
$sql = 'SELECT post_id, post_subject, post_text, poster_id, forum_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE post_id >= ' . (int) ($post_counter + 1) . '
|
||||
AND post_id <= ' . (int) ($post_counter + $this->batch_size);
|
||||
$result = $db->sql_query($sql);
|
||||
WHERE post_id > ' . (int) $post_counter . '
|
||||
ORDER BY post_id ASC';
|
||||
$result = $db->sql_query_limit($sql, $this->batch_size);
|
||||
|
||||
$buffer = $db->sql_buffer_nested_transactions();
|
||||
|
||||
@@ -416,13 +415,12 @@ class acp_search
|
||||
$this->search->index('post', $row['post_id'], $row['post_text'], $row['post_subject'], $row['poster_id'], $row['forum_id']);
|
||||
}
|
||||
$row_count++;
|
||||
$post_counter = $row['post_id'];
|
||||
}
|
||||
if (!$buffer)
|
||||
{
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
$post_counter += $this->batch_size;
|
||||
}
|
||||
// save the current state
|
||||
$this->save_state();
|
||||
@@ -434,7 +432,7 @@ class acp_search
|
||||
$this->search->tidy();
|
||||
$config['num_posts'] = $num_posts;
|
||||
|
||||
if ($post_counter <= $this->max_post_id)
|
||||
if ($post_counter < $this->max_post_id)
|
||||
{
|
||||
$totaltime = microtime(true) - $starttime;
|
||||
$rows_per_second = $row_count / $totaltime;
|
||||
|
@@ -2277,7 +2277,7 @@ class acp_users
|
||||
}
|
||||
else
|
||||
{
|
||||
$view_topic = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$row['topic_id']}&p={$row['post_msg_id']}") . '#p' . $row['post_msg_id'];
|
||||
$view_topic = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p={$row['post_msg_id']}") . '#p' . $row['post_msg_id'];
|
||||
}
|
||||
|
||||
$template->assign_block_vars('attach', array(
|
||||
|
@@ -28,7 +28,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
|
||||
// phpBB Version
|
||||
@define('PHPBB_VERSION', '3.3.4');
|
||||
@define('PHPBB_VERSION', '3.3.6');
|
||||
|
||||
// QA-related
|
||||
// define('PHPBB_QA', 1);
|
||||
|
@@ -168,8 +168,14 @@ class diff
|
||||
$final = $edit->final;
|
||||
|
||||
// We can simplify one case where the array is usually supposed to be empty...
|
||||
if (count($orig) == 1 && trim($orig[0]) === '') $orig = array();
|
||||
if (count($final) == 1 && trim($final[0]) === '') $final = array();
|
||||
if (is_array($orig) && count($orig) == 1 && trim($orig[0]) === '')
|
||||
{
|
||||
$orig = array();
|
||||
}
|
||||
if (is_array($final) && count($final) == 1 && trim($final[0]) === '')
|
||||
{
|
||||
$final = array();
|
||||
}
|
||||
|
||||
if (!$orig && !$final)
|
||||
{
|
||||
|
@@ -263,49 +263,68 @@ function phpbb_version_compare($version1, $version2, $operator = null)
|
||||
// functions used for building option fields
|
||||
|
||||
/**
|
||||
* Pick a language, any language ...
|
||||
*/
|
||||
function language_select($default = '')
|
||||
* Pick a language, any language ...
|
||||
*
|
||||
* @param string $default Language ISO code to be selected by default in the dropdown list
|
||||
* @param array $langdata Language data in format of array(array('lang_iso' => string, lang_local_name => string), ...)
|
||||
*
|
||||
* @return string HTML options for language selection dropdown list.
|
||||
*/
|
||||
function language_select($default = '', array $langdata = [])
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = 'SELECT lang_iso, lang_local_name
|
||||
FROM ' . LANG_TABLE . '
|
||||
ORDER BY lang_english_name';
|
||||
$result = $db->sql_query($sql);
|
||||
if (empty($langdata))
|
||||
{
|
||||
$sql = 'SELECT lang_iso, lang_local_name
|
||||
FROM ' . LANG_TABLE . '
|
||||
ORDER BY lang_english_name';
|
||||
$result = $db->sql_query($sql);
|
||||
$langdata = (array) $db->sql_fetchrowset($result);
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
$lang_options = '';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
foreach ($langdata as $row)
|
||||
{
|
||||
$selected = ($row['lang_iso'] == $default) ? ' selected="selected"' : '';
|
||||
$lang_options .= '<option value="' . $row['lang_iso'] . '"' . $selected . '>' . $row['lang_local_name'] . '</option>';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
return $lang_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pick a template/theme combo,
|
||||
*/
|
||||
function style_select($default = '', $all = false)
|
||||
* Pick a template/theme combo
|
||||
*
|
||||
* @param string $default Style ID to be selected by default in the dropdown list
|
||||
* @param bool $all Flag indicating if all styles data including inactive ones should be fetched
|
||||
* @param array $styledata Style data in format of array(array('style_id' => int, style_name => string), ...)
|
||||
*
|
||||
* @return string HTML options for style selection dropdown list.
|
||||
*/
|
||||
function style_select($default = '', $all = false, array $styledata = [])
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql_where = (!$all) ? 'WHERE style_active = 1 ' : '';
|
||||
$sql = 'SELECT style_id, style_name
|
||||
FROM ' . STYLES_TABLE . "
|
||||
$sql_where
|
||||
ORDER BY style_name";
|
||||
$result = $db->sql_query($sql);
|
||||
if (empty($styledata))
|
||||
{
|
||||
$sql_where = (!$all) ? 'WHERE style_active = 1 ' : '';
|
||||
$sql = 'SELECT style_id, style_name
|
||||
FROM ' . STYLES_TABLE . "
|
||||
$sql_where
|
||||
ORDER BY style_name";
|
||||
$result = $db->sql_query($sql);
|
||||
$styledata = (array) $db->sql_fetchrowset($result);
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
$style_options = '';
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
foreach ($styledata as $row)
|
||||
{
|
||||
$selected = ($row['style_id'] == $default) ? ' selected="selected"' : '';
|
||||
$style_options .= '<option value="' . $row['style_id'] . '"' . $selected . '>' . $row['style_name'] . '</option>';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
return $style_options;
|
||||
}
|
||||
@@ -1075,7 +1094,7 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis
|
||||
* @param string $sql_limit Limits the size of unread topics list, 0 for unlimited query
|
||||
* @param string $sql_limit_offset Sets the offset of the first row to search, 0 to search from the start
|
||||
*
|
||||
* @return array[int][int] Topic ids as keys, mark_time of topic as value
|
||||
* @return int[] Topic ids as keys, mark_time of topic as value
|
||||
*/
|
||||
function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $sql_limit = 1001, $sql_limit_offset = 0)
|
||||
{
|
||||
@@ -1464,10 +1483,9 @@ function tracking_unserialize($string, $max_depth = 3)
|
||||
* @return string The corrected url.
|
||||
*
|
||||
* Examples:
|
||||
* <code>
|
||||
* append_sid("{$phpbb_root_path}viewtopic.$phpEx?t=1&f=2");
|
||||
* append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=1&f=2');
|
||||
* append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=1&f=2', false);
|
||||
* <code> append_sid("{$phpbb_root_path}viewtopic.$phpEx?t=1");
|
||||
* append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=1');
|
||||
* append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=1', false);
|
||||
* append_sid("{$phpbb_root_path}viewtopic.$phpEx", array('t' => 1, 'f' => 2));
|
||||
* </code>
|
||||
*
|
||||
@@ -2996,7 +3014,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||
|
||||
// Check the error reporting level and return if the error level does not match
|
||||
// If DEBUG is defined the default level is E_ALL
|
||||
if (($errno & ($phpbb_container->getParameter('debug.show_errors') ? E_ALL : error_reporting())) == 0)
|
||||
if (($errno & ($phpbb_container != null && $phpbb_container->getParameter('debug.show_errors') ? E_ALL : error_reporting())) == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -4070,7 +4088,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
|
||||
|
||||
'T_FONT_AWESOME_LINK' => !empty($config['allow_cdn']) && !empty($config['load_font_awesome_url']) ? $config['load_font_awesome_url'] : "{$web_path}assets/css/font-awesome.min.css?assets_version=" . $config['assets_version'],
|
||||
|
||||
'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery-3.5.1.min.js?assets_version=" . $config['assets_version'],
|
||||
'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery-3.6.0.min.js?assets_version=" . $config['assets_version'],
|
||||
'S_ALLOW_CDN' => !empty($config['allow_cdn']),
|
||||
'S_COOKIE_NOTICE' => !empty($config['cookie_notice']),
|
||||
|
||||
|
@@ -178,7 +178,7 @@ function adm_page_footer($copyright_html = true)
|
||||
'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
|
||||
'S_COPYRIGHT_HTML' => $copyright_html,
|
||||
'CREDIT_LINE' => $user->lang('POWERED_BY', '<a href="https://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Limited'),
|
||||
'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$phpbb_root_path}assets/javascript/jquery-3.5.1.min.js",
|
||||
'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$phpbb_root_path}assets/javascript/jquery-3.6.0.min.js",
|
||||
'S_ALLOW_CDN' => !empty($config['allow_cdn']),
|
||||
'VERSION' => $config['version'])
|
||||
);
|
||||
|
@@ -479,7 +479,7 @@ function copy_forum_permissions($src_forum_id, $dest_forum_ids, $clear_dest_perm
|
||||
/**
|
||||
* Get physical file listing
|
||||
*/
|
||||
function filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png')
|
||||
function filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png|svg|webp')
|
||||
{
|
||||
$matches = array($dir => array());
|
||||
|
||||
@@ -1324,7 +1324,7 @@ function update_posted_info(&$topic_ids)
|
||||
*/
|
||||
function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, $sync_extra = false)
|
||||
{
|
||||
global $db;
|
||||
global $db, $phpbb_dispatcher;
|
||||
|
||||
if (is_array($where_ids))
|
||||
{
|
||||
@@ -1826,11 +1826,26 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
// 5: Retrieve last_post infos
|
||||
if (count($post_ids))
|
||||
{
|
||||
$sql = 'SELECT p.post_id, p.poster_id, p.post_subject, p.post_time, p.post_username, u.username, u.user_colour
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . '
|
||||
AND p.poster_id = u.user_id';
|
||||
$result = $db->sql_query($sql);
|
||||
$sql_ary = array(
|
||||
'SELECT' => 'p.post_id, p.poster_id, p.post_subject, p.post_time, p.post_username, u.username, u.user_colour',
|
||||
'FROM' => array(
|
||||
POSTS_TABLE => 'p',
|
||||
USERS_TABLE => 'u',
|
||||
),
|
||||
'WHERE' => $db->sql_in_set('p.post_id', $post_ids) . '
|
||||
AND p.poster_id = u.user_id',
|
||||
);
|
||||
|
||||
/**
|
||||
* Event to modify the SQL array to get the post and user data from all forums' last posts
|
||||
*
|
||||
* @event core.sync_forum_last_post_info_sql
|
||||
* @var array sql_ary SQL array with some post and user data from the last posts list
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = ['sql_ary'];
|
||||
extract($phpbb_dispatcher->trigger_event('core.sync_forum_last_post_info_sql', compact($vars)));
|
||||
$result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
@@ -1862,7 +1877,6 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($post_info);
|
||||
}
|
||||
|
||||
// 6: Now do that thing
|
||||
@@ -1873,6 +1887,23 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
array_push($fieldnames, 'posts_approved', 'posts_unapproved', 'posts_softdeleted', 'topics_approved', 'topics_unapproved', 'topics_softdeleted');
|
||||
}
|
||||
|
||||
/**
|
||||
* Event to modify the SQL array to get the post and user data from all forums' last posts
|
||||
*
|
||||
* @event core.sync_modify_forum_data
|
||||
* @var array forum_data Array with data to update for all forum ids
|
||||
* @var array post_info Array with some post and user data from the last posts list
|
||||
* @var array fieldnames Array with the partial column names that are being updated
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'forum_data',
|
||||
'post_info',
|
||||
'fieldnames',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.sync_modify_forum_data', compact($vars)));
|
||||
unset($post_info);
|
||||
|
||||
foreach ($forum_data as $forum_id => $row)
|
||||
{
|
||||
$sql_ary = array();
|
||||
@@ -2041,11 +2072,31 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
unset($delete_topics, $delete_topic_ids);
|
||||
}
|
||||
|
||||
$sql = 'SELECT p.post_id, p.topic_id, p.post_visibility, p.poster_id, p.post_subject, p.post_username, p.post_time, u.username, u.user_colour
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . '
|
||||
AND u.user_id = p.poster_id';
|
||||
$result = $db->sql_query($sql);
|
||||
$sql_ary = array(
|
||||
'SELECT' => 'p.post_id, p.topic_id, p.post_visibility, p.poster_id, p.post_subject, p.post_username, p.post_time, u.username, u.user_colour',
|
||||
'FROM' => array(
|
||||
POSTS_TABLE => 'p',
|
||||
USERS_TABLE => 'u',
|
||||
),
|
||||
'WHERE' => $db->sql_in_set('p.post_id', $post_ids) . '
|
||||
AND u.user_id = p.poster_id',
|
||||
);
|
||||
|
||||
$custom_fieldnames = [];
|
||||
/**
|
||||
* Event to modify the SQL array to get the post and user data from all topics' last posts
|
||||
*
|
||||
* @event core.sync_topic_last_post_info_sql
|
||||
* @var array sql_ary SQL array with some post and user data from the last posts list
|
||||
* @var array custom_fieldnames Empty array for custom fieldnames to update the topics_table with
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'sql_ary',
|
||||
'custom_fieldnames',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.sync_topic_last_post_info_sql', compact($vars)));
|
||||
$result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
@@ -2067,6 +2118,22 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
$topic_data[$topic_id]['last_poster_name'] = ($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username'];
|
||||
$topic_data[$topic_id]['last_poster_colour'] = $row['user_colour'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Event to modify the topic_data when syncing topics
|
||||
*
|
||||
* @event core.sync_modify_topic_data
|
||||
* @var array topic_data Array with the topics' data we are syncing
|
||||
* @var array row Array with some of the current user and post data
|
||||
* @var int topic_id The current topic_id of $row
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'topic_data',
|
||||
'row',
|
||||
'topic_id',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.sync_modify_topic_data', compact($vars)));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@@ -2182,6 +2249,10 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
// These are fields that will be synchronised
|
||||
$fieldnames = array('time', 'visibility', 'posts_approved', 'posts_unapproved', 'posts_softdeleted', 'poster', 'first_post_id', 'first_poster_name', 'first_poster_colour', 'last_post_id', 'last_post_subject', 'last_post_time', 'last_poster_id', 'last_poster_name', 'last_poster_colour');
|
||||
|
||||
// Add custom fieldnames
|
||||
$fieldnames = array_merge($fieldnames, $custom_fieldnames);
|
||||
unset($custom_fieldnames);
|
||||
|
||||
if ($sync_extra)
|
||||
{
|
||||
// This routine assumes that post_reported values are correct
|
||||
@@ -2418,7 +2489,7 @@ function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_fr
|
||||
* must be carried through for the moderators table.
|
||||
*
|
||||
* @param \phpbb\db\driver\driver_interface $db Database connection
|
||||
* @param \phpbb\cache\driver\driver_interface Cache driver
|
||||
* @param \phpbb\cache\driver\driver_interface $cache Cache driver
|
||||
* @param \phpbb\auth\auth $auth Authentication object
|
||||
* @return null
|
||||
*/
|
||||
@@ -2605,7 +2676,7 @@ function phpbb_cache_moderators($db, $cache, $auth)
|
||||
* @param mixed $forum_id Restrict the log entries to the given forum_id (can also be an array of forum_ids)
|
||||
* @param int $topic_id Restrict the log entries to the given topic_id
|
||||
* @param int $user_id Restrict the log entries to the given user_id
|
||||
* @param int $log_time Only get log entries newer than the given timestamp
|
||||
* @param int $limit_days Only get log entries newer than the given timestamp
|
||||
* @param string $sort_by SQL order option, e.g. 'l.log_time DESC'
|
||||
* @param string $keywords Will only return log entries that have the keywords in log_operation or log_data
|
||||
*
|
||||
|
@@ -223,12 +223,12 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port
|
||||
/**
|
||||
* Add log entry
|
||||
*
|
||||
* @param string $mode The mode defines which log_type is used and from which log the entry is retrieved
|
||||
* @param int $forum_id Mode 'mod' ONLY: forum id of the related item, NOT INCLUDED otherwise
|
||||
* @param int $topic_id Mode 'mod' ONLY: topic id of the related item, NOT INCLUDED otherwise
|
||||
* @param int $reportee_id Mode 'user' ONLY: user id of the reportee, NOT INCLUDED otherwise
|
||||
* @param string $log_operation Name of the operation
|
||||
* @param array $additional_data More arguments can be added, depending on the log_type
|
||||
* string $mode The mode defines which log_type is used and from which log the entry is retrieved
|
||||
* int $forum_id Mode 'mod' ONLY: forum id of the related item, NOT INCLUDED otherwise
|
||||
* int $topic_id Mode 'mod' ONLY: topic id of the related item, NOT INCLUDED otherwise
|
||||
* int $reportee_id Mode 'user' ONLY: user id of the reportee, NOT INCLUDED otherwise
|
||||
* string $log_operation Name of the operation
|
||||
* array $additional_data More arguments can be added, depending on the log_type
|
||||
*
|
||||
* @return int|bool Returns the log_id, if the entry was added to the database, false otherwise.
|
||||
*
|
||||
@@ -345,7 +345,8 @@ function set_config_count($config_name, $increment, $is_dynamic = false, \phpbb\
|
||||
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
|
||||
* @param bool $cookie This param is mapped to \phpbb\request\request_interface::COOKIE as the last param for
|
||||
* \phpbb\request\request_interface::variable for backwards compatability reasons.
|
||||
* @param \phpbb\request\request_interface|null|false If an instance of \phpbb\request\request_interface is given the instance is stored in
|
||||
* @param \phpbb\request\request_interface|null|false $request
|
||||
* If an instance of \phpbb\request\request_interface is given the instance is stored in
|
||||
* a static variable and used for all further calls where this parameters is null. Until
|
||||
* the function is called with an instance it automatically creates a new \phpbb\request\request
|
||||
* instance on every call. By passing false this per-call instantiation can be restored
|
||||
|
@@ -1127,6 +1127,7 @@ function add_user_group($group_id, $user_id, $group_leader = false)
|
||||
*
|
||||
* @param string $group The name of the special group to add to
|
||||
* @param string $select_query An SQL query to retrieve the user(s) to add to the group
|
||||
* @param bool $use_src_db
|
||||
*/
|
||||
function user_group_auth($group, $select_query, $use_src_db)
|
||||
{
|
||||
@@ -1835,10 +1836,12 @@ function add_bots()
|
||||
|
||||
$bots = array(
|
||||
'AdsBot [Google]' => array('AdsBot-Google', ''),
|
||||
'Ahrefs [Bot]' => array('AhrefsBot/', ''),
|
||||
'Alexa [Bot]' => array('ia_archiver', ''),
|
||||
'Alta Vista [Bot]' => array('Scooter/', ''),
|
||||
'Amazon [Bot]' => array('Amazonbot/', ''),
|
||||
'Ask Jeeves [Bot]' => array('Ask Jeeves', ''),
|
||||
'Baidu [Spider]' => array('Baiduspider+(', ''),
|
||||
'Baidu [Spider]' => array('Baiduspider', ''),
|
||||
'Bing [Bot]' => array('bingbot/', ''),
|
||||
'DuckDuckGo [Bot]' => array('DuckDuckBot/', ''),
|
||||
'Exabot [Bot]' => array('Exabot/', ''),
|
||||
@@ -1854,7 +1857,7 @@ function add_bots()
|
||||
'Heritrix [Crawler]' => array('heritrix/1.', ''),
|
||||
'IBM Research [Bot]' => array('ibm.com/cs/crawler', ''),
|
||||
'ICCrawler - ICjobs' => array('ICCrawler - ICjobs', ''),
|
||||
'ichiro [Crawler]' => array('ichiro/2', ''),
|
||||
'ichiro [Crawler]' => array('ichiro/', ''),
|
||||
'Majestic-12 [Bot]' => array('MJ12bot/', ''),
|
||||
'Metager [Bot]' => array('MetagerBot/', ''),
|
||||
'MSN NewsBlogs' => array('msnbot-NewsBlogs/', ''),
|
||||
@@ -1867,6 +1870,7 @@ function add_bots()
|
||||
'Online link [Validator]' => array('online link validator', ''),
|
||||
'psbot [Picsearch]' => array('psbot/0', ''),
|
||||
'Seekport [Bot]' => array('Seekbot/', ''),
|
||||
'Semrush [Bot]' => array('SemrushBot/', ''),
|
||||
'Sensis [Crawler]' => array('Sensis Web Crawler', ''),
|
||||
'SEO Crawler' => array('SEO search Crawler/', ''),
|
||||
'Seoma [Crawler]' => array('Seoma [SEO Crawler]', ''),
|
||||
@@ -1876,7 +1880,7 @@ function add_bots()
|
||||
'Synoo [Bot]' => array('SynooBot/', ''),
|
||||
'Telekom [Bot]' => array('crawleradmin.t-info@telekom.de', ''),
|
||||
'TurnitinBot [Bot]' => array('TurnitinBot/', ''),
|
||||
'Voyager [Bot]' => array('voyager/1.0', ''),
|
||||
'Voyager [Bot]' => array('voyager/', ''),
|
||||
'W3 [Sitesearch]' => array('W3 SiteSearch Crawler', ''),
|
||||
'W3C [Linkcheck]' => array('W3C-checklink/', ''),
|
||||
'W3C [Validator]' => array('W3C_*Validator', ''),
|
||||
|
@@ -551,7 +551,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
}
|
||||
$last_post_time = $user->format_date($row['forum_last_post_time']);
|
||||
$last_post_time_rfc3339 = gmdate(DATE_RFC3339, $row['forum_last_post_time']);
|
||||
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
|
||||
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1086,12 +1086,12 @@ function display_custom_bbcodes()
|
||||
// Start counting from 22 for the bbcode ids (every bbcode takes two ids - opening/closing)
|
||||
$num_predefined_bbcodes = NUM_PREDEFINED_BBCODES;
|
||||
|
||||
$sql_ary = array(
|
||||
'SELECT' => 'b.bbcode_id, b.bbcode_tag, b.bbcode_helpline',
|
||||
'FROM' => array(BBCODES_TABLE => 'b'),
|
||||
$sql_ary = [
|
||||
'SELECT' => 'b.bbcode_id, b.bbcode_tag, b.bbcode_helpline, b.bbcode_match',
|
||||
'FROM' => [BBCODES_TABLE => 'b'],
|
||||
'WHERE' => 'b.display_on_posting = 1',
|
||||
'ORDER_BY' => 'b.bbcode_tag',
|
||||
);
|
||||
];
|
||||
|
||||
/**
|
||||
* Event to modify the SQL query before custom bbcode data is queried
|
||||
@@ -1119,13 +1119,18 @@ function display_custom_bbcodes()
|
||||
// Convert Numeric Character References to UTF-8 chars.
|
||||
$row['bbcode_helpline'] = utf8_decode_ncr($row['bbcode_helpline']);
|
||||
|
||||
$custom_tags = array(
|
||||
'BBCODE_NAME' => "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'",
|
||||
// Does the closing bbcode tag exists? If so display it.
|
||||
$bbcode_close_tag = '%\[\/' . utf8_strtolower($row['bbcode_tag']) . '\]%';
|
||||
$bbcode_match_str = utf8_strtolower($row['bbcode_match']);
|
||||
$bbcode_name_clean = preg_match($bbcode_close_tag, $bbcode_match_str) ? "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'" : "'[{$row['bbcode_tag']}]', ''";
|
||||
|
||||
$custom_tags = [
|
||||
'BBCODE_NAME' => $bbcode_name_clean,
|
||||
'BBCODE_ID' => $num_predefined_bbcodes + ($i * 2),
|
||||
'BBCODE_TAG' => $row['bbcode_tag'],
|
||||
'BBCODE_TAG_CLEAN' => str_replace('=', '-', $row['bbcode_tag']),
|
||||
'BBCODE_HELPLINE' => $row['bbcode_helpline'],
|
||||
);
|
||||
];
|
||||
|
||||
/**
|
||||
* Event to modify the template data block of a custom bbcode
|
||||
|
@@ -656,15 +656,15 @@ function phpbb_download_handle_forum_auth($db, $auth, $topic_id)
|
||||
{
|
||||
global $phpbb_container;
|
||||
|
||||
$sql_array = array(
|
||||
'SELECT' => 't.topic_visibility, t.forum_id, f.forum_name, f.forum_password, f.parent_id',
|
||||
'FROM' => array(
|
||||
$sql_array = [
|
||||
'SELECT' => 't.forum_id, t.topic_poster, t.topic_visibility, f.forum_name, f.forum_password, f.parent_id',
|
||||
'FROM' => [
|
||||
TOPICS_TABLE => 't',
|
||||
FORUMS_TABLE => 'f',
|
||||
),
|
||||
'WHERE' => 't.topic_id = ' . (int) $topic_id . '
|
||||
],
|
||||
'WHERE' => 't.topic_id = ' . (int) $topic_id . '
|
||||
AND t.forum_id = f.forum_id',
|
||||
);
|
||||
];
|
||||
|
||||
$sql = $db->sql_build_query('SELECT', $sql_array);
|
||||
$result = $db->sql_query($sql);
|
||||
|
@@ -35,7 +35,7 @@ function phpbb_module_notes_url($mode, $module_row)
|
||||
}
|
||||
|
||||
global $user_id;
|
||||
return ($user_id) ? "&u=$user_id" : '';
|
||||
return phpbb_extra_url();
|
||||
}
|
||||
|
||||
function phpbb_module_warn_url($mode, $module_row)
|
||||
@@ -43,24 +43,18 @@ function phpbb_module_warn_url($mode, $module_row)
|
||||
if ($mode == 'front' || $mode == 'list')
|
||||
{
|
||||
global $forum_id;
|
||||
|
||||
return ($forum_id) ? "&f=$forum_id" : '';
|
||||
return phpbb_extra_url();
|
||||
}
|
||||
|
||||
if ($mode == 'warn_post')
|
||||
{
|
||||
global $forum_id, $post_id;
|
||||
|
||||
$url_extra = ($forum_id) ? "&f=$forum_id" : '';
|
||||
$url_extra .= ($post_id) ? "&p=$post_id" : '';
|
||||
|
||||
return $url_extra;
|
||||
return phpbb_extra_url();
|
||||
}
|
||||
else
|
||||
{
|
||||
global $user_id;
|
||||
|
||||
return ($user_id) ? "&u=$user_id" : '';
|
||||
return phpbb_extra_url();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,18 +83,34 @@ function phpbb_module_reports_url($mode, $module_row)
|
||||
return phpbb_extra_url();
|
||||
}
|
||||
|
||||
function phpbb_extra_url()
|
||||
/**
|
||||
* Generate URL parameters for MCP modules
|
||||
*
|
||||
* @param array $additional_parameters Array with additional parameters in format of ['key' => 'parameter_name']
|
||||
*
|
||||
* @return string String with URL parameters (empty string if not any)
|
||||
*/
|
||||
function phpbb_extra_url($additional_parameters = [])
|
||||
{
|
||||
global $forum_id, $topic_id, $post_id, $report_id, $user_id;
|
||||
$url_extra = [];
|
||||
$url_parameters = array_merge([
|
||||
'f' => 'forum_id',
|
||||
't' => 'topic_id',
|
||||
'p' => 'post_id',
|
||||
'r' => 'report_id',
|
||||
'u' => 'user_id',
|
||||
], $additional_parameters);
|
||||
|
||||
$url_extra = '';
|
||||
$url_extra .= ($forum_id) ? "&f=$forum_id" : '';
|
||||
$url_extra .= ($topic_id) ? "&t=$topic_id" : '';
|
||||
$url_extra .= ($post_id) ? "&p=$post_id" : '';
|
||||
$url_extra .= ($user_id) ? "&u=$user_id" : '';
|
||||
$url_extra .= ($report_id) ? "&r=$report_id" : '';
|
||||
foreach ($url_parameters as $key => $value)
|
||||
{
|
||||
global $$value;
|
||||
if (isset($$value) && $parameter = $$value)
|
||||
{
|
||||
$url_extra[] = "$key=$parameter";
|
||||
}
|
||||
}
|
||||
|
||||
return $url_extra;
|
||||
return implode('&', $url_extra);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -383,7 +393,7 @@ function phpbb_get_pm_data($pm_ids)
|
||||
/**
|
||||
* sorting in mcp
|
||||
*
|
||||
* @param string $where_sql should either be WHERE (default if ommited) or end with AND or OR
|
||||
* $where_sql should either be WHERE (default if ommited) or end with AND or OR
|
||||
*
|
||||
* $mode reports and reports_closed: the $where parameters uses aliases p for posts table and r for report table
|
||||
* $mode unapproved_posts: the $where parameters uses aliases p for posts table and t for topic table
|
||||
@@ -684,7 +694,7 @@ function phpbb_mcp_sorting($mode, &$sort_days_val, &$sort_key_val, &$sort_dir_va
|
||||
* @param string $table The table to find the ids in
|
||||
* @param string $sql_id The ids relevant column name
|
||||
* @param array $acl_list A list of permissions the user need to have
|
||||
* @param mixed $singe_forum Limit to one forum id (int) or the first forum found (true)
|
||||
* @param mixed $single_forum Limit to one forum id (int) or the first forum found (true)
|
||||
*
|
||||
* @return mixed False if no ids were able to be retrieved, true if at least one id left.
|
||||
* Additionally, this value can be the forum_id assigned if $single_forum was set.
|
||||
|
@@ -1840,56 +1840,84 @@ class smtp_class
|
||||
}
|
||||
|
||||
/**
|
||||
* Encodes the given string for proper display in UTF-8.
|
||||
*
|
||||
* This version is using base64 encoded data. The downside of this
|
||||
* is if the mail client does not understand this encoding the user
|
||||
* is basically doomed with an unreadable subject.
|
||||
*
|
||||
* Please note that this version fully supports RFC 2045 section 6.8.
|
||||
*
|
||||
* @param string $eol End of line we are using (optional to be backwards compatible)
|
||||
*/
|
||||
* Encodes the given string for proper display in UTF-8 or US-ASCII.
|
||||
*
|
||||
* This version is based on iconv_mime_encode() implementation
|
||||
* from symfomy/polyfill-iconv
|
||||
* https://github.com/symfony/polyfill-iconv/blob/fd324208ec59a39ebe776e6e9ec5540ad4f40aaa/Iconv.php#L355
|
||||
*
|
||||
* @param string $str
|
||||
* @param string $eol Lines delimiter (optional to be backwards compatible)
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function mail_encode($str, $eol = "\r\n")
|
||||
{
|
||||
// define start delimimter, end delimiter and spacer
|
||||
$start = "=?UTF-8?B?";
|
||||
$end = "?=";
|
||||
$delimiter = "$eol ";
|
||||
// Check if string contains ASCII only characters
|
||||
$is_ascii = strlen($str) === utf8_strlen($str);
|
||||
|
||||
// Maximum length is 75. $split_length *must* be a multiple of 4, but <= 75 - strlen($start . $delimiter . $end)!!!
|
||||
$split_length = 60;
|
||||
$encoded_str = base64_encode($str);
|
||||
$scheme = $is_ascii ? 'Q' : 'B';
|
||||
|
||||
// If encoded string meets the limits, we just return with the correct data.
|
||||
if (strlen($encoded_str) <= $split_length)
|
||||
// Define start delimiter, end delimiter
|
||||
// Use the Quoted-Printable encoding for ASCII strings to avoid unnecessary encoding in Base64
|
||||
$start = '=?' . ($is_ascii ? 'US-ASCII' : 'UTF-8') . '?' . $scheme . '?';
|
||||
$end = '?=';
|
||||
|
||||
// Maximum encoded-word length is 75 as per RFC 2047 section 2.
|
||||
// $split_length *must* be a multiple of 4, but <= 75 - strlen($start . $eol . $end)!!!
|
||||
$split_length = 75 - strlen($start . $eol . $end);
|
||||
$split_length = $split_length - $split_length % 4;
|
||||
|
||||
$line_length = strlen($start) + strlen($end);
|
||||
$line_offset = strlen($start) + 1;
|
||||
$line_data = '';
|
||||
|
||||
$is_quoted_printable = 'Q' === $scheme;
|
||||
|
||||
preg_match_all('/./us', $str, $chars);
|
||||
$chars = $chars[0] ?? [];
|
||||
|
||||
$str = [];
|
||||
foreach ($chars as $char)
|
||||
{
|
||||
return $start . $encoded_str . $end;
|
||||
}
|
||||
$encoded_char = $is_quoted_printable
|
||||
? $char = preg_replace_callback(
|
||||
'/[=_\?\x20\x00-\x1F\x80-\xFF]/',
|
||||
function ($matches)
|
||||
{
|
||||
$hex = dechex(ord($matches[0]));
|
||||
$hex = strlen($hex) == 1 ? "0$hex" : $hex;
|
||||
return '=' . strtoupper($hex);
|
||||
},
|
||||
$char
|
||||
)
|
||||
: base64_encode($line_data . $char);
|
||||
|
||||
// If there is only ASCII data, we just return what we want, correctly splitting the lines.
|
||||
if (strlen($str) === utf8_strlen($str))
|
||||
{
|
||||
return $start . implode($end . $delimiter . $start, str_split($encoded_str, $split_length)) . $end;
|
||||
}
|
||||
|
||||
// UTF-8 data, compose encoded lines
|
||||
$array = utf8_str_split($str);
|
||||
$str = '';
|
||||
|
||||
while (count($array))
|
||||
{
|
||||
$text = '';
|
||||
|
||||
while (count($array) && intval((strlen($text . $array[0]) + 2) / 3) << 2 <= $split_length)
|
||||
if (isset($encoded_char[$split_length - $line_length]))
|
||||
{
|
||||
$text .= array_shift($array);
|
||||
if (!$is_quoted_printable)
|
||||
{
|
||||
$line_data = base64_encode($line_data);
|
||||
}
|
||||
$str[] = $start . $line_data . $end;
|
||||
$line_length = $line_offset;
|
||||
$line_data = '';
|
||||
}
|
||||
|
||||
$str .= $start . base64_encode($text) . $end . $delimiter;
|
||||
$line_data .= $char;
|
||||
$is_quoted_printable && $line_length += strlen($char);
|
||||
}
|
||||
|
||||
return substr($str, 0, -strlen($delimiter));
|
||||
if ($line_data !== '')
|
||||
{
|
||||
if (!$is_quoted_printable)
|
||||
{
|
||||
$line_data = base64_encode($line_data);
|
||||
}
|
||||
$str[] = $start . $line_data . $end;
|
||||
}
|
||||
|
||||
return implode($eol . ' ', $str);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1897,7 +1925,7 @@ function mail_encode($str, $eol = "\r\n")
|
||||
*/
|
||||
function phpbb_mail($to, $subject, $msg, $headers, $eol, &$err_msg)
|
||||
{
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
global $config, $phpbb_root_path, $phpEx, $phpbb_dispatcher;
|
||||
|
||||
// Convert Numeric Character References to UTF-8 chars (ie. Emojis)
|
||||
$subject = utf8_decode_ncr($subject);
|
||||
@@ -1926,8 +1954,54 @@ function phpbb_mail($to, $subject, $msg, $headers, $eol, &$err_msg)
|
||||
*/
|
||||
$additional_parameters = $config['email_force_sender'] ? '-f' . $config['board_email'] : '';
|
||||
|
||||
/**
|
||||
* Modify data before sending out emails with PHP's mail function
|
||||
*
|
||||
* @event core.phpbb_mail_before
|
||||
* @var string to The message recipient
|
||||
* @var string subject The message subject
|
||||
* @var string msg The message text
|
||||
* @var string headers The email headers
|
||||
* @var string eol The endline character
|
||||
* @var string additional_parameters The additional parameters
|
||||
* @since 3.3.6-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'to',
|
||||
'subject',
|
||||
'msg',
|
||||
'headers',
|
||||
'eol',
|
||||
'additional_parameters',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.phpbb_mail_before', compact($vars)));
|
||||
|
||||
$result = mail($to, mail_encode($subject, ''), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers, $additional_parameters);
|
||||
|
||||
/**
|
||||
* Execute code after sending out emails with PHP's mail function
|
||||
*
|
||||
* @event core.phpbb_mail_after
|
||||
* @var string to The message recipient
|
||||
* @var string subject The message subject
|
||||
* @var string msg The message text
|
||||
* @var string headers The email headers
|
||||
* @var string eol The endline character
|
||||
* @var string additional_parameters The additional parameters
|
||||
* @var bool result True if the email was sent, false otherwise
|
||||
* @since 3.3.6-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'to',
|
||||
'subject',
|
||||
'msg',
|
||||
'headers',
|
||||
'eol',
|
||||
'additional_parameters',
|
||||
'result',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.phpbb_mail_after', compact($vars)));
|
||||
|
||||
$collector->uninstall();
|
||||
$err_msg = $collector->format_errors();
|
||||
|
||||
|
@@ -662,7 +662,7 @@ class p_master
|
||||
// Add url_extra parameter to u_action url
|
||||
if (!empty($this->module_ary) && $this->active_module !== false && $this->module_ary[$this->active_module_row_id]['url_extra'])
|
||||
{
|
||||
$this->module->u_action .= $this->module_ary[$this->active_module_row_id]['url_extra'];
|
||||
$this->module->u_action .= '&' . $this->module_ary[$this->active_module_row_id]['url_extra'];
|
||||
}
|
||||
|
||||
// Assign the module path for re-usage
|
||||
@@ -920,7 +920,7 @@ class p_master
|
||||
}
|
||||
|
||||
// Was not allowed in categories before - /*!$item_ary['cat'] && */
|
||||
$u_title .= (isset($item_ary['url_extra'])) ? $item_ary['url_extra'] : '';
|
||||
$u_title .= (isset($item_ary['url_extra']) && $item_ary['url_extra']) ? '&' . $item_ary['url_extra'] : '';
|
||||
|
||||
// Only output a categories items if it's currently selected
|
||||
if (!$depth || ($depth && (in_array($item_ary['parent'], array_values($this->module_cache['parents'])) || $item_ary['parent'] == $this->p_parent)))
|
||||
|
@@ -256,7 +256,7 @@ function generate_smilies($mode, $forum_id)
|
||||
*/
|
||||
function update_post_information($type, $ids, $return_update_sql = false)
|
||||
{
|
||||
global $db;
|
||||
global $db, $phpbb_dispatcher;
|
||||
|
||||
if (empty($ids))
|
||||
{
|
||||
@@ -340,14 +340,35 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
||||
|
||||
if (count($last_post_ids))
|
||||
{
|
||||
$sql = 'SELECT p.' . $type . '_id, p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
WHERE p.poster_id = u.user_id
|
||||
AND ' . $db->sql_in_set('p.post_id', $last_post_ids);
|
||||
$result = $db->sql_query($sql);
|
||||
$sql_ary = array(
|
||||
'SELECT' => 'p.' . $type . '_id, p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour',
|
||||
'FROM' => array(
|
||||
POSTS_TABLE => 'p',
|
||||
USERS_TABLE => 'u',
|
||||
),
|
||||
'WHERE' => $db->sql_in_set('p.post_id', $last_post_ids) . '
|
||||
AND p.poster_id = u.user_id',
|
||||
);
|
||||
|
||||
/**
|
||||
* Event to modify the SQL array to get the post and user data from all last posts
|
||||
*
|
||||
* @event core.update_post_info_modify_posts_sql
|
||||
* @var string type The table being updated (forum or topic)
|
||||
* @var array sql_ary SQL array to get some of the last posts' data
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'type',
|
||||
'sql_ary',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.update_post_info_modify_posts_sql', compact($vars)));
|
||||
$result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
|
||||
|
||||
$rowset = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$rowset[] = $row;
|
||||
$update_sql[$row["{$type}_id"]][] = $type . '_last_post_id = ' . (int) $row['post_id'];
|
||||
$update_sql[$row["{$type}_id"]][] = "{$type}_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
|
||||
$update_sql[$row["{$type}_id"]][] = $type . '_last_post_time = ' . (int) $row['post_time'];
|
||||
@@ -356,6 +377,23 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
||||
$update_sql[$row["{$type}_id"]][] = "{$type}_last_poster_name = '" . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['post_username']) : $db->sql_escape($row['username'])) . "'";
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
/**
|
||||
* Event to modify the update_sql array to add new update data for forum or topic last posts
|
||||
*
|
||||
* @event core.update_post_info_modify_sql
|
||||
* @var string type The table being updated (forum or topic)
|
||||
* @var array rowset Array with the posts data
|
||||
* @var array update_sql Array with SQL data to update the forums or topics table with
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'type',
|
||||
'rowset',
|
||||
'update_sql',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.update_post_info_modify_sql', compact($vars)));
|
||||
unset($rowset);
|
||||
}
|
||||
unset($empty_forums, $ids, $last_post_ids);
|
||||
|
||||
@@ -775,20 +813,42 @@ function posting_gen_inline_attachments(&$attachment_data)
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate inline attachment entry
|
||||
*/
|
||||
function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_attach_box = true)
|
||||
* Generate inline attachment entry
|
||||
*
|
||||
* @param array $attachment_data The attachment data
|
||||
* @param string $filename_data The filename data (filecomment)
|
||||
* @param bool $show_attach_box Whether to show the attach box
|
||||
* @param mixed $forum_id The forum id to check or false if private message
|
||||
* @return int
|
||||
*/
|
||||
function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_attach_box = true, $forum_id = false)
|
||||
{
|
||||
global $template, $config, $phpbb_root_path, $phpEx, $user, $phpbb_dispatcher;
|
||||
global $template, $cache, $config, $phpbb_root_path, $phpEx, $user, $phpbb_dispatcher;
|
||||
|
||||
$allowed_attachments = array_keys($cache->obtain_attach_extensions($forum_id)['_allowed_']);
|
||||
|
||||
// Some default template variables
|
||||
$template->assign_vars(array(
|
||||
$default_vars = [
|
||||
'S_SHOW_ATTACH_BOX' => $show_attach_box,
|
||||
'S_HAS_ATTACHMENTS' => count($attachment_data),
|
||||
'FILESIZE' => $config['max_filesize'],
|
||||
'FILE_COMMENT' => (isset($filename_data['filecomment'])) ? $filename_data['filecomment'] : '',
|
||||
'MAX_ATTACHMENT_FILESIZE' => $config['max_filesize'] > 0 ? $user->lang('MAX_ATTACHMENT_FILESIZE', get_formatted_filesize($config['max_filesize'])) : '',
|
||||
));
|
||||
'ALLOWED_ATTACHMENTS' => !empty($allowed_attachments) ? implode(',', $allowed_attachments) : '',
|
||||
];
|
||||
|
||||
/**
|
||||
* Modify default attachments template vars
|
||||
*
|
||||
* @event core.modify_default_attachments_template_vars
|
||||
* @var array allowed_attachments Array containing allowed attachments data
|
||||
* @var array default_vars Array containing default attachments template vars
|
||||
* @since 3.3.6-RC1
|
||||
*/
|
||||
$vars = ['allowed_attachments', 'default_vars'];
|
||||
extract($phpbb_dispatcher->trigger_event('core.modify_default_attachments_template_vars', compact($vars)));
|
||||
|
||||
$template->assign_vars($default_vars);
|
||||
|
||||
if (count($attachment_data))
|
||||
{
|
||||
@@ -937,10 +997,10 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0, $pm_action = '', $ms
|
||||
$topic_forum_id = ($topic_rows[$draft['topic_id']]['forum_id']) ? $topic_rows[$draft['topic_id']]['forum_id'] : $forum_id;
|
||||
|
||||
$link_topic = true;
|
||||
$view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_forum_id . '&t=' . $draft['topic_id']);
|
||||
$view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $draft['topic_id']);
|
||||
$title = $topic_rows[$draft['topic_id']]['topic_title'];
|
||||
|
||||
$insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 'f=' . $topic_forum_id . '&t=' . $draft['topic_id'] . '&mode=reply&d=' . $draft['draft_id']);
|
||||
$insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 't=' . $draft['topic_id'] . '&mode=reply&d=' . $draft['draft_id']);
|
||||
}
|
||||
else if ($draft['forum_id'] && $auth->acl_get('f_read', $draft['forum_id']))
|
||||
{
|
||||
@@ -1160,7 +1220,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||
$post_subject = censor_text($post_subject);
|
||||
|
||||
$post_anchor = ($mode == 'post_review') ? 'ppr' . $row['post_id'] : 'pr' . $row['post_id'];
|
||||
$u_show_post = append_sid($phpbb_root_path . 'viewtopic.' . $phpEx, "f=$forum_id&t=$topic_id&p={$row['post_id']}&view=show#p{$row['post_id']}");
|
||||
$u_show_post = append_sid($phpbb_root_path . 'viewtopic.' . $phpEx, "t=$topic_id&p={$row['post_id']}&view=show#p{$row['post_id']}");
|
||||
|
||||
$l_deleted_message = '';
|
||||
if ($row['post_visibility'] == ITEM_DELETED)
|
||||
@@ -1209,7 +1269,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||
'POST_TIME' => $row['post_time'],
|
||||
'USER_ID' => $row['user_id'],
|
||||
'U_MINI_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . '#p' . $row['post_id'],
|
||||
'U_MCP_DETAILS' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=post_details&f=' . $forum_id . '&p=' . $row['post_id'], true, $user->session_id) : '',
|
||||
'U_MCP_DETAILS' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=post_details&p=' . $row['post_id'], true, $user->session_id) : '',
|
||||
'POSTER_QUOTE' => ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) ? addslashes(get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '',
|
||||
);
|
||||
|
||||
@@ -2503,27 +2563,35 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
|
||||
}
|
||||
}
|
||||
|
||||
$params = $add_anchor = '';
|
||||
$params = [];
|
||||
$add_anchor = '';
|
||||
$url = "{$phpbb_root_path}viewtopic.$phpEx";
|
||||
|
||||
if ($post_visibility == ITEM_APPROVED ||
|
||||
($auth->acl_get('m_softdelete', $data_ary['forum_id']) && $post_visibility == ITEM_DELETED) ||
|
||||
($auth->acl_get('m_approve', $data_ary['forum_id']) && in_array($post_visibility, array(ITEM_UNAPPROVED, ITEM_REAPPROVE))))
|
||||
{
|
||||
$params .= '&t=' . $data_ary['topic_id'];
|
||||
|
||||
if ($mode != 'post')
|
||||
{
|
||||
$params .= '&p=' . $data_ary['post_id'];
|
||||
$params['p'] = $data_ary['post_id'];
|
||||
$add_anchor = '#p' . $data_ary['post_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$params['t'] = $data_ary['topic_id'];
|
||||
}
|
||||
}
|
||||
else if ($mode != 'post' && $post_mode != 'edit_first_post' && $post_mode != 'edit_topic')
|
||||
{
|
||||
$params .= '&t=' . $data_ary['topic_id'];
|
||||
$params['t'] = $data_ary['topic_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$url = "{$phpbb_root_path}viewforum.$phpEx";
|
||||
$params['f'] = $data_ary['forum_id'];
|
||||
}
|
||||
|
||||
$url = (!$params) ? "{$phpbb_root_path}viewforum.$phpEx" : "{$phpbb_root_path}viewtopic.$phpEx";
|
||||
$url = append_sid($url, 'f=' . $data_ary['forum_id'] . $params) . $add_anchor;
|
||||
$url = append_sid($url, $params) . $add_anchor;
|
||||
|
||||
$poll = $poll_ary;
|
||||
$data = $data_ary;
|
||||
@@ -2584,7 +2652,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
|
||||
* - 'topic_last_poster_name'
|
||||
* - 'topic_last_poster_colour'
|
||||
* @param int $bump_time The time at which topic was bumped, usually it is a current time as obtained via time().
|
||||
* @return string An URL to the bumped topic, example: ./viewtopic.php?forum_id=1&topic_id=2&p=3#p3
|
||||
* @return string An URL to the bumped topic, example: ./viewtopic.php?p=3#p3
|
||||
*/
|
||||
function phpbb_bump_topic($forum_id, $topic_id, $post_data, $bump_time = false)
|
||||
{
|
||||
@@ -2673,7 +2741,7 @@ function phpbb_bump_topic($forum_id, $topic_id, $post_data, $bump_time = false)
|
||||
$post_data['topic_title']
|
||||
));
|
||||
|
||||
$url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&p={$post_data['topic_last_post_id']}") . "#p{$post_data['topic_last_post_id']}";
|
||||
$url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p={$post_data['topic_last_post_id']}") . "#p{$post_data['topic_last_post_id']}";
|
||||
|
||||
return $url;
|
||||
}
|
||||
@@ -2804,7 +2872,7 @@ function phpbb_handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $
|
||||
$delete_reason
|
||||
));
|
||||
|
||||
$meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&p=$next_post_id") . "#p$next_post_id";
|
||||
$meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p=$next_post_id") . "#p$next_post_id";
|
||||
$message = $user->lang['POST_DELETED'];
|
||||
|
||||
if (!$request->is_ajax())
|
||||
|
@@ -425,7 +425,7 @@ function user_add($user_row, $cp_data = false, $notifications_data = null)
|
||||
/**
|
||||
* Delete user(s) and their related data
|
||||
*
|
||||
* @param string $mode Mode of posts deletion (retain|delete)
|
||||
* @param string $mode Mode of posts deletion (retain|remove)
|
||||
* @param mixed $user_ids Either an array of integers or an integer
|
||||
* @param bool $retain_username True if username should be retained, false otherwise
|
||||
* @return bool
|
||||
@@ -464,7 +464,7 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
* Event before of the performing of the user(s) delete action
|
||||
*
|
||||
* @event core.delete_user_before
|
||||
* @var string mode Mode of posts deletion (retain|delete)
|
||||
* @var string mode Mode of posts deletion (retain|remove)
|
||||
* @var array user_ids ID(s) of the user(s) bound to be deleted
|
||||
* @var bool retain_username True if username should be retained, false otherwise
|
||||
* @var array user_rows Array containing data of the user(s) bound to be deleted
|
||||
@@ -774,7 +774,7 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
* Event after the user(s) delete action has been performed
|
||||
*
|
||||
* @event core.delete_user_after
|
||||
* @var string mode Mode of posts deletion (retain|delete)
|
||||
* @var string mode Mode of posts deletion (retain|remove)
|
||||
* @var array user_ids ID(s) of the deleted user(s)
|
||||
* @var bool retain_username True if username should be retained, false otherwise
|
||||
* @var array user_rows Array containing data of the deleted user(s)
|
||||
@@ -797,6 +797,8 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
* Flips user_type from active to inactive and vice versa, handles group membership updates
|
||||
*
|
||||
* @param string $mode can be flip for flipping from active/inactive, activate or deactivate
|
||||
* @param array $user_id_ary
|
||||
* @param int $reason
|
||||
*/
|
||||
function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
|
||||
{
|
||||
@@ -919,6 +921,7 @@ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
|
||||
* @param string $ban_len_other Ban length as a date (YYYY-MM-DD)
|
||||
* @param boolean $ban_exclude Exclude these entities from banning?
|
||||
* @param string $ban_reason String describing the reason for this ban
|
||||
* @param string $ban_give_reason
|
||||
* @return boolean
|
||||
*/
|
||||
function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason = '')
|
||||
@@ -1611,6 +1614,7 @@ function validate_num($num, $optional = false, $min = 0, $max = 1E99)
|
||||
/**
|
||||
* Validate Date
|
||||
* @param string $date_string a date in the dd-mm-yyyy format
|
||||
* @param bool $optional
|
||||
* @return boolean
|
||||
*/
|
||||
function validate_date($date_string, $optional = false)
|
||||
@@ -1748,7 +1752,8 @@ function validate_username($username, $allowed_username = false, $allow_all_name
|
||||
}
|
||||
|
||||
// ... fast checks first.
|
||||
if (strpos($username, '"') !== false || strpos($username, '"') !== false || empty($clean_username))
|
||||
if (strpos($username, '"') !== false || strpos($username, '"') !== false || empty($clean_username)
|
||||
|| preg_match('/[\x{180E}\x{2005}-\x{200D}\x{202F}\x{205F}\x{2060}\x{FEFF}]/u', $username))
|
||||
{
|
||||
return 'INVALID_CHARS';
|
||||
}
|
||||
@@ -1882,6 +1887,7 @@ function validate_password($password)
|
||||
* Check to see if email address is a valid address and contains a MX record
|
||||
*
|
||||
* @param string $email The email to check
|
||||
* @param $config
|
||||
*
|
||||
* @return mixed Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)
|
||||
*/
|
||||
@@ -3621,7 +3627,8 @@ function group_update_listings($group_id)
|
||||
/**
|
||||
* Funtion to make a user leave the NEWLY_REGISTERED system group.
|
||||
* @access public
|
||||
* @param $user_id The id of the user to remove from the group
|
||||
* @param int $user_id The id of the user to remove from the group
|
||||
* @param mixed $user_data The id of the user to remove from the group
|
||||
*/
|
||||
function remove_newly_registered($user_id, $user_data = false)
|
||||
{
|
||||
|
@@ -542,8 +542,8 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
|
||||
sync('forum', 'forum_id', $sync_forums, true, true);
|
||||
|
||||
// Link to the new topic
|
||||
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&t=' . $to_topic_id) . '">', '</a>');
|
||||
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&t=$to_topic_id");
|
||||
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $to_topic_id) . '">', '</a>');
|
||||
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?t=$to_topic_id");
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
/**
|
||||
|
@@ -105,7 +105,7 @@ function mcp_front_view($id, $mode, $action)
|
||||
* @var int total Number of unapproved posts
|
||||
* @var array post_list List of unapproved posts
|
||||
* @var array forum_list List of forums that contain the posts
|
||||
* @var array forum_names Associative array with forum_id as key and it's corresponding forum_name as value
|
||||
* @var array forum_names Associative array with forum_id as key and its corresponding forum_name as value
|
||||
* @since 3.1.0-RC3
|
||||
*/
|
||||
$vars = array('total', 'post_list', 'forum_list', 'forum_names');
|
||||
@@ -119,16 +119,37 @@ function mcp_front_view($id, $mode, $action)
|
||||
AND t.topic_id = p.topic_id
|
||||
AND p.poster_id = u.user_id
|
||||
ORDER BY p.post_time DESC, p.post_id DESC';
|
||||
|
||||
/**
|
||||
* Alter posts data SQL query
|
||||
*
|
||||
* @event core.mcp_front_view_modify_posts_data_sql
|
||||
* @var array forum_list List of forums that contain the posts
|
||||
* @var array forum_names Associative array with forum_id as key and its corresponding forum_name as value
|
||||
* @var array post_list List of unapproved posts
|
||||
* @var string sql String with the SQL query to be executed
|
||||
* @var int total Number of unapproved posts
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'forum_list',
|
||||
'forum_names',
|
||||
'post_list',
|
||||
'sql',
|
||||
'total',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_front_view_modify_posts_data_sql', compact($vars)));
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$template->assign_block_vars('unapproved', array(
|
||||
'U_POST_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $row['forum_id'] . '&p=' . $row['post_id']),
|
||||
$unapproved_post_row = [
|
||||
'U_POST_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&p=' . $row['post_id']),
|
||||
'U_MCP_FORUM' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=forum_view&f=' . $row['forum_id']),
|
||||
'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=topic_view&f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
|
||||
'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=topic_view&t=' . $row['topic_id']),
|
||||
'U_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
|
||||
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
|
||||
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $row['topic_id']),
|
||||
|
||||
'AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour']),
|
||||
'AUTHOR' => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour']),
|
||||
@@ -141,7 +162,27 @@ function mcp_front_view($id, $mode, $action)
|
||||
'SUBJECT' => ($row['post_subject']) ? $row['post_subject'] : $user->lang['NO_SUBJECT'],
|
||||
'POST_TIME' => $user->format_date($row['post_time']),
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
));
|
||||
];
|
||||
|
||||
/**
|
||||
* Alter unapproved posts template block for MCP front page
|
||||
*
|
||||
* @event core.mcp_front_view_modify_unapproved_post_row
|
||||
* @var array forum_names Array containing forum names
|
||||
* @var string mode MCP front view mode
|
||||
* @var array row Array with unapproved post data
|
||||
* @var array unapproved_post_row Template block array of the unapproved post
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'forum_names',
|
||||
'mode',
|
||||
'row',
|
||||
'unapproved_post_row',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_front_view_modify_unapproved_post_row', compact($vars)));
|
||||
|
||||
$template->assign_block_vars('unapproved', $unapproved_post_row);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
@@ -238,12 +279,12 @@ function mcp_front_view($id, $mode, $action)
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$template->assign_block_vars('report', array(
|
||||
'U_POST_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . '&p=' . $row['post_id'] . "&i=reports&mode=report_details"),
|
||||
$reported_post_row = [
|
||||
'U_POST_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'p=' . $row['post_id'] . "&i=reports&mode=report_details"),
|
||||
'U_MCP_FORUM' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . "&i=$id&mode=forum_view"),
|
||||
'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id'] . "&i=$id&mode=topic_view"),
|
||||
'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 't=' . $row['topic_id'] . "&i=$id&mode=topic_view"),
|
||||
'U_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
|
||||
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
|
||||
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $row['topic_id']),
|
||||
|
||||
'REPORTER_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
'REPORTER' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
@@ -261,7 +302,27 @@ function mcp_front_view($id, $mode, $action)
|
||||
'REPORT_TIME' => $user->format_date($row['report_time']),
|
||||
'POST_TIME' => $user->format_date($row['post_time']),
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
));
|
||||
];
|
||||
|
||||
/**
|
||||
* Alter reported posts template block for MCP front page
|
||||
*
|
||||
* @event core.mcp_front_view_modify_reported_post_row
|
||||
* @var array forum_list List of forums that contain the posts
|
||||
* @var string mode MCP front view mode
|
||||
* @var array reported_post_row Template block array of the reported post
|
||||
* @var array row Array with reported post data
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'forum_list',
|
||||
'mode',
|
||||
'reported_post_row',
|
||||
'row',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_front_view_modify_reported_post_row', compact($vars)));
|
||||
|
||||
$template->assign_block_vars('report', $reported_post_row);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
@@ -1171,7 +1171,7 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
|
||||
$return_link = array();
|
||||
if ($affected_topics == 1 && $topic_id)
|
||||
{
|
||||
$return_link[] = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id") . '">', '</a>');
|
||||
$return_link[] = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t=$topic_id") . '">', '</a>');
|
||||
}
|
||||
$return_link[] = sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
|
||||
|
||||
@@ -1230,7 +1230,7 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
|
||||
$return_link = array();
|
||||
if ($affected_topics == 1 && !$deleted_topics && $topic_id)
|
||||
{
|
||||
$return_link[] = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id") . '">', '</a>');
|
||||
$return_link[] = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t=$topic_id") . '">', '</a>');
|
||||
}
|
||||
$return_link[] = sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
|
||||
|
||||
@@ -1563,6 +1563,26 @@ function mcp_fork_topic($topic_ids)
|
||||
$counter[$row['poster_id']] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify the forked post's sql array before it's inserted into the database.
|
||||
*
|
||||
* @event core.mcp_main_modify_fork_post_sql
|
||||
* @var int new_topic_id The newly created topic ID
|
||||
* @var int to_forum_id The forum ID where the forked topic has been moved to
|
||||
* @var array sql_ary SQL Array with the post's data
|
||||
* @var array row Post data
|
||||
* @var array counter Array with post counts
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'new_topic_id',
|
||||
'to_forum_id',
|
||||
'sql_ary',
|
||||
'row',
|
||||
'counter',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_main_modify_fork_post_sql', compact($vars)));
|
||||
$db->sql_query('INSERT INTO ' . POSTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
|
||||
$new_post_id = $db->sql_nextid();
|
||||
|
||||
|
@@ -220,7 +220,7 @@ function mcp_post_details($id, $mode, $action)
|
||||
$mcp_post_template_data = array(
|
||||
'U_MCP_ACTION' => "$url&i=main&quickmod=1&mode=post_details", // Use this for mode paramaters
|
||||
'U_POST_ACTION' => "$url&i=$id&mode=post_details", // Use this for action parameters
|
||||
'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&p=$post_id&f={$post_info['forum_id']}"),
|
||||
'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&p=$post_id"),
|
||||
|
||||
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
|
||||
'S_CAN_CHGPOSTER' => $auth->acl_get('m_chgposter', $post_info['forum_id']),
|
||||
@@ -236,18 +236,18 @@ function mcp_post_details($id, $mode, $action)
|
||||
'DELETED_MESSAGE' => $l_deleted_by,
|
||||
'DELETE_REASON' => $post_info['post_delete_reason'],
|
||||
|
||||
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '',
|
||||
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&p={$post_info['post_id']}") : '',
|
||||
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp_chgposter&field=username&select_single=true'),
|
||||
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&p=' . $post_id),
|
||||
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&p=' . $post_id),
|
||||
'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $post_info['user_id']),
|
||||
'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '',
|
||||
'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&p=' . $post_info['post_id'] . '#p' . $post_info['post_id']),
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']),
|
||||
'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $post_info['post_id'] . '#p' . $post_info['post_id']),
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $post_info['topic_id']),
|
||||
|
||||
'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'UNREAD_POST') : $user->img('icon_post_target', 'POST'),
|
||||
|
||||
'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$post_info['forum_id']}&p=$post_id") . "#p$post_id\">", '</a>'),
|
||||
'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p=$post_id") . "#p$post_id\">", '</a>'),
|
||||
'RETURN_FORUM' => sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", "f={$post_info['forum_id']}&start={$start}") . '">', '</a>'),
|
||||
'REPORTED_IMG' => $user->img('icon_topic_reported', $user->lang['POST_REPORTED']),
|
||||
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', $user->lang['POST_UNAPPROVED']),
|
||||
|
@@ -278,12 +278,12 @@ class mcp_queue
|
||||
$l_deleted_by = '';
|
||||
}
|
||||
|
||||
$post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&p=' . $post_info['post_id'] . '#p' . $post_info['post_id']);
|
||||
$topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']);
|
||||
$post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $post_info['post_id'] . '#p' . $post_info['post_id']);
|
||||
$topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $post_info['topic_id']);
|
||||
|
||||
$post_data = array(
|
||||
'S_MCP_QUEUE' => true,
|
||||
'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&p=$post_id&f=$forum_id"),
|
||||
'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&p=$post_id"),
|
||||
'S_CAN_DELETE_POST' => $auth->acl_get('m_delete', $post_info['forum_id']),
|
||||
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
|
||||
'S_POST_REPORTED' => $post_info['post_reported'],
|
||||
@@ -294,9 +294,9 @@ class mcp_queue
|
||||
'DELETED_MESSAGE' => $l_deleted_by,
|
||||
'DELETE_REASON' => $post_info['post_delete_reason'],
|
||||
|
||||
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '',
|
||||
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&p={$post_info['post_id']}") : '',
|
||||
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&p=' . $post_id),
|
||||
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&p=' . $post_id),
|
||||
'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $post_info['user_id']),
|
||||
'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '',
|
||||
'U_VIEW_POST' => $post_url,
|
||||
@@ -324,7 +324,7 @@ class mcp_queue
|
||||
'POST_ID' => $post_info['post_id'],
|
||||
'S_FIRST_POST' => ($post_info['topic_first_post_id'] == $post_id),
|
||||
|
||||
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id . '&lookup=' . $post_info['poster_ip']) . '#ip' : '',
|
||||
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&p=' . $post_id . '&lookup=' . $post_info['poster_ip']) . '#ip' : '',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -614,10 +614,10 @@ class mcp_queue
|
||||
}
|
||||
|
||||
$post_row = array(
|
||||
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
|
||||
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $row['topic_id']),
|
||||
'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
|
||||
'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&p=' . $row['post_id']) . (($mode == 'unapproved_posts') ? '#p' . $row['post_id'] : ''),
|
||||
'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&start=$start&mode=approve_details&f={$row['forum_id']}&p={$row['post_id']}" . (($mode == 'unapproved_topics') ? "&t={$row['topic_id']}" : '')),
|
||||
'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . (($mode == 'unapproved_posts') ? '#p' . $row['post_id'] : ''),
|
||||
'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&start=$start&mode=approve_details&p={$row['post_id']}" . (($mode == 'unapproved_topics') ? "&t={$row['topic_id']}" : '')),
|
||||
|
||||
'POST_AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
|
||||
'POST_AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
|
||||
@@ -746,7 +746,7 @@ class mcp_queue
|
||||
$topic_info[$topic_id]['last_post'] = true;
|
||||
}
|
||||
|
||||
$post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$post_data['forum_id']}&t={$post_data['topic_id']}&p={$post_data['post_id']}") . '#p' . $post_data['post_id'];
|
||||
$post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p={$post_data['post_id']}") . '#p' . $post_data['post_id'];
|
||||
|
||||
$approve_log[] = array(
|
||||
'forum_id' => $post_data['forum_id'],
|
||||
@@ -984,7 +984,7 @@ class mcp_queue
|
||||
$phpbb_content_visibility->set_topic_visibility(ITEM_APPROVED, $topic_id, $topic_data['forum_id'], $user->data['user_id'], time(), '');
|
||||
$first_post_ids[$topic_id] = (int) $topic_data['topic_first_post_id'];
|
||||
|
||||
$topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$topic_data['forum_id']}&t={$topic_id}");
|
||||
$topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$topic_id}");
|
||||
|
||||
$approve_log[] = array(
|
||||
'forum_id' => $topic_data['forum_id'],
|
||||
@@ -1430,7 +1430,7 @@ class mcp_queue
|
||||
{
|
||||
// However this is only possible if the topic still exists,
|
||||
// Otherwise we go back to the viewforum page
|
||||
$redirect = append_sid($phpbb_root_path . 'viewforum.' . $phpEx, 'f=' . $request->variable('f', 0));
|
||||
$redirect = append_sid($phpbb_root_path . 'viewforum.' . $phpEx, 'f=' . $post_data['forum_id']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -251,7 +251,7 @@ class mcp_reports
|
||||
// So it can be sent through the event below.
|
||||
$report_template = array(
|
||||
'S_MCP_REPORT' => true,
|
||||
'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&p=' . $post_id),
|
||||
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
|
||||
'S_POST_REPORTED' => $post_info['post_reported'],
|
||||
'S_POST_UNAPPROVED' => $post_info['post_visibility'] == ITEM_UNAPPROVED || $post_info['post_visibility'] == ITEM_REAPPROVE,
|
||||
@@ -259,16 +259,16 @@ class mcp_reports
|
||||
'S_REPORT_CLOSED' => $report['report_closed'],
|
||||
'S_USER_NOTES' => true,
|
||||
|
||||
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '',
|
||||
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&p={$post_info['post_id']}") : '',
|
||||
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&p=' . $post_id),
|
||||
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&p=' . $post_id),
|
||||
'U_MCP_REPORTER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $report['user_id']),
|
||||
'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $post_info['user_id']),
|
||||
'U_MCP_WARN_REPORTER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $report['user_id']) : '',
|
||||
'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '',
|
||||
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $post_info['forum_id']),
|
||||
'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&p=' . $post_info['post_id'] . '#p' . $post_info['post_id']),
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']),
|
||||
'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $post_info['post_id'] . '#p' . $post_info['post_id']),
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $post_info['topic_id']),
|
||||
|
||||
'EDIT_IMG' => $user->img('icon_post_edit', $user->lang['EDIT_POST']),
|
||||
'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'UNREAD_POST') : $user->img('icon_post_target', 'POST'),
|
||||
@@ -300,7 +300,7 @@ class mcp_reports
|
||||
'POST_ID' => $post_info['post_id'],
|
||||
'SIGNATURE' => $post_info['user_sig'],
|
||||
|
||||
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? $this->u_action . '&r=' . $report_id . '&p=' . $post_id . '&f=' . $forum_id . '&lookup=' . $post_info['poster_ip'] . '#ip' : '',
|
||||
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? $this->u_action . '&r=' . $report_id . '&p=' . $post_id . '&lookup=' . $post_info['poster_ip'] . '#ip' : '',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -493,14 +493,33 @@ class mcp_reports
|
||||
AND ru.user_id = r.user_id
|
||||
AND r.pm_id = 0
|
||||
ORDER BY ' . $sort_order_sql;
|
||||
|
||||
/**
|
||||
* Alter sql query to get reports data for requested forum and topic or just forum
|
||||
*
|
||||
* @event core.mcp_reports_modify_reports_data_sql
|
||||
* @var string sql String with the query to be executed
|
||||
* @var array forum_list List of forums that contain the posts
|
||||
* @var int topic_id topic_id in the page request
|
||||
* @var string sort_order_sql String with the ORDER BY SQL code used in this query
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'sql',
|
||||
'forum_list',
|
||||
'topic_id',
|
||||
'sort_order_sql',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_reports_modify_reports_data_sql', compact($vars)));
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$template->assign_block_vars('postrow', array(
|
||||
$post_row = [
|
||||
'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
|
||||
'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&p=' . $row['post_id']) . '#p' . $row['post_id'],
|
||||
'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=reports&start=$start&mode=report_details&f={$row['forum_id']}&r={$row['report_id']}"),
|
||||
'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . '#p' . $row['post_id'],
|
||||
'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=reports&start=$start&mode=report_details&r={$row['report_id']}"),
|
||||
|
||||
'POST_AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
|
||||
'POST_AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
|
||||
@@ -520,13 +539,37 @@ class mcp_reports
|
||||
'REPORT_TIME' => $user->format_date($row['report_time']),
|
||||
'TOPIC_TITLE' => $row['topic_title'],
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
));
|
||||
];
|
||||
|
||||
/**
|
||||
* Alter posts template block for MCP reports
|
||||
*
|
||||
* @event core.mcp_reports_modify_post_row
|
||||
* @var string mode Post report mode
|
||||
* @var array forum_data Array containing forum data
|
||||
* @var array post_row Template block array of the post
|
||||
* @var array row Array with original post and report data
|
||||
* @var int start Start item of this page
|
||||
* @var int topic_id topic_id in the page request
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'mode',
|
||||
'forum_data',
|
||||
'post_row',
|
||||
'row',
|
||||
'start',
|
||||
'topic_id',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_reports_modify_post_row', compact($vars)));
|
||||
|
||||
$template->assign_block_vars('postrow', $post_row);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
unset($report_ids, $row);
|
||||
}
|
||||
|
||||
$base_url = $this->u_action . "&f=$forum_id&t=$topic_id&st=$sort_days&sk=$sort_key&sd=$sort_dir";
|
||||
$base_url = $this->u_action . "&t=$topic_id&st=$sort_days&sk=$sort_key&sd=$sort_dir";
|
||||
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total, $config['topics_per_page'], $start);
|
||||
|
||||
// Now display the page
|
||||
@@ -830,7 +873,7 @@ function close_report($report_id_list, $mode, $action, $pm = false)
|
||||
|
||||
if (count($topic_ids) === 1)
|
||||
{
|
||||
$return_topic = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . current($topic_ids) . '&f=' . current($forum_ids)) . '">', '</a>') . '<br /><br />';
|
||||
$return_topic = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . current($topic_ids)) . '">', '</a>') . '<br /><br />';
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -288,9 +288,9 @@ function mcp_topic_view($id, $mode, $action)
|
||||
'S_CHECKED' => (($submitted_id_list && !in_array(intval($row['post_id']), $submitted_id_list)) || in_array(intval($row['post_id']), $checked_ids)) ? true : false,
|
||||
'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,
|
||||
|
||||
'U_POST_DETAILS' => "$url&i=$id&p={$row['post_id']}&mode=post_details" . (($forum_id) ? "&f=$forum_id" : ''),
|
||||
'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '',
|
||||
'U_MCP_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '',
|
||||
'U_POST_DETAILS' => "$url&i=$id&p={$row['post_id']}&mode=post_details",
|
||||
'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&p=' . $row['post_id']) : '',
|
||||
'U_MCP_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&p=' . $row['post_id']) : '',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -379,12 +379,12 @@ function mcp_topic_view($id, $mode, $action)
|
||||
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total, $posts_per_page, $start);
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
$topic_row = [
|
||||
'TOPIC_TITLE' => $topic_info['topic_title'],
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_info['forum_id'] . '&t=' . $topic_info['topic_id']),
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $topic_info['topic_id']),
|
||||
|
||||
'TO_TOPIC_ID' => $to_topic_id,
|
||||
'TO_TOPIC_INFO' => ($to_topic_id) ? sprintf($user->lang['YOU_SELECTED_TOPIC'], $to_topic_id, '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_topic_info['forum_id'] . '&t=' . $to_topic_id) . '">' . $to_topic_info['topic_title'] . '</a>') : '',
|
||||
'TO_TOPIC_INFO' => ($to_topic_id) ? sprintf($user->lang['YOU_SELECTED_TOPIC'], $to_topic_id, '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $to_topic_id) . '">' . $to_topic_info['topic_title'] . '</a>') : '',
|
||||
|
||||
'SPLIT_SUBJECT' => $subject,
|
||||
'POSTS_PER_PAGE' => $posts_per_page,
|
||||
@@ -416,11 +416,53 @@ function mcp_topic_view($id, $mode, $action)
|
||||
|
||||
'U_SELECT_TOPIC' => "$url&i=$id&mode=forum_view&action=merge_select" . (($forum_id) ? "&f=$forum_id" : ''),
|
||||
|
||||
'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$topic_info['forum_id']}&t={$topic_info['topic_id']}&start=$start") . '">', '</a>'),
|
||||
'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$topic_info['topic_id']}&start=$start") . '">', '</a>'),
|
||||
'RETURN_FORUM' => sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", "f={$topic_info['forum_id']}&start=$start") . '">', '</a>'),
|
||||
|
||||
'TOTAL_POSTS' => $user->lang('VIEW_TOPIC_POSTS', (int) $total),
|
||||
));
|
||||
];
|
||||
|
||||
/**
|
||||
* Event to modify the template data block for topic data output in the MCP
|
||||
*
|
||||
* @event core.mcp_topic_review_modify_topic_row
|
||||
* @var string action Moderation action type to be performed with the topic
|
||||
* @var bool has_unapproved_posts Flag indicating if the topic has unapproved posts
|
||||
* @var int icon_id Split topic icon ID
|
||||
* @var int id ID of the tab we are displaying
|
||||
* @var string mode Mode of the MCP page we are displaying
|
||||
* @var int topic_id The topic ID we are currently reviewing
|
||||
* @var int forum_id The forum ID we are currently in
|
||||
* @var bool s_topic_icons Flag indicating if split topic icon to be displayed
|
||||
* @var int start Start item of this page
|
||||
* @var string subject Subject of the topic to be split
|
||||
* @var array topic_info Array with topic data
|
||||
* @var int to_forum_id Forum id the topic is being moved to
|
||||
* @var int to_topic_id Topic ID the topic is being merged with
|
||||
* @var array topic_row Topic template data array
|
||||
* @var int total Total posts count
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'action',
|
||||
'has_unapproved_posts',
|
||||
'icon_id',
|
||||
'id',
|
||||
'mode',
|
||||
'topic_id',
|
||||
'forum_id',
|
||||
's_topic_icons',
|
||||
'start',
|
||||
'subject',
|
||||
'topic_info',
|
||||
'to_forum_id',
|
||||
'to_topic_id',
|
||||
'topic_row',
|
||||
'total',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_topic_review_modify_topic_row', compact($vars)));
|
||||
|
||||
$template->assign_vars($topic_row);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -692,10 +734,36 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
|
||||
$config->increment('num_topics', 1, false);
|
||||
|
||||
// Link back to both topics
|
||||
$return_link = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']) . '">', '</a>') . '<br /><br />' . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&t=' . $to_topic_id) . '">', '</a>');
|
||||
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&t=$to_topic_id");
|
||||
$return_link = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $post_info['topic_id']) . '">', '</a>') . '<br /><br />' . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $to_topic_id) . '">', '</a>');
|
||||
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?t=$to_topic_id");
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
/**
|
||||
* Event to access topic data after split
|
||||
*
|
||||
* @event core.mcp_topic_split_topic_after
|
||||
* @var string action Split action type to be performed with the topic
|
||||
* @var int topic_id The topic ID we are currently splitting
|
||||
* @var int forum_id The forum ID we are currently in
|
||||
* @var int start Start item of this page
|
||||
* @var string subject Subject of the topic to be split
|
||||
* @var array topic_info Array with topic data
|
||||
* @var int to_forum_id Forum id the topic is being moved to
|
||||
* @var int to_topic_id Topic ID the topic is being split to
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'action',
|
||||
'topic_id',
|
||||
'forum_id',
|
||||
'start',
|
||||
'subject',
|
||||
'topic_info',
|
||||
'to_forum_id',
|
||||
'to_topic_id',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_topic_split_topic_after', compact($vars)));
|
||||
|
||||
meta_refresh(3, $redirect);
|
||||
trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
|
||||
}
|
||||
@@ -789,7 +857,7 @@ function merge_posts($topic_id, $to_topic_id)
|
||||
|
||||
if ($row)
|
||||
{
|
||||
$return_link .= sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $topic_id) . '">', '</a>');
|
||||
$return_link .= sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $topic_id) . '">', '</a>');
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -812,8 +880,8 @@ function merge_posts($topic_id, $to_topic_id)
|
||||
sync('forum', 'forum_id', $sync_forums, true, true);
|
||||
|
||||
// Link to the new topic
|
||||
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&t=' . $to_topic_id) . '">', '</a>');
|
||||
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&t=$to_topic_id");
|
||||
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $to_topic_id) . '">', '</a>');
|
||||
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?t=$to_topic_id");
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
/**
|
||||
|
@@ -238,10 +238,10 @@ class mcp_warn
|
||||
|
||||
$user_id = $user_row['user_id'];
|
||||
|
||||
if (strpos($this->u_action, "&f=$forum_id&p=$post_id") === false)
|
||||
if (strpos($this->u_action, "&p=$post_id") === false)
|
||||
{
|
||||
$this->p_master->adjust_url("&f=$forum_id&p=$post_id");
|
||||
$this->u_action .= "&f=$forum_id&p=$post_id";
|
||||
$this->p_master->adjust_url("&p=$post_id");
|
||||
$this->u_action .= "&p=$post_id";
|
||||
}
|
||||
|
||||
// Check if can send a notification
|
||||
@@ -358,7 +358,7 @@ class mcp_warn
|
||||
'AVATAR_IMG' => $avatar_img,
|
||||
'RANK_IMG' => $user_rank_data['img'],
|
||||
|
||||
'L_WARNING_POST_DEFAULT' => sprintf($user->lang['WARNING_POST_DEFAULT'], generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&p=$post_id#p$post_id"),
|
||||
'L_WARNING_POST_DEFAULT' => sprintf($user->lang['WARNING_POST_DEFAULT'], generate_board_url() . "/viewtopic.$phpEx?p=$post_id#p$post_id"),
|
||||
|
||||
'S_CAN_NOTIFY' => $s_can_notify,
|
||||
));
|
||||
|
@@ -38,7 +38,7 @@ class phpbb_questionnaire_data_collector
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string
|
||||
* @param string $install_id
|
||||
*/
|
||||
function __construct($install_id)
|
||||
{
|
||||
|
@@ -76,10 +76,12 @@ class ucp_activate
|
||||
if ($update_password)
|
||||
{
|
||||
$sql_ary = array(
|
||||
'user_actkey' => '',
|
||||
'user_password' => $user_row['user_newpasswd'],
|
||||
'user_newpasswd' => '',
|
||||
'user_login_attempts' => 0,
|
||||
'user_actkey' => '',
|
||||
'user_password' => $user_row['user_newpasswd'],
|
||||
'user_newpasswd' => '',
|
||||
'user_login_attempts' => 0,
|
||||
'reset_token' => '',
|
||||
'reset_token_expiration' => 0,
|
||||
);
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
@@ -101,8 +103,14 @@ class ucp_activate
|
||||
|
||||
user_active_flip('activate', $user_row['user_id']);
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||
SET user_actkey = ''
|
||||
$sql_ary = [
|
||||
'user_actkey' => '',
|
||||
'reset_token' => '',
|
||||
'reset_token_expiration' => 0,
|
||||
];
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
|
||||
WHERE user_id = {$user_row['user_id']}";
|
||||
$db->sql_query($sql);
|
||||
|
||||
|
@@ -159,7 +159,7 @@ class ucp_attachments
|
||||
}
|
||||
else
|
||||
{
|
||||
$view_topic = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$row['topic_id']}&p={$row['post_msg_id']}") . "#p{$row['post_msg_id']}";
|
||||
$view_topic = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p={$row['post_msg_id']}") . "#p{$row['post_msg_id']}";
|
||||
}
|
||||
|
||||
$template->assign_block_vars('attachrow', array(
|
||||
@@ -194,7 +194,7 @@ class ucp_attachments
|
||||
|
||||
$template->assign_vars(array(
|
||||
'TOTAL_ATTACHMENTS' => $num_attachments,
|
||||
'NUM_ATTACHMENTS' => $user->lang('NUM_ATTACHMENTS', $num_attachments),
|
||||
'NUM_ATTACHMENTS' => $user->lang('NUM_ATTACHMENTS', (int) $num_attachments),
|
||||
|
||||
'L_TITLE' => $user->lang['UCP_ATTACHMENTS'],
|
||||
|
||||
|
@@ -184,10 +184,10 @@ class ucp_main
|
||||
'S_UNREAD' => $unread_topic,
|
||||
|
||||
'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&p=" . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
|
||||
'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p=" . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
|
||||
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
||||
'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=unread") . '#unread',
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id"),
|
||||
'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t=$topic_id&view=unread") . '#unread',
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t=$topic_id"),
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -396,7 +396,7 @@ class ucp_main
|
||||
if ($row['forum_last_post_id'])
|
||||
{
|
||||
$last_post_time = $user->format_date($row['forum_last_post_time']);
|
||||
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&p=" . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
|
||||
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p=" . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -677,10 +677,10 @@ class ucp_main
|
||||
if (isset($topic_rows[$draft['topic_id']]) && $auth->acl_get('f_read', $topic_rows[$draft['topic_id']]['forum_id']))
|
||||
{
|
||||
$link_topic = true;
|
||||
$view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_rows[$draft['topic_id']]['forum_id'] . '&t=' . $draft['topic_id']);
|
||||
$view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $draft['topic_id']);
|
||||
$title = $topic_rows[$draft['topic_id']]['topic_title'];
|
||||
|
||||
$insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 'f=' . $topic_rows[$draft['topic_id']]['forum_id'] . '&t=' . $draft['topic_id'] . '&mode=reply&d=' . $draft['draft_id']);
|
||||
$insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 't=' . $draft['topic_id'] . '&mode=reply&d=' . $draft['draft_id']);
|
||||
}
|
||||
else if ($auth->acl_get('f_read', $draft['forum_id']))
|
||||
{
|
||||
@@ -940,7 +940,7 @@ class ucp_main
|
||||
$folder_img = $folder_alt = $topic_type = '';
|
||||
topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type);
|
||||
|
||||
$view_topic_url_params = "f=$forum_id&t=$topic_id";
|
||||
$view_topic_url_params = "t=$topic_id";
|
||||
$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params);
|
||||
|
||||
// Send vars to template
|
||||
@@ -1022,7 +1022,7 @@ class ucp_main
|
||||
|
||||
$template->assign_block_vars('topicrow', $template_vars);
|
||||
|
||||
$pagination->generate_template_pagination(append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . "&t=$topic_id"), 'topicrow.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true);
|
||||
$pagination->generate_template_pagination(append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t=$topic_id"), 'topicrow.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -159,33 +159,23 @@ class ucp_prefs
|
||||
phpbb_timezone_select($template, $user, $data['tz'], true);
|
||||
|
||||
// check if there are any user-selectable languages
|
||||
$sql = 'SELECT COUNT(lang_id) as languages_count
|
||||
FROM ' . LANG_TABLE;
|
||||
$sql = 'SELECT lang_iso, lang_local_name
|
||||
FROM ' . LANG_TABLE . '
|
||||
ORDER BY lang_english_name';
|
||||
$result = $db->sql_query($sql);
|
||||
if ($db->sql_fetchfield('languages_count') > 1)
|
||||
{
|
||||
$s_more_languages = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$s_more_languages = false;
|
||||
}
|
||||
$lang_row = (array) $db->sql_fetchrowset($result);
|
||||
$db->sql_freeresult($result);
|
||||
$s_more_languages = count($lang_row) > 1;
|
||||
|
||||
// check if there are any user-selectable styles
|
||||
$sql = 'SELECT COUNT(style_id) as styles_count
|
||||
FROM ' . STYLES_TABLE . '
|
||||
WHERE style_active = 1';
|
||||
$sql = 'SELECT style_id, style_name
|
||||
FROM ' . STYLES_TABLE . '
|
||||
WHERE style_active = 1
|
||||
ORDER BY style_name';
|
||||
$result = $db->sql_query($sql);
|
||||
if ($db->sql_fetchfield('styles_count') > 1)
|
||||
{
|
||||
$s_more_styles = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$s_more_styles = false;
|
||||
}
|
||||
$styles_row = (array) $db->sql_fetchrowset($result);
|
||||
$db->sql_freeresult($result);
|
||||
$s_more_styles = count($styles_row) > 1;
|
||||
|
||||
$template->assign_vars(array(
|
||||
'ERROR' => (count($error)) ? implode('<br />', $error) : '',
|
||||
@@ -205,11 +195,11 @@ class ucp_prefs
|
||||
'DEFAULT_DATEFORMAT' => $config['default_dateformat'],
|
||||
'A_DEFAULT_DATEFORMAT' => addslashes($config['default_dateformat']),
|
||||
|
||||
'S_MORE_LANGUAGES' => $s_more_languages,
|
||||
'S_MORE_LANGUAGES' => $s_more_languages,
|
||||
'S_MORE_STYLES' => $s_more_styles,
|
||||
|
||||
'S_LANG_OPTIONS' => language_select($data['lang']),
|
||||
'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($data['user_style']),
|
||||
'S_LANG_OPTIONS' => language_select($data['lang'], $lang_row),
|
||||
'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($data['user_style'], false, $styles_row),
|
||||
'S_CAN_HIDE_ONLINE' => ($auth->acl_get('u_hideonline')) ? true : false,
|
||||
'S_SELECT_NOTIFY' => ($config['jab_enable'] && $user->data['user_jabber'] && @extension_loaded('xml')) ? true : false)
|
||||
);
|
||||
|
@@ -150,15 +150,11 @@ class ucp_register
|
||||
}
|
||||
|
||||
// Checking amount of available languages
|
||||
$sql = 'SELECT lang_id
|
||||
FROM ' . LANG_TABLE;
|
||||
$sql = 'SELECT lang_iso, lang_local_name
|
||||
FROM ' . LANG_TABLE . '
|
||||
ORDER BY lang_english_name';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$lang_row = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$lang_row[] = $row;
|
||||
}
|
||||
$lang_row = (array) $db->sql_fetchrowset($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($coppa === false && $config['coppa_enable'])
|
||||
@@ -171,7 +167,7 @@ class ucp_register
|
||||
unset($now);
|
||||
|
||||
$template_vars = array(
|
||||
'S_LANG_OPTIONS' => (count($lang_row) > 1) ? language_select($user_lang) : '',
|
||||
'S_LANG_OPTIONS' => (count($lang_row) > 1) ? language_select($user_lang, $lang_row) : '',
|
||||
'L_COPPA_NO' => $user->lang('UCP_COPPA_BEFORE', $coppa_birthday),
|
||||
'L_COPPA_YES' => $user->lang('UCP_COPPA_ON_AFTER', $coppa_birthday),
|
||||
|
||||
@@ -186,7 +182,7 @@ class ucp_register
|
||||
else
|
||||
{
|
||||
$template_vars = array(
|
||||
'S_LANG_OPTIONS' => (count($lang_row) > 1) ? language_select($user_lang) : '',
|
||||
'S_LANG_OPTIONS' => (count($lang_row) > 1) ? language_select($user_lang, $lang_row) : '',
|
||||
'L_TERMS_OF_USE' => sprintf($user->lang['TERMS_OF_USE_CONTENT'], $config['sitename'], generate_board_url()),
|
||||
|
||||
'S_SHOW_COPPA' => false,
|
||||
@@ -367,7 +363,7 @@ class ucp_register
|
||||
$config['require_activation'] == USER_ACTIVATION_SELF ||
|
||||
$config['require_activation'] == USER_ACTIVATION_ADMIN) && $config['email_enable'])
|
||||
{
|
||||
$user_actkey = gen_rand_string(mt_rand(6, 10));
|
||||
$user_actkey = strtolower(gen_rand_string(32));
|
||||
$user_type = USER_INACTIVE;
|
||||
$user_inactive_reason = INACTIVE_REGISTER;
|
||||
$user_inactive_time = time();
|
||||
@@ -633,6 +629,14 @@ class ucp_register
|
||||
// Assign template vars for timezone select
|
||||
phpbb_timezone_select($template, $user, $data['tz'], true);
|
||||
|
||||
// Checking amount of available languages
|
||||
$sql = 'SELECT lang_iso, lang_local_name
|
||||
FROM ' . LANG_TABLE . '
|
||||
ORDER BY lang_english_name';
|
||||
$result = $db->sql_query($sql);
|
||||
$lang_row = (array) $db->sql_fetchrowset($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$template_vars = array(
|
||||
'USERNAME' => $data['username'],
|
||||
'PASSWORD' => $data['new_password'],
|
||||
@@ -643,7 +647,7 @@ class ucp_register
|
||||
'L_USERNAME_EXPLAIN' => $user->lang($config['allow_name_chars'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_name_chars']), $user->lang('CHARACTERS', (int) $config['max_name_chars'])),
|
||||
'L_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_pass_chars'])),
|
||||
|
||||
'S_LANG_OPTIONS' => language_select($data['lang']),
|
||||
'S_LANG_OPTIONS' => (count($lang_row) > 1) ? language_select($data['lang'], $lang_row) : '',
|
||||
'S_TZ_PRESELECT' => !$submit,
|
||||
'S_CONFIRM_REFRESH' => ($config['enable_confirm'] && $config['confirm_refresh']) ? true : false,
|
||||
'S_REGISTRATION' => true,
|
||||
|
@@ -22,11 +22,9 @@ if (!defined('IN_PHPBB'))
|
||||
setlocale(LC_CTYPE, 'C');
|
||||
|
||||
/**
|
||||
* Setup the UTF-8 portability layer
|
||||
*/
|
||||
Patchwork\Utf8\Bootup::initUtf8Encode();
|
||||
Patchwork\Utf8\Bootup::initMbstring();
|
||||
Patchwork\Utf8\Bootup::initIntl();
|
||||
* UTF-8 portability layer is provided by
|
||||
* symfony/polyfill-mbstring, symfony/polyfill-intl-normalizer, symfony/polyfill-php72
|
||||
*/
|
||||
|
||||
/**
|
||||
* UTF-8 tools
|
||||
@@ -171,7 +169,7 @@ function utf8_strspn($str, $mask, $start = null, $length = null)
|
||||
* Make a string's first character uppercase
|
||||
*
|
||||
* @author Harry Fuecks
|
||||
* @param string
|
||||
* @param string $str
|
||||
* @return string with first character as upper case (if applicable)
|
||||
*/
|
||||
function utf8_ucfirst($str)
|
||||
|
@@ -38,7 +38,7 @@ $dbms = $phpbb_config_php_file->convert_30_dbms_to_31($dbms);
|
||||
$convertor_data = array(
|
||||
'forum_name' => 'phpBB 2.0.x',
|
||||
'version' => '1.0.3',
|
||||
'phpbb_version' => '3.3.4',
|
||||
'phpbb_version' => '3.3.6',
|
||||
'author' => '<a href="https://www.phpbb.com/">phpBB Limited</a>',
|
||||
'dbms' => $dbms,
|
||||
'dbhost' => $dbhost,
|
||||
|
@@ -23,7 +23,7 @@ if (php_sapi_name() !== 'cli')
|
||||
define('IN_PHPBB', true);
|
||||
define('IN_INSTALL', true);
|
||||
define('PHPBB_ENVIRONMENT', 'production');
|
||||
define('PHPBB_VERSION', '3.3.4');
|
||||
define('PHPBB_VERSION', '3.3.6');
|
||||
$phpbb_root_path = __DIR__ . '/../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
|
||||
|
@@ -200,7 +200,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_lastread', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_track', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_font_awesome_url', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jumpbox', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_moderators', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_notifications', '1');
|
||||
@@ -316,7 +316,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('update_hashes_lock
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('use_system_cron', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.3.4');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.3.6');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');
|
||||
|
||||
|
@@ -49,13 +49,19 @@ function phpbb_include_updated($path, $phpbb_root_path, $optional = false)
|
||||
|
||||
function installer_msg_handler($errno, $msg_text, $errfile, $errline)
|
||||
{
|
||||
global $phpbb_installer_container;
|
||||
global $phpbb_installer_container, $msg_long_text;
|
||||
|
||||
if (error_reporting() == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// If the message handler is stripping text, fallback to the long version if available
|
||||
if (!$msg_text && !empty($msg_long_text))
|
||||
{
|
||||
$msg_text = $msg_long_text;
|
||||
}
|
||||
|
||||
switch ($errno)
|
||||
{
|
||||
case E_NOTICE:
|
||||
@@ -87,6 +93,21 @@ function installer_msg_handler($errno, $msg_text, $errfile, $errline)
|
||||
case E_USER_ERROR:
|
||||
$msg = '<b>General Error:</b><br>' . $msg_text . '<br> in file ' . $errfile . ' on line ' . $errline . '<br><br>';
|
||||
|
||||
if (!empty($phpbb_installer_container))
|
||||
{
|
||||
try
|
||||
{
|
||||
/** @var \phpbb\install\helper\iohandler\iohandler_interface $iohandler */
|
||||
$iohandler = $phpbb_installer_container->get('installer.helper.iohandler');
|
||||
$iohandler->add_error_message($msg);
|
||||
$iohandler->send_response(true);
|
||||
exit();
|
||||
}
|
||||
catch (\phpbb\install\helper\iohandler\exception\iohandler_not_implemented_exception $e)
|
||||
{
|
||||
throw new \phpbb\exception\runtime_exception($msg);
|
||||
}
|
||||
}
|
||||
throw new \phpbb\exception\runtime_exception($msg);
|
||||
break;
|
||||
case E_DEPRECATED:
|
||||
|
@@ -170,4 +170,5 @@ $lang = array_merge($lang, array(
|
||||
'UPLOAD_DIR_EXPLAIN' => 'Storage path for attachments. Please note that if you change this directory while already having uploaded attachments you need to manually copy the files to their new location.',
|
||||
'UPLOAD_ICON' => 'Upload icon',
|
||||
'UPLOAD_NOT_DIR' => 'The upload location you specified does not appear to be a directory.',
|
||||
'UPLOAD_POST_NOT_EXIST' => 'File “%1$s” can not be uploaded to post number %2$d as the post does not exist.',
|
||||
));
|
||||
|
@@ -70,7 +70,6 @@ $lang = array_merge($lang, array(
|
||||
'START_RESTORE' => 'Start restore',
|
||||
'STORE_AND_DOWNLOAD' => 'Store and download',
|
||||
'STORE_LOCAL' => 'Store file locally',
|
||||
'STRUCTURE_ONLY' => 'Structure only',
|
||||
|
||||
'TABLE_SELECT' => 'Table select',
|
||||
'TABLE_SELECT_ERROR'=> 'You must select at least one table.',
|
||||
|
@@ -347,7 +347,7 @@ $lang = array_merge($lang, array(
|
||||
// Common updater messages
|
||||
$lang = array_merge($lang, array(
|
||||
'UPDATE_INSTALLATION' => 'Update phpBB installation',
|
||||
'UPDATE_INSTALLATION_EXPLAIN' => 'With this option, it is possible to update your phpBB installation to the latest version.<br />During the process all of your files will be checked for their integrity. You are able to review all differences and files before the update.<br /><br />The file update itself can be done in two different ways.</p><h2>Manual Update</h2><p>With this update you only download your personal set of changed files to make sure you do not lose your file modifications you may have done. After you downloaded this package you need to manually upload the files to their correct position under your phpBB root directory. Once done, you are able to do the file check stage again to see if you moved the files to their correct location.</p><h2>Automatic Update with FTP</h2><p>This method is similar to the first one but without the need to download the changed files and uploading them on your own. This will be done for you. In order to use this method you need to know your FTP login details since you will be asked for them. Once finished you will be redirected to the file check again to make sure everything got updated correctly.<br /><br />',
|
||||
'UPDATE_INSTALLATION_EXPLAIN' => 'With this option, it is possible to update your phpBB installation to the latest version.<br />During the process all of your files will be checked for their integrity. You are able to review all differences and files before the update.<br /><br />The file update itself can be done in two different ways.</p><h2>Manual Update</h2><p>With this update you only download your personal set of changed files to make sure you do not lose your file modifications you may have done. After you downloaded this package you need to manually upload the files to their correct position under your phpBB root directory. Once done, you are able to do the file check stage again to see if you moved the files to their correct location.</p><h2>Advanced Update with FTP</h2><p>This method is similar to the first one but without the need to download the changed files and uploading them on your own. This will be done for you. In order to use this method you need to know your FTP login details since you will be asked for them. Once finished you will be redirected to the file check again to make sure everything got updated correctly.<br /><br />',
|
||||
'UPDATE_INSTRUCTIONS' => '
|
||||
|
||||
<h1>Release announcement</h1>
|
||||
@@ -358,7 +358,7 @@ $lang = array_merge($lang, array(
|
||||
|
||||
<h1>How to update your installation with the Full Package</h1>
|
||||
|
||||
<p>The recommended way of updating your installation is using the full package. If core phpBB files have been modified in your installation you may wish to use the automatic update package in order to not lose these changes. You are also able to update your installation using the other methods listed within the INSTALL.html document. The steps for updating phpBB3 using the full package are:</p>
|
||||
<p>The recommended way of updating your installation is using the full package. If core phpBB files have been modified in your installation you may wish to use the advanced update package in order to not lose these changes. You are also able to update your installation using the other methods listed within the INSTALL.html document. The steps for updating phpBB3 using the full package are:</p>
|
||||
|
||||
<ol style="margin-left: 20px; font-size: 1.1em;">
|
||||
<li><strong class="error">Backup all board files and the database.</strong></li>
|
||||
@@ -379,12 +379,12 @@ $lang = array_merge($lang, array(
|
||||
<li>Update your style<br><br></li>
|
||||
</ul>
|
||||
|
||||
<h1>How to update your installation with the Automatic Update Package</h1>
|
||||
<h1>How to update your installation with the Advanced Update Package</h1>
|
||||
|
||||
<p>The automatic update package is only recommended in case core phpBB files have been modified in your installation. You are also able to update your installation using the methods listed within the INSTALL.html document. The steps for updating phpBB3 using the automatic update package are:</p>
|
||||
<p>The advanced update package is only recommended for expert users in case core phpBB files have been modified in your installation. You are also able to update your installation using the methods listed within the INSTALL.html document. The steps for updating phpBB3 using the advanced update package are:</p>
|
||||
|
||||
<ol style="margin-left: 20px; font-size: 1.1em;">
|
||||
<li>Go to the <a href="https://www.phpbb.com/downloads/" title="https://www.phpbb.com/downloads/">phpBB.com downloads page</a> and download the "Automatic Update Package" archive.</li>
|
||||
<li>Go to the <a href="https://www.phpbb.com/downloads/" title="https://www.phpbb.com/downloads/">phpBB.com downloads page</a> and download the "Advanced Update Package" archive.</li>
|
||||
<li>Unpack the archive.</li>
|
||||
<li>Upload the complete uncompressed "install" and "vendor" folders to your phpBB root directory (where your config.php file is).<br><br></li>
|
||||
</ol>
|
||||
|
@@ -77,5 +77,6 @@ $lang = array_merge($lang, array(
|
||||
'PARENT_MODULE_FIND_ERROR' => 'Unable to determine the parent module identifier: %s',
|
||||
'PERMISSION_NOT_EXIST' => 'The permission setting "%s" unexpectedly does not exist.',
|
||||
|
||||
'ROLE_ASSIGNED_NOT_EXIST' => 'The permission role assigned to group "%1$s" unexpectedly does not exist. Role id: "%2$s"',
|
||||
'ROLE_NOT_EXIST' => 'The permission role "%s" unexpectedly does not exist.',
|
||||
));
|
||||
|
@@ -980,23 +980,26 @@ switch ($mode)
|
||||
WHERE ' . $db->sql_in_set('user_type', $user_types) . '
|
||||
AND username_clean ' . $db->sql_like_expression(utf8_clean_string($username_chars) . $db->get_any_char());
|
||||
$result = $db->sql_query_limit($sql, 10);
|
||||
$user_list = array();
|
||||
|
||||
$user_list = [];
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$user_list[] = array(
|
||||
$user_list[] = [
|
||||
'user_id' => (int) $row['user_id'],
|
||||
'result' => $row['username'],
|
||||
'result' => htmlspecialchars_decode($row['username']),
|
||||
'username_full' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
'display' => get_username_string('no_profile', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
);
|
||||
];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$json_response = new \phpbb\json_response();
|
||||
$json_response->send(array(
|
||||
|
||||
$json_response->send([
|
||||
'keyword' => $username_chars,
|
||||
'results' => $user_list,
|
||||
));
|
||||
]);
|
||||
|
||||
break;
|
||||
|
||||
|
@@ -85,7 +85,7 @@ abstract class base implements provider_interface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function login_link_has_necessary_data($login_link_data)
|
||||
public function login_link_has_necessary_data(array $login_link_data)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@@ -163,7 +163,7 @@ class oauth extends base
|
||||
$provider = $this->request->variable('oauth_service', '', false);
|
||||
$service_name = $this->get_service_name($provider);
|
||||
|
||||
if ($provider === '' || !array_key_exists($service_name, $this->service_providers))
|
||||
if ($provider === '' || !$this->service_providers->offsetExists($service_name))
|
||||
{
|
||||
return [
|
||||
'status' => LOGIN_ERROR_EXTERNAL_AUTH,
|
||||
@@ -411,7 +411,7 @@ class oauth extends base
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function login_link_has_necessary_data($login_link_data)
|
||||
public function login_link_has_necessary_data(array $login_link_data)
|
||||
{
|
||||
if (empty($login_link_data))
|
||||
{
|
||||
@@ -452,7 +452,7 @@ class oauth extends base
|
||||
|
||||
$service_name = $this->get_service_name($link_data['oauth_service']);
|
||||
|
||||
if (!array_key_exists($service_name, $this->service_providers))
|
||||
if (!$this->service_providers->offsetExists($service_name))
|
||||
{
|
||||
return 'LOGIN_ERROR_OAUTH_SERVICE_DOES_NOT_EXIST';
|
||||
}
|
||||
|
@@ -154,7 +154,7 @@ interface provider_interface
|
||||
* @return string|null Returns a string with a language constant if there
|
||||
* is data missing or null if there is no error.
|
||||
*/
|
||||
public function login_link_has_necessary_data($login_link_data);
|
||||
public function login_link_has_necessary_data(array $login_link_data);
|
||||
|
||||
/**
|
||||
* Links an external account to a phpBB account.
|
||||
|
@@ -15,8 +15,9 @@
|
||||
"support": {
|
||||
"issues": "https://tracker.phpbb.com",
|
||||
"forum": "https://www.phpbb.com/community/",
|
||||
"wiki": "https://wiki.phpbb.com",
|
||||
"irc": "irc://irc.freenode.org/phpbb"
|
||||
"docs": "https://www.phpbb.com/support/docs/",
|
||||
"irc": "irc://irc.libera.chat/phpbb",
|
||||
"chat": "https://www.phpbb.com/support/chat/"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [""]
|
||||
|
@@ -13,20 +13,23 @@
|
||||
|
||||
namespace phpbb\config;
|
||||
|
||||
use phpbb\cache\driver\driver_interface as cache_interface;
|
||||
use phpbb\db\driver\driver_interface as db_interface;
|
||||
|
||||
/**
|
||||
* Configuration container class
|
||||
*/
|
||||
class db extends \phpbb\config\config
|
||||
class db extends config
|
||||
{
|
||||
/**
|
||||
* Cache instance
|
||||
* @var \phpbb\cache\driver\driver_interface
|
||||
* @var cache_interface
|
||||
*/
|
||||
protected $cache;
|
||||
|
||||
/**
|
||||
* Database connection
|
||||
* @var \phpbb\db\driver\driver_interface
|
||||
* @var db_interface
|
||||
*/
|
||||
protected $db;
|
||||
|
||||
@@ -39,16 +42,28 @@ class db extends \phpbb\config\config
|
||||
/**
|
||||
* Creates a configuration container with a default set of values
|
||||
*
|
||||
* @param \phpbb\db\driver\driver_interface $db Database connection
|
||||
* @param \phpbb\cache\driver\driver_interface $cache Cache instance
|
||||
* @param db_interface $db Database connection
|
||||
* @param cache_interface $cache Cache instance
|
||||
* @param string $table Configuration table name
|
||||
*/
|
||||
public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\cache\driver\driver_interface $cache, $table)
|
||||
public function __construct(db_interface $db, cache_interface $cache, $table)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->cache = $cache;
|
||||
$this->table = $table;
|
||||
|
||||
$this->initialise($cache);
|
||||
|
||||
parent::__construct($this->config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialise config with database and/or cached entries
|
||||
*
|
||||
* @param cache_interface $cache
|
||||
*/
|
||||
public function initialise(cache_interface $cache)
|
||||
{
|
||||
if (($config = $cache->get('config')) !== false)
|
||||
{
|
||||
$sql = 'SELECT config_name, config_value
|
||||
@@ -84,7 +99,7 @@ class db extends \phpbb\config\config
|
||||
$cache->put('config', $cached_config);
|
||||
}
|
||||
|
||||
parent::__construct($config);
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,7 +108,7 @@ class db extends \phpbb\config\config
|
||||
* @param String $key The configuration option's name
|
||||
* @param bool $use_cache Whether this variable should be cached or if it
|
||||
* changes too frequently to be efficiently cached
|
||||
* @return null
|
||||
* @return void
|
||||
*/
|
||||
public function delete($key, $use_cache = true)
|
||||
{
|
||||
@@ -157,7 +172,7 @@ class db extends \phpbb\config\config
|
||||
$sql = 'INSERT INTO ' . $this->table . ' ' . $this->db->sql_build_array('INSERT', array(
|
||||
'config_name' => $key,
|
||||
'config_value' => $new_value,
|
||||
'is_dynamic' => ($use_cache) ? 0 : 1));
|
||||
'is_dynamic' => $use_cache ? 0 : 1));
|
||||
$this->db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
@@ -58,6 +58,10 @@ class migrate extends \phpbb\console\command\db\migration_command
|
||||
$this->migrator->create_migrations_table();
|
||||
|
||||
$this->cache->purge();
|
||||
if ($this->config instanceof \phpbb\config\db)
|
||||
{
|
||||
$this->config->initialise($this->cache->get_driver());
|
||||
}
|
||||
|
||||
$this->load_migrations();
|
||||
$orig_version = $this->config['version'];
|
||||
|
@@ -97,19 +97,19 @@ class datetime extends \DateTime
|
||||
|
||||
$midnight = $midnight->getTimestamp();
|
||||
|
||||
if ($timestamp <= $midnight + 2 * 86400)
|
||||
if ($timestamp < $midnight + 2 * 86400)
|
||||
{
|
||||
$day = false;
|
||||
|
||||
if ($timestamp > $midnight + 86400)
|
||||
if ($timestamp >= $midnight + 86400)
|
||||
{
|
||||
$day = 'TOMORROW';
|
||||
}
|
||||
else if ($timestamp > $midnight)
|
||||
else if ($timestamp >= $midnight)
|
||||
{
|
||||
$day = 'TODAY';
|
||||
}
|
||||
else if ($timestamp > $midnight - 86400)
|
||||
else if ($timestamp >= $midnight - 86400)
|
||||
{
|
||||
$day = 'YESTERDAY';
|
||||
}
|
||||
|
@@ -71,6 +71,13 @@ class mysqli extends \phpbb\db\driver\mysql_base
|
||||
// Disable loading local files on client side
|
||||
@mysqli_options($this->db_connect_id, MYSQLI_OPT_LOCAL_INFILE, false);
|
||||
|
||||
/*
|
||||
* As of PHP 8.1 MySQLi default error mode is set to MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT
|
||||
* See https://wiki.php.net/rfc/mysqli_default_errmode
|
||||
* Since phpBB implements own SQL errors handling, explicitly set it back to MYSQLI_REPORT_OFF
|
||||
*/
|
||||
mysqli_report(MYSQLI_REPORT_OFF);
|
||||
|
||||
@mysqli_query($this->db_connect_id, "SET NAMES 'utf8'");
|
||||
|
||||
// enforce strict mode on databases that support it
|
||||
|
@@ -207,14 +207,16 @@ class postgres extends \phpbb\db\driver\driver
|
||||
return false;
|
||||
}
|
||||
|
||||
$safe_query_id = $this->clean_query_id($this->query_result);
|
||||
|
||||
if ($cache && $cache_ttl)
|
||||
{
|
||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||
$this->open_queries[$safe_query_id] = $this->query_result;
|
||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
||||
}
|
||||
else if (strpos($query, 'SELECT') === 0)
|
||||
{
|
||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||
$this->open_queries[$safe_query_id] = $this->query_result;
|
||||
}
|
||||
}
|
||||
else if ($this->debug_sql_explain)
|
||||
@@ -555,6 +557,15 @@ class postgres extends \phpbb\db\driver\driver
|
||||
*/
|
||||
private function clean_query_id($query_id)
|
||||
{
|
||||
return is_resource($query_id) ? (int) $query_id : $query_id;
|
||||
// As of PHP 8.1 PgSQL functions accept/return \PgSQL\* objects instead of "pgsql *" resources
|
||||
// Attempting to cast object to int will throw error, hence correctly handle all cases
|
||||
if (is_resource($query_id))
|
||||
{
|
||||
return function_exists('get_resource_id') ? get_resource_id($query_id) : (int) $query_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
return is_object($query_id) ? spl_object_id($query_id) : $query_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -390,7 +390,7 @@ class sqlite3 extends \phpbb\db\driver\driver
|
||||
{
|
||||
$html_table = false;
|
||||
|
||||
if ($result = $this->dbo->query("EXPLAIN QUERY PLAN $explain_query"))
|
||||
if ($result = @$this->dbo->query("EXPLAIN QUERY PLAN $explain_query"))
|
||||
{
|
||||
while ($row = $result->fetchArray(SQLITE3_ASSOC))
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user