Compare commits

...

57 commits

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

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

PHPBB-17492
2025-04-12 09:17:39 +02:00
LukeWCS
cac3d81e73
[ticket/17492] Unintuitive checkbox status inverted for topic subscriptions
PHPBB-17492
2025-04-12 09:17:24 +02:00
rxu
692c96978a
[ticket/17488] Fix PHP error when MySQL PDO driver is not enabled
Check pdo_mysql extension for being loaded
to use respective \PDO::MYSQL_ATTR_FOUND_ROWS constant.

PHPBB-17488
2025-04-04 12:26:08 +07:00
rxu
bbfd0385b0
[ticket/15790] Fix typo in var name.
PHPBB3-15790
2025-01-08 13:13:26 +07:00
rxu
dfcd18b9ce
[ticket/15790] Allow dynamic loading services files for extensions
PHPBB3-15790
2025-01-08 13:13:22 +07:00
102 changed files with 804 additions and 3339 deletions

View file

@ -135,7 +135,7 @@ searchd
read_timeout = 5
max_children = 30
pid_file = $SPHINX_DATA_DIR/searchd.pid
binlog_path = $SPHINX_DATA_DIR/
binlog_path = $SPHINX_DATA_DIR
}
" > $SPHINX_CONF

View file

@ -370,15 +370,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 +387,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"
@ -422,7 +419,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

View file

@ -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"

View file

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

View file

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

View file

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

Binary file not shown.

View file

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

View file

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

View file

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

579
phpBB/composer.lock generated

File diff suppressed because it is too large Load diff

View file

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

View file

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

View file

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

View file

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

View file

@ -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);

View file

@ -185,7 +185,7 @@ class acp_inactive
trigger_error($user->lang['EMAIL_DISABLED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type, user_regdate, user_actkey
$sql = 'SELECT user_id, username, user_email, user_lang, user_regdate, user_actkey
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('user_id', $mark) . '
AND user_inactive_reason';
@ -194,9 +194,10 @@ class acp_inactive
$result = $db->sql_query($sql);
/** @var \phpbb\di\service_collection */
$messenger = $phpbb_container->get('messenger.method_collection');
$messenger_collection_iterator = $messenger->getIterator();
/** @var \phpbb\di\service_collection $messenger_collection */
$messenger_collection = $phpbb_container->get('messenger.method_collection');
/** @var \phpbb\messenger\method\messenger_interface $messenger_method */
$messenger_method = $messenger_collection->offsetGet('messenger.method.email');
if ($row = $db->sql_fetchrow($result))
{
@ -205,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'];

View file

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

View file

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

View file

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

View file

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

View file

@ -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&amp;mode=warn_user&amp;u=' . $user_id) : '',
'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && $can_receive_pm) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;u=' . $user_id) : '',
'U_EMAIL' => $email,
'U_JABBER' => ($data['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=jabber&amp;u=' . $user_id) : '',
'USER_JABBER' => ($config['jab_enable'] && $auth->acl_get('u_sendim')) ? $data['user_jabber'] : '',
'USER_JABBER_IMG' => ($config['jab_enable'] && $auth->acl_get('u_sendim') && $data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '',
'L_SEND_EMAIL_USER' => $user->lang('SEND_EMAIL_USER', $username),
'L_CONTACT_USER' => $user->lang('CONTACT_USER', $username),

View file

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

View file

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

View file

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

View file

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

View file

@ -35,7 +35,7 @@ class ucp_activate
$user_id = $request->variable('u', 0);
$key = $request->variable('k', '');
$sql = 'SELECT user_id, username, user_type, user_email, user_newpasswd, user_lang, user_notify_type, user_actkey, user_inactive_reason
$sql = 'SELECT user_id, username, user_type, user_email, user_newpasswd, user_lang, user_actkey, user_inactive_reason
FROM ' . USERS_TABLE . "
WHERE user_id = $user_id";
$result = $db->sql_query($sql);
@ -131,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';
}

View file

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

View file

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

View file

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

View file

@ -128,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);
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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.',

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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
{

View file

@ -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;
}

View file

@ -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';
}

View 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 $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;
}
}

View 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],
],
]
];
}
}

View file

@ -73,30 +73,38 @@ class extension_base extends Extension
{
$services_directory = false;
$services_file = false;
$additional_services_files = array();
if (file_exists($this->ext_path . 'config/' . $container->getParameter('core.environment') . '/container/environment.yml'))
{
$services_directory = $this->ext_path . 'config/' . $container->getParameter('core.environment') . '/container/';
$services_directory = 'config/' . $container->getParameter('core.environment') . '/container';
$services_file = 'environment.yml';
}
else if (!is_dir($this->ext_path . 'config/' . $container->getParameter('core.environment')))
{
if (file_exists($this->ext_path . 'config/default/container/environment.yml'))
{
$services_directory = $this->ext_path . 'config/default/container/';
$services_directory = 'config/default/container';
$services_file = 'environment.yml';
}
else if (!is_dir($this->ext_path . 'config/default') && file_exists($this->ext_path . '/config/services.yml'))
{
$services_directory = $this->ext_path . 'config';
$services_directory = 'config';
$services_file = 'services.yml';
}
}
if ($services_directory && $services_file)
{
$loader = new YamlFileLoader($container, new FileLocator(filesystem_helper::realpath($services_directory)));
$loader = new YamlFileLoader($container, new FileLocator(filesystem_helper::realpath($this->ext_path . $services_directory)));
$loader->load($services_file);
// Load additional services located in service_ prefixed Yaml files if any
$additional_services_files = $this->getServicesFilenames($services_directory, 'services_');
foreach ($additional_services_files as $file)
{
$loader->load($file);
}
}
}
@ -136,4 +144,30 @@ class extension_base extends Extension
{
return str_replace('/', '_', $this->extension_name);
}
/**
* Gets the array of the Yaml filenames.
*
* @param string $services_directory Directory in the extension folder containing services files
* @param string $services_file_prefix Services files prefix to look for
*
* @return array The services filenames array
*/
public function getServicesFilenames($services_directory, $services_file_prefix = '')
{
$services_files = array();
$finder = new \Symfony\Component\Finder\Finder();
$finder
->name("{$services_file_prefix}*.yml")
->path($services_directory)
->files()
->in($this->ext_path);
foreach ($finder as $file)
{
$services_files[] = $file->getBasename();
}
return $services_files;
}
}

View file

@ -13,8 +13,6 @@
namespace phpbb\message;
use phpbb\messenger\method\messenger_interface;
/**
* Class admin_form
* Displays a message to the user and allows him to send an email
@ -157,7 +155,6 @@ class admin_form extends form
}
$this->message->set_sender($this->user->ip, $this->sender_name, $this->sender_address, $this->user->lang_name);
$this->message->set_sender_notify_type(messenger_interface::NOTIFY_EMAIL);
}
$this->message->set_template('contact_admin');
@ -166,8 +163,7 @@ class admin_form extends form
$this->message->add_recipient(
$this->user->lang['ADMINISTRATOR'],
$this->config['board_contact'],
$this->config['default_lang'],
messenger_interface::NOTIFY_EMAIL
$this->config['default_lang']
);
$this->message->set_template_vars(array(

View file

@ -26,29 +26,33 @@ class message
/** @var string */
protected $subject = '';
/** @var string */
protected $body = '';
/** @var string */
protected $template = '';
/** @var array */
protected $template_vars = array();
/** @var string */
protected $sender_ip = '';
/** @var string */
protected $sender_name = '';
/** @var string */
protected $sender_address = '';
/** @var string */
protected $sender_lang = '';
/** @var string|int */
protected $sender_id = '';
/** @var string */
protected $sender_username = '';
/** @var string */
protected $sender_jabber = '';
/** @var int */
protected $sender_notify_type = messenger_interface::NOTIFY_EMAIL;
/** @var array */
protected $recipients;
@ -119,9 +123,7 @@ class message
$user['username'],
$user['user_email'],
$user['user_lang'],
$user['user_notify_type'],
$user['username'],
$user['user_jabber']
$user['username']
);
}
@ -131,20 +133,16 @@ class message
* @param string $recipient_name Displayed sender name
* @param string $recipient_address Email address
* @param string $recipient_lang
* @param int $recipient_notify_type Used notification methods (Jabber, Email, ...)
* @param string $recipient_username User Name (used for AntiAbuse header)
* @param string $recipient_jabber
* @return void
*/
public function add_recipient($recipient_name, $recipient_address, $recipient_lang, $recipient_notify_type = messenger_interface::NOTIFY_EMAIL, $recipient_username = '', $recipient_jabber = '')
public function add_recipient($recipient_name, $recipient_address, $recipient_lang, $recipient_username = '')
{
$this->recipients[] = array(
'name' => $recipient_name,
'user_email' => $recipient_address,
'lang' => $recipient_lang,
'username' => $recipient_username,
'user_jabber' => $recipient_jabber,
'notify_type' => $recipient_notify_type,
'to_name' => $recipient_name,
);
}
@ -163,11 +161,8 @@ class message
$user->data['user_email'],
$user->lang_name,
$user->data['user_id'],
$user->data['username'],
$user->data['user_jabber']
$user->data['username']
);
$this->set_sender_notify_type($user->data['user_notify_type']);
}
/**
@ -179,10 +174,9 @@ class message
* @param string $sender_lang
* @param int $sender_id User ID
* @param string $sender_username User Name (used for AntiAbuse header)
* @param string $sender_jabber
* @return void
*/
public function set_sender($sender_ip, $sender_name, $sender_address, $sender_lang = '', $sender_id = 0, $sender_username = '', $sender_jabber = '')
public function set_sender($sender_ip, $sender_name, $sender_address, $sender_lang = '', $sender_id = 0, $sender_username = '')
{
$this->sender_ip = $sender_ip;
$this->sender_name = $sender_name;
@ -190,18 +184,6 @@ class message
$this->sender_lang = $sender_lang;
$this->sender_id = $sender_id;
$this->sender_username = $sender_username;
$this->sender_jabber = $sender_jabber;
}
/**
* Which notification type should be used? Jabber, Email, ...?
*
* @param int $sender_notify_type
* @return void
*/
public function set_sender_notify_type($sender_notify_type)
{
$this->sender_notify_type = $sender_notify_type;
}
/**
@ -225,8 +207,6 @@ class message
'user_email' => $this->sender_address,
'name' => $this->sender_name,
'username' => $this->sender_username,
'user_jabber' => $this->sender_jabber,
'notify_type' => $this->sender_notify_type,
'to_name' => $this->recipients[0]['to_name'],
);
}
@ -257,40 +237,37 @@ class message
foreach ($messenger_collection_iterator as $messenger_method)
{
$messenger_method->set_use_queue(false);
if ($messenger_method->get_id() == $recipient['notify_type'] || $recipient['notify_type'] == $messenger_method::NOTIFY_BOTH)
$messenger_method->template($this->template, $recipient['lang']);
$messenger_method->set_addresses($recipient);
$messenger_method->reply_to($this->sender_address);
$messenger_method->header('X-AntiAbuse', 'Board servername - ' . $this->server_name);
$messenger_method->header('X-AntiAbuse', 'User IP - ' . $this->sender_ip);
if ($this->sender_id)
{
$messenger_method->template($this->template, $recipient['lang']);
$messenger_method->set_addresses($recipient);
$messenger_method->reply_to($this->sender_address);
$messenger_method->header('X-AntiAbuse', 'Board servername - ' . $this->server_name);
$messenger_method->header('X-AntiAbuse', 'User IP - ' . $this->sender_ip);
if ($this->sender_id)
{
$messenger_method->header('X-AntiAbuse', 'User_id - ' . $this->sender_id);
}
if ($this->sender_username)
{
$messenger_method->header('X-AntiAbuse', 'Username - ' . $this->sender_username);
}
$messenger_method->subject(html_entity_decode($this->subject, ENT_COMPAT));
$messenger_method->assign_vars([
'BOARD_CONTACT' => $contact,
'TO_USERNAME' => html_entity_decode($recipient['to_name'], ENT_COMPAT),
'FROM_USERNAME' => html_entity_decode($this->sender_name, ENT_COMPAT),
'MESSAGE' => html_entity_decode($this->body, ENT_COMPAT),
]);
if (count($this->template_vars))
{
$messenger_method->assign_vars($this->template_vars);
}
$messenger_method->send();
$messenger_method->header('X-AntiAbuse', 'User_id - ' . $this->sender_id);
}
if ($this->sender_username)
{
$messenger_method->header('X-AntiAbuse', 'Username - ' . $this->sender_username);
}
$messenger_method->subject(html_entity_decode($this->subject, ENT_COMPAT));
$messenger_method->assign_vars([
'BOARD_CONTACT' => $contact,
'TO_USERNAME' => html_entity_decode($recipient['to_name'], ENT_COMPAT),
'FROM_USERNAME' => html_entity_decode($this->sender_name, ENT_COMPAT),
'MESSAGE' => html_entity_decode($this->body, ENT_COMPAT),
]);
if (count($this->template_vars))
{
$messenger_method->assign_vars($this->template_vars);
}
$messenger_method->send();
}
}
}

View file

@ -13,8 +13,6 @@
namespace phpbb\message;
use phpbb\messenger\method\messenger_interface;
/**
* Class topic_form
* Form used to send topics as notification emails
@ -131,10 +129,8 @@ class topic_form extends form
$this->message->add_recipient(
$this->recipient_name,
$this->recipient_address,
$this->recipient_lang,
messenger_interface::NOTIFY_EMAIL
$this->recipient_lang
);
$this->message->set_sender_notify_type(messenger_interface::NOTIFY_EMAIL);
parent::submit($messenger);
}

View file

@ -34,7 +34,7 @@ class user_form extends form
*/
protected function get_user_row($user_id)
{
$sql = 'SELECT user_id, username, user_colour, user_email, user_allow_viewemail, user_lang, user_jabber, user_notify_type
$sql = 'SELECT user_id, username, user_colour, user_email, user_allow_viewemail, user_lang
FROM ' . USERS_TABLE . '
WHERE user_id = ' . (int) $user_id . '
AND user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')';

View file

@ -141,11 +141,6 @@ abstract class base implements messenger_interface
$this->set_use_queue();
}
/**
* {@inheritdoc}
*/
abstract public function get_id(): int;
/**
* {@inheritdoc}
*/

View file

@ -74,14 +74,6 @@ class email extends base
/** @var AbstractTransport */
protected AbstractTransport $transport;
/**
* {@inheritDoc}
*/
public function get_id(): int
{
return self::NOTIFY_EMAIL;
}
/**
* {@inheritDoc}
*/

File diff suppressed because it is too large Load diff

View file

@ -18,22 +18,6 @@ namespace phpbb\messenger\method;
*/
interface messenger_interface
{
/** @var int Email notify method used */
public const NOTIFY_EMAIL = 0;
/** @var int Instant messaging (Jabber) notify method used */
public const NOTIFY_IM = 1;
/** @var int Both notify methods used */
public const NOTIFY_BOTH = 2;
/**
* Get messenger method id
*
* @return int
*/
public function get_id(): int;
/**
* Check if the messenger method is enabled
*

View file

@ -64,7 +64,7 @@ class queue
/**
* Init a queue object
*
* @param string $object Queue object type: email/jabber/etc
* @param string $object Queue object type: email/etc
* @param int $package_size Size of the messenger package to send
* @return void
*/
@ -78,7 +78,7 @@ class queue
/**
* Put message into the messenger file queue
*
* @param string $object Queue object type: email/jabber/etc
* @param string $object Queue object type: email/etc
* @param array $message_data Message data to send
* @return void
*/

View file

@ -708,7 +708,7 @@ class manager
*
* @param string $item_type Type identifier of the subscription
* @param int $item_id The id of the item
* @param string $method The method of the notification e.g. 'board', 'email', or 'jabber'
* @param string $method The method of the notification e.g. 'board', 'email'
* (if null a subscription will be added for all the defaults methods)
* @param bool|int $user_id The user_id to add the subscription for (bool false for current user)
*/
@ -765,7 +765,7 @@ class manager
*
* @param string $item_type Type identifier of the subscription
* @param int $item_id The id of the item
* @param string $method The method of the notification e.g. 'board', 'email', or 'jabber'
* @param string $method The method of the notification e.g. 'board', 'email'
* @param bool|int $user_id The user_id to add the subscription for (bool false for current user)
*/
public function delete_subscription($item_type, $item_id = 0, $method = null, $user_id = false)

View file

@ -19,14 +19,13 @@ use phpbb\user_loader;
use phpbb\config\config;
use phpbb\db\driver\driver_interface;
use phpbb\di\service_collection;
use phpbb\messenger\method\messenger_interface;
/**
* Email notification method class
* This class handles sending emails for notifications
*/
class email extends \phpbb\notification\method\messenger_base
class email extends messenger_base
{
/** @var user */
protected $user;
@ -136,7 +135,7 @@ class email extends \phpbb\notification\method\messenger_base
$insert_buffer->flush();
$this->notify_using_messenger(messenger_interface::NOTIFY_EMAIL);
$this->notify_using_messenger('messenger.method.email');
}
/**

View file

@ -1,104 +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.
*
*/
namespace phpbb\notification\method;
use phpbb\notification\type\type_interface;
use phpbb\user;
use phpbb\user_loader;
use phpbb\config\config;
use phpbb\di\service_collection;
use phpbb\messenger\method\messenger_interface;
/**
* Jabber notification method class
* This class handles sending Jabber messages for notifications
*/
class jabber extends \phpbb\notification\method\messenger_base
{
/** @var user */
protected $user;
/** @var config */
protected $config;
/** @var service_collection */
protected $messenger;
/**
* Notification Method jabber Constructor
*
* @param user_loader $user_loader
* @param user $user
* @param config $config
* @param string $phpbb_root_path
* @param string $php_ext
* @param service_collection $messenger
*/
public function __construct(user_loader $user_loader, user $user, config $config, $phpbb_root_path, $php_ext, service_collection $messenger)
{
parent::__construct($messenger, $user_loader, $phpbb_root_path, $php_ext);
$this->user = $user;
$this->config = $config;
}
/**
* Get notification method name
*
* @return string
*/
public function get_type()
{
return 'notification.method.jabber';
}
/**
* Is this method available for the user?
* This is checked on the notifications options
*
* @param type_interface|null $notification_type An optional instance of a notification type. If provided, this
* method additionally checks if the type provides an email template.
* @return bool
*/
public function is_available(type_interface $notification_type = null)
{
return parent::is_available($notification_type) && $this->global_available() && !empty($this->user->data['user_jabber']);
}
/**
* Is this method available at all?
* This is checked before notifications are sent
*/
public function global_available()
{
return !(
empty($this->config['jab_enable']) ||
empty($this->config['jab_host']) ||
empty($this->config['jab_username']) ||
empty($this->config['jab_password']) ||
!@extension_loaded('xml')
);
}
public function notify()
{
if (!$this->global_available())
{
return;
}
$this->notify_using_messenger(messenger_interface::NOTIFY_IM, 'short/');
}
}

View file

@ -18,7 +18,7 @@ use phpbb\di\service_collection;
use phpbb\user_loader;
/**
* Abstract notification method handling email and jabber notifications
* Abstract notification method handling messenger notifications
* using the phpBB messenger.
*/
abstract class messenger_base extends \phpbb\notification\method\base
@ -67,12 +67,12 @@ abstract class messenger_base extends \phpbb\notification\method\base
/**
* Notify using phpBB messenger
*
* @param int $notify_method Notify method for messenger (e.g. \phpbb\messenger\method\messenger_interface::NOTIFY_IM)
* @param string $notify_method Notify method service for messenger (e.g. 'messenger.method.email'), empty string for all available methods
* @param string $template_dir_prefix Base directory to prepend to the email template name
*
* @return void
*/
protected function notify_using_messenger($notify_method, $template_dir_prefix = '')
protected function notify_using_messenger(string $notify_method, string $template_dir_prefix = ''): void
{
if (empty($this->queue))
{
@ -120,7 +120,7 @@ abstract class messenger_base extends \phpbb\notification\method\base
*/
foreach ($messenger_collection_iterator as $messenger_method)
{
if ($messenger_method->get_id() == $notify_method || $notify_method == $messenger_method::NOTIFY_BOTH)
if (empty($notify_method) || $messenger_collection_iterator->key() == $notify_method)
{
$messenger_method->template($notification->get_email_template(), $user['user_lang'], '', $template_dir_prefix);
$messenger_method->set_addresses($user);

View file

@ -327,10 +327,7 @@ abstract class base implements \phpbb\notification\type\type_interface
*/
/**
* URL to unsubscribe to this notification (fall back)
*
* @param string|bool $method Method name to unsubscribe from (email|jabber|etc), False to unsubscribe from all notifications for this item
* @return false
* {@inheritDoc}
*/
public function get_unsubscribe_url($method = false)
{

View file

@ -132,7 +132,7 @@ interface type_interface
/**
* URL to unsubscribe to this notification
*
* @param string|bool $method Method name to unsubscribe from (email|jabber|etc), False to unsubscribe from all notifications for this item
* @param string|bool $method Method name to unsubscribe from (email|etc), False to unsubscribe from all notifications for this item
*/
public function get_unsubscribe_url($method);

View file

@ -253,7 +253,6 @@ class permissions
'u_pm_img' => array('lang' => 'ACL_U_PM_IMG', 'cat' => 'pm'),
'u_sendemail' => array('lang' => 'ACL_U_SENDEMAIL', 'cat' => 'misc'),
'u_sendim' => array('lang' => 'ACL_U_SENDIM', 'cat' => 'misc'),
'u_ignoreflood' => array('lang' => 'ACL_U_IGNOREFLOOD', 'cat' => 'misc'),
'u_hideonline' => array('lang' => 'ACL_U_HIDEONLINE', 'cat' => 'misc'),
'u_viewonline' => array('lang' => 'ACL_U_VIEWONLINE', 'cat' => 'misc'),
@ -317,7 +316,6 @@ class permissions
// Admin Permissions
'a_board' => array('lang' => 'ACL_A_BOARD', 'cat' => 'settings'),
'a_server' => array('lang' => 'ACL_A_SERVER', 'cat' => 'settings'),
'a_jabber' => array('lang' => 'ACL_A_JABBER', 'cat' => 'settings'),
'a_phpinfo' => array('lang' => 'ACL_A_PHPINFO', 'cat' => 'settings'),
'a_forum' => array('lang' => 'ACL_A_FORUM', 'cat' => 'forums'),

View file

@ -952,7 +952,7 @@ class fulltext_sphinx implements search_backend_interface
array('read_timeout', '5'),
array('max_children', '30'),
array('pid_file', $this->config['fulltext_sphinx_data_path'] . 'searchd.pid'),
array('binlog_path', $this->config['fulltext_sphinx_data_path']),
array('binlog_path', rtrim($this->config['fulltext_sphinx_data_path'], '/\\')), // Trim trailing slash
),
);

View file

@ -176,7 +176,7 @@ class reset_password
}
$sql_array = [
'SELECT' => 'user_id, username, user_permissions, user_email, user_jabber, user_notify_type, user_type,'
'SELECT' => 'user_id, username, user_permissions, user_email, user_type,'
. ' user_lang, user_inactive_reason, reset_token, reset_token_expiration',
'FROM' => [$this->users_table => 'u'],
'WHERE' => "user_email = '" . $this->db->sql_escape($email) . "'" .
@ -308,7 +308,7 @@ class reset_password
add_form_key('ucp_reset_password');
$sql_array = [
'SELECT' => 'user_id, username, user_permissions, user_email, user_jabber, user_notify_type, user_type,'
'SELECT' => 'user_id, username, user_permissions, user_email, user_type,'
. ' user_lang, user_inactive_reason, reset_token, reset_token_expiration',
'FROM' => [$this->users_table => 'u'],
'WHERE' => 'user_id = ' . $user_id,

View file

@ -1,46 +0,0 @@
<!-- INCLUDE simple_header.html -->
<h2>{L_SEND_IM}</h2>
<form method="post" action="{S_IM_ACTION}">
<div class="panel bg2">
<div class="inner">
<p>{L_SEND_IM_EXPLAIN}</p>
<!-- IF S_SENT_JABBER -->
<p>{L_IM_SENT_JABBER}</p>
<!-- ENDIF -->
<fieldset>
<dl class="fields2">
<dt><label>{L_IM_RECIPIENT}{L_COLON}</label></dt>
<dd><strong>{USERNAME}</strong><!-- IF S_NO_SEND_JABBER --> [ {IM_CONTACT} ]<!-- ENDIF --><!-- IF PRESENCE_IMG --> {PRESENCE_IMG}<!-- ENDIF --></dd>
</dl>
<!-- IF S_SEND_JABBER -->
<dl class="fields2">
<dt><label for="message">{L_IM_MESSAGE}{L_COLON}</label></dt>
<dd><textarea class="inputbox autowidth" name="message" id="message" rows="5" cols="45"></textarea></dd>
</dl>
<dl class="fields2">
<dt>&nbsp;</dt>
<dd><input class="button1 button button-form" name="submit" type="submit" value="{L_IM_SEND}" /></dd>
</dl>
<!-- ELSE IF S_NO_SEND_JABBER -->
<dl class="fields2">
<dt>&nbsp;</dt>
<dd>{L_IM_NO_JABBER}</dd>
</dl>
<!-- ENDIF -->
{S_FORM_TOKEN}
</fieldset>
</div>
</div>
</form>
<a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a>
<!-- INCLUDE simple_footer.html -->

View file

@ -29,12 +29,6 @@
<dt><label for="email">{L_EMAIL}{L_COLON}</label></dt>
<dd><input type="text" name="email" id="email" value="{EMAIL}" class="inputbox" /></dd>
</dl>
<!-- ENDIF -->
<!-- IF S_JABBER_ENABLED -->
<dl>
<dt><label for="jabber">{L_JABBER}{L_COLON}</label></dt>
<dd><input type="text" name="jabber" id="jabber" value="{JABBER}" class="inputbox" /></dd>
</dl>
<!-- ENDIF -->
<dl>
<dt><label for="search_group_id">{L_GROUP}{L_COLON}</label></dt>

View file

@ -75,7 +75,6 @@
<dl class="details">
<!-- IF U_EMAIL --><dt>{L_EMAIL_ADDRESS}{L_COLON}</dt> <dd><a href="{U_EMAIL}">{L_SEND_EMAIL_USER}</a></dd><!-- ENDIF -->
<!-- IF U_PM --><dt>{L_PM}{L_COLON}</dt> <dd><a href="{U_PM}">{L_SEND_PRIVATE_MESSAGE}</a></dd><!-- ENDIF -->
<!-- IF U_JABBER and S_JABBER_ENABLED --><dt>{L_JABBER}{L_COLON}</dt> <dd><a href="{U_JABBER}" onclick="popup(this.href, 750, 320); return false;">{L_SEND_JABBER_MESSAGE}</a></dd><!-- ELSEIF USER_JABBER --><dt>{L_JABBER}{L_COLON}</dt> <dd>{USER_JABBER}</dd><!-- ENDIF -->
<!-- EVENT memberlist_view_contact_custom_fields_before -->
<!-- BEGIN custom_fields -->
<!-- IF custom_fields.S_PROFILE_CONTACT -->

View file

@ -35,11 +35,11 @@
<li class="in-menu">
<a href="{{ U_WATCH_FORUM_LINK }}" title="{{ S_WATCH_FORUM_TITLE }}" data-ajax="toggle_link" data-toggle-text="{{ S_WATCH_FORUM_TOGGLE }}" data-toggle-url="{{ U_WATCH_FORUM_TOGGLE }}">
{% if S_WATCHING_FORUM %}
{{ Icon('font', 'bell-slash', '', true, 'far c-watch-icon is-active') }}
{{ Icon('font', 'bell', '', true, 'far c-watch-icon') }}
{% else %}
{{ Icon('font', 'bell', '', true, 'far c-watch-icon is-active') }}
{{ Icon('font', 'bell-slash', '', true, 'far c-watch-icon') }}
{% else %}
{{ Icon('font', 'bell-slash', '', true, 'far c-watch-icon is-active') }}
{{ Icon('font', 'bell', '', true, 'far c-watch-icon') }}
{% endif %}
<span>{{ S_WATCH_FORUM_TITLE }}</span>
</a>

View file

@ -70,7 +70,7 @@
<!-- IF REMAINDER eq 0 -->
<div>
<!-- ENDIF -->
<a href="<!-- IF contact.U_CONTACT -->{contact.U_CONTACT}<!-- ELSE -->{contact.U_PROFILE_AUTHOR}<!-- ENDIF -->" title="{contact.NAME}"<!-- IF $S_LAST_CELL --> class="last-cell"<!-- ENDIF --><!-- IF contact.ID eq 'jabber' --> onclick="popup(this.href, 750, 320); return false;"<!-- ENDIF -->>
<a href="<!-- IF contact.U_CONTACT -->{contact.U_CONTACT}<!-- ELSE -->{contact.U_PROFILE_AUTHOR}<!-- ENDIF -->" title="{contact.NAME}"<!-- IF $S_LAST_CELL --> class="last-cell"<!-- ENDIF -->>
{% if contact.ID == 'pm' %}
{{ Icon('font', 'message', '', true, 'far contact-icon') }}
{% elseif contact.ID == 'email' %}

View file

@ -40,16 +40,6 @@
</dd>
</dl>
<!-- ENDIF -->
<!-- IF S_SELECT_NOTIFY -->
<dl>
<dt><label for="notifymethod0">{L_NOTIFY_METHOD}{L_COLON}</label></dt>
<dd>
<label for="notifymethod0"><input type="radio" name="notifymethod" id="notifymethod0" value="0"<!-- IF S_NOTIFY_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_EMAIL}</label>
<label for="notifymethod1"><input type="radio" name="notifymethod" id="notifymethod1" value="1"<!-- IF S_NOTIFY_IM --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_IM}</label>
<label for="notifymethod2"><input type="radio" name="notifymethod" id="notifymethod2" value="2"<!-- IF S_NOTIFY_BOTH --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_BOTH}</label>
</dd>
</dl>
<!-- ENDIF -->
<!-- IF S_MORE_LANGUAGES -->
<dl>
<dt><label for="{{ LANG_OPTIONS.id }}">{L_BOARD_LANGUAGE}{L_COLON}</label></dt>

View file

@ -21,12 +21,6 @@
</dd>
</dl>
<!-- ENDIF -->
<!-- IF S_JABBER_ENABLED -->
<dl>
<dt><label for="jabber">{L_UCP_JABBER}{L_COLON}</label></dt>
<dd><input type="email" name="jabber" id="jabber" maxlength="255" value="{JABBER}" class="inputbox" /></dd>
</dl>
<!-- ENDIF -->
<!-- BEGIN profile_fields -->
<dl>
<dt><label<!-- IF profile_fields.FIELD_ID --> for="{profile_fields.FIELD_ID}"<!-- ENDIF -->>{profile_fields.LANG_NAME}{L_COLON}<!-- IF profile_fields.S_REQUIRED --> *<!-- ENDIF --></label>

View file

@ -191,7 +191,7 @@
<!-- IF REMAINDER eq 0 -->
<div>
<!-- ENDIF -->
<a href="<!-- IF postrow.contact.U_CONTACT -->{postrow.contact.U_CONTACT}<!-- ELSE -->{postrow.U_POST_AUTHOR}<!-- ENDIF -->" title="{postrow.contact.NAME}"<!-- IF $S_LAST_CELL --> class="last-cell"<!-- ENDIF --><!-- IF postrow.contact.ID eq 'jabber' --> onclick="popup(this.href, 750, 320); return false;"<!-- ENDIF -->>
<a href="<!-- IF postrow.contact.U_CONTACT -->{postrow.contact.U_CONTACT}<!-- ELSE -->{postrow.U_POST_AUTHOR}<!-- ENDIF -->" title="{postrow.contact.NAME}"<!-- IF $S_LAST_CELL --> class="last-cell"<!-- ENDIF -->>
{% EVENT viewtopic_body_contact_icon_prepend %}
{% if postrow.contact.ID == 'pm' %}
{{ Icon('font', 'message', '', true, 'far contact-icon') }}

View file

@ -8,20 +8,20 @@
<div class="pointer"><div class="pointer-inner"></div></div>
<ul class="dropdown-contents">
<!-- EVENT viewtopic_topic_tools_before -->
<!-- IF U_WATCH_TOPIC -->
{% if U_WATCH_TOPIC %}
<li>
<a href="{U_WATCH_TOPIC}" class="watch-topic-link" title="{S_WATCH_TOPIC_TITLE}" data-ajax="toggle_link" data-toggle-text="{S_WATCH_TOPIC_TOGGLE}" data-toggle-url="{U_WATCH_TOPIC_TOGGLE}" data-update-all=".watch-topic-link">
<a href="{{ U_WATCH_TOPIC }}" class="watch-topic-link" title="{{ S_WATCH_TOPIC_TITLE }}" data-ajax="toggle_link" data-toggle-text="{{ S_WATCH_TOPIC_TOGGLE }}" data-toggle-url="{{ U_WATCH_TOPIC_TOGGLE }}" data-update-all=".watch-topic-link">
{% if S_WATCHING_TOPIC %}
{{ Icon('font', 'bell-slash', '', true, 'far c-watch-icon is-active') }}
{{ Icon('font', 'bell', '', true, 'far c-watch-icon') }}
{% else %}
{{ Icon('font', 'bell', '', true, 'far c-watch-icon is-active') }}
{{ Icon('font', 'bell-slash', '', true, 'far c-watch-icon') }}
{% else %}
{{ Icon('font', 'bell-slash', '', true, 'far c-watch-icon is-active') }}
{{ Icon('font', 'bell', '', true, 'far c-watch-icon') }}
{% endif %}
<span>{S_WATCH_TOPIC_TITLE}</span>
</a>
</li>
<!-- ENDIF -->
{% endif %}
<!-- IF U_BOOKMARK_TOPIC -->
<li>
<a href="{U_BOOKMARK_TOPIC}" class="bookmark-link" title="{L_BOOKMARK_TOPIC}" data-ajax="alt_text" data-alt-text="{S_BOOKMARK_TOGGLE}" data-update-all=".bookmark-link">

View file

@ -802,7 +802,6 @@ $template->assign_vars(array(
'SEARCH_IMG' => $user->img('icon_user_search', 'SEARCH_USER_POSTS'),
'PM_IMG' => $user->img('icon_contact_pm', 'SEND_PRIVATE_MESSAGE'),
'EMAIL_IMG' => $user->img('icon_contact_email', 'SEND_EMAIL'),
'JABBER_IMG' => $user->img('icon_contact_jabber', 'JABBER') ,
'REPORT_IMG' => $user->img('icon_post_report', 'REPORT_POST'),
'REPORTED_IMG' => $user->img('icon_topic_reported', 'POST_REPORTED'),
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'POST_UNAPPROVED'),
@ -1423,7 +1422,6 @@ while ($row = $db->sql_fetchrow($result))
'rank_image_src' => '',
'pm' => '',
'email' => '',
'jabber' => '',
'search' => '',
'age' => '',
@ -1493,7 +1491,6 @@ while ($row = $db->sql_fetchrow($result))
'contact_user' => $user->lang('CONTACT_USER', get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['username'])),
'online' => false,
'jabber' => ($config['jab_enable'] && $row['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&amp;action=jabber&amp;u=$poster_id") : '',
'search' => ($config['load_search'] && $auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$poster_id&amp;sr=posts") : '',
'author_full' => get_username_string('full', $poster_id, $row['username'], $row['user_colour']),
@ -2068,7 +2065,6 @@ for ($i = 0, $end = count($post_list); $i < $end; ++$i)
'U_SEARCH' => $user_cache[$poster_id]['search'],
'U_PM' => $u_pm,
'U_EMAIL' => $user_cache[$poster_id]['email'],
'U_JABBER' => $user_cache[$poster_id]['jabber'],
'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;p={$row['post_id']}&amp;f={$row['forum_id']}&amp;redirect=" . urlencode(str_replace('&amp;', '&', $viewtopic_url . '&amp;p=' . $row['post_id'] . '#p' . $row['post_id']))),
'U_REPORT' => ($auth->acl_get('f_report', $forum_id)) ? $phpbb_container->get('controller.helper')->route('phpbb_report_post_controller', array('id' => $row['post_id'])) : '',
@ -2179,11 +2175,6 @@ for ($i = 0, $end = count($post_list); $i < $end; ++$i)
'NAME' => $user->lang['SEND_EMAIL'],
'U_CONTACT' => $user_cache[$poster_id]['email'],
),
array(
'ID' => 'jabber',
'NAME' => $user->lang['JABBER'],
'U_CONTACT' => $user_cache[$poster_id]['jabber'],
),
);
foreach ($contact_fields as $field)

View file

@ -152,7 +152,6 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case
'user_post_sortby_dir' => 'a',
'user_notify' => 0,
'user_notify_pm' => 1,
'user_notify_type' => 0,
'user_allow_pm' => 1,
'user_allow_viewonline' => 1,
'user_allow_viewemail' => 1,
@ -165,7 +164,6 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case
'user_sig' => '',
'user_sig_bbcode_uid' => '',
'user_sig_bbcode_bitfield' => '',
'user_jabber' => '',
'user_actkey' => '',
'user_actkey_expiration' => 0,
'user_newpasswd' => '',

View file

@ -263,7 +263,12 @@ abstract class phpbb_functional_search_base extends phpbb_functional_test_case
// Ensure search index has been actually created
$crawler = self::request('GET', 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid);
$posts_indexed = (int) $crawler->filter('#acp_search_index_' . str_replace('\\', '-', $search_type) . ' td')->eq(1)->text();
$posts_indexed = (int) $crawler->filter('#acp_search_index_' . str_replace('\\', '-', $search_type) . ' td')->reduce(
function ($node, $i) {
// Find the value of total posts indexed
return (strpos($node->text(), $this->lang('FULLTEXT_MYSQL_TOTAL_POSTS')) !== false || strpos($node->text(), $this->lang('TOTAL_WORDS')) !== false);
})
->nextAll()->eq(0)->text();
$this->assertTrue($posts_indexed > 0);
}
@ -300,7 +305,12 @@ abstract class phpbb_functional_search_base extends phpbb_functional_test_case
// Ensure search index has been actually removed
$crawler = self::request('GET', 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid);
$posts_indexed = (int) $crawler->filter('#acp_search_index_' . str_replace('\\', '-', $this->search_backend) . ' td')->eq(1)->text();
$posts_indexed = (int) $crawler->filter('#acp_search_index_' . str_replace('\\', '-', $this->search_backend) . ' td')->reduce(
function ($node, $i) {
// Find the value of total posts indexed
return (strpos($node->text(), $this->lang('FULLTEXT_MYSQL_TOTAL_POSTS')) !== false || strpos($node->text(), $this->lang('TOTAL_WORDS')) !== false);
})
->nextAll()->eq(0)->text();
$this->assertEquals(0, $posts_indexed);
}
}

View file

@ -27,8 +27,10 @@ class phpbb_functional_search_sphinx_test extends phpbb_functional_search_base
if (!$backend || $this->search_backend == $backend)
{
$output = $retval = null;
// After creating phpBB search index, build Sphinx index
exec('sudo -S service sphinxsearch stop', $output, $retval); // Attemtp to stop sphinxsearch service in case it's running
exec('sudo -S service sphinxsearch stop', $output, $retval); // Attempt to stop sphinxsearch service in case it's running
exec('sudo -S indexer --all', $output, $retval); // Run sphinxsearch indexer
exec('sudo -S service sphinxsearch start', $output, $retval); // Attempt to start sphinxsearch service again
}

View file

@ -263,7 +263,7 @@ class phpbb_functional_user_password_reset_test extends phpbb_functional_test_ca
protected function get_user_data($username)
{
$db = $this->get_db();
$sql = 'SELECT user_id, username, user_type, user_email, user_newpasswd, user_lang, user_notify_type, user_actkey, user_inactive_reason, reset_token, reset_token_expiration
$sql = 'SELECT user_id, username, user_type, user_email, user_newpasswd, user_lang, user_actkey, user_inactive_reason, reset_token, reset_token_expiration
FROM ' . USERS_TABLE . "
WHERE username = '" . $db->sql_escape($username) . "'";
$result = $db->sql_query($sql);

View file

@ -601,7 +601,16 @@ class phpbb_functional_visibility_softdelete_test extends phpbb_functional_test_
// Assert new topic title is indexed as well
$this->add_lang('search');
self::request('GET', "search.php?keywords=bang&sid={$this->sid}");
$this->assertStringContainsString(sprintf($this->lang['FOUND_SEARCH_MATCHES'][1], 1), self::get_content());
// Sphinx search doesn't apply to unapproved or softdeleted posts
if (strpos($this->get_search_type(), 'fulltext_sphinx'))
{
$this->assertStringContainsString(sprintf($this->lang['FOUND_SEARCH_MATCHES'][2], 0), self::get_content());
}
else
{
$this->assertStringContainsString(sprintf($this->lang['FOUND_SEARCH_MATCHES'][1], 1), self::get_content());
}
}
public function test_move_topic_back()

View file

@ -1,83 +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.
*
*/
require_once __DIR__ . '/../../phpBB/includes/functions_user.php';
require_once __DIR__ . '/validate_data_helper.php';
class phpbb_functions_validate_jabber_test extends phpbb_test_case
{
protected $helper;
protected function setUp(): void
{
parent::setUp();
$this->helper = new phpbb_functions_validate_data_helper($this);
}
public function test_validate_jabber()
{
$this->helper->assert_valid_data(array(
'empty' => array(
array(),
'',
array('jabber'),
),
'no_seperator' => array(
array('WRONG_DATA'),
'testjabber.ccc',
array('jabber'),
),
'no_user' => array(
array('WRONG_DATA'),
'@jabber.ccc',
array('jabber'),
),
'no_realm' => array(
array('WRONG_DATA'),
'user@',
array('jabber'),
),
'dot_realm' => array(
array('WRONG_DATA'),
'user@.....',
array('jabber'),
),
'-realm' => array(
array('WRONG_DATA'),
'user@-jabber.ccc',
array('jabber'),
),
'realm-' => array(
array('WRONG_DATA'),
'user@jabber.ccc-',
array('jabber'),
),
'correct' => array(
array(),
'user@jabber.09A-z.org',
array('jabber'),
),
'prohibited' => array(
array('WRONG_DATA'),
'u@ser@jabber.ccc.org',
array('jabber'),
),
'prohibited_char' => array(
array('WRONG_DATA'),
'u<s>er@jabber.ccc.org',
array('jabber'),
),
));
}
}

View file

@ -119,7 +119,6 @@ class phpbb_messenger_method_email_test extends \phpbb_test_case
public function test_miscellaneous(): void
{
$this->assertEquals(email::NOTIFY_EMAIL, $this->method_email->get_id());
$this->assertEquals('email', $this->method_email->get_queue_object_name());
$this->assertFalse($this->method_email->is_enabled());
$this->config->offsetSet('email_enable', true);

View file

@ -1,311 +0,0 @@
<?php
use phpbb\config\config;
use phpbb\language\language;
use phpbb\language\language_file_loader;
use phpbb\messenger\method\jabber;
use phpbb\messenger\method\messenger_interface;
use phpbb\messenger\queue;
use phpbb\path_helper;
use phpbb\symfony_request;
use phpbb\template\assets_bag;
/**
*
* 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 phpbb_messenger_method_jabber_test extends \phpbb_test_case
{
protected $assets_bag;
protected $cache_path;
protected config $config;
protected $dispatcher;
protected $extension_manager;
protected jabber $method_jabber;
protected $method_base;
protected $language;
protected $log;
protected $path_helper;
protected queue $queue;
protected $request;
protected $twig_extensions_collection;
protected $twig_lexer;
protected $user;
public function setUp(): void
{
global $config, $request, $symfony_request, $user, $phpbb_root_path, $phpEx;
$this->assets_bag = new assets_bag();
$this->cache_path = $phpbb_root_path . 'cache/' . PHPBB_ENVIRONMENT . '/twig';
$this->config = new config([
'force_server_vars' => false,
'jab_username' => 'test',
'jab_password' => 'password',
'jab_use_ssl' => false,
'jab_host' => 'localhost',
'jab_port' => 5222,
'jab_verify_peer' => true,
'jab_verify_peer_name' => true,
'jab_allow_self_signed' => false,
]);
$config = $this->config;
$this->dispatcher = $this->getMockBuilder('\phpbb\event\dispatcher')
->disableOriginalConstructor()
->getMock();
$this->filesystem = new \phpbb\filesystem\filesystem();
$this->language = new language(new language_file_loader($phpbb_root_path, $phpEx));
$this->queue = $this->createMock(queue::class);
$this->request = new phpbb_mock_request();
$request = $this->request;
$this->symfony_request = new symfony_request(new phpbb_mock_request());
$symfony_request = $this->symfony_request;
$this->user = $this->getMockBuilder('\phpbb\user')
->setConstructorArgs([$this->language, '\phpbb\datetime'])
->getMock();
$user = $this->user;
$user->page['root_script_path'] = 'phpbb/';
$this->user->host = 'yourdomain.com';
$this->path_helper = new path_helper(
$this->symfony_request,
$this->request,
$phpbb_root_path,
$phpEx
);
$phpbb_container = new phpbb_mock_container_builder;
$this->twig_extensions_collection = new \phpbb\di\service_collection($phpbb_container);
$twig = new \phpbb\template\twig\environment(
$this->assets_bag,
$this->config,
$this->filesystem,
$this->path_helper,
$this->cache_path,
null,
new \phpbb\template\twig\loader(''),
$this->dispatcher,
array(
'cache' => false,
'debug' => false,
'auto_reload' => true,
'autoescape' => false,
)
);
$this->twig_lexer = new \phpbb\template\twig\lexer($twig);
$this->extension_manager = new phpbb_mock_extension_manager(
__DIR__ . '/',
array(
'vendor2/foo' => array(
'ext_name' => 'vendor2/foo',
'ext_active' => '1',
'ext_path' => 'ext/vendor2/foo/',
),
)
);
$this->log = $this->createMock(\phpbb\log\log_interface::class);
$this->method_jabber = new jabber(
$this->assets_bag,
$this->config,
$this->dispatcher,
$this->language,
$this->queue,
$this->path_helper,
$this->request,
$this->twig_extensions_collection,
$this->twig_lexer,
$this->user,
$phpbb_root_path,
$this->cache_path,
$this->extension_manager,
$this->log
);
}
public function test_miscellaneous()
{
$this->method_jabber->init();
$this->assertEquals(messenger_interface::NOTIFY_IM, $this->method_jabber->get_id());
$this->assertEquals('jabber', $this->method_jabber->get_queue_object_name());
$this->assertFalse($this->method_jabber->is_enabled());
$this->config->set('jab_enable', true);
$this->assertTrue($this->method_jabber->is_enabled());
$this->assertEquals(@extension_loaded('openssl'), $this->method_jabber->can_use_ssl());
}
public function test_stream_options()
{
$this->method_jabber->init();
$this->assertEquals($this->method_jabber, $this->method_jabber->stream_options([
'allow_self_signed' => true,
]));
$stream_options_reflection = new \ReflectionProperty($this->method_jabber, 'stream_options');
$stream_options = $stream_options_reflection->getValue($this->method_jabber);
$this->assertEquals([
'ssl' => [
'allow_self_signed' => false,
'verify_peer' => true,
'verify_peer_name' => true,
],
], $stream_options);
$this->method_jabber->ssl(true);
$this->assertEquals($this->method_jabber, $this->method_jabber->stream_options([
'allow_self_signed' => true,
]));
$stream_options = $stream_options_reflection->getValue($this->method_jabber);
$this->assertEquals([
'ssl' => [
'allow_self_signed' => true,
'verify_peer' => true,
'verify_peer_name' => true,
],
], $stream_options);
}
public function test_port_ssl_switch()
{
$port_reflection = new \ReflectionProperty($this->method_jabber, 'port');
$this->method_jabber->port();
$this->assertEquals(5222, $port_reflection->getValue($this->method_jabber));
$this->method_jabber->ssl(true)
->port();
$this->assertEquals(5223, $port_reflection->getValue($this->method_jabber));
}
public function test_username()
{
$jabber_reflection = new \ReflectionClass($this->method_jabber);
$username_reflection = $jabber_reflection->getProperty('username');
$jid_reflection = $jabber_reflection->getProperty('jid');
$this->method_jabber->username('foo@bar');
$this->assertEquals(['foo', 'bar'], $jid_reflection->getValue($this->method_jabber));
$this->assertEquals('foo', $username_reflection->getValue($this->method_jabber));
$this->method_jabber->username('bar@baz@qux');
$this->assertEquals(['bar', 'baz@qux'], $jid_reflection->getValue($this->method_jabber));
$this->assertEquals('bar', $username_reflection->getValue($this->method_jabber));
}
public function test_server()
{
$jabber_reflection = new \ReflectionClass($this->method_jabber);
$connect_server_reflection = $jabber_reflection->getProperty('connect_server');
$server_reflection = $jabber_reflection->getProperty('server');
$this->method_jabber->server();
$this->assertEquals('localhost', $connect_server_reflection->getValue($this->method_jabber));
$this->assertEquals('localhost', $server_reflection->getValue($this->method_jabber));
$this->method_jabber->server('foobar.com');
$this->assertEquals('foobar.com', $connect_server_reflection->getValue($this->method_jabber));
$this->assertEquals('foobar.com', $server_reflection->getValue($this->method_jabber));
$this->method_jabber->username('foo@bar.com');
$this->method_jabber->server('foobar.com');
$this->assertEquals('foobar.com', $connect_server_reflection->getValue($this->method_jabber));
$this->assertEquals('bar.com', $server_reflection->getValue($this->method_jabber));
}
public function test_encrypt_password()
{
$this->method_jabber->init();
$this->method_jabber->password('password');
$data = [
'realm' => 'example.com',
'nonce' => '12345',
'cnonce' => 'abcde',
'digest-uri' => 'xmpp/example.com',
'nc' => '00000001',
'qop' => 'auth',
];
$expected = md5(sprintf(
'%s:%s:%s:%s:%s:%s',
md5(pack('H32', md5('test:example.com:password')) . ':12345:abcde'),
$data['nonce'],
$data['nc'],
$data['cnonce'],
$data['qop'],
md5('AUTHENTICATE:xmpp/example.com')
));
$this->assertEquals($expected, $this->method_jabber->encrypt_password($data));
}
public function test_parse_data()
{
$data = 'key1="value1",key2="value2",key3="value3"';
$expected = [
'key1' => 'value1',
'key2' => 'value2',
'key3' => 'value3',
];
$this->assertEquals($expected, $this->method_jabber->parse_data($data));
}
public function test_implode_data()
{
$data = [
'key1' => 'value1',
'key2' => 'value2',
'key3' => 'value3',
];
$expected = 'key1="value1",key2="value2",key3="value3"';
$this->assertEquals($expected, $this->method_jabber->implode_data($data));
}
public function test_xmlize()
{
$xml = '<root><child key="value">content</child></root>';
$result = $this->method_jabber->xmlize($xml);
$this->assertArrayHasKey('root', $result);
$this->assertArrayHasKey('child', $result['root'][0]['#']);
$this->assertEquals('content', $result['root'][0]['#']['child'][0]['#']);
$this->assertEquals(['key' => 'value'], $result['root'][0]['#']['child'][0]['@']);
}
public function test_send_xml()
{
$jabber_mock = $this->getMockBuilder(jabber::class)
->setConstructorArgs([
$this->assets_bag,
$this->config,
$this->dispatcher,
$this->language,
$this->queue,
$this->path_helper,
$this->request,
$this->twig_extensions_collection,
$this->twig_lexer,
$this->user,
'',
'',
$this->extension_manager,
$this->log,
])
->onlyMethods(['send_xml'])
->getMock();
$jabber_mock->expects($this->once())
->method('send_xml')
->with('<message>Test</message>')
->willReturn(true);
$this->assertTrue($jabber_mock->send_xml('<message>Test</message>'));
}
}

View file

@ -202,20 +202,14 @@ class phpbb_messenger_queue_test extends phpbb_test_case
// First save queue data
$this->assertFileDoesNotExist($this->cache_file);
$this->messenger_queue->init('email', 5);
$this->messenger_queue->init('jabber', 10);
$this->assertEquals([
'email' => [
'package_size' => 5,
'data' => [],
],
'jabber' => [
'package_size' => 10,
'data' => [],
]
], $this->messenger_queue->get_data());
$this->messenger_queue->put('email', ['data1']);
$this->messenger_queue->put('jabber', ['data2']);
$this->messenger_queue->save();
$this->assertFileExists($this->cache_file);
$this->assertEquals([], $this->messenger_queue->get_data());
@ -239,27 +233,10 @@ class phpbb_messenger_queue_test extends phpbb_test_case
], $queue_data['email']);
unset($queue_data['email']);
});
$jabber_method = $this->getMockBuilder('phpbb\messenger\method\jabber')
->disableOriginalConstructor()
->onlyMethods(['get_queue_object_name', 'process_queue'])
->getMock();
$jabber_method->method('get_queue_object_name')
->willReturn('jabber');
$jabber_method->method('process_queue')
->willReturnCallback(function(array &$queue_data) {
$this->assertEquals([
'package_size' => 10,
'data' => [
['data2'],
],
], $queue_data['jabber']);
unset($queue_data['jabber']);
});
$this->service_collection->method('getIterator')
->willReturn(new \ArrayIterator([
'email' => $email_method,
'jabber' => $jabber_method,
]));
// Process the queue

View file

@ -148,7 +148,6 @@ abstract class phpbb_tests_notification_base extends phpbb_database_test_case
$messenger_method_collection = new \phpbb\di\service_collection($phpbb_container);
$messenger_method_collection->add('messenger.method.email');
$messenger_method_collection->add('messenger.method.jabber');
$phpbb_container->set('messenger.method_collection', $messenger_method_collection);
$phpbb_container->compile();

View file

@ -30,15 +30,33 @@ class phpbb_notification_convert_test extends phpbb_database_test_case
$this->db = $this->new_dbal();
$this->doctrine_db = $this->new_doctrine_dbal();
$factory = new \phpbb\db\tools\factory();
$db_tools = $factory->get($this->doctrine_db);
$core_tables = self::get_core_tables();
// Add user_notify_type column for testing this migration and set type
$db_tools->sql_column_add($core_tables['users'], 'user_notify_type', ['TINT:4', 0]);
$user_notify_type_map = [
1 => 0,
2 => 0,
3 => 1,
4 => 1,
5 => 2,
6 => 2,
];
foreach ($user_notify_type_map as $user_id => $notify_type)
{
$this->db->sql_query('UPDATE ' . $core_tables['users'] . ' SET user_notify_type = ' . (int) $notify_type . ' WHERE user_id = ' . (int) $user_id);
}
$this->migration = new \phpbb\db\migration\data\v310\notification_options_reconvert(
new \phpbb\config\config(array()),
$this->db,
$factory->get($this->doctrine_db),
$db_tools,
$phpbb_root_path,
$phpEx,
'phpbb_',
self::get_core_tables()
$core_tables
);
}

View file

@ -4,7 +4,6 @@
<column>user_id</column>
<column>username</column>
<column>username_clean</column>
<column>user_notify_type</column>
<column>user_notify_pm</column>
<column>user_permissions</column>
<column>user_sig</column>
@ -13,7 +12,6 @@
<value>1</value>
<value>1</value>
<value>0</value>
<value>0</value>
<value></value>
<value></value>
</row>
@ -21,7 +19,6 @@
<value>2</value>
<value>2</value>
<value>2</value>
<value>0</value>
<value>1</value>
<value></value>
<value></value>
@ -30,7 +27,6 @@
<value>3</value>
<value>3</value>
<value>3</value>
<value>1</value>
<value>0</value>
<value></value>
<value></value>
@ -40,7 +36,6 @@
<value>4</value>
<value>4</value>
<value>1</value>
<value>1</value>
<value></value>
<value></value>
</row>
@ -48,7 +43,6 @@
<value>5</value>
<value>5</value>
<value>5</value>
<value>2</value>
<value>0</value>
<value></value>
<value></value>
@ -57,7 +51,6 @@
<value>6</value>
<value>6</value>
<value>6</value>
<value>2</value>
<value>1</value>
<value></value>
<value></value>

View file

@ -107,7 +107,6 @@ class notification_method_email_test extends phpbb_tests_notification_base
$messenger_method_collection = new \phpbb\di\service_collection($phpbb_container);
$messenger_method_collection->add('messenger.method.email');
$messenger_method_collection->add('messenger.method.jabber');
$phpbb_container->set('messenger.method_collection', $messenger_method_collection);
$this->notification_method_email = $this->getMockBuilder('\phpbb\notification\method\email')

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