mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
Compare commits
73 commits
f24373ea19
...
4b7d7c2fc7
Author | SHA1 | Date | |
---|---|---|---|
|
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 | ||
|
e85b25122a | ||
|
80a08d9c54 | ||
|
3d9ecba1b1 | ||
|
83508b415b | ||
|
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 | ||
|
8d0d6c012c | ||
|
e13c465ad5 | ||
|
8c5e22f4d5 | ||
|
cac3d81e73 | ||
|
692c96978a |
167 changed files with 1179 additions and 3531 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
|
||||
|
|
25
.github/workflows/tests.yml
vendored
25
.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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<!-- a few settings for the build -->
|
||||
<property name="newversion" value="4.0.0-a1-dev" />
|
||||
<property name="prevversion" value="3.3.15" />
|
||||
<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, 3.3.14" />
|
||||
<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,
|
||||
|
|
|
@ -49,9 +49,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;
|
||||
|
|
|
@ -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.
|
@ -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 -->
|
|
@ -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>
|
||||
|
|
|
@ -39,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",
|
||||
|
|
703
phpBB/composer.lock
generated
703
phpBB/composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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/
|
||||
|
|
|
@ -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,59 +213,38 @@ 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'];
|
||||
|
||||
/**
|
||||
* @var \phpbb\messenger\method\messenger_interface $messenger_method
|
||||
* @psalm-suppress UndefinedMethod
|
||||
*/
|
||||
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->save_queue();
|
||||
$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);
|
||||
|
||||
|
|
|
@ -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,27 +206,17 @@ class acp_inactive
|
|||
|
||||
do
|
||||
{
|
||||
/**
|
||||
* @var \phpbb\messenger\method\messenger_interface $messenger_method
|
||||
* @psalm-suppress UndefinedMethod
|
||||
*/
|
||||
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->save_queue();
|
||||
}
|
||||
}
|
||||
$messenger_method->send();
|
||||
$messenger_method->save_queue();
|
||||
|
||||
$usernames[] = $row['username'];
|
||||
$user_ids[] = (int) $row['user_id'];
|
||||
|
|
|
@ -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,
|
||||
));
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -1681,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,
|
||||
|
||||
|
@ -1690,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
|
||||
*
|
||||
|
@ -2730,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,28 +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();
|
||||
/** @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');
|
||||
|
||||
/**
|
||||
* @var \phpbb\messenger\method\messenger_interface $messenger_method
|
||||
* @psalm-suppress UndefinedMethod
|
||||
*/
|
||||
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),
|
||||
]);
|
||||
$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();
|
||||
}
|
||||
}
|
||||
$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,37 +128,29 @@ 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))
|
||||
{
|
||||
/**
|
||||
* @var \phpbb\messenger\method\messenger_interface $messenger_method
|
||||
* @psalm-suppress UndefinedMethod
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -232,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.',
|
||||
|
@ -372,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',
|
||||
|
@ -801,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.',
|
||||
|
@ -814,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.',
|
||||
|
@ -943,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}
|
|
@ -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)
|
||||
|
@ -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) : '')) : '',
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -101,7 +101,7 @@ class installer
|
|||
* @param request $request phpBB request object
|
||||
* @param config|null $config Config object
|
||||
*/
|
||||
public function __construct($root_path, filesystem $filesystem, request $request, config $config = null)
|
||||
public function __construct($root_path, filesystem $filesystem, request $request, config|null $config = null)
|
||||
{
|
||||
if ($config)
|
||||
{
|
||||
|
@ -135,7 +135,7 @@ class installer
|
|||
*
|
||||
* @throws runtime_exception
|
||||
*/
|
||||
public function install(array $packages, $whitelist, IOInterface $io = null)
|
||||
public function install(array $packages, $whitelist, IOInterface|null $io = null)
|
||||
{
|
||||
$this->wrap(function() use ($packages, $whitelist, $io) {
|
||||
$this->do_install($packages, $whitelist, $io);
|
||||
|
@ -155,7 +155,7 @@ class installer
|
|||
* @throws runtime_exception
|
||||
* @throws JsonValidationException
|
||||
*/
|
||||
protected function do_install(array $packages, $whitelist, io\io_interface $io = null)
|
||||
protected function do_install(array $packages, $whitelist, io\io_interface|null $io = null)
|
||||
{
|
||||
if (!$io)
|
||||
{
|
||||
|
@ -232,7 +232,7 @@ class installer
|
|||
* @return Composer|PartialComposer
|
||||
* @throws JsonValidationException
|
||||
*/
|
||||
protected function get_composer(?string $config_file): PartialComposer
|
||||
protected function get_composer(string|null $config_file): PartialComposer
|
||||
{
|
||||
static $composer_factory;
|
||||
if (!$composer_factory)
|
||||
|
|
|
@ -46,7 +46,7 @@ class html_output_formatter extends \Composer\Console\HtmlOutputFormatter
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function format(?string $message): ?string
|
||||
public function format(string|null $message): string|null
|
||||
{
|
||||
$formatted = parent::format($message);
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ class web_io extends BufferIO implements io_interface
|
|||
* @param int $verbosity Verbosity level
|
||||
* @param OutputFormatterInterface|null $formatter Output formatter
|
||||
*/
|
||||
public function __construct(language $language, $input = '', $verbosity = StreamOutput::VERBOSITY_NORMAL, OutputFormatterInterface $formatter = null)
|
||||
public function __construct(language $language, $input = '', $verbosity = StreamOutput::VERBOSITY_NORMAL, OutputFormatterInterface|null $formatter = null)
|
||||
{
|
||||
$this->language = $language;
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ class manager implements manager_interface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function install(array $packages, IOInterface $io = null)
|
||||
public function install(array $packages, IOInterface|null $io = null)
|
||||
{
|
||||
$packages = $this->normalize_version($packages);
|
||||
|
||||
|
@ -103,7 +103,7 @@ class manager implements manager_interface
|
|||
* Each entry may be a name or an array associating a version constraint to a name
|
||||
* @param IOInterface|null $io IO object used for the output
|
||||
*/
|
||||
protected function pre_install(array $packages, IOInterface $io = null)
|
||||
protected function pre_install(array $packages, IOInterface|null $io = null)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -114,14 +114,14 @@ class manager implements manager_interface
|
|||
* Each entry may be a name or an array associating a version constraint to a name
|
||||
* @param IOInterface|null $io IO object used for the output
|
||||
*/
|
||||
protected function post_install(array $packages, IOInterface $io = null)
|
||||
protected function post_install(array $packages, IOInterface|null $io = null)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function update(array $packages, IOInterface $io = null)
|
||||
public function update(array $packages, IOInterface|null $io = null)
|
||||
{
|
||||
$packages = $this->normalize_version($packages);
|
||||
|
||||
|
@ -148,7 +148,7 @@ class manager implements manager_interface
|
|||
* Each entry may be a name or an array associating a version constraint to a name
|
||||
* @param IOInterface|null $io IO object used for the output
|
||||
*/
|
||||
protected function pre_update(array $packages, IOInterface $io = null)
|
||||
protected function pre_update(array $packages, IOInterface|null $io = null)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -159,14 +159,14 @@ class manager implements manager_interface
|
|||
* Each entry may be a name or an array associating a version constraint to a name
|
||||
* @param IOInterface|null $io IO object used for the output
|
||||
*/
|
||||
protected function post_update(array $packages, IOInterface $io = null)
|
||||
protected function post_update(array $packages, IOInterface|null $io = null)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function remove(array $packages, IOInterface $io = null)
|
||||
public function remove(array $packages, IOInterface|null $io = null)
|
||||
{
|
||||
$packages = $this->normalize_version($packages);
|
||||
|
||||
|
@ -195,7 +195,7 @@ class manager implements manager_interface
|
|||
* Each entry may be a name or an array associating a version constraint to a name
|
||||
* @param IOInterface|null $io IO object used for the output
|
||||
*/
|
||||
protected function pre_remove(array $packages, IOInterface $io = null)
|
||||
protected function pre_remove(array $packages, IOInterface|null $io = null)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -206,7 +206,7 @@ class manager implements manager_interface
|
|||
* Each entry may be a name or an array associating a version constraint to a name
|
||||
* @param IOInterface|null $io IO object used for the output
|
||||
*/
|
||||
protected function post_remove(array $packages, IOInterface $io = null)
|
||||
protected function post_remove(array $packages, IOInterface|null $io = null)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ interface manager_interface
|
|||
*
|
||||
* @throws runtime_exception
|
||||
*/
|
||||
public function install(array $packages, IOInterface $io = null);
|
||||
public function install(array $packages, IOInterface|null $io = null);
|
||||
|
||||
/**
|
||||
* Updates or installs a set of packages
|
||||
|
@ -41,7 +41,7 @@ interface manager_interface
|
|||
*
|
||||
* @throws runtime_exception
|
||||
*/
|
||||
public function update(array $packages, IOInterface $io = null);
|
||||
public function update(array $packages, IOInterface|null $io = null);
|
||||
|
||||
/**
|
||||
* Removes a set of packages
|
||||
|
@ -52,7 +52,7 @@ interface manager_interface
|
|||
*
|
||||
* @throws runtime_exception
|
||||
*/
|
||||
public function remove(array $packages, IOInterface $io = null);
|
||||
public function remove(array $packages, IOInterface|null $io = null);
|
||||
|
||||
/**
|
||||
* Tells whether or not a package is managed by Composer.
|
||||
|
|
|
@ -53,7 +53,7 @@ class resolver implements ControllerResolverInterface
|
|||
* @param string $phpbb_root_path Relative path to phpBB root
|
||||
* @param \phpbb\template\template|null $template
|
||||
*/
|
||||
public function __construct(ContainerInterface $container, $phpbb_root_path, \phpbb\template\template $template = null)
|
||||
public function __construct(ContainerInterface $container, $phpbb_root_path, \phpbb\template\template|null $template = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
$this->template = $template;
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace phpbb\cron\task\core;
|
|||
use phpbb\config\config;
|
||||
|
||||
/**
|
||||
* Queue cron task. Sends email and jabber messages queued by other scripts.
|
||||
* Queue cron task. Sends email queued by other scripts.
|
||||
*/
|
||||
class queue extends \phpbb\cron\task\base
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@ class datetime extends \DateTime
|
|||
* @param string $time String in a format accepted by strtotime().
|
||||
* @param \DateTimeZone|null $timezone Time zone of the time.
|
||||
*/
|
||||
public function __construct($user, $time = 'now', \DateTimeZone $timezone = null)
|
||||
public function __construct($user, $time = 'now', \DateTimeZone|null $timezone = null)
|
||||
{
|
||||
$this->user = $user;
|
||||
$timezone = $timezone ?: $this->user->timezone;
|
||||
|
|
|
@ -73,10 +73,10 @@ class connection_factory
|
|||
public static function get_connection_from_params(
|
||||
string $driver,
|
||||
string $host,
|
||||
?string $user = null,
|
||||
?string $password = null,
|
||||
?string $name = null,
|
||||
?string $port = null): Connection
|
||||
string|null $user = null,
|
||||
string|null $password = null,
|
||||
string|null $name = null,
|
||||
string|null $port = null): Connection
|
||||
{
|
||||
$available_drivers = DriverManager::getAvailableDrivers();
|
||||
if (!in_array($driver, $available_drivers))
|
||||
|
|
|
@ -37,11 +37,11 @@ class connection_parameter_factory
|
|||
*/
|
||||
public static function get_configuration(
|
||||
string $driver,
|
||||
?string $host = null,
|
||||
?string $user = null,
|
||||
?string $password = null,
|
||||
?string $name = null,
|
||||
?string $port = null) : array
|
||||
string|null $host = null,
|
||||
string|null $user = null,
|
||||
string|null $password = null,
|
||||
string|null $name = null,
|
||||
string|null $port = null) : array
|
||||
{
|
||||
$params = [
|
||||
'driver' => $driver,
|
||||
|
@ -73,11 +73,11 @@ class connection_parameter_factory
|
|||
*/
|
||||
private static function build_connection_parameters(
|
||||
array $params,
|
||||
?string $host = null,
|
||||
?string $user = null,
|
||||
?string $password = null,
|
||||
?string $name = null,
|
||||
?string $port = null) : array
|
||||
string|null $host = null,
|
||||
string|null $user = null,
|
||||
string|null $password = null,
|
||||
string|null $name = null,
|
||||
string|null $port = null) : array
|
||||
{
|
||||
if ($params['driver'] === 'pdo_sqlite')
|
||||
{
|
||||
|
@ -120,7 +120,7 @@ class connection_parameter_factory
|
|||
*
|
||||
* @return array Doctrine's DBAL configuration for SQLite.
|
||||
*/
|
||||
private static function build_sqlite_parameters(array $params, string $path, ?string $user, ?string $password) : array
|
||||
private static function build_sqlite_parameters(array $params, string $path, string|null $user, string|null $password) : array
|
||||
{
|
||||
$params['path'] = $path;
|
||||
|
||||
|
@ -164,7 +164,7 @@ class connection_parameter_factory
|
|||
],
|
||||
];
|
||||
|
||||
if ($params['driver'] === 'pdo_mysql')
|
||||
if ($params['driver'] === 'pdo_mysql' && extension_loaded('pdo_mysql'))
|
||||
{
|
||||
$enrichment_tags['pdo_mysql'][\PDO::MYSQL_ATTR_FOUND_ROWS] = true;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ abstract class container_aware_migration extends migration implements ContainerA
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
public function setContainer(ContainerInterface|null $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
|
|
@ -13,10 +13,12 @@
|
|||
|
||||
namespace phpbb\db\migration\data\v310;
|
||||
|
||||
use phpbb\messenger\method\messenger_interface;
|
||||
|
||||
class notification_options_reconvert extends \phpbb\db\migration\migration
|
||||
{
|
||||
protected const NOTIFY_EMAIL = 0;
|
||||
protected const NOTIFY_IM = 1;
|
||||
protected const NOTIFY_BOTH = 2;
|
||||
|
||||
public static function depends_on()
|
||||
{
|
||||
return array('\phpbb\db\migration\data\v310\notifications_schema_fix');
|
||||
|
@ -69,12 +71,12 @@ class notification_options_reconvert extends \phpbb\db\migration\migration
|
|||
// In-board notification
|
||||
$notification_methods[] = '';
|
||||
|
||||
if ($row['user_notify_type'] == messenger_interface::NOTIFY_EMAIL || $row['user_notify_type'] == messenger_interface::NOTIFY_BOTH)
|
||||
if ($row['user_notify_type'] == self::NOTIFY_EMAIL || $row['user_notify_type'] == self::NOTIFY_BOTH)
|
||||
{
|
||||
$notification_methods[] = 'email';
|
||||
}
|
||||
|
||||
if ($row['user_notify_type'] == messenger_interface::NOTIFY_IM || $row['user_notify_type'] == messenger_interface::NOTIFY_BOTH)
|
||||
if ($row['user_notify_type'] == self::NOTIFY_IM || $row['user_notify_type'] == self::NOTIFY_BOTH)
|
||||
{
|
||||
$notification_methods[] = 'jabber';
|
||||
}
|
||||
|
|
115
phpBB/phpbb/db/migration/data/v400/remove_jabber.php
Normal file
115
phpBB/phpbb/db/migration/data/v400/remove_jabber.php
Normal file
|
@ -0,0 +1,115 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\migration\data\v400;
|
||||
|
||||
use phpbb\db\migration\migration;
|
||||
|
||||
class remove_jabber extends migration
|
||||
{
|
||||
public static function depends_on(): array
|
||||
{
|
||||
return [
|
||||
'\phpbb\db\migration\data\v310\notifications_use_full_name',
|
||||
'\phpbb\db\migration\data\v31x\add_jabber_ssl_context_config_options',
|
||||
'\phpbb\db\migration\data\v400\dev',
|
||||
'\phpbb\db\migration\data\v400\add_webpush',
|
||||
];
|
||||
}
|
||||
|
||||
public function update_schema(): array
|
||||
{
|
||||
return [
|
||||
'drop_columns' => [
|
||||
$this->table_prefix . 'users' => [
|
||||
'user_jabber',
|
||||
],
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
public function revert_schema(): array
|
||||
{
|
||||
return [
|
||||
'add_columns' => [
|
||||
$this->table_prefix . 'users' => [
|
||||
'user_jabber' => ['VCHAR_UNI', ''],
|
||||
],
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
public function update_data(): array
|
||||
{
|
||||
return [
|
||||
['config.remove', ['jab_enable']],
|
||||
['config.remove', ['jab_host']],
|
||||
['config.remove', ['jab_package_size']],
|
||||
['config.remove', ['jab_password']],
|
||||
['config.remove', ['jab_port']],
|
||||
['config.remove', ['jab_use_ssl']],
|
||||
['config.remove', ['jab_username']],
|
||||
['config.remove', ['jab_verify_peer']],
|
||||
['config.remove', ['jab_verify_peer_name']],
|
||||
['config.remove', ['jab_allow_self_signed']],
|
||||
['module.remove', [
|
||||
'acp',
|
||||
'ACP_CLIENT_COMMUNICATION',
|
||||
'ACP_JABBER_SETTINGS',
|
||||
]],
|
||||
['permission.remove', ['a_jabber']],
|
||||
['permission.remove', ['u_sendim']],
|
||||
['custom', [[$this, 'move_jabber_to_email_notifications']]],
|
||||
];
|
||||
}
|
||||
|
||||
public function revert_data(): array
|
||||
{
|
||||
return [
|
||||
['config.add', ['jab_enable', 0]],
|
||||
['config.add', ['jab_host', '']],
|
||||
['config.add', ['jab_package_size', 20]],
|
||||
['config.add', ['jab_password', '']],
|
||||
['config.add', ['jab_port', 5222]],
|
||||
['config.add', ['jab_use_ssl', 0]],
|
||||
['config.add', ['jab_username', '']],
|
||||
['config.add', ['jab_verify_peer', 1]],
|
||||
['config.add', ['jab_verify_peer_name', 1]],
|
||||
['config.add', ['jab_allow_self_signed', 0]],
|
||||
['module.add', [
|
||||
'acp',
|
||||
'ACP_CLIENT_COMMUNICATION',
|
||||
[
|
||||
'module_basename' => 'acp_jabber',
|
||||
'module_langname' => 'ACP_JABBER_SETTINGS',
|
||||
'module_mode' => 'settings',
|
||||
'module_auth' => 'acl_a_jabber',
|
||||
],
|
||||
]],
|
||||
['permission.add', ['a_jabber', true]],
|
||||
['permission.add', ['u_sendim', true]],
|
||||
];
|
||||
}
|
||||
|
||||
public function move_jabber_to_email_notifications(int|null $start)
|
||||
{
|
||||
$limit = 1000;
|
||||
|
||||
$sql = 'UPDATE ' . $this->tables['user_notifications'] . '
|
||||
SET ' . $this->db->sql_build_array('UPDATE', ['method' => 'notification.method.email']) . "
|
||||
WHERE method = 'notification.method.jabber'";
|
||||
$this->db->sql_query_limit($sql, $limit, $start ?: 0);
|
||||
|
||||
return $this->db->sql_affectedrows() < $limit ? true : $start + $limit;
|
||||
}
|
||||
}
|
50
phpBB/phpbb/db/migration/data/v400/remove_notify_type.php
Normal file
50
phpBB/phpbb/db/migration/data/v400/remove_notify_type.php
Normal file
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\migration\data\v400;
|
||||
|
||||
use phpbb\db\migration\migration;
|
||||
|
||||
class remove_notify_type extends migration
|
||||
{
|
||||
public static function depends_on(): array
|
||||
{
|
||||
return [
|
||||
'\phpbb\db\migration\data\v400\remove_jabber',
|
||||
'\phpbb\db\migration\data\v400\dev',
|
||||
'\phpbb\db\migration\data\v30x\release_3_0_0',
|
||||
];
|
||||
}
|
||||
|
||||
public function update_schema(): array
|
||||
{
|
||||
return [
|
||||
'drop_columns' => [
|
||||
$this->table_prefix . 'users' => [
|
||||
'user_notify_type',
|
||||
],
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
public function revert_schema(): array
|
||||
{
|
||||
return [
|
||||
'add_columns' => [
|
||||
$this->table_prefix . 'users' => [
|
||||
'user_notify_type' => ['TINT:4', 0],
|
||||
],
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
|
@ -240,7 +240,7 @@ class schema_generator
|
|||
* @param mixed $data Array of values to be set.
|
||||
* @param callable|null $value_transform Callback to transform the value being set.
|
||||
*/
|
||||
private static function set_all(&$schema, $data, ?callable $value_transform = null)
|
||||
private static function set_all(&$schema, $data, callable|null $value_transform = null)
|
||||
{
|
||||
$data = (!is_array($data)) ? [$data] : $data;
|
||||
foreach ($data as $key => $change)
|
||||
|
@ -317,7 +317,7 @@ class schema_generator
|
|||
*
|
||||
* @return Closure|null The value transformation callback or null if it is not needed.
|
||||
*/
|
||||
private static function get_value_transform(string $change_type, string $schema_type) : ?Closure
|
||||
private static function get_value_transform(string $change_type, string $schema_type) : Closure|null
|
||||
{
|
||||
if ($change_type !== 'add')
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ class error_handler extends ErrorHandler
|
|||
/**
|
||||
* @psalm-suppress MethodSignatureMismatch
|
||||
*/
|
||||
public function __construct(BufferingLogger $bootstrappingLogger = null, private readonly bool $debug = false) // phpcs:ignore Generic.CodeAnalysis.UselessOverridingMethod.Found
|
||||
public function __construct(BufferingLogger|null $bootstrappingLogger = null, private readonly bool $debug = false) // phpcs:ignore Generic.CodeAnalysis.UselessOverridingMethod.Found
|
||||
{
|
||||
parent::__construct($bootstrappingLogger, $debug);
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ class dispatcher extends EventDispatcher implements dispatcher_interface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function dispatch(object $event, string $eventName = null) : object
|
||||
public function dispatch(object $event, string|null $eventName = null) : object
|
||||
{
|
||||
if ($this->disabled)
|
||||
{
|
||||
|
|
|
@ -39,7 +39,7 @@ class recursive_event_filter_iterator extends \RecursiveFilterIterator
|
|||
*
|
||||
* @return recursive_event_filter_iterator
|
||||
*/
|
||||
public function getChildren(): ?\RecursiveFilterIterator
|
||||
public function getChildren(): \RecursiveFilterIterator|null
|
||||
{
|
||||
$inner_iterator = $this->getInnerIterator();
|
||||
assert($inner_iterator instanceof \RecursiveIterator);
|
||||
|
|
|
@ -44,7 +44,7 @@ class http_exception extends runtime_exception implements HttpExceptionInterface
|
|||
* @param array $headers Additional headers to set in the response.
|
||||
* @param integer $code The Exception code.
|
||||
*/
|
||||
public function __construct($status_code, $message = "", array $parameters = array(), \Exception $previous = null, array $headers = array(), $code = 0)
|
||||
public function __construct($status_code, $message = "", array $parameters = array(), \Exception|null $previous = null, array $headers = array(), $code = 0)
|
||||
{
|
||||
$this->status_code = $status_code;
|
||||
$this->headers = $headers;
|
||||
|
|
|
@ -35,7 +35,7 @@ class runtime_exception extends \RuntimeException implements exception_interface
|
|||
* @param \Exception|null $previous The previous runtime_exception used for the runtime_exception chaining.
|
||||
* @param integer $code The Exception code.
|
||||
*/
|
||||
public function __construct($message = "", array $parameters = array(), \Exception $previous = null, $code = 0)
|
||||
public function __construct($message = "", array $parameters = array(), \Exception|null $previous = null, $code = 0)
|
||||
{
|
||||
$this->parameters = $parameters;
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class manager
|
|||
* @param \phpbb\cache\service|null $cache A cache instance or null
|
||||
* @param string $cache_name The name of the cache variable, defaults to _ext
|
||||
*/
|
||||
public function __construct(ContainerInterface $container, \phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, finder_factory $finder_factory, $extension_table, $phpbb_root_path, \phpbb\cache\service $cache = null, $cache_name = '_ext')
|
||||
public function __construct(ContainerInterface $container, \phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, finder_factory $finder_factory, $extension_table, $phpbb_root_path, \phpbb\cache\service|null $cache = null, $cache_name = '_ext')
|
||||
{
|
||||
$this->cache = $cache;
|
||||
$this->cache_name = $cache_name;
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace phpbb\feed\exception;
|
|||
|
||||
class no_feed_exception extends feed_unavailable_exception
|
||||
{
|
||||
public function __construct(\Exception $previous = null, $code = 0)
|
||||
public function __construct(\Exception|null $previous = null, $code = 0)
|
||||
{
|
||||
parent::__construct('NO_FEED', array(), $previous, $code);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace phpbb\feed\exception;
|
|||
|
||||
class no_forum_exception extends feed_unavailable_exception
|
||||
{
|
||||
public function __construct($forum_id, \Exception $previous = null, $code = 0)
|
||||
public function __construct($forum_id, \Exception|null $previous = null, $code = 0)
|
||||
{
|
||||
parent::__construct('NO_FORUM', array($forum_id), $previous, $code);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace phpbb\feed\exception;
|
|||
|
||||
class no_topic_exception extends feed_unavailable_exception
|
||||
{
|
||||
public function __construct($topic_id, \Exception $previous = null, $code = 0)
|
||||
public function __construct($topic_id, \Exception|null $previous = null, $code = 0)
|
||||
{
|
||||
parent::__construct('NO_TOPIC', array($topic_id), $previous, $code);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace phpbb\feed\exception;
|
|||
|
||||
class unauthorized_forum_exception extends unauthorized_exception
|
||||
{
|
||||
public function __construct($forum_id, \Exception $previous = null, $code = 0)
|
||||
public function __construct($forum_id, \Exception|null $previous = null, $code = 0)
|
||||
{
|
||||
parent::__construct('SORRY_AUTH_READ', array($forum_id), $previous, $code);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace phpbb\feed\exception;
|
|||
|
||||
class unauthorized_topic_exception extends unauthorized_exception
|
||||
{
|
||||
public function __construct($topic_id, \Exception $previous = null, $code = 0)
|
||||
public function __construct($topic_id, \Exception|null $previous = null, $code = 0)
|
||||
{
|
||||
parent::__construct('SORRY_AUTH_READ_TOPIC', array($topic_id), $previous, $code);
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ class filespec
|
|||
* @param \phpbb\mimetype\guesser|null $mimetype_guesser Mime type guesser
|
||||
* @param \phpbb\plupload\plupload|null $plupload Plupload
|
||||
*/
|
||||
public function __construct(\phpbb\filesystem\filesystem_interface $phpbb_filesystem, language $language, \bantu\IniGetWrapper\IniGetWrapper $php_ini, \FastImageSize\FastImageSize $imagesize, $phpbb_root_path, \phpbb\mimetype\guesser $mimetype_guesser = null, \phpbb\plupload\plupload $plupload = null)
|
||||
public function __construct(\phpbb\filesystem\filesystem_interface $phpbb_filesystem, language $language, \bantu\IniGetWrapper\IniGetWrapper $php_ini, \FastImageSize\FastImageSize $imagesize, $phpbb_root_path, \phpbb\mimetype\guesser|null $mimetype_guesser = null, \phpbb\plupload\plupload|null $plupload = null)
|
||||
{
|
||||
$this->filesystem = $phpbb_filesystem;
|
||||
$this->language = $language;
|
||||
|
|
|
@ -86,7 +86,7 @@ class filespec_storage
|
|||
* @param \phpbb\mimetype\guesser|null $mimetype_guesser Mime type guesser
|
||||
* @param \phpbb\plupload\plupload|null $plupload Plupload
|
||||
*/
|
||||
public function __construct(language $language, \FastImageSize\FastImageSize $imagesize, \phpbb\mimetype\guesser $mimetype_guesser = null, \phpbb\plupload\plupload $plupload = null)
|
||||
public function __construct(language $language, \FastImageSize\FastImageSize $imagesize, \phpbb\mimetype\guesser|null $mimetype_guesser = null, \phpbb\plupload\plupload|null $plupload = null)
|
||||
{
|
||||
$this->language = $language;
|
||||
$this->imagesize = $imagesize;
|
||||
|
|
|
@ -26,7 +26,7 @@ class filesystem_exception extends runtime_exception
|
|||
* @param \Exception|null $previous The previous runtime_exception used for the runtime_exception chaining.
|
||||
* @param integer $code The Exception code.
|
||||
*/
|
||||
public function __construct($message = '', $filename = '', $parameters = array(), \Exception $previous = null, $code = 0)
|
||||
public function __construct($message = '', $filename = '', $parameters = array(), \Exception|null $previous = null, $code = 0)
|
||||
{
|
||||
parent::__construct($message, array_merge(array('filename' => $filename), $parameters), $previous, $code);
|
||||
}
|
||||
|
|
|
@ -293,7 +293,7 @@ class filesystem implements filesystem_interface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function mirror($origin_dir, $target_dir, \Traversable $iterator = null, $options = array())
|
||||
public function mirror($origin_dir, $target_dir, \Traversable|null $iterator = null, $options = array())
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
|
@ -190,7 +190,7 @@ interface filesystem_interface
|
|||
* The filename which triggered the error can be
|
||||
* retrieved by filesystem_exception::get_filename()
|
||||
*/
|
||||
public function mirror($origin_dir, $target_dir, \Traversable $iterator = null, $options = array());
|
||||
public function mirror($origin_dir, $target_dir, \Traversable|null $iterator = null, $options = array());
|
||||
|
||||
/**
|
||||
* Creates a directory recursively.
|
||||
|
|
|
@ -33,7 +33,7 @@ class factory
|
|||
* @param string $phpbb_root_path Path to the phpbb root directory
|
||||
* @param string $php_ext php file extension
|
||||
*/
|
||||
public function __construct(?service $cache, bool $use_cache, string $phpbb_root_path, string $php_ext)
|
||||
public function __construct(service|null $cache, bool $use_cache, string $phpbb_root_path, string $php_ext)
|
||||
{
|
||||
$this->cache = $cache;
|
||||
$this->use_cache = $use_cache;
|
||||
|
|
|
@ -58,7 +58,7 @@ class finder
|
|||
* @param string $cache_name The name of the cache variable, defaults to
|
||||
* _ext_finder
|
||||
*/
|
||||
public function __construct(?service $cache, bool $use_cache, string $phpbb_root_path, string $php_ext, string $cache_name = '_ext_finder')
|
||||
public function __construct(service|null $cache, bool $use_cache, string $phpbb_root_path, string $php_ext, string $cache_name = '_ext_finder')
|
||||
{
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->cache = $cache;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue