mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
Compare commits
278 commits
67afc0a1e2
...
3a5247d01b
Author | SHA1 | Date | |
---|---|---|---|
|
3a5247d01b | ||
|
5e0dc9ef2e | ||
|
8338ff9e56 | ||
|
84e7e34a66 | ||
|
18bae795f0 | ||
|
09fd86ffb0 | ||
|
4a00212f2d | ||
|
cb47d78d26 | ||
|
0eb98d51e2 | ||
|
82a5e20f3e | ||
|
71fe9d60c4 | ||
|
59b482a222 | ||
|
d934c8c4b7 | ||
|
d07aeb00d8 | ||
|
9adb7eb9fe | ||
|
29a74db9ec | ||
|
5e12e8b6e9 | ||
|
478d119d42 | ||
|
1f6f0a3547 | ||
|
5281807e1f | ||
|
e2554d1fb0 | ||
|
b3478d83d1 | ||
|
ff6f3b2a8c | ||
|
1cd17caf87 | ||
|
6a0c949ed1 | ||
|
146f917d19 | ||
|
c01d1967dd | ||
|
7a4b3f52ae | ||
|
b3ff1d7e34 | ||
|
7268859226 | ||
|
61bede748a | ||
|
0562984999 | ||
|
83e1886e27 | ||
|
10947f3d49 | ||
|
f94423d491 | ||
|
b6200d6690 | ||
|
04f2141a7d | ||
|
4b7d7c2fc7 | ||
|
3d76a8bd09 | ||
|
1c399dcab7 | ||
|
e91c7d42a9 | ||
|
b7db1b0844 | ||
|
0066d53c08 | ||
|
1b08a74508 | ||
|
a5113d7cd3 | ||
|
0f94e1cb13 | ||
|
c6dcf474d3 | ||
|
d0cb7d6389 | ||
|
118ab73c37 | ||
|
91aaadbc6d | ||
|
7d1ae5bf19 | ||
|
bdbd0be548 | ||
|
1b2ac50cfd | ||
|
779bec5fcf | ||
|
f512af1823 | ||
|
bc1e1732cf | ||
|
ee889ac98b | ||
|
b7d2243f6c | ||
|
59e8875fa8 | ||
|
f11512b580 | ||
|
1ae9a49811 | ||
|
5ef1a40083 | ||
|
d95437682e | ||
|
99ffd9205f | ||
|
3eaf4829bb | ||
|
e85b25122a | ||
|
80a08d9c54 | ||
|
3d9ecba1b1 | ||
|
83508b415b | ||
|
3b233d9c28 | ||
|
3801eb0946 | ||
|
3a553f07bc | ||
|
b666bc9e0a | ||
|
81c49aa6a5 | ||
|
6fd9a78872 | ||
|
7f3b37560e | ||
|
68e941ac21 | ||
|
2bbc013d83 | ||
|
c0504c2e01 | ||
|
75a24ae484 | ||
|
3125f3e1d3 | ||
|
3caab55e81 | ||
|
bde52e28f8 | ||
|
52f04a3c2c | ||
|
54d8a49e70 | ||
|
27550ce59b | ||
|
5ab0446eb1 | ||
|
d985c8be60 | ||
|
da32d51a81 | ||
|
ef010db26c | ||
|
3081db5f0b | ||
|
81e9f46a55 | ||
|
4140d50f6a | ||
|
d5ac95f79f | ||
|
b5ac26a394 | ||
|
dd53db1625 | ||
|
bb26658a00 | ||
|
1e73dcc2a2 | ||
|
531c4f2c17 | ||
|
e5f599c43b | ||
|
610fa67928 | ||
|
ef47c69155 | ||
|
3128b3fa9b | ||
|
a7c7c38bfb | ||
|
e32ebda982 | ||
|
30178ee443 | ||
|
8c6731ffb9 | ||
|
afbc0794d2 | ||
|
e33c1746c1 | ||
|
705b5ca572 | ||
|
a5c34234da | ||
|
860c2fe601 | ||
|
f04f07f265 | ||
|
d47262dbd9 | ||
|
8d0d6c012c | ||
|
e13c465ad5 | ||
|
8c5e22f4d5 | ||
|
cac3d81e73 | ||
|
bf2dd2cd75 | ||
|
6fcac2c40f | ||
|
a63d423c86 | ||
|
63203f42f7 | ||
|
aa2da5b916 | ||
|
5bc4c5765e | ||
|
e4c8984bf3 | ||
|
d5717b541e | ||
|
8dbe499e3d | ||
|
91c325174f | ||
|
930c87e97a | ||
|
2e08d01b5e | ||
|
692c96978a | ||
|
6ecb41f01a | ||
|
43d34880ac | ||
|
10cb4991a0 | ||
|
40608777f0 | ||
|
3b7d98bf0f | ||
|
84a835a995 | ||
|
f9e6385e84 | ||
|
cebc19f2ed | ||
|
21314a34a6 | ||
|
67265efc0d | ||
|
d99c3838df | ||
|
c23504e3c7 | ||
|
7467b567e8 | ||
|
1f1a02d086 | ||
|
3dc1e6fc8e | ||
|
b8ea36a70f | ||
|
98a8999283 | ||
|
b92ca5d1f8 | ||
|
fb46aa38b8 | ||
|
51465670f6 | ||
|
14a6322b4f | ||
|
cfa3a21e20 | ||
|
023f56dff9 | ||
|
64dd8b668e | ||
|
57abba6be0 | ||
|
0826a41da8 | ||
|
1ea59731f0 | ||
|
9bdb88879d | ||
|
79ff5b18ce | ||
|
430200cbf6 | ||
|
d8aa6873b2 | ||
|
d9136469ea | ||
|
7fd634b420 | ||
|
9e5abf3d6e | ||
|
bb3d41e193 | ||
|
94fde8fa23 | ||
|
66650cb0e2 | ||
|
d9e4ce6dde | ||
|
24fc7d5388 | ||
|
ae40c6365e | ||
|
7c3c49486c | ||
|
63c110b511 | ||
|
be67bfbe63 | ||
|
cedbbb0c76 | ||
|
3533185cdf | ||
|
a5bf1ff165 | ||
|
328d6f1714 | ||
|
08fd9caa11 | ||
|
38cb3761af | ||
|
746133d005 | ||
|
17480d7d07 | ||
|
c3bb5e1bec | ||
|
29730e49ce | ||
|
3584ef7eca | ||
|
8adc853dea | ||
|
2a0f1896aa | ||
|
a223da37fb | ||
|
1ba909d99f | ||
|
7181c4d591 | ||
|
2fa5da1454 | ||
|
77f83306b5 | ||
|
f54f82f071 | ||
|
4f5ace858d | ||
|
f42c4be939 | ||
|
85c6954f07 | ||
|
183110789a | ||
|
bfdf172992 | ||
|
1e76b0df0e | ||
|
67e2b32816 | ||
|
68c4e22886 | ||
|
29c19bb764 | ||
|
bf15d1ea42 | ||
|
220b655150 | ||
|
97728da9be | ||
|
fe3750bfb2 | ||
|
53d7fff391 | ||
|
bb956539a4 | ||
|
c2725b441c | ||
|
1729e3f52b | ||
|
f5bb065a4d | ||
|
f6c9d15b0c | ||
|
e0bcea9000 | ||
|
8b1ee790d6 | ||
|
6eacf68047 | ||
|
cc488c8b7d | ||
|
1157c41410 | ||
|
feb7d6f34e | ||
|
525924b2fc | ||
|
3506883c75 | ||
|
dacabf0537 | ||
|
573c6c87b2 | ||
|
1ba58768f3 | ||
|
d2c402f038 | ||
|
84ec3dc6c3 | ||
|
6b5bb4d51f | ||
|
736ef320ed | ||
|
04031a9acc | ||
|
a75ecae0b0 | ||
|
bf29596bad | ||
|
353aa653b4 | ||
|
d4ce544748 | ||
|
ccbf2e6265 | ||
|
24385a47d1 | ||
|
120ae90636 | ||
|
8eb2958382 | ||
|
e75d7a8410 | ||
|
8ba7ecd3ba | ||
|
b157e1b0d2 | ||
|
c937b8f7ab | ||
|
5df8eb5822 | ||
|
cd47344ee2 | ||
|
a1a6e17a72 | ||
|
a86f368f3d | ||
|
c5c6c96a50 | ||
|
ac3e9f64d8 | ||
|
0c1aeb862b | ||
|
6a47e3628c | ||
|
f9def4a725 | ||
|
3d6e63154f | ||
|
f0181cc681 | ||
|
c9ff5a09f6 | ||
|
921505ca3b | ||
|
598d1c7f49 | ||
|
90bd9d006e | ||
|
a9efd4a234 | ||
|
b404606a9f | ||
|
353ea362f0 | ||
|
555c760a4c | ||
|
58b5c8f5cf | ||
|
31f9ffd56b | ||
|
c0ae7ccb3e | ||
|
79fc90dce3 | ||
|
d32970348f | ||
|
74084107ed | ||
|
14d889f74f | ||
|
2d392791ad | ||
|
23010abcb8 | ||
|
b33f17e7ce | ||
|
d6953a0422 | ||
|
1f7ae9e2b0 | ||
|
a44295a1ba | ||
|
be3966c0cb | ||
|
9bf9538dc6 | ||
|
4becf438e1 | ||
|
a8399c1431 | ||
|
6d9a8ae8af | ||
|
e9c445925b |
287 changed files with 6692 additions and 4543 deletions
1
.github/setup-exiftool.sh
vendored
1
.github/setup-exiftool.sh
vendored
|
@ -10,5 +10,4 @@
|
|||
#
|
||||
set -e
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y parallel libimage-exiftool-perl
|
||||
|
|
3
.github/setup-sphinx.sh
vendored
3
.github/setup-sphinx.sh
vendored
|
@ -11,7 +11,6 @@
|
|||
set -e
|
||||
set -x
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -q -y sphinxsearch
|
||||
|
||||
DIR=$(dirname "$0")
|
||||
|
@ -135,7 +134,7 @@ searchd
|
|||
read_timeout = 5
|
||||
max_children = 30
|
||||
pid_file = $SPHINX_DATA_DIR/searchd.pid
|
||||
binlog_path = $SPHINX_DATA_DIR/
|
||||
binlog_path = $SPHINX_DATA_DIR
|
||||
}
|
||||
" > $SPHINX_CONF
|
||||
|
||||
|
|
1
.github/setup-unbuffer.sh
vendored
1
.github/setup-unbuffer.sh
vendored
|
@ -10,5 +10,4 @@
|
|||
#
|
||||
set -e
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y expect-dev
|
||||
|
|
1
.github/setup-webserver.sh
vendored
1
.github/setup-webserver.sh
vendored
|
@ -11,7 +11,6 @@
|
|||
set -e
|
||||
set -x
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y nginx coreutils
|
||||
|
||||
sudo service nginx stop
|
||||
|
|
27
.github/workflows/tests.yml
vendored
27
.github/workflows/tests.yml
vendored
|
@ -28,6 +28,10 @@ jobs:
|
|||
name: PHP ${{ matrix.php }} - ${{ matrix.db }}
|
||||
|
||||
steps:
|
||||
- name: Update Ubuntu package lists
|
||||
run: |
|
||||
sudo apt-get update -y --allow-releaseinfo-change
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
|
@ -169,6 +173,10 @@ jobs:
|
|||
- 6379:6379
|
||||
|
||||
steps:
|
||||
- name: Update Ubuntu package lists
|
||||
run: |
|
||||
sudo apt-get update -y --allow-releaseinfo-change
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
|
@ -308,6 +316,10 @@ jobs:
|
|||
- 6379:6379
|
||||
|
||||
steps:
|
||||
- name: Update Ubuntu package lists
|
||||
run: |
|
||||
sudo apt-get update -y --allow-releaseinfo-change
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
|
@ -370,15 +382,12 @@ jobs:
|
|||
|
||||
# Other database types, namely sqlite3 and mssql
|
||||
other-tests:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- php: '8.1'
|
||||
db: "sqlite3"
|
||||
- php: '8.1'
|
||||
db: "mcr.microsoft.com/mssql/server:2017-latest"
|
||||
db_alias: 'MSSQL 2017'
|
||||
- php: '8.1'
|
||||
db: "mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04"
|
||||
db_alias: 'MSSQL 2019'
|
||||
|
@ -390,7 +399,7 @@ jobs:
|
|||
|
||||
services:
|
||||
mssql:
|
||||
image: ${{ matrix.db != 'mcr.microsoft.com/mssql/server:2017-latest' && matrix.db != 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' && matrix.db != 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' && 'mcr.microsoft.com/mssql/server:2017-latest' || matrix.db }}
|
||||
image: ${{ matrix.db != 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' && matrix.db != 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' && 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' || matrix.db }}
|
||||
env:
|
||||
SA_PASSWORD: "Pssw0rd_12"
|
||||
ACCEPT_EULA: "y"
|
||||
|
@ -415,6 +424,10 @@ jobs:
|
|||
|
||||
|
||||
steps:
|
||||
- name: Update Ubuntu package lists
|
||||
run: |
|
||||
sudo apt-get update -y --allow-releaseinfo-change
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
|
@ -422,7 +435,7 @@ jobs:
|
|||
env:
|
||||
MATRIX_DB: ${{ matrix.db }}
|
||||
run: |
|
||||
if [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2017-latest' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' ]
|
||||
if [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' ]
|
||||
then
|
||||
db='mssql'
|
||||
else
|
||||
|
@ -503,7 +516,7 @@ jobs:
|
|||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, intl, gd, exif, iconv, pgsql, pdo_pgsql
|
||||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, intl, gd, exif, iconv, pgsql, pdo_pgsql, sodium
|
||||
ini-values: upload_tmp_dir=${{ runner.temp }}, sys_temp_dir=${{ runner.temp }}
|
||||
coverage: none
|
||||
|
||||
|
|
13
SECURITY.md
Normal file
13
SECURITY.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Security Policy
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please do not post potential security vulnerabilities publicly. Instead, report them to the phpBB team.
|
||||
We take security very seriously and will respond to reports about potential security vulnerabilities as quickly as possible.
|
||||
There are multiple ways a potential security vulnerability can be reported:
|
||||
|
||||
- HackerOne: [phpBB | Vulnerability Disclosure Program | HackerOne](https://hackerone.com/phpbb)
|
||||
- Create a report in the security tracker: [Security Tracker](https://www.phpbb.com/security/)
|
||||
- Send an email: [security@phpbb.com](mailto:security@phpbb.com)
|
||||
|
||||
Please provide as much detail as possible when reporting a vulnerability. You can expect to receive an update on your report within a few days. If the vulnerability is accepted, we will work on a fix and keep you informed of the progress. If the vulnerability is declined, we will provide an explanation.
|
|
@ -3,8 +3,8 @@
|
|||
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
|
||||
<!-- a few settings for the build -->
|
||||
<property name="newversion" value="4.0.0-a1-dev" />
|
||||
<property name="prevversion" value="3.3.14" />
|
||||
<property name="olderversions" value="3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9, 3.2.10, 3.2.11, 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.3.10, 3.3.11, 3.3.12, 3.3.13" />
|
||||
<property name="prevversion" value="3.3.15" />
|
||||
<property name="olderversions" value="3.1.12, 3.2.11, 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.3.10, 3.3.11, 3.3.12, 3.3.13, 3.3.14" />
|
||||
<!-- no configuration should be needed beyond this point -->
|
||||
|
||||
<property name="oldversions" value="${olderversions}, ${prevversion}" />
|
||||
|
@ -166,32 +166,32 @@
|
|||
|
||||
<target name="prepare-new-version">
|
||||
<!-- select the currently checked out commit (HEAD) for packaging -->
|
||||
<mkdir dir="build/new_version/phpBB3" />
|
||||
<mkdir dir="build/new_version/phpBB" />
|
||||
<phingcall target="export">
|
||||
<property name="revision" value="HEAD" />
|
||||
<property name="dir" value="build/new_version/phpBB3" />
|
||||
<property name="dir" value="build/new_version/phpBB" />
|
||||
</phingcall>
|
||||
|
||||
<!-- copy into directory for diffs -->
|
||||
<exec dir="build" command="cp -rp new_version/phpBB3 old_versions/release-${newversion}" />
|
||||
<exec dir="build" command="cp -rp new_version/phpBB old_versions/release-${newversion}" />
|
||||
<!-- and clean up -->
|
||||
<phingcall target="clean-diff-dir">
|
||||
<property name="dir" value="build/old_versions/release-${newversion}" />
|
||||
</phingcall>
|
||||
|
||||
<!-- create an empty config.php file (not for diffs) -->
|
||||
<touch file="build/new_version/phpBB3/config.php" />
|
||||
<copy file="build/new_version/phpBB3/vendor-ext/.htaccess" tofile="build/new_version/phpBB3/vendor/.htaccess" />
|
||||
<touch file="build/new_version/phpBB/config.php" />
|
||||
<copy file="build/new_version/phpBB/vendor-ext/.htaccess" tofile="build/new_version/phpBB/vendor/.htaccess" />
|
||||
|
||||
</target>
|
||||
|
||||
<target name="package" depends="clean,prepare,prepare-new-version,old-version-diffs">
|
||||
<exec dir="build" command="php -f package.php '${versions}' > logs/package.log" escape="false" />
|
||||
<exec dir="build" escape="false"
|
||||
command="LC_ALL=C diff -crNEBZbd old_versions/release-${prevversion}/language new_version/phpBB3/language >
|
||||
command="LC_ALL=C diff -crNEBZbd old_versions/release-${prevversion}/language new_version/phpBB/language >
|
||||
save/phpbb-${prevversion}_to_${newversion}_language.patch" />
|
||||
<exec dir="build" escape="false"
|
||||
command="LC_ALL=C diff -crNEBZbd old_versions/release-${prevversion}/styles/prosilver new_version/phpBB3/styles/prosilver >
|
||||
command="LC_ALL=C diff -crNEBZbd old_versions/release-${prevversion}/styles/prosilver new_version/phpBB/styles/prosilver >
|
||||
save/phpbb-${prevversion}_to_${newversion}_prosilver.patch" />
|
||||
|
||||
<exec dir="build" escape="false"
|
||||
|
|
|
@ -29,7 +29,7 @@ else
|
|||
{
|
||||
$fixVersion = $_SERVER['argv'][1];
|
||||
|
||||
$query = 'project IN (PHPBB3, SECURITY)
|
||||
$query = 'project IN (PHPBB, PHPBB3, SECURITY)
|
||||
AND resolution = Fixed
|
||||
AND fixVersion = "' . $fixVersion . '"
|
||||
AND status IN ("Unverified Fix", Closed)';
|
||||
|
|
|
@ -50,7 +50,7 @@ class build_package
|
|||
);
|
||||
|
||||
$this->package_infos = array(
|
||||
'package_name' => 'phpBB3',
|
||||
'package_name' => 'phpBB',
|
||||
'name_prefix' => 'phpbb',
|
||||
'simple_name' => 'release-' . $_latest,
|
||||
'new_version_number' => $_latest,
|
||||
|
|
|
@ -0,0 +1,116 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\Sniffs\CodeLayout;
|
||||
|
||||
use PHP_CodeSniffer\Files\File;
|
||||
use PHP_CodeSniffer\Sniffs\Sniff;
|
||||
|
||||
/**
|
||||
* Checks that union type declarations follows the coding guidelines.
|
||||
*/
|
||||
class UnionTypesCheckSniff implements Sniff
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
return [
|
||||
T_FUNCTION,
|
||||
T_CLASS,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function process(File $phpcsFile, $stackPtr)
|
||||
{
|
||||
$tokens = $phpcsFile->getTokens();
|
||||
if ($tokens[$stackPtr]['type'] === 'T_FUNCTION')
|
||||
{
|
||||
$method_params = $phpcsFile->getMethodParameters($stackPtr);
|
||||
$method_params_array = array_column($method_params, 'type_hint', 'token');
|
||||
foreach ($method_params_array as $stack_pointer => $type_hint)
|
||||
{
|
||||
$this->check_union_type($phpcsFile, $stack_pointer, $type_hint);
|
||||
}
|
||||
|
||||
$method_properties = $phpcsFile->getMethodProperties($stackPtr);
|
||||
$this->check_union_type($phpcsFile, $stackPtr, $method_properties['return_type']);
|
||||
}
|
||||
else if ($tokens[$stackPtr]['type'] === 'T_CLASS')
|
||||
{
|
||||
$class_token = $tokens[$stackPtr];
|
||||
$class_closer_pointer = $class_token['scope_closer'];
|
||||
$first_method_pointer = $phpcsFile->findNext(T_FUNCTION, $stackPtr);
|
||||
$class_members_declarations_end_pointer = $first_method_pointer ?: $class_closer_pointer;
|
||||
|
||||
$stack_pointer = $stackPtr;
|
||||
while(($class_member_pointer = $phpcsFile->findNext(T_VARIABLE, $stack_pointer)) !== false && ($class_member_pointer < $class_members_declarations_end_pointer))
|
||||
{
|
||||
$properties = $phpcsFile->getMemberProperties($class_member_pointer);
|
||||
$this->check_union_type($phpcsFile, $class_member_pointer, $properties['type']);
|
||||
$stack_pointer = $class_member_pointer + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function check_union_type(File $phpcsFile, $stack_pointer, $type_hint)
|
||||
{
|
||||
if (empty($type_hint))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!strpos($type_hint, '|') && $type_hint[0] == '?') // Check nullable shortcut syntax
|
||||
{
|
||||
$type = substr($type_hint, 1);
|
||||
$error = 'Nullable shortcut syntax must not be used. Use union type instead: %1$s|null; found %2$s';
|
||||
$data = [$type, $type_hint];
|
||||
$phpcsFile->addError($error, $stack_pointer, 'ShortNullableSyntax', $data);
|
||||
}
|
||||
else if ((count($types_array = explode('|', $type_hint))) > 1) // Check union type layout
|
||||
{
|
||||
$types_array_null_less = $types_array;
|
||||
|
||||
// Check 'null' to be the last element
|
||||
$null_position = array_search('null', $types_array);
|
||||
if ($null_position !== false && $null_position != array_key_last($types_array))
|
||||
{
|
||||
$error = 'The "null" type hint must be the last of the union type elements; found %s';
|
||||
$data = [implode('|', $types_array)];
|
||||
$phpcsFile->addError($error, $stack_pointer, 'NullAlwaysLast', $data);
|
||||
}
|
||||
|
||||
// Check types excepting 'null' to follow alphabetical order
|
||||
if ($null_position !== false)
|
||||
{
|
||||
array_splice($types_array_null_less, $null_position, 1);
|
||||
}
|
||||
|
||||
if (count($types_array_null_less) > 1)
|
||||
{
|
||||
$types_array_null_less_sorted = $types_array_null_less;
|
||||
sort($types_array_null_less_sorted);
|
||||
if (!empty(array_diff_assoc($types_array_null_less, $types_array_null_less_sorted)))
|
||||
{
|
||||
$error = 'Union type elements must be sorted alphabetically excepting the "null" type hint must be the last if any; found %s';
|
||||
$data = [implode('|', $types_array)];
|
||||
$phpcsFile->addError($error, $stack_pointer, 'AlphabeticalSort', $data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -11,6 +11,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\Sniffs\Commenting;
|
||||
|
||||
use PHP_CodeSniffer\Files\File;
|
||||
use PHP_CodeSniffer\Sniffs\Sniff;
|
||||
|
||||
|
@ -21,7 +23,7 @@ use PHP_CodeSniffer\Sniffs\Sniff;
|
|||
* @package code_sniffer
|
||||
* @author Manuel Pichler <mapi@phpundercontrol.org>
|
||||
*/
|
||||
class phpbb_Sniffs_Commenting_FileCommentSniff implements Sniff
|
||||
class FileCommentSniff implements Sniff
|
||||
{
|
||||
/**
|
||||
* Returns an array of tokens this test wants to listen for.
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\Sniffs\ControlStructures;
|
||||
|
||||
use PHP_CodeSniffer\Files\File;
|
||||
use PHP_CodeSniffer\Sniffs\Sniff;
|
||||
|
||||
|
@ -18,7 +20,7 @@ use PHP_CodeSniffer\Sniffs\Sniff;
|
|||
* Checks that the opening brace of a control structures is on the line after.
|
||||
* From Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff
|
||||
*/
|
||||
class phpbb_Sniffs_ControlStructures_OpeningBraceBsdAllmanSniff implements Sniff
|
||||
class OpeningBraceBsdAllmanSniff implements Sniff
|
||||
{
|
||||
/**
|
||||
* Registers the tokens that this sniff wants to listen for.
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
namespace phpbb\Sniffs\ControlStructures;
|
||||
|
||||
use PHP_CodeSniffer\Files\File;
|
||||
use PHP_CodeSniffer\Sniffs\Sniff;
|
||||
|
@ -18,7 +19,7 @@ use PHP_CodeSniffer\Sniffs\Sniff;
|
|||
* Checks that there is exactly one space between the keyword and the opening
|
||||
* parenthesis of a control structures.
|
||||
*/
|
||||
class phpbb_Sniffs_ControlStructures_OpeningParenthesisSniff implements Sniff
|
||||
class OpeningParenthesisSniff implements Sniff
|
||||
{
|
||||
/**
|
||||
* Registers the tokens that this sniff wants to listen for.
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\Sniffs\ControlStructures;
|
||||
|
||||
use PHP_CodeSniffer\Files\File;
|
||||
use PHP_CodeSniffer\Sniffs\Sniff;
|
||||
|
||||
|
@ -18,7 +20,7 @@ use PHP_CodeSniffer\Sniffs\Sniff;
|
|||
* Checks that the visibility qualifiers are placed after the static keyword
|
||||
* according to the coding guidelines
|
||||
*/
|
||||
class phpbb_Sniffs_ControlStructures_StaticKeywordSniff implements Sniff
|
||||
class StaticKeywordSniff implements Sniff
|
||||
{
|
||||
/**
|
||||
* Registers the tokens that this sniff wants to listen for.
|
||||
|
|
|
@ -11,13 +11,15 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\Sniffs\Namespaces;
|
||||
|
||||
use PHP_CodeSniffer\Files\File;
|
||||
use PHP_CodeSniffer\Sniffs\Sniff;
|
||||
|
||||
/**
|
||||
* Checks that each use statement is used.
|
||||
*/
|
||||
class phpbb_Sniffs_Namespaces_UnusedUseSniff implements Sniff
|
||||
class UnusedUseSniff implements Sniff
|
||||
{
|
||||
const FIND = [
|
||||
T_NS_SEPARATOR,
|
||||
|
@ -49,9 +51,20 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements Sniff
|
|||
$phpcsFile->addError($error, $stack_pointer, 'FullName');
|
||||
}
|
||||
|
||||
if ($found_name === $short_name)
|
||||
/*
|
||||
* Check for possible union types (like string|MyType|null)
|
||||
* and question mark nullable type syntax (like ?MyType)
|
||||
*/
|
||||
$types = explode('|', $found_name);
|
||||
foreach ($types as $type)
|
||||
{
|
||||
return true;
|
||||
// Nullable type syntax
|
||||
$type = (strpos($type, '?') === 0) ? substr($type, 1) : $type;
|
||||
|
||||
if ($short_name === $type)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -17,9 +17,6 @@
|
|||
<!-- There MUST not be more than one statement per line. -->
|
||||
<rule ref="Generic.Formatting.DisallowMultipleStatements" />
|
||||
|
||||
<!-- Call-time pass-by-reference MUST not be used. -->
|
||||
<rule ref="Generic.Functions.CallTimePassByReference.NotAllowed" />
|
||||
|
||||
<!-- Filenames MUST be lowercase. -->
|
||||
<rule ref="Generic.Files.LowercasedFilename" />
|
||||
|
||||
|
|
|
@ -45,4 +45,8 @@
|
|||
<!-- There MUST NOT be unused use statements. -->
|
||||
<rule ref="./phpbb/Sniffs/Namespaces/UnusedUseSniff.php" />
|
||||
|
||||
<!-- The null type SHALL be the last union type element, other types SHALL follow alphabetical order.
|
||||
No nullable type shortcut syntax should be used. -->
|
||||
<rule ref="./phpbb/Sniffs/CodeLayout/UnionTypesCheckSniff.php" />
|
||||
|
||||
</ruleset>
|
||||
|
|
|
@ -19,9 +19,9 @@ do
|
|||
|
||||
$command "$1.$ext"
|
||||
|
||||
for file in `find phpBB3 -name '.svn' -prune -o -type f -print`
|
||||
for file in `find phpBB -name '.svn' -prune -o -type f -print`
|
||||
do
|
||||
orig_file="${file/#phpBB3/$orig_dir}"
|
||||
orig_file="${file/#phpBB/$orig_dir}"
|
||||
diff_result=`diff $orig_file $file`
|
||||
|
||||
if [ -n "$diff_result" ]
|
||||
|
@ -31,7 +31,7 @@ do
|
|||
fi
|
||||
done
|
||||
|
||||
rm -rf phpBB3
|
||||
rm -rf phpBB
|
||||
done
|
||||
|
||||
cd ..
|
||||
|
|
BIN
composer.phar
BIN
composer.phar
Binary file not shown.
|
@ -14,7 +14,7 @@
|
|||
|
||||
<fieldset>
|
||||
<legend>{L_BBCODE_USAGE}</legend>
|
||||
<p>{L_BBCODE_USAGE_EXPLAIN}</p>
|
||||
<p>{{ lang('BBCODE_USAGE_EXPLAIN', '<a href="#down">', '</a>') }}</p>
|
||||
<dl>
|
||||
<dt><label for="bbcode_match">{L_EXAMPLES}</label><br /><br /><span>{L_BBCODE_USAGE_EXAMPLE}</span></dt>
|
||||
<dd><textarea id="bbcode_match" name="bbcode_match" cols="60" rows="5">{BBCODE_MATCH}</textarea></dd>
|
||||
|
@ -47,6 +47,17 @@
|
|||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('APPEARANCE') }}</legend>
|
||||
<dl>
|
||||
<dt><label for="bbcode_font_icon">{{ lang('BBCODE_FONT_ICON') }}</label><br><span>{{ lang('BBCODE_FONT_ICON_EXPLAIN', '<a href="https://fontawesome.com/v6/icons/" target="_blank">', '</a>') }}</span></dt>
|
||||
<dd>
|
||||
<input type="text" name="bbcode_font_icon" id="bbcode_font_icon" value="{{ BBCODE_FONT_ICON }}" />
|
||||
{{ Icon('font', ' ', '', false, '', {'id':'bbcode_icon_preview'}) }}
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<!-- EVENT acp_bbcodes_edit_fieldsets_after -->
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
<h1>{L_ACP_JABBER_SETTINGS}</h1>
|
||||
|
||||
<p>{L_ACP_JABBER_SETTINGS_EXPLAIN}</p>
|
||||
|
||||
<!-- IF S_WARNING -->
|
||||
<div class="errorbox">
|
||||
<h3>{L_WARNING}</h3>
|
||||
<p>{WARNING_MSG}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<form id="acp_jabber" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_ACP_JABBER_SETTINGS}</legend>
|
||||
<!-- IF S_GTALK_NOTE -->
|
||||
<p>{L_JAB_GTALK_NOTE}</p>
|
||||
<!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label for="jab_enable">{L_JAB_ENABLE}{L_COLON}</label><br /><span>{L_JAB_ENABLE_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" id="jab_enable" name="jab_enable" value="1"<!-- IF JAB_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_ENABLED}</label>
|
||||
<label><input type="radio" class="radio" name="jab_enable" value="0"<!-- IF not JAB_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_DISABLED}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="jab_host">{L_JAB_SERVER}{L_COLON}</label><br /><span>{L_JAB_SERVER_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" id="jab_host" name="jab_host" value="{JAB_HOST}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="jab_port">{L_JAB_PORT}{L_COLON}</label><br /><span>{L_JAB_PORT_EXPLAIN}</span></dt>
|
||||
<dd><input type="number" id="jab_port" name="jab_port" value="{JAB_PORT}" min="0" max="99999" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="jab_username">{L_JAB_USERNAME}{L_COLON}</label><br /><span>{L_JAB_USERNAME_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" id="jab_username" name="jab_username" value="{JAB_USERNAME}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="jab_password">{L_JAB_PASSWORD}{L_COLON}</label><br /><span>{L_JAB_PASSWORD_EXPLAIN}</span></dt>
|
||||
<dd><input type="password" id="jab_password" name="jab_password" value="{JAB_PASSWORD}" autocomplete="off" /></dd>
|
||||
</dl>
|
||||
<!-- IF S_CAN_USE_SSL -->
|
||||
<dl>
|
||||
<dt><label for="jab_use_ssl">{L_JAB_USE_SSL}{L_COLON}</label><br /><span>{L_JAB_USE_SSL_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" id="jab_use_ssl" name="jab_use_ssl" value="1"<!-- IF JAB_USE_SSL --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="jab_use_ssl" value="0"<!-- IF not JAB_USE_SSL --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="jab_verify_peer">{L_JAB_VERIFY_PEER}{L_COLON}</label><br /><span>{L_JAB_VERIFY_PEER_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" id="jab_verify_peer" name="jab_verify_peer" value="1"<!-- IF JAB_VERIFY_PEER --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="jab_verify_peer" value="0"<!-- IF not JAB_VERIFY_PEER --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="jab_verify_peer_name">{L_JAB_VERIFY_PEER_NAME}{L_COLON}</label><br /><span>{L_JAB_VERIFY_PEER_NAME_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" id="jab_verify_peer_name" name="jab_verify_peer_name" value="1"<!-- IF JAB_VERIFY_PEER_NAME --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="jab_verify_peer_name" value="0"<!-- IF not JAB_VERIFY_PEER_NAME --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="jab_allow_self_signed">{L_JAB_ALLOW_SELF_SIGNED}{L_COLON}</label><br /><span>{L_JAB_ALLOW_SELF_SIGNED_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" id="jab_allow_self_signed" name="jab_allow_self_signed" value="1"<!-- IF JAB_ALLOW_SELF_SIGNED --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="jab_allow_self_signed" value="0"<!-- IF not JAB_ALLOW_SELF_SIGNED --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label for="jab_package_size">{L_JAB_PACKAGE_SIZE}{L_COLON}</label><br /><span>{L_JAB_PACKAGE_SIZE_EXPLAIN}</span></dt>
|
||||
<dd><input type="number" id="jab_package_size" name="jab_package_size" value="{JAB_PACKAGE_SIZE}" min="0" max="99999" /></dd>
|
||||
</dl>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_ACP_SUBMIT_CHANGES}</legend>
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
|
@ -47,7 +47,7 @@
|
|||
{% for provider in PROVIDERS %}
|
||||
{% if provider.is_available %}
|
||||
<option value="{{ get_class(provider) }}"{{ attribute(config, 'storage\\' ~ storage.get_name ~ '\\provider') == get_class(provider) ? ' selected' : '' }} data-toggle-setting="#{{ storage.get_name }}_{{ provider.get_name }}_settings">
|
||||
{{ lang('STORAGE_ADAPTER_' ~ provider.get_name | upper ~ '_NAME') }}
|
||||
{{ provider.get_title }}
|
||||
</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
@ -59,43 +59,42 @@
|
|||
{% for provider in PROVIDERS %}
|
||||
{% if provider.is_available %}
|
||||
<fieldset id="{{ storage.get_name }}_{{ provider.get_name }}_settings">
|
||||
<legend>{{ lang('STORAGE_' ~ storage.get_name | upper ~ '_TITLE') }} - {{ lang('STORAGE_ADAPTER_' ~ provider.get_name | upper ~ '_NAME') }}</legend>
|
||||
<legend>{{ lang('STORAGE_' ~ storage.get_name | upper ~ '_TITLE') }} - {{ provider.get_title }}</legend>
|
||||
{% for name, options in provider.get_options %}
|
||||
<dl>
|
||||
<dt>
|
||||
{% set title = 'STORAGE_ADAPTER_' ~ provider.get_name | upper ~ '_OPTION_' ~ name | upper %}
|
||||
{% set description = 'STORAGE_ADAPTER_' ~ provider.get_name | upper ~ '_OPTION_' ~ name | upper ~ '_EXPLAIN' %}
|
||||
<label>{{ lang(title) ~ lang('COLON') }}</label>
|
||||
{% if lang_defined(description) %}
|
||||
<br /><span>{{ lang(description) }}</span>
|
||||
<label>{{ options.title ~ lang('COLON') }}</label>
|
||||
{% if options.description %}
|
||||
<br /><span>{{ options.description }}</span>
|
||||
{% endif %}
|
||||
</dt>
|
||||
<dd>
|
||||
{% set input_name = storage.get_name ~ '[' ~ name ~ ']' %}
|
||||
{% set input_value = attribute(config, 'storage\\' ~ storage.get_name ~ '\\config\\' ~ name) %}
|
||||
{% set form_macro = options.form_macro %}
|
||||
|
||||
{% if options.tag == 'input' %}
|
||||
{{ FormsInput(options | merge({"name": input_name, "value": input_value})) }}
|
||||
{% elseif options.tag == 'textarea' %}
|
||||
{{ FormsTextarea(options | merge({"name": input_name, "content": input_value})) }}
|
||||
{% elseif options.tag == 'radio' %}
|
||||
{% if form_macro.tag == 'input' %}
|
||||
{{ FormsInput(form_macro | merge({"name": input_name, "value": input_value})) }}
|
||||
{% elseif form_macro.tag == 'textarea' %}
|
||||
{{ FormsTextarea(form_macro | merge({"name": input_name, "content": input_value})) }}
|
||||
{% elseif form_macro.tag == 'radio' %}
|
||||
{% set buttons = [] %}
|
||||
|
||||
{% for button in options.buttons %}
|
||||
{% for button in form_macro.buttons %}
|
||||
{% set new_button = button | merge({"name": input_name, "checked": button.value == input_value}) %}
|
||||
{% set buttons = buttons | merge([new_button]) %}
|
||||
{% endfor %}
|
||||
|
||||
{{ FormsRadioButtons(options | merge({"buttons": buttons})) }}
|
||||
{% elseif options.tag == 'select' %}
|
||||
{{ FormsRadioButtons(form_macro | merge({"buttons": buttons})) }}
|
||||
{% elseif form_macro.tag == 'select' %}
|
||||
{% set select_options = [] %}
|
||||
|
||||
{% for option in options.options %}
|
||||
{% for option in form_macro.options %}
|
||||
{% set new_option = option | merge({"selected": option.value == input_value}) %}
|
||||
{% set select_options = select_options | merge([new_option]) %}
|
||||
{% endfor %}
|
||||
|
||||
{{ FormsSelect(options | merge({"name": input_name, "options": select_options})) }}
|
||||
{{ FormsSelect(form_macro | merge({"name": input_name, "options": select_options})) }}
|
||||
{% endif %}
|
||||
</dd>
|
||||
</dl>
|
||||
|
@ -109,9 +108,9 @@
|
|||
<dl>
|
||||
<dt><label for="update_type">{{ lang('STORAGE_UPDATE_TYPE') ~ lang('COLON') }}</label></dt>
|
||||
<dd>
|
||||
<label><input id="update_type" class="radio" name="update_type" value="{{ STORAGE_UPDATE_TYPE_CONFIG }}" checked="checked" type="radio"> {{ lang('STORAGE_UPDATE_TYPE_CONFIG') }}</label>
|
||||
<label><input class="radio" name="update_type" value="{{ STORAGE_UPDATE_TYPE_CONFIG }}" type="radio"> {{ lang('STORAGE_UPDATE_TYPE_CONFIG') }}</label>
|
||||
<label><input class="radio" name="update_type" value="{{ STORAGE_UPDATE_TYPE_COPY }}" type="radio"> {{ lang('STORAGE_UPDATE_TYPE_COPY') }}</label>
|
||||
<label><input class="radio" name="update_type" value="{{ STORAGE_UPDATE_TYPE_MOVE }}" type="radio"> {{ lang('STORAGE_UPDATE_TYPE_MOVE') }}</label>
|
||||
<label><input class="radio" name="update_type" value="{{ STORAGE_UPDATE_TYPE_MOVE }}" type="radio" checked="checked" id="update_type"> {{ lang('STORAGE_UPDATE_TYPE_MOVE') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
|
|
@ -29,12 +29,6 @@
|
|||
<dd><label><input type="radio" class="radio" name="hideonline" value="1"<!-- IF HIDE_ONLINE --> id="hideonline" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="hideonline" value="0"<!-- IF not HIDE_ONLINE --> id="hideonline" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="notifymethod">{L_NOTIFY_METHOD}{L_COLON}</label><br /><span>{L_NOTIFY_METHOD_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="notifymethod" value="0"<!-- IF NOTIFY_EMAIL --> id="notifymethod" checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_EMAIL}</label>
|
||||
<label><input type="radio" class="radio" name="notifymethod" value="1"<!-- IF NOTIFY_IM --> id="notifymethod" checked="checked"<!-- ENDIF --><!-- IF S_JABBER_DISABLED --> disabled="disabled"<!-- ENDIF --> /> {L_NOTIFY_METHOD_IM}</label>
|
||||
<label><input type="radio" class="radio" name="notifymethod" value="2"<!-- IF NOTIFY_BOTH --> id="notifymethod" checked="checked"<!-- ENDIF --><!-- IF S_JABBER_DISABLED --> disabled="disabled"<!-- ENDIF --> /> {L_NOTIFY_METHOD_BOTH}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="notifypm">{L_NOTIFY_ON_PM}{L_COLON}</label></dt>
|
||||
<dd><label><input type="radio" class="radio" name="notifypm" value="1"<!-- IF NOTIFY_PM --> id="notifypm" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
<fieldset>
|
||||
<legend>{L_USER_PROFILE}</legend>
|
||||
<!-- EVENT acp_users_profile_before -->
|
||||
<dl>
|
||||
<dt><label for="jabber">{L_UCP_JABBER}{L_COLON}</label></dt>
|
||||
<dd><input type="email" id="jabber" name="jabber" value="{JABBER}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="birthday">{L_BIRTHDAY}{L_COLON}</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
|
||||
<dd>{L_DAY}{L_COLON} <select id="birthday" name="bday_day">{S_BIRTHDAY_DAY_OPTIONS}</select> {L_MONTH}{L_COLON} <select name="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select> {L_YEAR}{L_COLON} <select name="bday_year">{S_BIRTHDAY_YEAR_OPTIONS}</select></dd>
|
||||
|
|
|
@ -123,8 +123,8 @@ function parse_document(container)
|
|||
}
|
||||
|
||||
if ((text.length && text !== '-') || cell.children().length) {
|
||||
if (headers[column] != '') {
|
||||
cell.prepend('<dfn style="display: none;">' + headers[column] + '</dfn>');
|
||||
if (headers[column].length) {
|
||||
cell.prepend($("<dfn>").css('display', 'none').text(headers[column]));
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -145,7 +145,7 @@ function parse_document(container)
|
|||
*/
|
||||
container.find('table.responsive > tbody').each(function() {
|
||||
var items = $(this).children('tr');
|
||||
if (items.length == 0)
|
||||
if (!items.length)
|
||||
{
|
||||
$(this).parent('table:first').addClass('responsive-hide');
|
||||
}
|
||||
|
@ -159,7 +159,6 @@ function parse_document(container)
|
|||
if ($this.html() == ' ') {
|
||||
$this.addClass('responsive-hide');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
|
@ -175,7 +174,6 @@ function parse_document(container)
|
|||
$this.value = inputChars.slice(0, maxLength).join('');
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
|
@ -202,7 +200,7 @@ function parse_document(container)
|
|||
var width = $body.width(),
|
||||
height = $this.height();
|
||||
|
||||
if (arguments.length == 0 && (!responsive || width <= lastWidth) && height <= maxHeight) {
|
||||
if (!arguments.length && (!responsive || width <= lastWidth) && height <= maxHeight) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -277,5 +275,34 @@ function parse_document(container)
|
|||
$('.actions a:has(i.acp-icon)').mouseover(function () {
|
||||
$(this).css("text-decoration", "none");
|
||||
});
|
||||
|
||||
// Live update BBCode font icon preview
|
||||
const updateIconClass = (element, newClass) => {
|
||||
// Ignore invalid class names
|
||||
const faIconRegex = /^(?!-)(?!.*--)[a-z0-9-]+(?<!-)$/;
|
||||
if (!faIconRegex.test(newClass)) {
|
||||
return;
|
||||
}
|
||||
|
||||
element.classList.forEach(className => {
|
||||
if (className.startsWith('fa-') && className !== 'fa-fw') {
|
||||
element.classList.remove(className);
|
||||
}
|
||||
});
|
||||
|
||||
element.classList.add(`fa-${newClass}`);
|
||||
};
|
||||
|
||||
const pageIconFont = document.getElementById('bbcode_font_icon');
|
||||
|
||||
if (pageIconFont) {
|
||||
pageIconFont.addEventListener('keyup', function () {
|
||||
updateIconClass(this.nextElementSibling, this.value);
|
||||
});
|
||||
|
||||
pageIconFont.addEventListener('blur', function () {
|
||||
updateIconClass(this.nextElementSibling, this.value);
|
||||
});
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
|
|
|
@ -284,14 +284,20 @@ function submitPermissions() {
|
|||
if ($alertBoxLink) {
|
||||
// Remove forum_id[] from URL
|
||||
$alertBoxLink.attr('href', $alertBoxLink.attr('href').replace(/(&forum_id\[\]=[0-9]+)/g, ''));
|
||||
var previousPageForm = '<form action="' + $alertBoxLink.attr('href') + '" method="post">';
|
||||
$.each(forumIds, function (key, value) {
|
||||
previousPageForm += '<input type="text" name="forum_id[]" value="' + value + '" />';
|
||||
const $previousPageForm = $('<form>').attr({
|
||||
action: $alertBoxLink.attr('href'),
|
||||
method: 'post'
|
||||
});
|
||||
|
||||
$.each(forumIds, function (key, value) {
|
||||
$previousPageForm.append($('<input>').attr({
|
||||
type: 'text',
|
||||
name: 'forum_id[]',
|
||||
value: value
|
||||
}));
|
||||
});
|
||||
previousPageForm += '</form>';
|
||||
|
||||
$alertBoxLink.on('click', function (e) {
|
||||
var $previousPageForm = $(previousPageForm);
|
||||
$('body').append($previousPageForm);
|
||||
e.preventDefault();
|
||||
$previousPageForm.submit();
|
||||
|
@ -306,12 +312,19 @@ function submitPermissions() {
|
|||
setTimeout(function () {
|
||||
// Create forum to submit using POST. This will prevent
|
||||
// exceeding the maximum length of URLs
|
||||
var form = '<form action="' + res.REFRESH_DATA.url.replace(/(&forum_id\[\]=[0-9]+)/g, '') + '" method="post">';
|
||||
$.each(forumIds, function (key, value) {
|
||||
form += '<input type="text" name="forum_id[]" value="' + value + '" />';
|
||||
const $form = $('<form>').attr({
|
||||
action: res.REFRESH_DATA.url.replace(/(&forum_id\[\]=[0-9]+)/g, ''),
|
||||
method: 'post'
|
||||
});
|
||||
form += '</form>';
|
||||
$form = $(form);
|
||||
|
||||
$.each(forumIds, function (key, value) {
|
||||
$form.append($('<input>').attr({
|
||||
type: 'text',
|
||||
name: 'forum_id[]',
|
||||
value: value
|
||||
}));
|
||||
});
|
||||
|
||||
$('body').append($form);
|
||||
|
||||
// Hide the alert even if we refresh the page, in case the user
|
||||
|
|
|
@ -28,7 +28,9 @@
|
|||
"require": {
|
||||
"php": "^8.1",
|
||||
"ext-pdo": "*",
|
||||
"ext-zip": "*",
|
||||
"ext-zlib": "*",
|
||||
"ext-sodium": "*",
|
||||
"bantu/ini-get-wrapper": "~1.0",
|
||||
"carlos-mg89/oauth": "^0.8.15",
|
||||
"chita/topological_sort": "^3.0",
|
||||
|
@ -37,7 +39,7 @@
|
|||
"composer/package-versions-deprecated": "^1.11",
|
||||
"doctrine/dbal": "~3.3.6",
|
||||
"google/recaptcha": "~1.1",
|
||||
"guzzlehttp/guzzle": "~6.3",
|
||||
"guzzlehttp/guzzle": " ^7.0",
|
||||
"marc1706/fast-image-size": "^1.1",
|
||||
"minishlink/web-push": "^8.0",
|
||||
"s9e/text-formatter": "^2.0",
|
||||
|
|
707
phpBB/composer.lock
generated
707
phpBB/composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -20,3 +20,5 @@ parameters:
|
|||
- passwords.driver.bcrypt
|
||||
- passwords.driver.salted_md5
|
||||
- passwords.driver.phpass
|
||||
|
||||
packages.public_key: 'auJX0pGetfYatE7t/rX5hAkCLZv9s78TwKkLfR3YGuQ='
|
||||
|
|
|
@ -37,6 +37,7 @@ imports:
|
|||
- { resource: services_twig.yml }
|
||||
- { resource: services_twig_extensions.yml }
|
||||
- { resource: services_ucp.yml }
|
||||
- { resource: services_updater.yml }
|
||||
- { resource: services_user.yml }
|
||||
|
||||
- { resource: tables.yml }
|
||||
|
|
|
@ -284,20 +284,22 @@ services:
|
|||
console.command.thumbnail.delete:
|
||||
class: phpbb\console\command\thumbnail\delete
|
||||
arguments:
|
||||
- '@config'
|
||||
- '@user'
|
||||
- '@dbal.conn'
|
||||
- '%core.root_path%'
|
||||
- '@language'
|
||||
- '@storage.attachment'
|
||||
tags:
|
||||
- { name: console.command }
|
||||
|
||||
console.command.thumbnail.generate:
|
||||
class: phpbb\console\command\thumbnail\generate
|
||||
arguments:
|
||||
- '@config'
|
||||
- '@user'
|
||||
- '@dbal.conn'
|
||||
- '@cache'
|
||||
- '@language'
|
||||
- '@storage.attachment'
|
||||
- '@filesystem.temp'
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
tags:
|
||||
|
@ -307,6 +309,7 @@ services:
|
|||
class: phpbb\console\command\thumbnail\recreate
|
||||
arguments:
|
||||
- '@user'
|
||||
- '@language'
|
||||
tags:
|
||||
- { name: console.command }
|
||||
|
||||
|
|
|
@ -38,15 +38,6 @@ services:
|
|||
tags:
|
||||
- { name: messenger.method }
|
||||
|
||||
messenger.method.jabber:
|
||||
class: phpbb\messenger\method\jabber
|
||||
shared: false
|
||||
parent: messenger.method.base
|
||||
calls:
|
||||
- [init, []]
|
||||
tags:
|
||||
- { name: messenger.method }
|
||||
|
||||
messenger.queue:
|
||||
class: phpbb\messenger\queue
|
||||
shared: false
|
||||
|
|
|
@ -233,19 +233,6 @@ services:
|
|||
tags:
|
||||
- { name: notification.method }
|
||||
|
||||
notification.method.jabber:
|
||||
class: phpbb\notification\method\jabber
|
||||
shared: false
|
||||
arguments:
|
||||
- '@user_loader'
|
||||
- '@user'
|
||||
- '@config'
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
- '@messenger.method_collection'
|
||||
tags:
|
||||
- { name: notification.method }
|
||||
|
||||
notification.method.webpush:
|
||||
class: phpbb\notification\method\webpush
|
||||
shared: false
|
||||
|
|
|
@ -4,33 +4,27 @@ services:
|
|||
storage.attachment:
|
||||
class: phpbb\storage\storage
|
||||
arguments:
|
||||
- '@dbal.conn'
|
||||
- '@cache.driver'
|
||||
- '@storage.adapter.factory'
|
||||
- '@storage.file_tracker'
|
||||
- 'attachment'
|
||||
- '%tables.storage%'
|
||||
tags:
|
||||
- { name: storage }
|
||||
|
||||
storage.avatar:
|
||||
class: phpbb\storage\storage
|
||||
arguments:
|
||||
- '@dbal.conn'
|
||||
- '@cache.driver'
|
||||
- '@storage.adapter.factory'
|
||||
- '@storage.file_tracker'
|
||||
- 'avatar'
|
||||
- '%tables.storage%'
|
||||
tags:
|
||||
- { name: storage }
|
||||
|
||||
storage.backup:
|
||||
class: phpbb\storage\storage
|
||||
arguments:
|
||||
- '@dbal.conn'
|
||||
- '@cache.driver'
|
||||
- '@storage.adapter.factory'
|
||||
- '@storage.file_tracker'
|
||||
- 'backup'
|
||||
- '%tables.storage%'
|
||||
tags:
|
||||
- { name: storage }
|
||||
|
||||
|
@ -78,6 +72,7 @@ services:
|
|||
storage.provider.local:
|
||||
class: phpbb\storage\provider\local
|
||||
arguments:
|
||||
- '@language'
|
||||
tags:
|
||||
- { name: storage.provider }
|
||||
|
||||
|
@ -124,3 +119,11 @@ services:
|
|||
- '@storage.state_helper'
|
||||
- '@storage.provider_collection'
|
||||
- '@storage.adapter_collection'
|
||||
|
||||
storage.file_tracker:
|
||||
class: phpbb\storage\file_tracker
|
||||
arguments:
|
||||
- '@cache.driver'
|
||||
- '@dbal.conn'
|
||||
- '%tables.storage%'
|
||||
|
||||
|
|
14
phpBB/config/default/container/services_updater.yml
Normal file
14
phpBB/config/default/container/services_updater.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
services:
|
||||
updater.get_updates:
|
||||
class: phpbb\update\get_updates
|
||||
arguments:
|
||||
- '@filesystem'
|
||||
- '%packages.public_key%'
|
||||
- '%core.root_path%'
|
||||
|
||||
updater.controller:
|
||||
class: phpbb\update\controller
|
||||
arguments:
|
||||
- '@filesystem'
|
||||
- '@updater.get_updates'
|
||||
- '%core.root_path%'
|
|
@ -140,7 +140,6 @@ $u_permissions = array(
|
|||
'u_sendemail' => array(0, 1),
|
||||
'u_readpm' => array(0, 1),
|
||||
'u_sendpm' => array(0, 1),
|
||||
'u_sendim' => array(0, 1),
|
||||
'u_hideonline' => array(0, 1),
|
||||
'u_viewonline' => array(0, 1),
|
||||
'u_viewprofile' => array(0, 1),
|
||||
|
@ -247,7 +246,7 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
|
|||
{
|
||||
if (!isset($group_ids[$ug_id]))
|
||||
{
|
||||
$sql = 'SELECT group_id FROM ' . GROUPS_TABLE . "
|
||||
$sql = 'SELECT group_id FROM ' . GROUPS_TABLE . "
|
||||
WHERE group_name = '" . strtoupper($ug_id) . "'";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$id = (int) $db->sql_fetchfield('group_id', 0, $result);
|
||||
|
@ -340,7 +339,7 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
|
|||
case ACL_NO:
|
||||
if (isset($cur_auth[$forum][$auth_option_id]))
|
||||
{
|
||||
$sql_ary['delete'][] = "DELETE FROM $table
|
||||
$sql_ary['delete'][] = "DELETE FROM $table
|
||||
WHERE forum_id = $forum
|
||||
AND auth_option_id = $auth_option_id
|
||||
AND $id_field = $ug_id";
|
||||
|
@ -354,10 +353,10 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
|
|||
}
|
||||
else if ($cur_auth[$forum][$auth_option_id] != $setting)
|
||||
{
|
||||
$sql_ary['update'][] = "UPDATE " . $table . "
|
||||
SET auth_setting = $setting
|
||||
WHERE $id_field = $ug_id
|
||||
AND forum_id = $forum
|
||||
$sql_ary['update'][] = "UPDATE " . $table . "
|
||||
SET auth_setting = $setting
|
||||
WHERE $id_field = $ug_id
|
||||
AND forum_id = $forum
|
||||
AND auth_option_id = $auth_option_id";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,6 +50,8 @@
|
|||
<ol>
|
||||
<li><a href="#changelog">Changelog</a>
|
||||
<ul>
|
||||
<li><a href="#v3315rc1">Changes since 3.3.15-RC1</a></li>
|
||||
<li><a href="#v3314">Changes since 3.3.14</a></li>
|
||||
<li><a href="#v3314rc1">Changes since 3.3.14-RC1</a></li>
|
||||
<li><a href="#v3313">Changes since 3.3.13</a></li>
|
||||
<li><a href="#v3313rc1">Changes since 3.3.13-RC1</a></li>
|
||||
|
@ -173,6 +175,42 @@
|
|||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
<a name="v3315rc1"></a><h3>Changes since 3.3.15-RC1</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17480">PHPBB-17480</a>] - PHP fatal error in version check failure</li>
|
||||
</ul>
|
||||
<h4>Security Issue</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/SECURITY-283">SECURITY-283</a>] - Use jQuery to generate HTML from page data</li>
|
||||
</ul>
|
||||
|
||||
<a name="v3314"></a><h3>Changes since 3.3.14</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17227">PHPBB-17227</a>] - Member list sorting bug - repeating users on several pages</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17381">PHPBB-17381</a>] - 'topic_views' column overflow blocks access to the topic</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17417">PHPBB-17417</a>] - Day selection not visible when no results</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17422">PHPBB-17422</a>] - Ascending posts pagination</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17436">PHPBB-17436</a>] - PHP fatal error while converting from phpBB 2.0 with Attachment MOD</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17455">PHPBB-17455</a>] - PHP warning on MySQLi connection failure</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17463">PHPBB-17463</a>] - Extra & in unread posts search pagination </li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17468">PHPBB-17468</a>] - Reset password feature is not restricted to email</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17470">PHPBB-17470</a>] - Enable feeds setting not enforced</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17429">PHPBB-17429</a>] - Adding event before users have been added to a group</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17431">PHPBB-17431</a>] - Add more vars to memberlist event</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17433">PHPBB-17433</a>] - Unclear instructions in ACP, Server settings</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17443">PHPBB-17443</a>] - Various Guzzle client issues for version checks</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17446">PHPBB-17446</a>] - Add acp_account_activation_edit_add event</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17461">PHPBB-17461</a>] - Add php events for ACP main actions</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17467">PHPBB-17467</a>] - Add TLS v.1.3 support to email messenger connection</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17471">PHPBB-17471</a>] - Forum feed link in forumlist_body does not return the correct URL</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB-17478">PHPBB-17478</a>] - Add security policy to repository</li>
|
||||
</ul>
|
||||
|
||||
<a name="v3314rc1"></a><h3>Changes since 3.3.14-RC1</h3>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
|
|
|
@ -90,7 +90,6 @@ Smarty (c) 2001, 2002 by ispi of Lincoln, Inc, http://smarty.php.net/
|
|||
|
||||
GPL licensed:
|
||||
phpMyAdmin (c) 2001, 2003 phpMyAdmin Devel team, http://www.phpmyadmin.net/
|
||||
Jabber Class (c) 2006 Flyspray.org, http://www.flyspray.org/
|
||||
Chora (c) 2000-2006, The Horde Project. http://horde.org/chora/
|
||||
Horde Project (c) 2000-2006, The Horde Project. http://horde.org/
|
||||
jQuery (c) 2011, John Resig. http://jquery.com/
|
||||
|
|
|
@ -953,11 +953,19 @@ index_body_forumlist_body_after
|
|||
* Since: 3.1.1
|
||||
* Purpose: Add content after the forum list body on the index page
|
||||
|
||||
index_body_forumlist_body_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/index_body.html
|
||||
* Since: 4.0.0-a1
|
||||
* Purpose: Add content before the forum list body on the index page
|
||||
|
||||
index_body_markforums_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/index_body.html
|
||||
* Since: 3.1.0-RC2
|
||||
* Deprecated: 4.0.0-a1 Use index_body_forumlist_body_before instead
|
||||
* Purpose: Add content after the mark-read link above the forum list on Board index
|
||||
|
||||
index_body_markforums_before
|
||||
|
@ -965,6 +973,7 @@ index_body_markforums_before
|
|||
* Locations:
|
||||
+ styles/prosilver/template/index_body.html
|
||||
* Since: 3.1.0-RC2
|
||||
* Deprecated: 4.0.0-a1 Use index_body_forumlist_body_before instead
|
||||
* Purpose: Add content before the mark-read link above the forum list on Board index
|
||||
|
||||
index_body_stat_blocks_after
|
||||
|
@ -1737,29 +1746,33 @@ overall_header_body_before
|
|||
overall_header_breadcrumb_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/navbar_header.html
|
||||
+ styles/prosilver/template/breadcrumbs.html
|
||||
* Since: 3.1.0-a1
|
||||
* Changed: 4.0.0-a1 Moved to breadcrumbs.html
|
||||
* Purpose: Add links to the list of breadcrumbs in the header
|
||||
|
||||
overall_header_breadcrumb_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/navbar_header.html
|
||||
+ styles/prosilver/template/breadcrumbs.html
|
||||
* Since: 3.1.0-RC3
|
||||
* Changed: 4.0.0-a1 Moved to breadcrumbs.html
|
||||
* Purpose: Add links to the list of breadcrumbs in the header (after site-home, but before board-index)
|
||||
|
||||
overall_header_breadcrumbs_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/navbar_header.html
|
||||
+ styles/prosilver/template/breadcrumbs.html
|
||||
* Since: 3.1.0-RC3
|
||||
* Changed: 4.0.0-a1 Moved to breadcrumbs.html
|
||||
* Purpose: Add content after the breadcrumbs (outside of the breadcrumbs container)
|
||||
|
||||
overall_header_breadcrumbs_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/navbar_header.html
|
||||
+ styles/prosilver/template/breadcrumbs.html
|
||||
* Since: 3.1.0-RC3
|
||||
* Changed: 4.0.0-a1 Moved to breadcrumbs.html
|
||||
* Purpose: Add content before the breadcrumbs (outside of the breadcrumbs container)
|
||||
|
||||
overall_header_content_before
|
||||
|
@ -1821,15 +1834,17 @@ overall_header_navigation_prepend
|
|||
overall_header_navlink_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/navbar_header.html
|
||||
+ styles/prosilver/template/breadcrumbs.html
|
||||
* Since: 3.1.0-b3
|
||||
* Changed: 4.0.0-a1 Moved to breadcrumbs.html
|
||||
* Purpose: Add content after each individual navlink (breadcrumb)
|
||||
|
||||
overall_header_navlink_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/navbar_header.html
|
||||
+ styles/prosilver/template/breadcrumbs.html
|
||||
* Since: 3.1.0-b3
|
||||
* Changed: 4.0.0-a1 Moved to breadcrumbs.html
|
||||
* Purpose: Add content before each individual navlink (breadcrumb)
|
||||
|
||||
overall_header_page_body_before
|
||||
|
|
|
@ -1079,7 +1079,7 @@ class acp_attachments
|
|||
$attachments_per_page = (int) $config['topics_per_page'];
|
||||
|
||||
// Get total number or orphans older than 3 hours
|
||||
$sql = 'SELECT COUNT(attach_id) as num_files, SUM(filesize) as total_size
|
||||
$sql = 'SELECT COUNT(attach_id) as num_files, SUM(' . $this->db->cast_expr_to_bigint('filesize') . ') as total_size
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE is_orphan = 1
|
||||
AND filetime < ' . (time() - 3*60*60);
|
||||
|
|
|
@ -44,12 +44,12 @@ class acp_bbcodes
|
|||
switch ($action)
|
||||
{
|
||||
case 'add':
|
||||
$bbcode_match = $bbcode_tpl = $bbcode_helpline = '';
|
||||
$bbcode_match = $bbcode_tpl = $bbcode_helpline = $bbcode_font_icon = '';
|
||||
$display_on_posting = 0;
|
||||
break;
|
||||
|
||||
case 'edit':
|
||||
$sql = 'SELECT bbcode_match, bbcode_tpl, display_on_posting, bbcode_helpline
|
||||
$sql = 'SELECT bbcode_match, bbcode_tpl, display_on_posting, bbcode_helpline, bbcode_font_icon
|
||||
FROM ' . BBCODES_TABLE . '
|
||||
WHERE bbcode_id = ' . $bbcode_id;
|
||||
$result = $db->sql_query($sql);
|
||||
|
@ -65,6 +65,7 @@ class acp_bbcodes
|
|||
$bbcode_tpl = htmlspecialchars($row['bbcode_tpl'], ENT_COMPAT);
|
||||
$display_on_posting = $row['display_on_posting'];
|
||||
$bbcode_helpline = $row['bbcode_helpline'];
|
||||
$bbcode_font_icon = $row['bbcode_font_icon'];
|
||||
break;
|
||||
|
||||
case 'modify':
|
||||
|
@ -88,6 +89,7 @@ class acp_bbcodes
|
|||
$bbcode_match = $request->variable('bbcode_match', '');
|
||||
$bbcode_tpl = html_entity_decode($request->variable('bbcode_tpl', '', true), ENT_COMPAT);
|
||||
$bbcode_helpline = $request->variable('bbcode_helpline', '', true);
|
||||
$bbcode_font_icon = $request->variable('bbcode_font_icon', '');
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -101,12 +103,12 @@ class acp_bbcodes
|
|||
'S_EDIT_BBCODE' => true,
|
||||
'U_BACK' => $this->u_action,
|
||||
'U_ACTION' => $this->u_action . '&action=' . (($action == 'add') ? 'create' : 'modify') . (($bbcode_id) ? "&bbcode=$bbcode_id" : ''),
|
||||
|
||||
'L_BBCODE_USAGE_EXPLAIN'=> sprintf($user->lang['BBCODE_USAGE_EXPLAIN'], '<a href="#down">', '</a>'),
|
||||
'BBCODE_MATCH' => $bbcode_match,
|
||||
'BBCODE_TPL' => $bbcode_tpl,
|
||||
'BBCODE_HELPLINE' => $bbcode_helpline,
|
||||
'DISPLAY_ON_POSTING' => $display_on_posting,
|
||||
'L_BBCODE_USAGE_EXPLAIN' => sprintf($user->lang['BBCODE_USAGE_EXPLAIN'], '<a href="#down">', '</a>'),
|
||||
'BBCODE_MATCH' => $bbcode_match,
|
||||
'BBCODE_TPL' => $bbcode_tpl,
|
||||
'BBCODE_HELPLINE' => $bbcode_helpline,
|
||||
'BBCODE_FONT_ICON' => $bbcode_font_icon,
|
||||
'DISPLAY_ON_POSTING' => $display_on_posting,
|
||||
);
|
||||
|
||||
$bbcode_tokens = array('TEXT', 'SIMPLETEXT', 'INTTEXT', 'IDENTIFIER', 'NUMBER', 'EMAIL', 'URL', 'LOCAL_URL', 'RELATIVE_URL', 'COLOR');
|
||||
|
@ -157,9 +159,11 @@ class acp_bbcodes
|
|||
* @var string bbcode_match The bbcode usage string to match
|
||||
* @var string bbcode_tpl The bbcode HTML replacement string
|
||||
* @var string bbcode_helpline The bbcode help line string
|
||||
* @var string bbcode_font_icon The name of the Font Awesome BBCode icon
|
||||
* @var array hidden_fields Array of hidden fields for use when
|
||||
* submitting form when $warn_unsafe is true
|
||||
* @since 3.1.0-a3
|
||||
* @changed 4.0.0-a1 Added bbcode_font_icon
|
||||
*/
|
||||
$vars = array(
|
||||
'action',
|
||||
|
@ -169,6 +173,7 @@ class acp_bbcodes
|
|||
'bbcode_match',
|
||||
'bbcode_tpl',
|
||||
'bbcode_helpline',
|
||||
'bbcode_font_icon',
|
||||
'hidden_fields',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_bbcodes_modify_create', compact($vars)));
|
||||
|
@ -232,6 +237,16 @@ class acp_bbcodes
|
|||
trigger_error($user->lang['BBCODE_HELPLINE_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if (strlen($bbcode_font_icon) > 64)
|
||||
{
|
||||
trigger_error($user->lang['BBCODE_FONT_ICON_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if (!empty($bbcode_font_icon) && !preg_match('/^(?!-)(?!.*--)[a-z0-9-]+(?<!-)$/', $bbcode_font_icon))
|
||||
{
|
||||
trigger_error($user->lang['BBCODE_FONT_ICON_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace Emojis and other 4bit UTF-8 chars not allowed by MySQL to UCR/NCR.
|
||||
* Using their Numeric Character Reference's Hexadecimal notation.
|
||||
|
@ -244,6 +259,7 @@ class acp_bbcodes
|
|||
'bbcode_tpl' => $bbcode_tpl,
|
||||
'display_on_posting' => $display_on_posting,
|
||||
'bbcode_helpline' => $bbcode_helpline,
|
||||
'bbcode_font_icon' => $bbcode_font_icon,
|
||||
'first_pass_match' => $data['first_pass_match'],
|
||||
'first_pass_replace' => $data['first_pass_replace'],
|
||||
'second_pass_match' => $data['second_pass_match'],
|
||||
|
@ -328,6 +344,7 @@ class acp_bbcodes
|
|||
'bbcode_match' => $bbcode_match,
|
||||
'bbcode_tpl' => htmlspecialchars($bbcode_tpl, ENT_COMPAT),
|
||||
'bbcode_helpline' => $bbcode_helpline,
|
||||
'bbcode_font_icon' => $bbcode_font_icon,
|
||||
'display_on_posting' => $display_on_posting,
|
||||
)))
|
||||
, 'confirm_bbcode.html');
|
||||
|
|
|
@ -162,12 +162,7 @@ class acp_database
|
|||
throw new \phpbb\exception\runtime_exception('CANNOT_OPEN_FILE');
|
||||
}
|
||||
|
||||
$storage->write_stream($file, $fp);
|
||||
|
||||
if (is_resource($fp))
|
||||
{
|
||||
fclose($fp);
|
||||
}
|
||||
$storage->write($file, $fp);
|
||||
|
||||
// Remove file from tmp
|
||||
@unlink($temp_dir . '/' . $file);
|
||||
|
@ -279,7 +274,7 @@ class acp_database
|
|||
|
||||
try
|
||||
{
|
||||
$stream = $storage->read_stream($backup_info['file_name']);
|
||||
$stream = $storage->read($backup_info['file_name']);
|
||||
$fp = fopen($temp_file_name, 'w+b');
|
||||
|
||||
stream_copy_to_stream($stream, $fp);
|
||||
|
|
|
@ -76,13 +76,13 @@ class acp_email
|
|||
{
|
||||
// If giving usernames the admin is able to email inactive users too...
|
||||
$sql_ary = array(
|
||||
'SELECT' => 'user_id, username, user_email, user_jabber, user_notify_type, user_lang',
|
||||
'SELECT' => 'user_id, username, user_email, user_lang',
|
||||
'FROM' => array(
|
||||
USERS_TABLE => '',
|
||||
),
|
||||
'WHERE' => $db->sql_in_set('username_clean', array_map('utf8_clean_string', $usernames)) . '
|
||||
AND user_allow_massemail = 1',
|
||||
'ORDER_BY' => 'user_lang, user_notify_type',
|
||||
'ORDER_BY' => 'user_lang',
|
||||
);
|
||||
}
|
||||
else
|
||||
|
@ -90,7 +90,7 @@ class acp_email
|
|||
if ($group_id)
|
||||
{
|
||||
$sql_ary = array(
|
||||
'SELECT' => 'u.user_id, u.user_email, u.username, u.username_clean, u.user_lang, u.user_jabber, u.user_notify_type',
|
||||
'SELECT' => 'u.user_id, u.user_email, u.username, u.username_clean, u.user_lang',
|
||||
'FROM' => array(
|
||||
USERS_TABLE => 'u',
|
||||
USER_GROUP_TABLE => 'ug',
|
||||
|
@ -100,19 +100,19 @@ class acp_email
|
|||
AND u.user_id = ug.user_id
|
||||
AND u.user_allow_massemail = 1
|
||||
AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')',
|
||||
'ORDER_BY' => 'u.user_lang, u.user_notify_type',
|
||||
'ORDER_BY' => 'u.user_lang',
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql_ary = array(
|
||||
'SELECT' => 'u.user_id, u.username, u.username_clean, u.user_email, u.user_jabber, u.user_lang, u.user_notify_type',
|
||||
'SELECT' => 'u.user_id, u.username, u.username_clean, u.user_email, u.user_lang',
|
||||
'FROM' => array(
|
||||
USERS_TABLE => 'u',
|
||||
),
|
||||
'WHERE' => 'u.user_allow_massemail = 1
|
||||
AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')',
|
||||
'ORDER_BY' => 'u.user_lang, u.user_notify_type',
|
||||
'ORDER_BY' => 'u.user_lang',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -154,15 +154,12 @@ class acp_email
|
|||
$max_chunk_size = (int) $config['email_max_chunk_size'];
|
||||
$email_list = array();
|
||||
$old_lang = $rows[0]['user_lang'];
|
||||
$old_notify_type = $rows[0]['user_notify_type'];
|
||||
|
||||
foreach ($rows as $row)
|
||||
{
|
||||
if (($row['user_notify_type'] == messenger_interface::NOTIFY_EMAIL && $row['user_email']) ||
|
||||
($row['user_notify_type'] == messenger_interface::NOTIFY_IM && $row['user_jabber']) ||
|
||||
($row['user_notify_type'] == messenger_interface::NOTIFY_BOTH && ($row['user_email'] || $row['user_jabber'])))
|
||||
if ($row['user_email'])
|
||||
{
|
||||
if ($i == $max_chunk_size || $row['user_lang'] != $old_lang || $row['user_notify_type'] != $old_notify_type)
|
||||
if ($i == $max_chunk_size || $row['user_lang'] != $old_lang)
|
||||
{
|
||||
$i = 0;
|
||||
|
||||
|
@ -172,14 +169,11 @@ class acp_email
|
|||
}
|
||||
|
||||
$old_lang = $row['user_lang'];
|
||||
$old_notify_type = $row['user_notify_type'];
|
||||
}
|
||||
|
||||
$email_list[$j][$i]['lang'] = $row['user_lang'];
|
||||
$email_list[$j][$i]['method'] = $row['user_notify_type'];
|
||||
$email_list[$j][$i]['email'] = $row['user_email'];
|
||||
$email_list[$j][$i]['name'] = $row['username'];
|
||||
$email_list[$j][$i]['jabber'] = $row['user_jabber'];
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
@ -219,65 +213,41 @@ class acp_email
|
|||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_email_send_before', compact($vars)));
|
||||
|
||||
/** @var \phpbb\di\service_collection */
|
||||
$messenger = $phpbb_container->get('messenger.method_collection');
|
||||
$messenger_collection_iterator = $messenger->getIterator();
|
||||
/** @var \phpbb\di\service_collection $messenger_collection */
|
||||
$messenger_collection = $phpbb_container->get('messenger.method_collection');
|
||||
/** @var \phpbb\messenger\method\messenger_interface $messenger_method */
|
||||
$messenger_method = $messenger_collection->offsetGet('messenger.method.email');
|
||||
|
||||
for ($i = 0, $size = count($email_list); $i < $size; $i++)
|
||||
{
|
||||
$used_lang = $email_list[$i][0]['lang'];
|
||||
$used_method = $email_list[$i][0]['method'];
|
||||
|
||||
foreach ($messenger_collection_iterator as $messenger_method)
|
||||
$messenger_method->set_use_queue($use_queue);
|
||||
$messenger_method->template($email_template, $used_lang);
|
||||
$messenger_method->subject(html_entity_decode($subject, ENT_COMPAT));
|
||||
$messenger_method->assign_vars($template_data);
|
||||
|
||||
for ($j = 0, $list_size = count($email_list[$i]); $j < $list_size; $j++)
|
||||
{
|
||||
$notify_method = $messenger_method->get_id();
|
||||
if ($notify_method == $used_method || $used_method == messenger_interface::NOTIFY_BOTH)
|
||||
$email_row = $email_list[$i][$j];
|
||||
if (count($email_list[$i]) == 1)
|
||||
{
|
||||
$messenger_method->set_use_queue($use_queue);
|
||||
$messenger_method->template($email_template, $used_lang);
|
||||
$messenger_method->subject(html_entity_decode($subject, ENT_COMPAT));
|
||||
$messenger_method->assign_vars($template_data);
|
||||
|
||||
if ($notify_method == messenger_interface::NOTIFY_EMAIL)
|
||||
{
|
||||
for ($j = 0, $list_size = count($email_list[$i]); $j < $list_size; $j++)
|
||||
{
|
||||
$email_row = $email_list[$i][$j];
|
||||
if (count($email_list[$i]) == 1)
|
||||
{
|
||||
$messenger_method->to($email_row['email'], $email_row['name']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$messenger_method->bcc($email_row['email'], $email_row['name']);
|
||||
}
|
||||
}
|
||||
|
||||
$messenger_method->anti_abuse_headers($config, $user);
|
||||
$messenger_method->set_mail_priority($priority);
|
||||
}
|
||||
else if ($notify_method == messenger_interface::NOTIFY_IM)
|
||||
{
|
||||
for ($j = 0, $list_size = count($email_list[$i]); $j < $list_size; $j++)
|
||||
{
|
||||
$email_row = $email_list[$i][$j];
|
||||
$messenger_method->to($email_row['jabber'], $email_row['name']);
|
||||
}
|
||||
}
|
||||
|
||||
$errored = !$messenger_method->send() || $errored;
|
||||
$messenger_method->to($email_row['email'], $email_row['name']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$messenger_method->bcc($email_row['email'], $email_row['name']);
|
||||
}
|
||||
}
|
||||
|
||||
$messenger_method->anti_abuse_headers($config, $user);
|
||||
$messenger_method->set_mail_priority($priority);
|
||||
|
||||
$errored = !$messenger_method->send() || $errored;
|
||||
$messenger_method->save_queue();
|
||||
}
|
||||
unset($email_list);
|
||||
|
||||
if ($use_queue)
|
||||
{
|
||||
foreach ($messenger_collection_iterator as $messenger_method)
|
||||
{
|
||||
$messenger_method->save_queue();
|
||||
}
|
||||
}
|
||||
|
||||
if ($generate_log_entry)
|
||||
{
|
||||
if (!empty($usernames))
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
*/
|
||||
|
||||
use phpbb\exception\exception_interface;
|
||||
use phpbb\exception\runtime_exception;
|
||||
use phpbb\exception\version_check_exception;
|
||||
|
||||
/**
|
||||
|
@ -388,7 +389,7 @@ class acp_extensions
|
|||
|
||||
$this->template->assign_block_vars('updates_available', $updates_available);
|
||||
}
|
||||
catch (exception_interface $e)
|
||||
catch (runtime_exception $e)
|
||||
{
|
||||
$message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
|
||||
|
||||
|
@ -797,7 +798,7 @@ class acp_extensions
|
|||
$enabled_extension_meta_data[$name]['S_VERSIONCHECK'] = true;
|
||||
$enabled_extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = $this->u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($md_manager->get_metadata('name'));
|
||||
}
|
||||
catch (exception_interface $e)
|
||||
catch (runtime_exception $e)
|
||||
{
|
||||
// Ignore exceptions due to the version check
|
||||
}
|
||||
|
@ -807,7 +808,7 @@ class acp_extensions
|
|||
$enabled_extension_meta_data[$name]['S_VERSIONCHECK'] = false;
|
||||
}
|
||||
}
|
||||
catch (exception_interface $e)
|
||||
catch (runtime_exception $e)
|
||||
{
|
||||
$message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
|
||||
$this->template->assign_block_vars('disabled', array(
|
||||
|
@ -887,7 +888,7 @@ class acp_extensions
|
|||
{
|
||||
$disabled_extension_meta_data[$name]['S_VERSIONCHECK'] = false;
|
||||
}
|
||||
catch (exception_interface $e)
|
||||
catch (runtime_exception $e)
|
||||
{
|
||||
$message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
|
||||
$this->template->assign_block_vars('disabled', array(
|
||||
|
@ -969,7 +970,7 @@ class acp_extensions
|
|||
{
|
||||
$available_extension_meta_data[$name]['S_VERSIONCHECK'] = false;
|
||||
}
|
||||
catch (exception_interface $e)
|
||||
catch (runtime_exception $e)
|
||||
{
|
||||
$message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
|
||||
$this->template->assign_block_vars('not_installed', array(
|
||||
|
|
|
@ -2048,7 +2048,7 @@ class acp_forums
|
|||
|
||||
$config->set('num_files', (int) $row['stat'], false);
|
||||
|
||||
$sql = 'SELECT SUM(filesize) as stat
|
||||
$sql = 'SELECT SUM(' . $db->cast_expr_to_bigint('filesize') . ') as stat
|
||||
FROM ' . ATTACHMENTS_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
|
|
|
@ -185,7 +185,7 @@ class acp_inactive
|
|||
trigger_error($user->lang['EMAIL_DISABLED'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type, user_regdate, user_actkey
|
||||
$sql = 'SELECT user_id, username, user_email, user_lang, user_regdate, user_actkey
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('user_id', $mark) . '
|
||||
AND user_inactive_reason';
|
||||
|
@ -194,9 +194,10 @@ class acp_inactive
|
|||
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
/** @var \phpbb\di\service_collection */
|
||||
$messenger = $phpbb_container->get('messenger.method_collection');
|
||||
$messenger_collection_iterator = $messenger->getIterator();
|
||||
/** @var \phpbb\di\service_collection $messenger_collection */
|
||||
$messenger_collection = $phpbb_container->get('messenger.method_collection');
|
||||
/** @var \phpbb\messenger\method\messenger_interface $messenger_method */
|
||||
$messenger_method = $messenger_collection->offsetGet('messenger.method.email');
|
||||
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
|
@ -205,33 +206,23 @@ class acp_inactive
|
|||
|
||||
do
|
||||
{
|
||||
foreach ($messenger_collection_iterator as $messenger_method)
|
||||
{
|
||||
if ($messenger_method->get_id() == $user_row['user_notify_type'] || $user_row['user_notify_type'] == $messenger_method::NOTIFY_BOTH)
|
||||
{
|
||||
$messenger_method->template('user_remind_inactive', $row['user_lang']);
|
||||
$messenger_method->set_addresses($row);
|
||||
$messenger_method->anti_abuse_headers($config, $user);
|
||||
$messenger_method->assign_vars([
|
||||
'USERNAME' => html_entity_decode($row['username'], ENT_COMPAT),
|
||||
'REGISTER_DATE' => $user->format_date($row['user_regdate'], false, true),
|
||||
'U_ACTIVATE' => generate_board_url() . "/ucp.$phpEx?mode=activate&u=" . $row['user_id'] . '&k=' . $row['user_actkey'],
|
||||
]);
|
||||
$messenger_method->template('user_remind_inactive', $row['user_lang']);
|
||||
$messenger_method->set_addresses($row);
|
||||
$messenger_method->anti_abuse_headers($config, $user);
|
||||
$messenger_method->assign_vars([
|
||||
'USERNAME' => html_entity_decode($row['username'], ENT_COMPAT),
|
||||
'REGISTER_DATE' => $user->format_date($row['user_regdate'], false, true),
|
||||
'U_ACTIVATE' => generate_board_url() . "/ucp.$phpEx?mode=activate&u=" . $row['user_id'] . '&k=' . $row['user_actkey'],
|
||||
]);
|
||||
|
||||
$messenger_method->send();
|
||||
}
|
||||
}
|
||||
$messenger_method->send();
|
||||
$messenger_method->save_queue();
|
||||
|
||||
$usernames[] = $row['username'];
|
||||
$user_ids[] = (int) $row['user_id'];
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
|
||||
foreach ($messenger_collection_iterator as $messenger_method)
|
||||
{
|
||||
$messenger_method->save_queue();
|
||||
}
|
||||
|
||||
// Add the remind state to the database and increase activation expiration by one day
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_reminded = user_reminded + 1,
|
||||
|
|
|
@ -1,139 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @todo Check/enter/update transport info
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
class acp_jabber
|
||||
{
|
||||
var $u_action;
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $template, $phpbb_log, $request;
|
||||
global $config, $phpbb_container, $phpbb_root_path, $phpEx;
|
||||
|
||||
$jabber = $phpbb_container->get('messenger.method.jabber');
|
||||
|
||||
$user->add_lang('acp/board');
|
||||
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
|
||||
if ($mode != 'settings')
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$this->tpl_name = 'acp_jabber';
|
||||
$this->page_title = 'ACP_JABBER_SETTINGS';
|
||||
|
||||
$jab_enable = $request->variable('jab_enable', (bool) $config['jab_enable']);
|
||||
$jab_host = $request->variable('jab_host', (string) $config['jab_host']);
|
||||
$jab_port = $request->variable('jab_port', (int) $config['jab_port']);
|
||||
$jab_username = $request->variable('jab_username', (string) $config['jab_username']);
|
||||
$jab_password = $request->variable('jab_password', (string) $config['jab_password']);
|
||||
$jab_package_size = $request->variable('jab_package_size', (int) $config['jab_package_size']);
|
||||
$jab_use_ssl = $request->variable('jab_use_ssl', (bool) $config['jab_use_ssl']);
|
||||
$jab_verify_peer = $request->variable('jab_verify_peer', (bool) $config['jab_verify_peer']);
|
||||
$jab_verify_peer_name = $request->variable('jab_verify_peer_name', (bool) $config['jab_verify_peer_name']);
|
||||
$jab_allow_self_signed = $request->variable('jab_allow_self_signed', (bool) $config['jab_allow_self_signed']);
|
||||
|
||||
$form_name = 'acp_jabber';
|
||||
add_form_key($form_name);
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
if (!check_form_key($form_name))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$message = $user->lang['JAB_SETTINGS_CHANGED'];
|
||||
$log = 'JAB_SETTINGS_CHANGED';
|
||||
|
||||
// Is this feature enabled? Then try to establish a connection
|
||||
if ($jabber->is_enabled())
|
||||
{
|
||||
if (!$jabber->connect())
|
||||
{
|
||||
trigger_error($user->lang['ERR_JAB_CONNECT'] . '<br /><br />' . $jabber->get_log() . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
// We'll try to authorise using this account
|
||||
if (!$jabber->login())
|
||||
{
|
||||
trigger_error($user->lang['ERR_JAB_AUTH'] . '<br /><br />' . $jabber->get_log() . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$jabber->disconnect();
|
||||
}
|
||||
else
|
||||
{
|
||||
// This feature is disabled.
|
||||
// We update the user table to be sure all users that have IM as notify type are set to both as notify type
|
||||
// We set this to both because users still have their jabber address entered and may want to receive jabber notifications again once it is re-enabled.
|
||||
$sql_ary = array(
|
||||
'user_notify_type' => $jabber::NOTIFY_BOTH,
|
||||
);
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
WHERE user_notify_type = ' . $jabber::NOTIFY_IM;
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
$config->set('jab_enable', $jab_enable);
|
||||
$config->set('jab_host', $jab_host);
|
||||
$config->set('jab_port', $jab_port);
|
||||
$config->set('jab_username', $jab_username);
|
||||
if ($jab_password !== '********')
|
||||
{
|
||||
$config->set('jab_password', $jab_password);
|
||||
}
|
||||
$config->set('jab_package_size', $jab_package_size);
|
||||
$config->set('jab_use_ssl', $jab_use_ssl);
|
||||
$config->set('jab_verify_peer', $jab_verify_peer);
|
||||
$config->set('jab_verify_peer_name', $jab_verify_peer_name);
|
||||
$config->set('jab_allow_self_signed', $jab_allow_self_signed);
|
||||
|
||||
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_' . $log);
|
||||
trigger_error($message . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_ACTION' => $this->u_action,
|
||||
'JAB_ENABLE' => $jab_enable,
|
||||
'L_JAB_SERVER_EXPLAIN' => sprintf($user->lang['JAB_SERVER_EXPLAIN'], '<a href="http://www.jabber.org/">', '</a>'),
|
||||
'JAB_HOST' => $jab_host,
|
||||
'JAB_PORT' => ($jab_port) ? $jab_port : '',
|
||||
'JAB_USERNAME' => $jab_username,
|
||||
'JAB_PASSWORD' => $jab_password !== '' ? '********' : '',
|
||||
'JAB_PACKAGE_SIZE' => $jab_package_size,
|
||||
'JAB_USE_SSL' => $jab_use_ssl,
|
||||
'JAB_VERIFY_PEER' => $jab_verify_peer,
|
||||
'JAB_VERIFY_PEER_NAME' => $jab_verify_peer_name,
|
||||
'JAB_ALLOW_SELF_SIGNED' => $jab_allow_self_signed,
|
||||
'S_CAN_USE_SSL' => $jabber::can_use_ssl(),
|
||||
'S_GTALK_NOTE' => (!@function_exists('dns_get_record')) ? true : false,
|
||||
));
|
||||
}
|
||||
}
|
|
@ -107,6 +107,20 @@ class acp_main
|
|||
default:
|
||||
$confirm = true;
|
||||
$confirm_lang = 'CONFIRM_OPERATION';
|
||||
|
||||
/**
|
||||
* Event to add confirm box for custom ACP quick actions
|
||||
*
|
||||
* @event core.acp_main_add_actions_confirm
|
||||
* @var string id The module ID
|
||||
* @var string mode The module mode
|
||||
* @var string action Custom action type name
|
||||
* @var boolean confirm Do we display the confirm box to run the custom action
|
||||
* @var string confirm_lang Lang var name to display in confirm box
|
||||
* @since 3.3.15-RC1
|
||||
*/
|
||||
$vars = ['id', 'mode', 'action', 'confirm', 'confirm_lang'];
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_main_add_actions_confirm', compact($vars)));
|
||||
}
|
||||
|
||||
if ($confirm)
|
||||
|
@ -175,7 +189,7 @@ class acp_main
|
|||
$config->set('num_files', (int) $db->sql_fetchfield('stat'), false);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT SUM(filesize) as stat
|
||||
$sql = 'SELECT SUM(' . $db->cast_expr_to_bigint('filesize') . ') as stat
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE is_orphan = 0';
|
||||
$result = $db->sql_query($sql);
|
||||
|
@ -414,6 +428,19 @@ class acp_main
|
|||
trigger_error('PURGE_SESSIONS_SUCCESS');
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
/**
|
||||
* Event to add custom ACP quick actions
|
||||
*
|
||||
* @event core.acp_main_add_actions
|
||||
* @var string id The module ID
|
||||
* @var string mode The module mode
|
||||
* @var string action Custom action type name
|
||||
* @since 3.3.15-RC1
|
||||
*/
|
||||
$vars = ['id', 'mode', 'action'];
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_main_add_actions', compact($vars)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -449,7 +476,7 @@ class acp_main
|
|||
'UPGRADE_INSTRUCTIONS' => !empty($upgrades_available) ? $user->lang('UPGRADE_INSTRUCTIONS', $upgrades_available['current'], $upgrades_available['announcement']) : false,
|
||||
));
|
||||
}
|
||||
catch (\RuntimeException $e)
|
||||
catch (\phpbb\exception\runtime_exception $e)
|
||||
{
|
||||
$message = call_user_func_array(array($user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
|
||||
$template->assign_vars(array(
|
||||
|
@ -496,7 +523,7 @@ class acp_main
|
|||
$upload_dir_size = get_formatted_filesize($config['upload_dir_size']);
|
||||
|
||||
$storage_avatar = $phpbb_container->get('storage.avatar');
|
||||
$avatar_dir_size = get_formatted_filesize($storage_avatar->get_size());
|
||||
$avatar_dir_size = get_formatted_filesize($storage_avatar->total_size());
|
||||
|
||||
if ($posts_per_day > $total_posts)
|
||||
{
|
||||
|
|
|
@ -475,6 +475,41 @@ class acp_profile
|
|||
$cp->vars[$key] = $var;
|
||||
}
|
||||
|
||||
// step 3 - all arrays
|
||||
if ($action == 'edit')
|
||||
{
|
||||
// Get language entries
|
||||
$sql = 'SELECT *
|
||||
FROM ' . PROFILE_FIELDS_LANG_TABLE . '
|
||||
WHERE lang_id <> ' . $this->edit_lang_id . "
|
||||
AND field_id = $field_id
|
||||
ORDER BY option_id ASC";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$l_lang_options = [];
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$l_lang_options[$row['lang_id']][$row['option_id']] = $row['lang_value'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT lang_id, lang_name, lang_explain, lang_default_value
|
||||
FROM ' . PROFILE_LANG_TABLE . '
|
||||
WHERE lang_id <> ' . $this->edit_lang_id . "
|
||||
AND field_id = $field_id
|
||||
ORDER BY lang_id ASC";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$l_lang_name = $l_lang_explain = $l_lang_default_value = [];
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$l_lang_name[$row['lang_id']] = $row['lang_name'];
|
||||
$l_lang_explain[$row['lang_id']] = $row['lang_explain'];
|
||||
$l_lang_default_value[$row['lang_id']] = $row['lang_default_value'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
foreach ($exclude[3] as $key)
|
||||
{
|
||||
$cp->vars[$key] = $request->variable($key, array(0 => ''), true);
|
||||
|
|
|
@ -378,7 +378,6 @@ class acp_storage
|
|||
foreach ($this->storage_collection as $storage)
|
||||
{
|
||||
$storage_name = $storage->get_name();
|
||||
$options = $this->storage_helper->get_provider_options($this->storage_helper->get_current_provider($storage_name));
|
||||
|
||||
$modified = false;
|
||||
|
||||
|
@ -389,6 +388,8 @@ class acp_storage
|
|||
}
|
||||
else
|
||||
{
|
||||
$options = $this->storage_helper->get_provider_options($this->storage_helper->get_current_provider($storage_name));
|
||||
|
||||
// Check if options have been modified
|
||||
foreach (array_keys($options) as $definition)
|
||||
{
|
||||
|
@ -431,8 +432,8 @@ class acp_storage
|
|||
|
||||
$storage_stats[] = [
|
||||
'name' => $this->lang->lang('STORAGE_' . strtoupper($storage->get_name()) . '_TITLE'),
|
||||
'files' => $storage->get_num_files(),
|
||||
'size' => get_formatted_filesize($storage->get_size()),
|
||||
'files' => $storage->total_files(),
|
||||
'size' => get_formatted_filesize($storage->total_size()),
|
||||
'free_space' => $free_space,
|
||||
];
|
||||
}
|
||||
|
@ -535,30 +536,29 @@ class acp_storage
|
|||
$this->validate_path($storage_name, $messages);
|
||||
|
||||
// Check options
|
||||
$new_options = $this->storage_helper->get_provider_options($this->request->variable([$storage_name, 'provider'], ''));
|
||||
$new_provider = $this->provider_collection->get_by_class($this->request->variable([$storage_name, 'provider'], ''));
|
||||
|
||||
foreach ($new_options as $definition_key => $definition_value)
|
||||
foreach ($new_provider->get_options() as $definition_key => $definition_value)
|
||||
{
|
||||
$provider = $this->provider_collection->get_by_class($this->request->variable([$storage_name, 'provider'], ''));
|
||||
$definition_title = $this->lang->lang('STORAGE_ADAPTER_' . strtoupper($provider->get_name()) . '_OPTION_' . strtoupper($definition_key));
|
||||
|
||||
$definition_title = $definition_value['title'];
|
||||
$value = $this->request->variable([$storage_name, $definition_key], '');
|
||||
|
||||
switch ($definition_value['tag'])
|
||||
switch ($definition_value['form_macro']['tag'])
|
||||
{
|
||||
case 'text':
|
||||
if ($definition_value['type'] == 'email' && filter_var($value, FILTER_VALIDATE_EMAIL))
|
||||
if ($definition_value['form_macro']['type'] === 'email' && filter_var($value, FILTER_VALIDATE_EMAIL))
|
||||
{
|
||||
$messages[] = $this->lang->lang('STORAGE_FORM_TYPE_EMAIL_INCORRECT_FORMAT', $definition_title, $storage_title);
|
||||
}
|
||||
|
||||
$maxlength = $definition_value['max'] ?? 255;
|
||||
$maxlength = $definition_value['form_macro']['max'] ?? 255;
|
||||
if (strlen($value) > $maxlength)
|
||||
{
|
||||
$messages[] = $this->lang->lang('STORAGE_FORM_TYPE_TEXT_TOO_LONG', $definition_title, $storage_title);
|
||||
}
|
||||
|
||||
if ($provider->get_name() == 'local' && $definition_key == 'path')
|
||||
if ($new_provider->get_name() === 'local' && $definition_key === 'path')
|
||||
{
|
||||
$path = $value;
|
||||
|
||||
|
@ -575,7 +575,7 @@ class acp_storage
|
|||
|
||||
case 'radio':
|
||||
$found = false;
|
||||
foreach ($definition_value['buttons'] as $button)
|
||||
foreach ($definition_value['form_macro']['buttons'] as $button)
|
||||
{
|
||||
if ($button['value'] == $value)
|
||||
{
|
||||
|
@ -592,7 +592,7 @@ class acp_storage
|
|||
|
||||
case 'select':
|
||||
$found = false;
|
||||
foreach ($definition_value['options'] as $option)
|
||||
foreach ($definition_value['form_macro']['options'] as $option)
|
||||
{
|
||||
if ($option['value'] == $value)
|
||||
{
|
||||
|
@ -619,10 +619,18 @@ class acp_storage
|
|||
*/
|
||||
protected function validate_path(string $storage_name, array &$messages) : void
|
||||
{
|
||||
$current_provider = $this->storage_helper->get_current_provider($storage_name);
|
||||
$options = $this->storage_helper->get_provider_options($current_provider);
|
||||
if ($this->request->is_set_post('submit'))
|
||||
{
|
||||
$provider = $this->request->variable([$storage_name, 'provider'], '');
|
||||
}
|
||||
else
|
||||
{
|
||||
$provider = $this->storage_helper->get_current_provider($storage_name);
|
||||
}
|
||||
|
||||
if ($this->provider_collection->get_by_class($current_provider)->get_name() == 'local' && isset($options['path']))
|
||||
$options = $this->storage_helper->get_provider_options($provider);
|
||||
|
||||
if ($this->provider_collection->get_by_class($provider)->get_name() === 'local' && isset($options['path']))
|
||||
{
|
||||
$path = $this->request->is_set_post('submit') ? $this->request->variable([$storage_name, 'path'], '') : $this->storage_helper->get_current_definition($storage_name, 'path');
|
||||
|
||||
|
|
|
@ -38,12 +38,32 @@ class acp_update
|
|||
try
|
||||
{
|
||||
$recheck = $request->variable('versioncheck_force', false);
|
||||
$do_update = $request->variable('do_update', false);
|
||||
|
||||
$updates_available = $version_helper->get_update_on_branch($recheck);
|
||||
$upgrades_available = $version_helper->get_suggested_updates();
|
||||
$branch = '';
|
||||
if (!empty($upgrades_available))
|
||||
{
|
||||
$branch = array_key_last($upgrades_available);
|
||||
$upgrades_available = array_pop($upgrades_available);
|
||||
}
|
||||
|
||||
if ($do_update && !empty($updates_available))
|
||||
{
|
||||
$updater = $phpbb_container->get('updater.controller');
|
||||
$current_version = $config['version'];
|
||||
$new_version = $upgrades_available['current'];
|
||||
$download_url = 'https://download.phpbb.com/pub/release/';
|
||||
$download_url .= $branch . '/' . $new_version . '/';
|
||||
$download_url .= 'phpBB-' . $current_version . '_to_' . $new_version . '.zip';
|
||||
$data = $updater->handle(
|
||||
$download_url
|
||||
);
|
||||
|
||||
$response = new \phpbb\json_response();
|
||||
$response->send($data);
|
||||
}
|
||||
}
|
||||
catch (\RuntimeException $e)
|
||||
{
|
||||
|
|
|
@ -1426,7 +1426,6 @@ class acp_users
|
|||
$user_row['iso_lang_id'] = $row['lang_id'];
|
||||
|
||||
$data = array(
|
||||
'jabber' => $request->variable('jabber', $user_row['user_jabber'], true),
|
||||
'bday_day' => 0,
|
||||
'bday_month' => 0,
|
||||
'bday_year' => 0,
|
||||
|
@ -1458,9 +1457,6 @@ class acp_users
|
|||
if ($submit)
|
||||
{
|
||||
$error = validate_data($data, array(
|
||||
'jabber' => array(
|
||||
array('string', true, 5, 255),
|
||||
array('jabber')),
|
||||
'bday_day' => array('num', true, 1, 31),
|
||||
'bday_month' => array('num', true, 1, 12),
|
||||
'bday_year' => array('num', true, 1901, gmdate('Y', time())),
|
||||
|
@ -1496,7 +1492,6 @@ class acp_users
|
|||
if (!count($error))
|
||||
{
|
||||
$sql_ary = array(
|
||||
'user_jabber' => $data['jabber'],
|
||||
'user_birthday' => $data['user_birthday'],
|
||||
);
|
||||
|
||||
|
@ -1553,7 +1548,6 @@ class acp_users
|
|||
unset($now);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'JABBER' => $data['jabber'],
|
||||
'S_BIRTHDAY_DAY_OPTIONS' => $s_birthday_day_options,
|
||||
'S_BIRTHDAY_MONTH_OPTIONS' => $s_birthday_month_options,
|
||||
'S_BIRTHDAY_YEAR_OPTIONS' => $s_birthday_year_options,
|
||||
|
@ -1583,7 +1577,6 @@ class acp_users
|
|||
'viewemail' => $request->variable('viewemail', $user_row['user_allow_viewemail']),
|
||||
'massemail' => $request->variable('massemail', $user_row['user_allow_massemail']),
|
||||
'hideonline' => $request->variable('hideonline', !$user_row['user_allow_viewonline']),
|
||||
'notifymethod' => $request->variable('notifymethod', $user_row['user_notify_type']),
|
||||
'notifypm' => $request->variable('notifypm', $user_row['user_notify_pm']),
|
||||
'allowpm' => $request->variable('allowpm', $user_row['user_allow_pm']),
|
||||
|
||||
|
@ -1654,7 +1647,6 @@ class acp_users
|
|||
'user_allow_viewemail' => $data['viewemail'],
|
||||
'user_allow_massemail' => $data['massemail'],
|
||||
'user_allow_viewonline' => !$data['hideonline'],
|
||||
'user_notify_type' => $data['notifymethod'],
|
||||
'user_notify_pm' => $data['notifypm'],
|
||||
|
||||
'user_dateformat' => $data['dateformat'],
|
||||
|
@ -1787,15 +1779,11 @@ class acp_users
|
|||
|
||||
$user_prefs_data = array(
|
||||
'S_PREFS' => true,
|
||||
'S_JABBER_DISABLED' => ($config['jab_enable'] && $user_row['user_jabber'] && @extension_loaded('xml')) ? false : true,
|
||||
|
||||
'VIEW_EMAIL' => $data['viewemail'],
|
||||
'MASS_EMAIL' => $data['massemail'],
|
||||
'ALLOW_PM' => $data['allowpm'],
|
||||
'HIDE_ONLINE' => $data['hideonline'],
|
||||
'NOTIFY_EMAIL' => ($data['notifymethod'] == messenger_interface::NOTIFY_EMAIL) ? true : false,
|
||||
'NOTIFY_IM' => ($data['notifymethod'] == messenger_interface::NOTIFY_IM) ? true : false,
|
||||
'NOTIFY_BOTH' => ($data['notifymethod'] == messenger_interface::NOTIFY_BOTH) ? true : false,
|
||||
'NOTIFY_PM' => $data['notifypm'],
|
||||
'BBCODE' => $data['bbcode'],
|
||||
'SMILIES' => $data['smilies'],
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
class acp_jabber_info
|
||||
{
|
||||
function module()
|
||||
{
|
||||
return array(
|
||||
'filename' => 'acp_jabber',
|
||||
'title' => 'ACP_JABBER_SETTINGS',
|
||||
'modes' => array(
|
||||
'settings' => array('title' => 'ACP_JABBER_SETTINGS', 'auth' => 'acl_a_jabber', 'cat' => array('ACP_CLIENT_COMMUNICATION')),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
function install()
|
||||
{
|
||||
}
|
||||
|
||||
function uninstall()
|
||||
{
|
||||
}
|
||||
}
|
|
@ -119,14 +119,6 @@ define('POST_STICKY', 1);
|
|||
define('POST_ANNOUNCE', 2);
|
||||
define('POST_GLOBAL', 3);
|
||||
|
||||
// Notify methods
|
||||
/** @deprecated 4.0.0-a1 Replaced by \phpbb\messenger\method\messenger_interface::NOTIFY_EMAIL, to be removed in 5.0.0-a1 */
|
||||
define('NOTIFY_EMAIL', 0);
|
||||
/** @deprecated 4.0.0-a1 Replaced by \phpbb\messenger\method\messenger_interface::NOTIFY_IM, to be removed in 5.0.0-a1 */
|
||||
define('NOTIFY_IM', 1);
|
||||
/** @deprecated 4.0.0-a1 Replaced by \phpbb\messenger\method\messenger_interface::NOTIFY_BOTH, to be removed in 5.0.0-a1 */
|
||||
define('NOTIFY_BOTH', 2);
|
||||
|
||||
// Notify status
|
||||
define('NOTIFY_YES', 0);
|
||||
define('NOTIFY_NO', 1);
|
||||
|
|
|
@ -130,7 +130,7 @@ function phpbb_gmgetdate($time = false)
|
|||
*
|
||||
* @return array|string data array if $string_only is false
|
||||
*/
|
||||
function get_formatted_filesize($value, bool $string_only = true, array $allowed_units = null)
|
||||
function get_formatted_filesize($value, bool $string_only = true, array|null $allowed_units = null)
|
||||
{
|
||||
global $user;
|
||||
|
||||
|
@ -253,7 +253,7 @@ function still_on_time($extra_time = 15)
|
|||
* @return mixed Boolean (true, false) if comparison operator is specified.
|
||||
* Integer (-1, 0, 1) otherwise.
|
||||
*/
|
||||
function phpbb_version_compare(string $version1, string $version2, string $operator = null)
|
||||
function phpbb_version_compare(string $version1, string $version2, string|null $operator = null)
|
||||
{
|
||||
$version1 = strtolower($version1);
|
||||
$version2 = strtolower($version2);
|
||||
|
@ -3806,6 +3806,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
|
|||
$template->assign_vars(array(
|
||||
'SITENAME' => $config['sitename'],
|
||||
'SITE_DESCRIPTION' => $config['site_desc'],
|
||||
'SITE_SHORTNAME' => (!empty($config['sitename_short'])) ? $config['sitename_short'] : utf8_substr($config['sitename'], 0, 12),
|
||||
'PAGE_TITLE' => $page_title,
|
||||
'SCRIPT_NAME' => str_replace('.' . $phpEx, '', $user->page['page_name']),
|
||||
'LAST_VISIT_DATE' => sprintf($user->lang['YOU_LAST_VISIT'], $s_last_visit),
|
||||
|
|
|
@ -215,7 +215,7 @@ function adm_back_link($u_action)
|
|||
*
|
||||
* @return array
|
||||
*/
|
||||
function build_select(array $options_ary, int|string|bool $option_default = false): array
|
||||
function build_select(array $options_ary, bool|int|string $option_default = false): array
|
||||
{
|
||||
global $language;
|
||||
|
||||
|
|
|
@ -1845,7 +1845,7 @@ function update_dynamic_config()
|
|||
$config->set('num_files', (int) $db->sql_fetchfield('stat'), false);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT SUM(filesize) as stat
|
||||
$sql = 'SELECT SUM(' . $db->cast_expr_to_bigint('filesize') . ') as stat
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE is_orphan = 0';
|
||||
$result = $db->sql_query($sql);
|
||||
|
|
|
@ -1081,7 +1081,7 @@ function display_custom_bbcodes()
|
|||
$num_predefined_bbcodes = NUM_PREDEFINED_BBCODES;
|
||||
|
||||
$sql_ary = [
|
||||
'SELECT' => 'b.bbcode_id, b.bbcode_tag, b.bbcode_helpline, b.bbcode_match',
|
||||
'SELECT' => 'b.bbcode_id, b.bbcode_tag, b.bbcode_helpline, b.bbcode_font_icon, b.bbcode_match',
|
||||
'FROM' => [BBCODES_TABLE => 'b'],
|
||||
'WHERE' => 'b.display_on_posting = 1',
|
||||
'ORDER_BY' => 'b.bbcode_tag',
|
||||
|
@ -1124,6 +1124,7 @@ function display_custom_bbcodes()
|
|||
'BBCODE_TAG' => $row['bbcode_tag'],
|
||||
'BBCODE_TAG_CLEAN' => str_replace('=', '-', $row['bbcode_tag']),
|
||||
'BBCODE_HELPLINE' => $row['bbcode_helpline'],
|
||||
'BBCODE_FONT_ICON' => $row['bbcode_font_icon'],
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -1680,7 +1681,6 @@ function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabl
|
|||
'S_ONLINE' => ($config['load_onlinetrack'] && $online) ? true : false,
|
||||
'RANK_IMG' => $user_rank_data['img'],
|
||||
'RANK_IMG_SRC' => $user_rank_data['img_src'],
|
||||
'S_JABBER_ENABLED' => ($config['jab_enable']) ? true : false,
|
||||
|
||||
'S_WARNINGS' => ($auth->acl_getf_global('m_') || $auth->acl_get('m_warn')) ? true : false,
|
||||
|
||||
|
@ -1689,10 +1689,6 @@ function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabl
|
|||
'U_WARN' => ($warn_user_enabled && $auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $user_id) : '',
|
||||
'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && $can_receive_pm) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $user_id) : '',
|
||||
'U_EMAIL' => $email,
|
||||
'U_JABBER' => ($data['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=jabber&u=' . $user_id) : '',
|
||||
|
||||
'USER_JABBER' => ($config['jab_enable'] && $auth->acl_get('u_sendim')) ? $data['user_jabber'] : '',
|
||||
'USER_JABBER_IMG' => ($config['jab_enable'] && $auth->acl_get('u_sendim') && $data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '',
|
||||
|
||||
'L_SEND_EMAIL_USER' => $user->lang('SEND_EMAIL_USER', $username),
|
||||
'L_CONTACT_USER' => $user->lang('CONTACT_USER', $username),
|
||||
|
|
|
@ -2381,7 +2381,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
|
|||
VALUES (' . $user->data['user_id'] . ', ' . $data_ary['topic_id'] . ')';
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
else if (($config['email_enable'] || $config['jab_enable']) && $data_ary['notify_set'] && !$data_ary['notify'])
|
||||
else if ($config['email_enable'] && $data_ary['notify_set'] && !$data_ary['notify'])
|
||||
{
|
||||
$sql = 'DELETE FROM ' . TOPICS_WATCH_TABLE . '
|
||||
WHERE user_id = ' . $user->data['user_id'] . '
|
||||
|
|
|
@ -246,7 +246,6 @@ function user_add($user_row, $cp_data = false, $notifications_data = null)
|
|||
|
||||
'user_notify' => 0,
|
||||
'user_notify_pm' => 1,
|
||||
'user_notify_type' => messenger_interface::NOTIFY_EMAIL,
|
||||
'user_allow_pm' => 1,
|
||||
'user_allow_viewonline' => 1,
|
||||
'user_allow_viewemail' => 1,
|
||||
|
@ -1514,208 +1513,6 @@ function validate_user_email($email, $allowed_email = false)
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate jabber address
|
||||
* Taken from the jabber class within flyspray (see author notes)
|
||||
*
|
||||
* @author flyspray.org
|
||||
*/
|
||||
function validate_jabber($jid)
|
||||
{
|
||||
if (!$jid)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$separator_pos = strpos($jid, '@');
|
||||
|
||||
if ($separator_pos === false)
|
||||
{
|
||||
return 'WRONG_DATA';
|
||||
}
|
||||
|
||||
$username = substr($jid, 0, $separator_pos);
|
||||
$realm = substr($jid, $separator_pos + 1);
|
||||
|
||||
if (strlen($username) == 0 || strlen($realm) < 3)
|
||||
{
|
||||
return 'WRONG_DATA';
|
||||
}
|
||||
|
||||
$arr = explode('.', $realm);
|
||||
|
||||
if (count($arr) == 0)
|
||||
{
|
||||
return 'WRONG_DATA';
|
||||
}
|
||||
|
||||
foreach ($arr as $part)
|
||||
{
|
||||
if (substr($part, 0, 1) == '-' || substr($part, -1, 1) == '-')
|
||||
{
|
||||
return 'WRONG_DATA';
|
||||
}
|
||||
|
||||
if (!preg_match("@^[a-zA-Z0-9-.]+$@", $part))
|
||||
{
|
||||
return 'WRONG_DATA';
|
||||
}
|
||||
}
|
||||
|
||||
$boundary = array(array(0, 127), array(192, 223), array(224, 239), array(240, 247), array(248, 251), array(252, 253));
|
||||
|
||||
// Prohibited Characters RFC3454 + RFC3920
|
||||
$prohibited = array(
|
||||
// Table C.1.1
|
||||
array(0x0020, 0x0020), // SPACE
|
||||
// Table C.1.2
|
||||
array(0x00A0, 0x00A0), // NO-BREAK SPACE
|
||||
array(0x1680, 0x1680), // OGHAM SPACE MARK
|
||||
array(0x2000, 0x2001), // EN QUAD
|
||||
array(0x2001, 0x2001), // EM QUAD
|
||||
array(0x2002, 0x2002), // EN SPACE
|
||||
array(0x2003, 0x2003), // EM SPACE
|
||||
array(0x2004, 0x2004), // THREE-PER-EM SPACE
|
||||
array(0x2005, 0x2005), // FOUR-PER-EM SPACE
|
||||
array(0x2006, 0x2006), // SIX-PER-EM SPACE
|
||||
array(0x2007, 0x2007), // FIGURE SPACE
|
||||
array(0x2008, 0x2008), // PUNCTUATION SPACE
|
||||
array(0x2009, 0x2009), // THIN SPACE
|
||||
array(0x200A, 0x200A), // HAIR SPACE
|
||||
array(0x200B, 0x200B), // ZERO WIDTH SPACE
|
||||
array(0x202F, 0x202F), // NARROW NO-BREAK SPACE
|
||||
array(0x205F, 0x205F), // MEDIUM MATHEMATICAL SPACE
|
||||
array(0x3000, 0x3000), // IDEOGRAPHIC SPACE
|
||||
// Table C.2.1
|
||||
array(0x0000, 0x001F), // [CONTROL CHARACTERS]
|
||||
array(0x007F, 0x007F), // DELETE
|
||||
// Table C.2.2
|
||||
array(0x0080, 0x009F), // [CONTROL CHARACTERS]
|
||||
array(0x06DD, 0x06DD), // ARABIC END OF AYAH
|
||||
array(0x070F, 0x070F), // SYRIAC ABBREVIATION MARK
|
||||
array(0x180E, 0x180E), // MONGOLIAN VOWEL SEPARATOR
|
||||
array(0x200C, 0x200C), // ZERO WIDTH NON-JOINER
|
||||
array(0x200D, 0x200D), // ZERO WIDTH JOINER
|
||||
array(0x2028, 0x2028), // LINE SEPARATOR
|
||||
array(0x2029, 0x2029), // PARAGRAPH SEPARATOR
|
||||
array(0x2060, 0x2060), // WORD JOINER
|
||||
array(0x2061, 0x2061), // FUNCTION APPLICATION
|
||||
array(0x2062, 0x2062), // INVISIBLE TIMES
|
||||
array(0x2063, 0x2063), // INVISIBLE SEPARATOR
|
||||
array(0x206A, 0x206F), // [CONTROL CHARACTERS]
|
||||
array(0xFEFF, 0xFEFF), // ZERO WIDTH NO-BREAK SPACE
|
||||
array(0xFFF9, 0xFFFC), // [CONTROL CHARACTERS]
|
||||
array(0x1D173, 0x1D17A), // [MUSICAL CONTROL CHARACTERS]
|
||||
// Table C.3
|
||||
array(0xE000, 0xF8FF), // [PRIVATE USE, PLANE 0]
|
||||
array(0xF0000, 0xFFFFD), // [PRIVATE USE, PLANE 15]
|
||||
array(0x100000, 0x10FFFD), // [PRIVATE USE, PLANE 16]
|
||||
// Table C.4
|
||||
array(0xFDD0, 0xFDEF), // [NONCHARACTER CODE POINTS]
|
||||
array(0xFFFE, 0xFFFF), // [NONCHARACTER CODE POINTS]
|
||||
array(0x1FFFE, 0x1FFFF), // [NONCHARACTER CODE POINTS]
|
||||
array(0x2FFFE, 0x2FFFF), // [NONCHARACTER CODE POINTS]
|
||||
array(0x3FFFE, 0x3FFFF), // [NONCHARACTER CODE POINTS]
|
||||
array(0x4FFFE, 0x4FFFF), // [NONCHARACTER CODE POINTS]
|
||||
array(0x5FFFE, 0x5FFFF), // [NONCHARACTER CODE POINTS]
|
||||
array(0x6FFFE, 0x6FFFF), // [NONCHARACTER CODE POINTS]
|
||||
array(0x7FFFE, 0x7FFFF), // [NONCHARACTER CODE POINTS]
|
||||
array(0x8FFFE, 0x8FFFF), // [NONCHARACTER CODE POINTS]
|
||||
array(0x9FFFE, 0x9FFFF), // [NONCHARACTER CODE POINTS]
|
||||
array(0xAFFFE, 0xAFFFF), // [NONCHARACTER CODE POINTS]
|
||||
array(0xBFFFE, 0xBFFFF), // [NONCHARACTER CODE POINTS]
|
||||
array(0xCFFFE, 0xCFFFF), // [NONCHARACTER CODE POINTS]
|
||||
array(0xDFFFE, 0xDFFFF), // [NONCHARACTER CODE POINTS]
|
||||
array(0xEFFFE, 0xEFFFF), // [NONCHARACTER CODE POINTS]
|
||||
array(0xFFFFE, 0xFFFFF), // [NONCHARACTER CODE POINTS]
|
||||
array(0x10FFFE, 0x10FFFF), // [NONCHARACTER CODE POINTS]
|
||||
// Table C.5
|
||||
array(0xD800, 0xDFFF), // [SURROGATE CODES]
|
||||
// Table C.6
|
||||
array(0xFFF9, 0xFFF9), // INTERLINEAR ANNOTATION ANCHOR
|
||||
array(0xFFFA, 0xFFFA), // INTERLINEAR ANNOTATION SEPARATOR
|
||||
array(0xFFFB, 0xFFFB), // INTERLINEAR ANNOTATION TERMINATOR
|
||||
array(0xFFFC, 0xFFFC), // OBJECT REPLACEMENT CHARACTER
|
||||
array(0xFFFD, 0xFFFD), // REPLACEMENT CHARACTER
|
||||
// Table C.7
|
||||
array(0x2FF0, 0x2FFB), // [IDEOGRAPHIC DESCRIPTION CHARACTERS]
|
||||
// Table C.8
|
||||
array(0x0340, 0x0340), // COMBINING GRAVE TONE MARK
|
||||
array(0x0341, 0x0341), // COMBINING ACUTE TONE MARK
|
||||
array(0x200E, 0x200E), // LEFT-TO-RIGHT MARK
|
||||
array(0x200F, 0x200F), // RIGHT-TO-LEFT MARK
|
||||
array(0x202A, 0x202A), // LEFT-TO-RIGHT EMBEDDING
|
||||
array(0x202B, 0x202B), // RIGHT-TO-LEFT EMBEDDING
|
||||
array(0x202C, 0x202C), // POP DIRECTIONAL FORMATTING
|
||||
array(0x202D, 0x202D), // LEFT-TO-RIGHT OVERRIDE
|
||||
array(0x202E, 0x202E), // RIGHT-TO-LEFT OVERRIDE
|
||||
array(0x206A, 0x206A), // INHIBIT SYMMETRIC SWAPPING
|
||||
array(0x206B, 0x206B), // ACTIVATE SYMMETRIC SWAPPING
|
||||
array(0x206C, 0x206C), // INHIBIT ARABIC FORM SHAPING
|
||||
array(0x206D, 0x206D), // ACTIVATE ARABIC FORM SHAPING
|
||||
array(0x206E, 0x206E), // NATIONAL DIGIT SHAPES
|
||||
array(0x206F, 0x206F), // NOMINAL DIGIT SHAPES
|
||||
// Table C.9
|
||||
array(0xE0001, 0xE0001), // LANGUAGE TAG
|
||||
array(0xE0020, 0xE007F), // [TAGGING CHARACTERS]
|
||||
// RFC3920
|
||||
array(0x22, 0x22), // "
|
||||
array(0x26, 0x26), // &
|
||||
array(0x27, 0x27), // '
|
||||
array(0x2F, 0x2F), // /
|
||||
array(0x3A, 0x3A), // :
|
||||
array(0x3C, 0x3C), // <
|
||||
array(0x3E, 0x3E), // >
|
||||
array(0x40, 0x40) // @
|
||||
);
|
||||
|
||||
$pos = 0;
|
||||
$result = true;
|
||||
|
||||
while ($pos < strlen($username))
|
||||
{
|
||||
$len = $uni = 0;
|
||||
for ($i = 0; $i <= 5; $i++)
|
||||
{
|
||||
if (ord($username[$pos]) >= $boundary[$i][0] && ord($username[$pos]) <= $boundary[$i][1])
|
||||
{
|
||||
$len = $i + 1;
|
||||
$uni = (ord($username[$pos]) - $boundary[$i][0]) * pow(2, $i * 6);
|
||||
|
||||
for ($k = 1; $k < $len; $k++)
|
||||
{
|
||||
$uni += (ord($username[$pos + $k]) - 128) * pow(2, ($i - $k) * 6);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($len == 0)
|
||||
{
|
||||
return 'WRONG_DATA';
|
||||
}
|
||||
|
||||
foreach ($prohibited as $pval)
|
||||
{
|
||||
if ($uni >= $pval[0] && $uni <= $pval[1])
|
||||
{
|
||||
$result = false;
|
||||
break 2;
|
||||
}
|
||||
}
|
||||
|
||||
$pos = $pos + $len;
|
||||
}
|
||||
|
||||
if (!$result)
|
||||
{
|
||||
return 'WRONG_DATA';
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate hex colour value
|
||||
*
|
||||
|
@ -2126,7 +1923,8 @@ function group_correct_avatar($group_id, $old_entry)
|
|||
|
||||
try
|
||||
{
|
||||
$storage->rename($old_filename, $new_filename);
|
||||
$storage->write($new_filename, $storage->read($old_filename));
|
||||
$storage->delete($old_filename);
|
||||
|
||||
$sql = 'UPDATE ' . GROUPS_TABLE . '
|
||||
SET group_avatar = \'' . $db->sql_escape($new_entry) . "'
|
||||
|
@ -2729,7 +2527,7 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
|
|||
|
||||
case 'approve':
|
||||
// Make sure we only approve those which are pending ;)
|
||||
$sql = 'SELECT u.user_id, u.user_email, u.username, u.username_clean, u.user_notify_type, u.user_jabber, u.user_lang
|
||||
$sql = 'SELECT u.user_id
|
||||
FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . ' ug
|
||||
WHERE ug.group_id = ' . $group_id . '
|
||||
AND ug.user_pending = 1
|
||||
|
|
|
@ -661,7 +661,7 @@ function close_report($report_id_list, $mode, $action, $pm = false)
|
|||
{
|
||||
$post_info = ($pm) ? phpbb_get_pm_data($post_id_list) : phpbb_get_post_data($post_id_list, 'm_report');
|
||||
|
||||
$sql = "SELECT r.report_id, r.$id_column, r.report_closed, r.user_id, r.user_notify, u.username, u.username_clean, u.user_email, u.user_jabber, u.user_lang, u.user_notify_type
|
||||
$sql = "SELECT r.report_id, r.$id_column, r.report_closed, r.user_id, r.user_notify, u.username, u.username_clean, u.user_email, u.user_lang
|
||||
FROM " . REPORTS_TABLE . ' r, ' . USERS_TABLE . ' u
|
||||
WHERE ' . $db->sql_in_set('r.report_id', $report_id_list) . '
|
||||
' . (($action == 'close') ? 'AND r.report_closed = 0' : '') . '
|
||||
|
|
|
@ -366,9 +366,6 @@ class phpbb_questionnaire_phpbb_data_provider
|
|||
'img_max_width' => true,
|
||||
'img_min_thumb_filesize' => true,
|
||||
'ip_check' => true,
|
||||
'jab_enable' => true,
|
||||
'jab_package_size' => true,
|
||||
'jab_use_ssl' => true,
|
||||
'limit_load' => true,
|
||||
'limit_search_load' => true,
|
||||
'load_anon_lastread' => true,
|
||||
|
|
|
@ -35,7 +35,7 @@ class ucp_activate
|
|||
$user_id = $request->variable('u', 0);
|
||||
$key = $request->variable('k', '');
|
||||
|
||||
$sql = 'SELECT user_id, username, user_type, user_email, user_newpasswd, user_lang, user_notify_type, user_actkey, user_inactive_reason
|
||||
$sql = 'SELECT user_id, username, user_type, user_email, user_newpasswd, user_lang, user_actkey, user_inactive_reason
|
||||
FROM ' . USERS_TABLE . "
|
||||
WHERE user_id = $user_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
@ -131,23 +131,20 @@ class ucp_activate
|
|||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
$phpbb_notifications->delete_notifications('notification.type.admin_activate_user', $user_row['user_id']);
|
||||
|
||||
$messenger = $phpbb_container->get('messenger.method_collection');
|
||||
$messenger_collection_iterator = $messenger->getIterator();
|
||||
foreach ($messenger_collection_iterator as $messenger_method)
|
||||
{
|
||||
if ($messenger_method->get_id() == $user_row['user_notify_type'] || $user_row['user_notify_type'] == $messenger_method::NOTIFY_BOTH)
|
||||
{
|
||||
$messenger_method->set_use_queue(false);
|
||||
$messenger_method->template('admin_welcome_activated', $user_row['user_lang']);
|
||||
$messenger_method->set_addresses($user_row);
|
||||
$messenger_method->anti_abuse_headers($config, $user);
|
||||
$messenger_method->assign_vars([
|
||||
'USERNAME' => html_entity_decode($user_row['username'], ENT_COMPAT),
|
||||
]);
|
||||
/** @var \phpbb\di\service_collection $messenger_collection */
|
||||
$messenger_collection = $phpbb_container->get('messenger.method_collection');
|
||||
/** @var \phpbb\messenger\method\messenger_interface $messenger_method */
|
||||
$messenger_method = $messenger_collection->offsetGet('messenger.method.email');
|
||||
|
||||
$messenger_method->send();
|
||||
}
|
||||
}
|
||||
$messenger_method->set_use_queue(false);
|
||||
$messenger_method->template('admin_welcome_activated', $user_row['user_lang']);
|
||||
$messenger_method->set_addresses($user_row);
|
||||
$messenger_method->anti_abuse_headers($config, $user);
|
||||
$messenger_method->assign_vars([
|
||||
'USERNAME' => html_entity_decode($user_row['username'], ENT_COMPAT),
|
||||
]);
|
||||
|
||||
$messenger_method->send();
|
||||
|
||||
$message = 'ACCOUNT_ACTIVE_ADMIN';
|
||||
}
|
||||
|
|
|
@ -201,18 +201,13 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
|||
}
|
||||
}
|
||||
|
||||
$u_pm = $u_jabber = '';
|
||||
$u_pm = '';
|
||||
|
||||
if ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_info['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_')))
|
||||
{
|
||||
$u_pm = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $author_id);
|
||||
}
|
||||
|
||||
if ($config['jab_enable'] && $user_info['user_jabber'] && $auth->acl_get('u_sendim'))
|
||||
{
|
||||
$u_jabber = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=jabber&u=' . $author_id);
|
||||
}
|
||||
|
||||
$can_edit_pm = ($message_row['message_time'] > time() - ($config['pm_edit_time'] * 60) || !$config['pm_edit_time']) && $folder_id == PRIVMSGS_OUTBOX && $auth->acl_get('u_pm_edit');
|
||||
|
||||
$msg_data = array(
|
||||
|
@ -248,7 +243,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
|||
'MESSAGE_ID' => $message_row['msg_id'],
|
||||
|
||||
'U_PM' => $u_pm,
|
||||
'U_JABBER' => $u_jabber,
|
||||
|
||||
'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&mode=compose&action=delete&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||
'U_EMAIL' => $user_info['email'],
|
||||
|
@ -358,11 +352,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
|||
'NAME' => $user->lang['SEND_EMAIL'],
|
||||
'U_CONTACT' => $user_info['email'],
|
||||
),
|
||||
array(
|
||||
'ID' => 'jabber',
|
||||
'NAME' => $user->lang['JABBER'],
|
||||
'U_CONTACT' => $u_jabber,
|
||||
),
|
||||
);
|
||||
|
||||
foreach ($contact_fields as $field)
|
||||
|
|
|
@ -42,7 +42,6 @@ class ucp_prefs
|
|||
case 'personal':
|
||||
add_form_key('ucp_prefs_personal');
|
||||
$data = array(
|
||||
'notifymethod' => $request->variable('notifymethod', $user->data['user_notify_type']),
|
||||
'dateformat' => $request->variable('dateformat', $user->data['user_dateformat'], true),
|
||||
'lang' => basename($request->variable('lang', $user->data['user_lang'])),
|
||||
'user_style' => $request->variable('user_style', (int) $user->data['user_style']),
|
||||
|
@ -54,12 +53,6 @@ class ucp_prefs
|
|||
'allowpm' => $request->variable('allowpm', (bool) $user->data['user_allow_pm']),
|
||||
);
|
||||
|
||||
if ($data['notifymethod'] == messenger_interface::NOTIFY_IM && (!$config['jab_enable'] || !$user->data['user_jabber'] || !@extension_loaded('xml')))
|
||||
{
|
||||
// Jabber isnt enabled, or no jabber field filled in. Update the users table to be sure its correct.
|
||||
$data['notifymethod'] = messenger_interface::NOTIFY_BOTH;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add UCP edit global settings data before they are assigned to the template or submitted
|
||||
*
|
||||
|
@ -105,7 +98,6 @@ class ucp_prefs
|
|||
'user_allow_viewemail' => $data['viewemail'],
|
||||
'user_allow_massemail' => $data['massemail'],
|
||||
'user_allow_viewonline' => ($auth->acl_get('u_hideonline')) ? !$data['hideonline'] : $user->data['user_allow_viewonline'],
|
||||
'user_notify_type' => $data['notifymethod'],
|
||||
'user_options' => $user->data['user_options'],
|
||||
|
||||
'user_dateformat' => $data['dateformat'],
|
||||
|
@ -184,9 +176,6 @@ class ucp_prefs
|
|||
$template->assign_vars([
|
||||
'ERROR' => (count($error)) ? implode('<br />', $error) : '',
|
||||
|
||||
'S_NOTIFY_EMAIL' => ($data['notifymethod'] == messenger_interface::NOTIFY_EMAIL) ? true : false,
|
||||
'S_NOTIFY_IM' => ($data['notifymethod'] == messenger_interface::NOTIFY_IM) ? true : false,
|
||||
'S_NOTIFY_BOTH' => ($data['notifymethod'] == messenger_interface::NOTIFY_BOTH) ? true : false,
|
||||
'S_VIEW_EMAIL' => $data['viewemail'],
|
||||
'S_MASS_EMAIL' => $data['massemail'],
|
||||
'S_ALLOW_PM' => $data['allowpm'],
|
||||
|
@ -218,7 +207,6 @@ class ucp_prefs
|
|||
'options' => $timezone_select,
|
||||
],
|
||||
'S_CAN_HIDE_ONLINE' => (bool) $auth->acl_get('u_hideonline'),
|
||||
'S_SELECT_NOTIFY' => (bool) ($config['jab_enable'] && $user->data['user_jabber'] && @extension_loaded('xml')),
|
||||
]);
|
||||
|
||||
break;
|
||||
|
|
|
@ -284,9 +284,7 @@ class ucp_profile
|
|||
|
||||
$cp_data = $cp_error = array();
|
||||
|
||||
$data = array(
|
||||
'jabber' => $request->variable('jabber', $user->data['user_jabber'], true),
|
||||
);
|
||||
$data = [];
|
||||
|
||||
if ($config['allow_birthdays'])
|
||||
{
|
||||
|
@ -318,11 +316,7 @@ class ucp_profile
|
|||
|
||||
if ($submit)
|
||||
{
|
||||
$validate_array = array(
|
||||
'jabber' => array(
|
||||
array('string', true, 5, 255),
|
||||
array('jabber')),
|
||||
);
|
||||
$validate_array = [];
|
||||
|
||||
if ($config['allow_birthdays'])
|
||||
{
|
||||
|
@ -363,19 +357,7 @@ class ucp_profile
|
|||
|
||||
if (!count($error))
|
||||
{
|
||||
$data['notify'] = $user->data['user_notify_type'];
|
||||
|
||||
if ($data['notify'] == messenger_interface::NOTIFY_IM && (!$config['jab_enable'] || !$data['jabber'] || !@extension_loaded('xml')))
|
||||
{
|
||||
// User has not filled in a jabber address (Or one of the modules is disabled or jabber is disabled)
|
||||
// Disable notify by Jabber now for this user.
|
||||
$data['notify'] = messenger_interface::NOTIFY_EMAIL;
|
||||
}
|
||||
|
||||
$sql_ary = array(
|
||||
'user_jabber' => $data['jabber'],
|
||||
'user_notify_type' => $data['notify'],
|
||||
);
|
||||
$sql_ary = [];
|
||||
|
||||
if ($config['allow_birthdays'])
|
||||
{
|
||||
|
@ -394,12 +376,16 @@ class ucp_profile
|
|||
$vars = array('cp_data', 'data', 'sql_ary');
|
||||
extract($phpbb_dispatcher->trigger_event('core.ucp_profile_info_modify_sql_ary', compact($vars)));
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
WHERE user_id = ' . $user->data['user_id'];
|
||||
$db->sql_query($sql);
|
||||
// Skip query if no data to update
|
||||
if (count($sql_ary))
|
||||
{
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
WHERE user_id = ' . $user->data['user_id'];
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
// Update Custom Fields
|
||||
// Always update custom fields
|
||||
$cp->update_profile_field_data($user->data['user_id'], $cp_data);
|
||||
|
||||
meta_refresh(3, $this->u_action);
|
||||
|
@ -446,8 +432,6 @@ class ucp_profile
|
|||
|
||||
$template->assign_vars(array(
|
||||
'ERROR' => (count($error)) ? implode('<br />', $error) : '',
|
||||
'S_JABBER_ENABLED' => $config['jab_enable'],
|
||||
'JABBER' => $data['jabber'],
|
||||
));
|
||||
|
||||
// Get additional profile fields and assign them to the template block var 'profile_fields'
|
||||
|
|
|
@ -128,41 +128,31 @@ class ucp_resend
|
|||
// Grab an array of user_id's with a_user permissions ... these users can activate a user
|
||||
$admin_ary = $auth->acl_get_list(false, 'a_user', false);
|
||||
|
||||
$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type
|
||||
$sql = 'SELECT user_id, username, user_email, user_lang
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('user_id', $admin_ary[0]['a_user']);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
/** @var \phpbb\di\service_collection */
|
||||
$messenger = $phpbb_container->get('messenger.method_collection');
|
||||
$messenger_collection_iterator = $messenger->getIterator();
|
||||
/** @var \phpbb\di\service_collection $messenger_collection */
|
||||
$messenger_collection = $phpbb_container->get('messenger.method_collection');
|
||||
/** @var \phpbb\messenger\method\messenger_interface $messenger_method */
|
||||
$messenger_method = $messenger_collection->offsetGet('messenger.method.email');
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
foreach ($messenger_collection_iterator as $messenger_method)
|
||||
{
|
||||
$messenger_method->set_use_queue(false);
|
||||
if ($messenger_method->get_id() == $row['user_notify_type'] || $row['user_notify_type'] == $messenger_method::NOTIFY_BOTH)
|
||||
{
|
||||
$messenger_method->template('admin_activate', $row['user_lang']);
|
||||
$messenger_method->set_addresses($row);
|
||||
$messenger_method->anti_abuse_headers($config, $user);
|
||||
$messenger_method->assign_vars([
|
||||
'USERNAME' => html_entity_decode($user_row['username'], ENT_COMPAT),
|
||||
'U_USER_DETAILS' => $board_url . "/memberlist.$phpEx?mode=viewprofile&u={$user_row['user_id']}",
|
||||
'U_ACTIVATE' => $board_url . "/ucp.$phpEx?mode=activate&u={$user_row['user_id']}&k={$user_row['user_actkey']}",
|
||||
]);
|
||||
$messenger_method->set_use_queue(false);
|
||||
$messenger_method->template('admin_activate', $row['user_lang']);
|
||||
$messenger_method->set_addresses($row);
|
||||
$messenger_method->anti_abuse_headers($config, $user);
|
||||
$messenger_method->assign_vars([
|
||||
'USERNAME' => html_entity_decode($user_row['username'], ENT_COMPAT),
|
||||
'U_USER_DETAILS' => $board_url . "/memberlist.$phpEx?mode=viewprofile&u={$user_row['user_id']}",
|
||||
'U_ACTIVATE' => $board_url . "/ucp.$phpEx?mode=activate&u={$user_row['user_id']}&k={$user_row['user_actkey']}",
|
||||
]);
|
||||
|
||||
$messenger_method->send();
|
||||
}
|
||||
}
|
||||
$messenger_method->send();
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Save the queue in the messenger method class (has to be called or these messages could be lost)
|
||||
foreach ($messenger_collection_iterator as $messenger_method)
|
||||
{
|
||||
$messenger_method->save_queue();
|
||||
}
|
||||
}
|
||||
|
||||
$this->update_activation_expiration();
|
||||
|
|
|
@ -923,7 +923,6 @@ if (!$get_info)
|
|||
array('user_inactive_reason', '', 'phpbb_inactive_reason'),
|
||||
array('user_inactive_time', '', 'phpbb_inactive_time'),
|
||||
|
||||
array('user_jabber', '', ''),
|
||||
array('user_rank', 'users.user_rank', 'intval'),
|
||||
array('user_permissions', '', ''),
|
||||
|
||||
|
@ -938,7 +937,6 @@ if (!$get_info)
|
|||
array('user_emailtime', 'users.user_emailtime', 'null_to_zero'),
|
||||
array('user_notify', 'users.user_notify', 'intval'),
|
||||
array('user_notify_pm', 'users.user_notify_pm', 'intval'),
|
||||
array('user_notify_type', $messenger_method::NOTIFY_EMAIL, ''),
|
||||
array('user_allow_pm', 'users.user_allow_pm', 'intval'),
|
||||
array('user_allow_viewonline', 'users.user_allow_viewonline', 'intval'),
|
||||
array('user_allow_viewemail', 'users.user_viewemail', 'intval'),
|
||||
|
|
|
@ -168,16 +168,6 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_check', '3');
|
|||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_login_limit_max', '50');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_login_limit_time', '21600');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_login_limit_use_forwarded', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_allow_self_signed', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_enable', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_host', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_package_size', '20');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_password', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_port', '5222');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_use_ssl', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_username', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_verify_peer', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_verify_peer_name', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_base_dn', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_email', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_password', '');
|
||||
|
@ -439,7 +429,6 @@ INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_group', 1);
|
|||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_groupadd', 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_groupdel', 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_icons', 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_jabber', 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_language', 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_mauth', 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_modules', 1);
|
||||
|
@ -493,7 +482,6 @@ INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_readpm', 1);
|
|||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_savedrafts', 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_search', 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_sendemail', 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_sendim', 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_sendpm', 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_sig', 1);
|
||||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_viewonline', 1);
|
||||
|
@ -539,10 +527,10 @@ INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id,
|
|||
INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts_approved, forum_posts_unapproved, forum_posts_softdeleted, forum_topics_approved, forum_topics_unapproved, forum_topics_softdeleted, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_subject, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_freq, prune_days, prune_viewed, forum_parents, forum_flags) VALUES ('{L_FORUMS_TEST_FORUM_TITLE}', '{L_FORUMS_TEST_FORUM_DESC}', 2, 3, 1, 1, 1, 0, 0, 1, 0, 0, 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, '', '', '', '', '', '', '', 1, 7, 7, '', 48);
|
||||
|
||||
# -- Users / Anonymous user
|
||||
INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_jabber, user_actkey, user_actkey_expiration, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', 0, '', 0);
|
||||
INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_actkey, user_actkey_expiration, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', 0, '', 0);
|
||||
|
||||
# -- username: Admin password: admin (change this or remove it once everything is working!)
|
||||
INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_jabber, user_actkey, user_actkey_expiration, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', 0, '');
|
||||
INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_actkey, user_actkey_expiration, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', 0, '');
|
||||
|
||||
# -- Groups
|
||||
INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('GUESTS', 3, 0, '', 0, '', '', '', 5);
|
||||
|
@ -569,7 +557,7 @@ INSERT INTO phpbb_ranks (rank_title, rank_min, rank_special, rank_image) VALUES
|
|||
# -- Roles data
|
||||
|
||||
# Standard Admin (a_)
|
||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 1, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'a_%' AND auth_option NOT IN ('a_switchperm', 'a_jabber', 'a_phpinfo', 'a_server', 'a_backup', 'a_styles', 'a_clearlogs', 'a_modules', 'a_language', 'a_email', 'a_bots', 'a_search', 'a_aauth', 'a_roles');
|
||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 1, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'a_%' AND auth_option NOT IN ('a_switchperm', 'a_phpinfo', 'a_server', 'a_backup', 'a_styles', 'a_clearlogs', 'a_modules', 'a_language', 'a_email', 'a_bots', 'a_search', 'a_aauth', 'a_roles');
|
||||
|
||||
# Forum admin (a_)
|
||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 2, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'a_%' AND auth_option IN ('a_', 'a_authgroups', 'a_authusers', 'a_fauth', 'a_forum', 'a_forumadd', 'a_forumdel', 'a_mauth', 'a_prune', 'a_uauth', 'a_viewauth', 'a_viewlogs');
|
||||
|
@ -587,14 +575,14 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT
|
|||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 6, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_forward');
|
||||
|
||||
# Limited Features (u_)
|
||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 7, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_attach', 'u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_attach', 'u_pm_emailpm', 'u_savedrafts', 'u_search', 'u_sendemail', 'u_sendim', 'u_masspm', 'u_masspm_group');
|
||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 7, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_attach', 'u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_attach', 'u_pm_emailpm', 'u_savedrafts', 'u_search', 'u_sendemail', 'u_masspm', 'u_masspm_group');
|
||||
|
||||
# No Private Messages (u_)
|
||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 8, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_', 'u_chgavatar', 'u_chgcensors', 'u_chgemail', 'u_chgpasswd', 'u_download', 'u_hideonline', 'u_mention', 'u_sig', 'u_viewprofile');
|
||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 8, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_readpm', 'u_sendpm', 'u_masspm', 'u_masspm_group');
|
||||
|
||||
# No Avatar (u_)
|
||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 9, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_attach', 'u_chgavatar', 'u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_attach', 'u_pm_emailpm', 'u_savedrafts', 'u_search', 'u_sendemail', 'u_sendim', 'u_masspm', 'u_masspm_group');
|
||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 9, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_attach', 'u_chgavatar', 'u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_attach', 'u_pm_emailpm', 'u_savedrafts', 'u_search', 'u_sendemail', 'u_masspm', 'u_masspm_group');
|
||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 9, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_chgavatar');
|
||||
|
||||
# Full Moderator (m_)
|
||||
|
|
|
@ -586,31 +586,3 @@ $lang = array_merge($lang, [
|
|||
'WEBPUSH_DROPDOWN_SUBSCRIBE' => 'Show “Subscribe” button in notification dropdown',
|
||||
'WEBPUSH_DROPDOWN_SUBSCRIBE_EXPLAIN' => 'Display a “Subscribe” button in the Notification dropdown, allowing users to easily subscribe to push notifications from anywhere in the forum.',
|
||||
]);
|
||||
|
||||
// Jabber settings
|
||||
$lang = array_merge($lang, array(
|
||||
'ACP_JABBER_SETTINGS_EXPLAIN' => 'Here you can enable and control the use of Jabber for instant messaging and board notifications. Jabber is an open source protocol and therefore available for use by anyone. Some Jabber servers include gateways or transports which allow you to contact users on other networks. Not all servers offer all transports and changes in protocols can prevent transports from operating. Please be sure to enter already registered account details - phpBB will use the details you enter here as is.',
|
||||
|
||||
'JAB_ALLOW_SELF_SIGNED' => 'Allow self-signed SSL certificates',
|
||||
'JAB_ALLOW_SELF_SIGNED_EXPLAIN' => 'Allow connections to Jabber server with self-signed SSL certificate. <br><em><strong>Warning:</strong> Allowing self-signed SSL certificates may cause security implications.</em>',
|
||||
'JAB_ENABLE' => 'Enable Jabber',
|
||||
'JAB_ENABLE_EXPLAIN' => 'Enables use of Jabber messaging and notifications.',
|
||||
'JAB_GTALK_NOTE' => 'Please note that GTalk will not work because the <samp>dns_get_record</samp> function could not be found. This function is not available in PHP4, and is not implemented on Windows platforms. It currently does not work on BSD-based systems, including Mac OS.',
|
||||
'JAB_PACKAGE_SIZE' => 'Jabber package size',
|
||||
'JAB_PACKAGE_SIZE_EXPLAIN' => 'This is the number of messages sent in one package. If set to 0 the message is sent immediately and will not be queued for later sending.',
|
||||
'JAB_PASSWORD' => 'Jabber password',
|
||||
'JAB_PASSWORD_EXPLAIN' => '<em><strong>Warning:</strong> This password will be stored as plain text in the database, visible to everybody who can access your database or who can view this configuration page.</em>',
|
||||
'JAB_PORT' => 'Jabber port',
|
||||
'JAB_PORT_EXPLAIN' => 'Leave blank unless you know it is not port 5222.',
|
||||
'JAB_SERVER' => 'Jabber server',
|
||||
'JAB_SERVER_EXPLAIN' => 'See %sjabber.org%s for a list of servers.',
|
||||
'JAB_SETTINGS_CHANGED' => 'Jabber settings changed successfully.',
|
||||
'JAB_USE_SSL' => 'Use SSL to connect',
|
||||
'JAB_USE_SSL_EXPLAIN' => 'If enabled a secure connection is tried to be established. The Jabber port will be modified to 5223 if port 5222 is specified.',
|
||||
'JAB_USERNAME' => 'Jabber username or JID',
|
||||
'JAB_USERNAME_EXPLAIN' => 'Specify a registered username or a valid JID. The username will not be checked for validity. If you only specify a username, then your JID will be the username and the server you specified above. Else, specify a valid JID, for example user@jabber.org.',
|
||||
'JAB_VERIFY_PEER' => 'Verify SSL certificate',
|
||||
'JAB_VERIFY_PEER_EXPLAIN' => 'Require verification of SSL certificate used by Jabber server. <br><em><strong>Warning:</strong> Connecting peers with unverified SSL certificates may cause security implications.</em>',
|
||||
'JAB_VERIFY_PEER_NAME' => 'Verify Jabber peer name',
|
||||
'JAB_VERIFY_PEER_NAME_EXPLAIN' => 'Require verification of peer name for Jabber servers using SSL / TLS connections. <br><em><strong>Warning:</strong> Connecting to unverified peers may cause security implications.</em>',
|
||||
));
|
||||
|
|
|
@ -120,8 +120,6 @@ $lang = array_merge($lang, array(
|
|||
'ACP_INACTIVE_USERS' => 'Inactive users',
|
||||
'ACP_INDEX' => 'ACP index',
|
||||
|
||||
'ACP_JABBER_SETTINGS' => 'Jabber settings',
|
||||
|
||||
'ACP_LANGUAGE' => 'Language management',
|
||||
'ACP_LANGUAGE_PACKS' => 'Language packs',
|
||||
'ACP_LOAD_SETTINGS' => 'Load settings',
|
||||
|
@ -642,7 +640,6 @@ $lang = array_merge($lang, array(
|
|||
'LOG_DOWNLOAD_IP' => '<strong>Added IP/hostname to download list</strong><br />» %s',
|
||||
'LOG_DOWNLOAD_REMOVE_IP' => '<strong>Removed IP/hostname from download list</strong><br />» %s',
|
||||
|
||||
'LOG_ERROR_JABBER' => '<strong>Jabber error</strong><br />» %s',
|
||||
'LOG_ERROR_EMAIL' => '<strong>Email error</strong><br />» %s',
|
||||
'LOG_ERROR_CAPTCHA' => '<strong>CAPTCHA error</strong><br />» %s',
|
||||
|
||||
|
@ -686,11 +683,6 @@ $lang = array_merge($lang, array(
|
|||
|
||||
'LOG_IP_BROWSER_FORWARDED_CHECK' => '<strong>Session IP/browser/X_FORWARDED_FOR check failed</strong><br />»User IP “<em>%1$s</em>” checked against session IP “<em>%2$s</em>”, user browser string “<em>%3$s</em>” checked against session browser string “<em>%4$s</em>” and user X_FORWARDED_FOR string “<em>%5$s</em>” checked against session X_FORWARDED_FOR string “<em>%6$s</em>”.',
|
||||
|
||||
'LOG_JAB_CHANGED' => '<strong>Jabber account changed</strong>',
|
||||
'LOG_JAB_PASSCHG' => '<strong>Jabber password changed</strong>',
|
||||
'LOG_JAB_REGISTER' => '<strong>Jabber account registered</strong>',
|
||||
'LOG_JAB_SETTINGS_CHANGED' => '<strong>Jabber settings changed</strong>',
|
||||
|
||||
'LOG_LANGUAGE_PACK_DELETED' => '<strong>Deleted language pack</strong><br />» %s',
|
||||
'LOG_LANGUAGE_PACK_INSTALLED' => '<strong>Installed language pack</strong><br />» %s',
|
||||
'LOG_LANGUAGE_PACK_UPDATED' => '<strong>Updated language pack details</strong><br />» %s',
|
||||
|
|
|
@ -98,7 +98,6 @@ $lang = array_merge($lang, array(
|
|||
'ACL_U_PM_IMG' => 'Can use [img] BBCode tag in private messages',
|
||||
|
||||
'ACL_U_SENDEMAIL' => 'Can send emails',
|
||||
'ACL_U_SENDIM' => 'Can send instant messages',
|
||||
'ACL_U_IGNOREFLOOD' => 'Can ignore flood limit',
|
||||
'ACL_U_HIDEONLINE' => 'Can hide online status',
|
||||
'ACL_U_VIEWONLINE' => 'Can view hidden online users',
|
||||
|
@ -168,7 +167,6 @@ $lang = array_merge($lang, array(
|
|||
$lang = array_merge($lang, array(
|
||||
'ACL_A_BOARD' => 'Can alter board settings/check for updates',
|
||||
'ACL_A_SERVER' => 'Can alter server/communication settings',
|
||||
'ACL_A_JABBER' => 'Can alter Jabber settings',
|
||||
'ACL_A_PHPINFO' => 'Can view php settings',
|
||||
|
||||
'ACL_A_FORUM' => 'Can manage forums',
|
||||
|
|
|
@ -53,7 +53,10 @@ $lang = array_merge($lang, array(
|
|||
'BBCODE_HELPLINE_EXPLAIN' => 'This field contains the mouse over text of the BBCode.',
|
||||
'BBCODE_HELPLINE_TEXT' => 'Help line text',
|
||||
'BBCODE_HELPLINE_TOO_LONG' => 'The help line you entered is too long.',
|
||||
|
||||
'BBCODE_FONT_ICON' => 'BBCode icon',
|
||||
'BBCODE_FONT_ICON_EXPLAIN' => 'Enter the name of a Font Awesome icon (without the fa prefix) to display instead of the BBCode name appearing on the button. %1$sClick here%2$s to view the list of available icons. Only solid style icons are supported.',
|
||||
'BBCODE_FONT_ICON_INVALID' => 'The icon name you have entered is invalid.',
|
||||
'BBCODE_FONT_ICON_TOO_LONG' => 'The icon name you have entered is too long.',
|
||||
'BBCODE_INVALID_TAG_NAME' => 'The BBCode tag name that you selected already exists.',
|
||||
'BBCODE_INVALID' => 'Your BBCode is constructed in an invalid form.',
|
||||
'BBCODE_INVALID_TEMPLATE' => 'Your BBCode’s template is invalid.',
|
||||
|
|
|
@ -65,6 +65,7 @@ $lang = array_merge($lang, [
|
|||
// Local adapter
|
||||
'STORAGE_ADAPTER_LOCAL_NAME' => 'Local',
|
||||
'STORAGE_ADAPTER_LOCAL_OPTION_PATH' => 'Path',
|
||||
'STORAGE_ADAPTER_LOCAL_OPTION_PATH_EXPLAIN' => 'Storage path for files.<br>For example: <samp>files</samp>, <samp>images/avatars/upload</samp> or <samp>store</samp>.',
|
||||
|
||||
// Form validation
|
||||
'STORAGE_UPDATE_SUCCESSFUL' => 'All storage types were successfully updated.',
|
||||
|
|
|
@ -78,6 +78,7 @@ $lang = array_merge($lang, array(
|
|||
'ALL_TOPICS' => 'All Topics',
|
||||
'ALT_TEXT' => 'Alternative text',
|
||||
'AND' => 'And',
|
||||
'APPEARANCE' => 'Appearance',
|
||||
'ARE_WATCHING_FORUM' => 'You have subscribed to be notified of new posts in this forum.',
|
||||
'ARE_WATCHING_TOPIC' => 'You have subscribed to be notified of new posts in this topic.',
|
||||
'ASCENDING' => 'Ascending',
|
||||
|
@ -231,8 +232,6 @@ $lang = array_merge($lang, array(
|
|||
'ENTER_USERNAME' => 'Enter username',
|
||||
'ERR_CHANGING_DIRECTORY' => 'Unable to change directory.',
|
||||
'ERR_CONNECTING_SERVER' => 'Error connecting to the server.',
|
||||
'ERR_JAB_AUTH' => 'Could not authorise on Jabber server.',
|
||||
'ERR_JAB_CONNECT' => 'Could not connect to Jabber server.',
|
||||
'ERR_UNABLE_TO_LOGIN' => 'The specified username or password is incorrect.',
|
||||
'ERR_UNWATCHING' => 'An error occurred while trying to unsubscribe.',
|
||||
'ERR_WATCHING' => 'An error occurred while trying to subscribe.',
|
||||
|
@ -351,6 +350,7 @@ $lang = array_merge($lang, array(
|
|||
'HIDE_ME' => 'Hide my online status this session',
|
||||
'HOURS' => 'Hours',
|
||||
'HOME' => 'Home',
|
||||
'HTTP_HANDLER_NOT_FOUND' => 'The operation could not be completed because the cURL PHP extension and allow_url_fopen PHP ini setting have been disabled and no other HTTP handler could be found.',
|
||||
|
||||
'ICQ' => 'ICQ',
|
||||
'IF' => 'If',
|
||||
|
@ -370,7 +370,6 @@ $lang = array_merge($lang, array(
|
|||
'IP' => 'IP',
|
||||
'IP_BLACKLISTED' => 'Your IP %1$s has been blocked because it is blacklisted. For details please see <a href="%2$s">%2$s</a>.',
|
||||
|
||||
'JABBER' => 'Jabber',
|
||||
'JOINED' => 'Joined',
|
||||
'JUMP_PAGE' => 'Enter the page number you wish to go to',
|
||||
'JUMP_TO' => 'Jump to',
|
||||
|
@ -799,7 +798,6 @@ $lang = array_merge($lang, array(
|
|||
|
||||
'TOO_LONG_CONFIRM_CODE' => 'The confirm code you entered is too long.',
|
||||
'TOO_LONG_DATEFORMAT' => 'The date format you entered is too long.',
|
||||
'TOO_LONG_JABBER' => 'The Jabber account name you entered is too long.',
|
||||
'TOO_LONG_NEW_PASSWORD' => 'The password you entered is too long.',
|
||||
'TOO_LONG_PASSWORD_CONFIRM' => 'The password confirmation you entered is too long.',
|
||||
'TOO_LONG_USER_PASSWORD' => 'The password you entered is too long.',
|
||||
|
@ -812,7 +810,6 @@ $lang = array_merge($lang, array(
|
|||
|
||||
'TOO_SHORT_CONFIRM_CODE' => 'The confirm code you entered is too short.',
|
||||
'TOO_SHORT_DATEFORMAT' => 'The date format you entered is too short.',
|
||||
'TOO_SHORT_JABBER' => 'The Jabber account name you entered is too short.',
|
||||
'TOO_SHORT_NEW_PASSWORD' => 'The password you entered is too short.',
|
||||
'TOO_SHORT_PASSWORD_CONFIRM' => 'The password confirmation you entered is too short.',
|
||||
'TOO_SHORT_USER_PASSWORD' => 'The password you entered is too short.',
|
||||
|
@ -941,7 +938,6 @@ $lang = array_merge($lang, array(
|
|||
'WRONG_PASSWORD' => 'You entered an incorrect password.',
|
||||
|
||||
'WRONG_DATA_COLOUR' => 'The colour value you entered is invalid.',
|
||||
'WRONG_DATA_JABBER' => 'The name you entered is not a valid Jabber account name.',
|
||||
'WRONG_DATA_LANG' => 'The language you specified is not valid.',
|
||||
'WRONG_DATA_POST_SD' => 'The post sort direction you specified is not valid.',
|
||||
'WRONG_DATA_POST_SK' => 'The post sort option you specified is not valid.',
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
Subject: Reply in "{TOPIC_TITLE}"
|
||||
|
||||
Hello {USERNAME},
|
||||
|
||||
Your bookmarked topic "{TOPIC_TITLE}" received a new reply since your last visit to "{SITENAME}". No more notifications will be sent until you visit the topic.
|
||||
|
||||
If you want to view the newest post made since your last visit, click the following link:
|
||||
{U_NEWEST_POST}
|
||||
|
||||
If you no longer wish to receive updates about replies to bookmarks, please update your notification settings here:
|
||||
{U_NOTIFICATION_SETTINGS}
|
||||
|
||||
{EMAIL_SIG}
|
|
@ -1,11 +0,0 @@
|
|||
Subject: New topic in "{FORUM_NAME}"
|
||||
|
||||
Hello {USERNAME},
|
||||
|
||||
The forum "{FORUM_NAME}" received a new topic "{TOPIC_TITLE}"<!-- IF AUTHOR_NAME != '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit to "{SITENAME}". No more notifications will be sent until you visit the forum.
|
||||
{U_FORUM}
|
||||
|
||||
If you no longer wish to watch this forum click the following link:
|
||||
{U_STOP_WATCHING_FORUM}
|
||||
|
||||
{EMAIL_SIG}
|
|
@ -1,13 +0,0 @@
|
|||
Subject: Post approved - "{POST_SUBJECT}"
|
||||
|
||||
Hello {USERNAME},
|
||||
|
||||
Your post "{POST_SUBJECT}" at "{SITENAME}" was approved by a moderator or administrator.
|
||||
|
||||
If you want to view the post, click the following link:
|
||||
{U_VIEW_POST}
|
||||
|
||||
If you want to view the topic, click the following link:
|
||||
{U_VIEW_TOPIC}
|
||||
|
||||
{EMAIL_SIG}
|
|
@ -1,11 +0,0 @@
|
|||
Subject: Post disapproved - "{POST_SUBJECT}"
|
||||
|
||||
Hello {USERNAME},
|
||||
|
||||
Your post "{POST_SUBJECT}" at "{SITENAME}" was disapproved by a moderator or administrator.
|
||||
|
||||
The following reason was given for the disapproval:
|
||||
|
||||
{REASON}
|
||||
|
||||
{EMAIL_SIG}
|
|
@ -1,13 +0,0 @@
|
|||
Subject: Post needs approval - "{TOPIC_TITLE}"
|
||||
|
||||
Hello {USERNAME},
|
||||
|
||||
The post "{POST_SUBJECT}" at "{SITENAME}" needs approval.
|
||||
|
||||
If you want to view the post, click the following link:
|
||||
{U_VIEW_POST}
|
||||
|
||||
If you want to view the topic, click the following link:
|
||||
{U_TOPIC}
|
||||
|
||||
{EMAIL_SIG}
|
|
@ -1,13 +0,0 @@
|
|||
Subject: New private message
|
||||
|
||||
Hello {USERNAME},
|
||||
|
||||
A new private message from "{AUTHOR_NAME}" to your account on "{SITENAME}" with the following subject has arrived:
|
||||
{SUBJECT}
|
||||
|
||||
You can view your new message by clicking on the following link:
|
||||
{U_VIEW_MESSAGE}
|
||||
|
||||
You have requested that you be notified on this event, remember that you can always choose not to be notified of new messages by changing the appropriate setting in your profile.
|
||||
|
||||
{EMAIL_SIG}
|
|
@ -1,13 +0,0 @@
|
|||
Subject: Quoted in "{TOPIC_TITLE}"
|
||||
|
||||
Hello {USERNAME},
|
||||
|
||||
"{AUTHOR_NAME}" quoted you in the topic "{TOPIC_TITLE}" at "{SITENAME}".
|
||||
|
||||
If you want to view the quoted post, click the following link:
|
||||
{U_VIEW_POST}
|
||||
|
||||
If you no longer wish to receive updates about replies quoting you, please update your notification settings here:
|
||||
{U_NOTIFICATION_SETTINGS}
|
||||
|
||||
{EMAIL_SIG}
|
|
@ -1,10 +0,0 @@
|
|||
Subject: Private Message report - "{SUBJECT}"
|
||||
|
||||
Hello {USERNAME},
|
||||
|
||||
A Private Message titled "{SUBJECT}" by "{AUTHOR_NAME}" at "{SITENAME}" was reported.
|
||||
|
||||
If you want to view the report, click the following link:
|
||||
{U_VIEW_REPORT}
|
||||
|
||||
{EMAIL_SIG}
|
|
@ -1,13 +0,0 @@
|
|||
Subject: Post report - "{TOPIC_TITLE}"
|
||||
|
||||
Hello {USERNAME},
|
||||
|
||||
The post "{POST_SUBJECT}" at "{SITENAME}" was reported.
|
||||
|
||||
If you want to view the report, click the following link:
|
||||
{U_VIEW_REPORT}
|
||||
|
||||
If you want to view the post, click the following link:
|
||||
{U_VIEW_POST}
|
||||
|
||||
{EMAIL_SIG}
|
|
@ -1,10 +0,0 @@
|
|||
Subject: Topic approved - "{TOPIC_TITLE}"
|
||||
|
||||
Hello {USERNAME},
|
||||
|
||||
Your topic "{TOPIC_TITLE}" at "{SITENAME}" was approved by a moderator or administrator.
|
||||
|
||||
If you want to view the topic, click the following link:
|
||||
{U_VIEW_TOPIC}
|
||||
|
||||
{EMAIL_SIG}
|
|
@ -1,11 +0,0 @@
|
|||
Subject: Topic disapproved - "{TOPIC_TITLE}"
|
||||
|
||||
Hello {USERNAME},
|
||||
|
||||
Your topic "{TOPIC_TITLE}" at "{SITENAME}" was disapproved by a moderator or administrator.
|
||||
|
||||
The following reason was given for the disapproval:
|
||||
|
||||
{REASON}
|
||||
|
||||
{EMAIL_SIG}
|
|
@ -1,13 +0,0 @@
|
|||
Subject: Topic needs approval - "{TOPIC_TITLE}"
|
||||
|
||||
Hello {USERNAME},
|
||||
|
||||
The topic "{TOPIC_TITLE}" at "{SITENAME}" needs approval.
|
||||
|
||||
If you want to view the topic, click the following link:
|
||||
{U_VIEW_TOPIC}
|
||||
|
||||
If you want to view the forum, click the following link:
|
||||
{U_FORUM}
|
||||
|
||||
{EMAIL_SIG}
|
|
@ -1,13 +0,0 @@
|
|||
Subject: Reply in "{TOPIC_TITLE}"
|
||||
|
||||
Hello {USERNAME},
|
||||
|
||||
The topic "{TOPIC_TITLE}" received a new reply<!-- IF AUTHOR_NAME != '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit to "{SITENAME}". No more emails will be sent until you visit the topic.
|
||||
|
||||
If you want to view the newest post made since your last visit, click the following link:
|
||||
{U_NEWEST_POST}
|
||||
|
||||
If you no longer wish to watch this topic click the following link:
|
||||
{U_STOP_WATCHING_TOPIC}
|
||||
|
||||
{EMAIL_SIG}
|
|
@ -221,6 +221,13 @@ $lang = array_merge($lang, array(
|
|||
|
||||
<p>We noticed that the last update of your phpBB installation hasn’t been completed. Visit the <a href="%1$s" title="%1$s">database updater</a>, ensure <em>Update database only</em> is selected and click on <strong>Submit</strong>. Don\'t forget to delete the "install"-directory after you have updated the database successfully.</p>',
|
||||
|
||||
// Auto update
|
||||
'UPDATE_PACKAGE_DOWNLOAD_FAILURE' => 'Failed to download the update package.',
|
||||
'UPDATE_SIGNATURE_DOWNLOAD_FAILURE' => 'Failed to download the update package signature.',
|
||||
'UPDATE_SIGNATURE_INVALID' => 'The update package is corrupted.',
|
||||
'UPDATE_PACKAGE_EXTRACT_FAILURE' => 'Could not extract files from the update package.',
|
||||
'UPDATE_FILES_COPY_FAILURE' => 'Could not copy files from the update package.',
|
||||
|
||||
//
|
||||
// Server data
|
||||
//
|
||||
|
|
|
@ -78,16 +78,12 @@ $lang = array_merge($lang, array(
|
|||
|
||||
'IM_ADD_CONTACT' => 'Add Contact',
|
||||
'IM_DOWNLOAD_APP' => 'Download application',
|
||||
'IM_JABBER' => 'Please note that users may have selected to not receive unsolicited instant messages.',
|
||||
'IM_JABBER_SUBJECT' => 'This is an automated message please do not reply! Message from user %1$s at %2$s.',
|
||||
'IM_MESSAGE' => 'Your message',
|
||||
'IM_NAME' => 'Your Name',
|
||||
'IM_NO_DATA' => 'There is no suitable contact information for this user.',
|
||||
'IM_NO_JABBER' => 'Sorry, direct messaging of Jabber users is not supported on this board. You will need a Jabber client installed on your system to contact the recipient above.',
|
||||
'IM_RECIPIENT' => 'Recipient',
|
||||
'IM_SEND' => 'Send message',
|
||||
'IM_SEND_MESSAGE' => 'Send message',
|
||||
'IM_SENT_JABBER' => 'Your message to %1$s has been sent successfully.',
|
||||
'IM_USER' => 'Send an instant message',
|
||||
|
||||
'LAST_ACTIVE' => 'Last active',
|
||||
|
@ -125,7 +121,6 @@ $lang = array_merge($lang, array(
|
|||
'SENDER_NAME' => 'Your name',
|
||||
'SEND_ICQ_MESSAGE' => 'Send ICQ message',
|
||||
'SEND_IM' => 'Instant messaging',
|
||||
'SEND_JABBER_MESSAGE' => 'Send Jabber message',
|
||||
'SEND_MESSAGE' => 'Message',
|
||||
'SEND_YIM_MESSAGE' => 'Send YIM message',
|
||||
'SORT_EMAIL' => 'Email',
|
||||
|
|
|
@ -331,7 +331,6 @@ $lang = array_merge($lang, array(
|
|||
'NOTIFICATION_GROUP_POSTING' => 'Posting Notifications',
|
||||
'NOTIFICATION_METHOD_BOARD' => 'Notifications',
|
||||
'NOTIFICATION_METHOD_EMAIL' => 'Email',
|
||||
'NOTIFICATION_METHOD_JABBER' => 'Jabber',
|
||||
'NOTIFICATION_METHOD_WEBPUSH' => 'Web Push',
|
||||
'NOTIFICATION_TYPE' => 'Notification type',
|
||||
'NOTIFICATION_TYPE_BOOKMARK' => 'Someone replies to a topic you have bookmarked',
|
||||
|
@ -354,7 +353,6 @@ $lang = array_merge($lang, array(
|
|||
'NOTIFY_METHOD_BOTH' => 'Both',
|
||||
'NOTIFY_METHOD_EMAIL' => 'Email only',
|
||||
'NOTIFY_METHOD_EXPLAIN' => 'Method for sending messages sent via this board.',
|
||||
'NOTIFY_METHOD_IM' => 'Jabber only',
|
||||
'NOTIFY_ON_PM' => 'Notify me on new private messages',
|
||||
'NOTIFY_WEBPUSH_ENABLE' => 'Enable receiving Web Push notifications',
|
||||
'NOTIFY_WEBPUSH_ENABLE_EXPLAIN' => 'Enable receiving browser-based push notifications.<br>The notifications can be turned off at any time in your browser settings, by unsubscribing, or by disabling the push notifications below.',
|
||||
|
@ -534,7 +532,6 @@ $lang = array_merge($lang, array(
|
|||
'UCP_COPPA_BEFORE' => 'Before %s',
|
||||
'UCP_COPPA_ON_AFTER' => 'On or after %s',
|
||||
'UCP_EMAIL_ACTIVATE' => 'Please note that you will need to enter a valid email address before your account is activated. You will receive an email at the address you provide that contains an account activation link.',
|
||||
'UCP_JABBER' => 'Jabber address',
|
||||
'UCP_LOGIN_LINK' => 'Set up an external account association',
|
||||
|
||||
'UCP_MAIN' => 'Overview',
|
||||
|
|
|
@ -373,120 +373,6 @@ switch ($mode)
|
|||
);
|
||||
break;
|
||||
|
||||
case 'contact':
|
||||
|
||||
$page_title = $user->lang['IM_USER'];
|
||||
$template_html = 'memberlist_im.html';
|
||||
|
||||
if (!$auth->acl_get('u_sendim'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
|
||||
$presence_img = '';
|
||||
switch ($action)
|
||||
{
|
||||
case 'jabber':
|
||||
$lang = 'JABBER';
|
||||
$sql_field = 'user_jabber';
|
||||
$s_select = (@extension_loaded('xml') && $config['jab_enable']) ? 'S_SEND_JABBER' : 'S_NO_SEND_JABBER';
|
||||
$s_action = append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=$action&u=$user_id");
|
||||
break;
|
||||
|
||||
default:
|
||||
trigger_error('NO_MODE', E_USER_ERROR);
|
||||
break;
|
||||
}
|
||||
|
||||
// Grab relevant data
|
||||
$sql = "SELECT user_id, username, user_email, user_lang, $sql_field
|
||||
FROM " . USERS_TABLE . "
|
||||
WHERE user_id = $user_id
|
||||
AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!$row)
|
||||
{
|
||||
trigger_error('NO_USER');
|
||||
}
|
||||
else if (empty($row[$sql_field]))
|
||||
{
|
||||
trigger_error('IM_NO_DATA');
|
||||
}
|
||||
|
||||
// Post data grab actions
|
||||
switch ($action)
|
||||
{
|
||||
case 'jabber':
|
||||
add_form_key('memberlist_messaging');
|
||||
|
||||
if ($submit && @extension_loaded('xml') && $config['jab_enable'])
|
||||
{
|
||||
if (check_form_key('memberlist_messaging'))
|
||||
{
|
||||
|
||||
$subject = sprintf($user->lang['IM_JABBER_SUBJECT'], $user->data['username'], $config['server_name']);
|
||||
$message = $request->variable('message', '', true);
|
||||
|
||||
if (empty($message))
|
||||
{
|
||||
trigger_error('EMPTY_MESSAGE_IM');
|
||||
}
|
||||
|
||||
$jabber = $phpbb_container->get('messenger.method.jabber');
|
||||
$jabber->set_use_queue(false);
|
||||
|
||||
$jabber->template('profile_send_im', $row['user_lang']);
|
||||
$jabber->subject(html_entity_decode($subject, ENT_COMPAT));
|
||||
$jabber->set_addresses($row);
|
||||
|
||||
$jabber->assign_vars([
|
||||
'BOARD_CONTACT' => phpbb_get_board_contact($config, $phpEx),
|
||||
'FROM_USERNAME' => html_entity_decode($user->data['username'], ENT_COMPAT),
|
||||
'TO_USERNAME' => html_entity_decode($row['username'], ENT_COMPAT),
|
||||
'MESSAGE' => html_entity_decode($message, ENT_COMPAT),
|
||||
]);
|
||||
|
||||
$jabber->send();
|
||||
|
||||
$s_select = 'S_SENT_JABBER';
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error('FORM_INVALID');
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
$template->assign_block_vars('navlinks', array(
|
||||
'BREADCRUMB_NAME' => $page_title,
|
||||
'U_BREADCRUMB' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=$action&u=$user_id"),
|
||||
));
|
||||
|
||||
// Send vars to the template
|
||||
$template->assign_vars(array(
|
||||
'IM_CONTACT' => $row[$sql_field],
|
||||
'A_IM_CONTACT' => addslashes($row[$sql_field]),
|
||||
|
||||
'USERNAME' => $row['username'],
|
||||
'CONTACT_NAME' => $row[$sql_field],
|
||||
'SITENAME' => $config['sitename'],
|
||||
|
||||
'PRESENCE_IMG' => $presence_img,
|
||||
|
||||
'L_SEND_IM_EXPLAIN' => $user->lang['IM_' . $lang],
|
||||
'L_IM_SENT_JABBER' => sprintf($user->lang['IM_SENT_JABBER'], $row['username']),
|
||||
|
||||
$s_select => true,
|
||||
'S_IM_ACTION' => $s_action)
|
||||
);
|
||||
|
||||
break;
|
||||
|
||||
case 'viewprofile':
|
||||
// Display a profile
|
||||
if ($user_id == ANONYMOUS && !$username)
|
||||
|
@ -783,7 +669,6 @@ switch ($mode)
|
|||
'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']),
|
||||
'L_SEND_EMAIL_USER' => $user->lang('SEND_EMAIL_USER', $member['username']),
|
||||
'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['EMAIL']),
|
||||
'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']),
|
||||
'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']),
|
||||
|
||||
'S_PROFILE_ACTION' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group'),
|
||||
|
@ -950,8 +835,8 @@ switch ($mode)
|
|||
{
|
||||
// Generate the navlinks based on the selected topic
|
||||
$navlinks_sql_array = [
|
||||
'SELECT' => 'f.parent_id, f.forum_parents, f.left_id, f.right_id, f.forum_type, f.forum_name,
|
||||
f.forum_id, f.forum_desc, f.forum_desc_uid, f.forum_desc_bitfield, f.forum_desc_options,
|
||||
'SELECT' => 'f.parent_id, f.forum_parents, f.left_id, f.right_id, f.forum_type, f.forum_name,
|
||||
f.forum_id, f.forum_desc, f.forum_desc_uid, f.forum_desc_bitfield, f.forum_desc_options,
|
||||
f.forum_options, t.topic_title',
|
||||
'FROM' => [
|
||||
FORUMS_TABLE => 'f',
|
||||
|
@ -1037,12 +922,6 @@ switch ($mode)
|
|||
$sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT']);
|
||||
$sort_key_sql = array('a' => 'u.username_clean', 'c' => 'u.user_regdate', 'd' => 'u.user_posts');
|
||||
|
||||
if ($config['jab_enable'] && $auth->acl_get('u_sendim'))
|
||||
{
|
||||
$sort_key_text['k'] = $user->lang['JABBER'];
|
||||
$sort_key_sql['k'] = 'u.user_jabber';
|
||||
}
|
||||
|
||||
if ($auth->acl_get('a_user'))
|
||||
{
|
||||
$sort_key_text['e'] = $user->lang['SORT_EMAIL'];
|
||||
|
@ -1084,7 +963,7 @@ switch ($mode)
|
|||
$select_single = $request->variable('select_single', false);
|
||||
|
||||
// Search URL parameters, if any of these are in the URL we do a search
|
||||
$search_params = array('username', 'email', 'jabber', 'search_group_id', 'joined_select', 'active_select', 'count_select', 'joined', 'active', 'count', 'ip');
|
||||
$search_params = array('username', 'email', 'search_group_id', 'joined_select', 'active_select', 'count_select', 'joined', 'active', 'count', 'ip');
|
||||
|
||||
// We validate form and field here, only id/class allowed
|
||||
$form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form;
|
||||
|
@ -1093,7 +972,6 @@ switch ($mode)
|
|||
{
|
||||
$username = $request->variable('username', '', true);
|
||||
$email = strtolower($request->variable('email', ''));
|
||||
$jabber = $request->variable('jabber', '');
|
||||
$search_group_id = $request->variable('search_group_id', 0);
|
||||
|
||||
// when using these, make sure that we actually have values defined in $find_key_match
|
||||
|
@ -1133,7 +1011,6 @@ switch ($mode)
|
|||
|
||||
$sql_where .= ($username) ? ' AND u.username_clean ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), utf8_clean_string($username))) : '';
|
||||
$sql_where .= ($auth->acl_get('a_user') && $email) ? ' AND u.user_email ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), $email)) . ' ' : '';
|
||||
$sql_where .= ($jabber) ? ' AND u.user_jabber ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), $jabber)) . ' ' : '';
|
||||
$sql_where .= (is_numeric($count) && isset($find_key_match[$count_select])) ? ' AND u.user_posts ' . $find_key_match[$count_select] . ' ' . (int) $count . ' ' : '';
|
||||
|
||||
if (isset($find_key_match[$joined_select]) && count($joined) == 3)
|
||||
|
@ -1385,10 +1262,10 @@ switch ($mode)
|
|||
|
||||
$order_by .= $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC');
|
||||
|
||||
// Unfortunately we must do this here for sorting by rank, else the sort order is applied wrongly
|
||||
if ($sort_key == 'm')
|
||||
// For sorting by non-unique columns (rank, posts) add unique sort key to avoid duplicated rows in results
|
||||
if ($sort_key == 'm' || $sort_key == 'd')
|
||||
{
|
||||
$order_by .= ', u.user_posts DESC';
|
||||
$order_by .= ', u.user_id ASC';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1439,7 +1316,6 @@ switch ($mode)
|
|||
'select_single' => array('select_single', $select_single),
|
||||
'username' => array('username', '', true),
|
||||
'email' => array('email', ''),
|
||||
'jabber' => array('jabber', ''),
|
||||
'search_group_id' => array('search_group_id', 0),
|
||||
'joined_select' => array('joined_select', 'lt'),
|
||||
'active_select' => array('active_select', 'lt'),
|
||||
|
@ -1594,7 +1470,6 @@ switch ($mode)
|
|||
$template->assign_vars(array(
|
||||
'USERNAME' => $username,
|
||||
'EMAIL' => $email,
|
||||
'JABBER' => $jabber,
|
||||
'JOINED' => implode('-', $joined),
|
||||
'ACTIVE' => implode('-', $active),
|
||||
'COUNT' => $count,
|
||||
|
@ -1602,7 +1477,6 @@ switch ($mode)
|
|||
|
||||
'S_IP_SEARCH_ALLOWED' => ($auth->acl_getf_global('m_info')) ? true : false,
|
||||
'S_EMAIL_SEARCH_ALLOWED'=> ($auth->acl_get('a_user')) ? true : false,
|
||||
'S_JABBER_ENABLED' => $config['jab_enable'],
|
||||
'S_IN_SEARCH_POPUP' => ($form && $field) ? true : false,
|
||||
'S_SEARCH_USER' => ($mode == 'searchuser' || ($mode == '' && $submit)),
|
||||
'S_FORM_NAME' => $form,
|
||||
|
@ -1830,7 +1704,6 @@ switch ($mode)
|
|||
'PROFILE_IMG' => $user->img('icon_user_profile', $user->lang['PROFILE']),
|
||||
'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']),
|
||||
'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['EMAIL']),
|
||||
'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']),
|
||||
'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']),
|
||||
|
||||
'U_FIND_MEMBER' => ($config['load_search'] || $auth->acl_get('a_')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser' . (($start) ? "&start=$start" : '') . (!empty($params) ? '&' . implode('&', $params) : '')) : '',
|
||||
|
|
|
@ -245,12 +245,7 @@ class upload
|
|||
// Move the thumbnail from temp folder to the storage
|
||||
$fp = fopen($destination, 'rb');
|
||||
|
||||
$this->storage->write_stream($destination_name, $fp);
|
||||
|
||||
if (is_resource($fp))
|
||||
{
|
||||
fclose($fp);
|
||||
}
|
||||
$this->storage->write($destination_name, $fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -82,7 +82,7 @@ abstract class driver implements \phpbb\avatar\driver\driver_interface
|
|||
* @param \phpbb\path_helper $path_helper phpBB path helper
|
||||
* @param \phpbb\cache\driver\driver_interface|null $cache Cache driver
|
||||
*/
|
||||
public function __construct(\phpbb\config\config $config, \FastImageSize\FastImageSize $imagesize, $phpbb_root_path, $php_ext, \phpbb\path_helper $path_helper, \phpbb\cache\driver\driver_interface $cache = null)
|
||||
public function __construct(\phpbb\config\config $config, \FastImageSize\FastImageSize $imagesize, $phpbb_root_path, $php_ext, \phpbb\path_helper $path_helper, \phpbb\cache\driver\driver_interface|null $cache = null)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->imagesize = $imagesize;
|
||||
|
|
|
@ -28,7 +28,7 @@ class email extends base
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function get_user_column(): ?string
|
||||
public function get_user_column(): string|null
|
||||
{
|
||||
return 'user_email';
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ class ip extends base
|
|||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function get_user_column(): ?string
|
||||
public function get_user_column(): string|null
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ interface type_interface
|
|||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function get_user_column(): ?string;
|
||||
public function get_user_column(): string|null;
|
||||
|
||||
/**
|
||||
* Sets a user object to the ban type to have it excluded
|
||||
|
|
|
@ -48,7 +48,7 @@ class class_loader
|
|||
* @param string $php_ext The file extension for PHP files
|
||||
* @param \phpbb\cache\driver\driver_interface|null $cache An implementation of the phpBB cache interface.
|
||||
*/
|
||||
public function __construct($namespace, $path, $php_ext = 'php', \phpbb\cache\driver\driver_interface $cache = null)
|
||||
public function __construct($namespace, $path, $php_ext = 'php', \phpbb\cache\driver\driver_interface|null $cache = null)
|
||||
{
|
||||
if ($namespace[0] !== '\\')
|
||||
{
|
||||
|
@ -69,7 +69,7 @@ class class_loader
|
|||
*
|
||||
* @param \phpbb\cache\driver\driver_interface|null $cache An implementation of the phpBB cache interface.
|
||||
*/
|
||||
public function set_cache(\phpbb\cache\driver\driver_interface $cache = null)
|
||||
public function set_cache(\phpbb\cache\driver\driver_interface|null $cache = null)
|
||||
{
|
||||
if ($cache)
|
||||
{
|
||||
|
|
|
@ -29,7 +29,7 @@ class runtime_exception extends base
|
|||
* @param \Exception|null $previous The previous runtime_exception used for the runtime_exception chaining.
|
||||
* @param integer $code The Exception code.
|
||||
*/
|
||||
public function __construct($prefix, $message = '', array $parameters = [], \Exception $previous = null, $code = 0)
|
||||
public function __construct($prefix, $message = '', array $parameters = [], \Exception|null $previous = null, $code = 0)
|
||||
{
|
||||
parent::__construct($prefix . $message, $parameters, $previous, $code);
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ class extension_manager extends manager
|
|||
* @param string $root_path phpBB root path
|
||||
* @param config|null $config Config object
|
||||
*/
|
||||
public function __construct(installer $installer, driver_interface $cache, ext_manager $extension_manager, filesystem $filesystem, $package_type, $exception_prefix, $root_path, config $config = null)
|
||||
public function __construct(installer $installer, driver_interface $cache, ext_manager $extension_manager, filesystem $filesystem, $package_type, $exception_prefix, $root_path, config|null $config = null)
|
||||
{
|
||||
$this->extension_manager = $extension_manager;
|
||||
$this->filesystem = $filesystem;
|
||||
|
@ -86,7 +86,7 @@ class extension_manager extends manager
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function pre_install(array $packages, IOInterface $io = null)
|
||||
public function pre_install(array $packages, IOInterface|null $io = null)
|
||||
{
|
||||
$installed_manually = array_intersect(array_keys($this->extension_manager->all_available()), array_keys($packages));
|
||||
if (count($installed_manually) !== 0)
|
||||
|
@ -98,7 +98,7 @@ class extension_manager extends manager
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function post_install(array $packages, IOInterface $io = null)
|
||||
public function post_install(array $packages, IOInterface|null $io = null)
|
||||
{
|
||||
if ($this->enable_on_install)
|
||||
{
|
||||
|
@ -127,7 +127,7 @@ class extension_manager extends manager
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function pre_update(array $packages, IOInterface $io = null)
|
||||
protected function pre_update(array $packages, IOInterface|null $io = null)
|
||||
{
|
||||
/** @psalm-suppress InvalidArgument */
|
||||
$io->writeError([['DISABLING_EXTENSIONS', [], 1]]);
|
||||
|
@ -158,7 +158,7 @@ class extension_manager extends manager
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function post_update(array $packages, IOInterface $io = null)
|
||||
protected function post_update(array $packages, IOInterface|null $io = null)
|
||||
{
|
||||
/** @psalm-suppress InvalidArgument */
|
||||
$io->writeError([['ENABLING_EXTENSIONS', [], 1]]);
|
||||
|
@ -184,7 +184,7 @@ class extension_manager extends manager
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function remove(array $packages, IOInterface $io = null)
|
||||
public function remove(array $packages, IOInterface|null $io = null)
|
||||
{
|
||||
$packages = $this->normalize_version($packages);
|
||||
|
||||
|
@ -200,7 +200,7 @@ class extension_manager extends manager
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function pre_remove(array $packages, IOInterface $io = null)
|
||||
public function pre_remove(array $packages, IOInterface|null $io = null)
|
||||
{
|
||||
if ($this->purge_on_remove)
|
||||
{
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue