Compare commits

..

13 commits

Author SHA1 Message Date
rxu
67afc0a1e2
[ticket/15214] Fix rebasing and some other issues
PHPBB3-15214
2025-01-10 22:01:51 +07:00
rxu
0a31489ed2
[ticket/15214] Fix Windows tests
PHPBB3-15214
2025-01-10 16:09:00 +07:00
toxyy
cb5b9823f9
[ticket/15214] Fix tests again
Adding per rxu's recommendation

PHPBB3-15214
2025-01-10 16:09:00 +07:00
rxu
059ad4a9b7
[ticket/15214] Fix Windows tests
Purge Twig compiled cache in Windows.
Set appropriate folder access control options to do that.

PHPBB3-15214
2025-01-10 16:08:59 +07:00
rxu
74f1f01a91
[ticket/15214] Fix test foo/foo extension listener
PHPBB3-15214
2025-01-10 16:08:58 +07:00
rxu
7330b0c792
[ticket/15214] Optimize event node code and add template event order tests
PHPBB3-15214
2025-01-10 16:08:56 +07:00
toxyy
127b775317
[ticket/15214] Update block, restart tests
Make docblock look a bit cleaner and restart the tests

PHPBB3-15214
2025-01-10 16:08:56 +07:00
toxyy
5b16729934
[ticket/15214] Provide usage example within event docblock
Adds similar usage examples like the event core.permissions has

PHPBB3-15214
2025-01-10 16:08:55 +07:00
toxyy
7345106f11
[ticket/15214] Replace arrow functions with anonymous functions
Arrow functions aren't added until PHP 7.4, so we can't use them yet.
Anonymous functions have been added since PHP 5.3

PHPBB3-15214
2025-01-10 16:08:54 +07:00
toxyy
b6265792d1
[ticket/15214] Add fixes for various other tests
Add new dispatch parameter to the template\twig\extension calls

PHPBB3-15214
2025-01-10 16:08:53 +07:00
toxyy
e34da0b33d
[ticket/15214] Test fix for test_bbcode_firstpass
Add new dispatch parameter to the template\twig\extension call

PHPBB3-15214
2025-01-10 16:08:53 +07:00
toxyy
5608f00f62
[ticket/15214] Test fix for test_helper_url_no_rewrite
Add new dispatch parameter to the template\twig\extension call

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

PHPBB3-15214
2025-01-10 16:08:37 +07:00
285 changed files with 4551 additions and 6387 deletions

View file

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

View file

@ -11,6 +11,7 @@
set -e
set -x
sudo apt-get update
sudo apt-get install -q -y sphinxsearch
DIR=$(dirname "$0")
@ -134,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

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

View file

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

View file

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

View file

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

View file

@ -3,8 +3,8 @@
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
<!-- a few settings for the build -->
<property name="newversion" value="4.0.0-a1-dev" />
<property name="prevversion" value="3.3.15" />
<property name="olderversions" value="3.1.12, 3.2.11, 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.3.10, 3.3.11, 3.3.12, 3.3.13, 3.3.14" />
<property name="prevversion" value="3.3.14" />
<property name="olderversions" value="3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9, 3.2.10, 3.2.11, 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.3.10, 3.3.11, 3.3.12, 3.3.13" />
<!-- 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/phpBB" />
<mkdir dir="build/new_version/phpBB3" />
<phingcall target="export">
<property name="revision" value="HEAD" />
<property name="dir" value="build/new_version/phpBB" />
<property name="dir" value="build/new_version/phpBB3" />
</phingcall>
<!-- copy into directory for diffs -->
<exec dir="build" command="cp -rp new_version/phpBB old_versions/release-${newversion}" />
<exec dir="build" command="cp -rp new_version/phpBB3 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/phpBB/config.php" />
<copy file="build/new_version/phpBB/vendor-ext/.htaccess" tofile="build/new_version/phpBB/vendor/.htaccess" />
<touch file="build/new_version/phpBB3/config.php" />
<copy file="build/new_version/phpBB3/vendor-ext/.htaccess" tofile="build/new_version/phpBB3/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/phpBB/language >
command="LC_ALL=C diff -crNEBZbd old_versions/release-${prevversion}/language new_version/phpBB3/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/phpBB/styles/prosilver >
command="LC_ALL=C diff -crNEBZbd old_versions/release-${prevversion}/styles/prosilver new_version/phpBB3/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 (PHPBB, PHPBB3, SECURITY)
$query = 'project IN (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' => 'phpBB',
'package_name' => 'phpBB3',
'name_prefix' => 'phpbb',
'simple_name' => 'release-' . $_latest,
'new_version_number' => $_latest,

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

Binary file not shown.

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

707
phpBB/composer.lock generated

File diff suppressed because it is too large Load diff

View file

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

View file

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

View file

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

View file

@ -38,6 +38,15 @@ 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,6 +233,19 @@ services:
tags:
- { name: notification.method }
notification.method.jabber:
class: phpbb\notification\method\jabber
shared: false
arguments:
- '@user_loader'
- '@user'
- '@config'
- '%core.root_path%'
- '%core.php_ext%'
- '@messenger.method_collection'
tags:
- { name: notification.method }
notification.method.webpush:
class: phpbb\notification\method\webpush
shared: false

View file

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

View file

@ -40,6 +40,7 @@ services:
- '@template_context'
- '@template.twig.environment'
- '@language'
- '@dispatcher'
tags:
- { name: twig.extension }

View file

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

View file

@ -140,6 +140,7 @@ $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),
@ -246,7 +247,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);
@ -339,7 +340,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";
@ -353,10 +354,10 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
}
else if ($cur_auth[$forum][$auth_option_id] != $setting)
{
$sql_ary['update'][] = "UPDATE " . $table . "
SET auth_setting = $setting
WHERE $id_field = $ug_id
AND forum_id = $forum
$sql_ary['update'][] = "UPDATE " . $table . "
SET auth_setting = $setting
WHERE $id_field = $ug_id
AND forum_id = $forum
AND auth_option_id = $auth_option_id";
}
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -76,13 +76,13 @@ class acp_email
{
// If giving usernames the admin is able to email inactive users too...
$sql_ary = array(
'SELECT' => 'user_id, username, user_email, user_lang',
'SELECT' => 'user_id, username, user_email, user_jabber, user_notify_type, 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',
'ORDER_BY' => 'user_lang, user_notify_type',
);
}
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',
'SELECT' => 'u.user_id, u.user_email, u.username, u.username_clean, u.user_lang, u.user_jabber, u.user_notify_type',
'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',
'ORDER_BY' => 'u.user_lang, u.user_notify_type',
);
}
else
{
$sql_ary = array(
'SELECT' => 'u.user_id, u.username, u.username_clean, u.user_email, u.user_lang',
'SELECT' => 'u.user_id, u.username, u.username_clean, u.user_email, u.user_jabber, u.user_lang, u.user_notify_type',
'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',
'ORDER_BY' => 'u.user_lang, u.user_notify_type',
);
}
}
@ -154,12 +154,15 @@ 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_email'])
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 ($i == $max_chunk_size || $row['user_lang'] != $old_lang)
if ($i == $max_chunk_size || $row['user_lang'] != $old_lang || $row['user_notify_type'] != $old_notify_type)
{
$i = 0;
@ -169,11 +172,14 @@ 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++;
}
}
@ -213,41 +219,65 @@ class acp_email
);
extract($phpbb_dispatcher->trigger_event('core.acp_email_send_before', compact($vars)));
/** @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\di\service_collection */
$messenger = $phpbb_container->get('messenger.method_collection');
$messenger_collection_iterator = $messenger->getIterator();
for ($i = 0, $size = count($email_list); $i < $size; $i++)
{
$used_lang = $email_list[$i][0]['lang'];
$used_method = $email_list[$i][0]['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++)
foreach ($messenger_collection_iterator as $messenger_method)
{
$email_row = $email_list[$i][$j];
if (count($email_list[$i]) == 1)
$notify_method = $messenger_method->get_id();
if ($notify_method == $used_method || $used_method == messenger_interface::NOTIFY_BOTH)
{
$messenger_method->to($email_row['email'], $email_row['name']);
}
else
{
$messenger_method->bcc($email_row['email'], $email_row['name']);
$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->anti_abuse_headers($config, $user);
$messenger_method->set_mail_priority($priority);
$errored = !$messenger_method->send() || $errored;
$messenger_method->save_queue();
}
unset($email_list);
if ($use_queue)
{
foreach ($messenger_collection_iterator as $messenger_method)
{
$messenger_method->save_queue();
}
}
if ($generate_log_entry)
{
if (!empty($usernames))

View file

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

View file

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

View file

@ -185,7 +185,7 @@ class acp_inactive
trigger_error($user->lang['EMAIL_DISABLED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$sql = 'SELECT user_id, username, user_email, user_lang, user_regdate, user_actkey
$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type, user_regdate, user_actkey
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('user_id', $mark) . '
AND user_inactive_reason';
@ -194,10 +194,9 @@ class acp_inactive
$result = $db->sql_query($sql);
/** @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\di\service_collection */
$messenger = $phpbb_container->get('messenger.method_collection');
$messenger_collection_iterator = $messenger->getIterator();
if ($row = $db->sql_fetchrow($result))
{
@ -206,23 +205,33 @@ class acp_inactive
do
{
$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'],
]);
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->send();
$messenger_method->save_queue();
$messenger_method->send();
}
}
$usernames[] = $row['username'];
$user_ids[] = (int) $row['user_id'];
}
while ($row = $db->sql_fetchrow($result));
foreach ($messenger_collection_iterator as $messenger_method)
{
$messenger_method->save_queue();
}
// Add the remind state to the database and increase activation expiration by one day
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_reminded = user_reminded + 1,

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1426,6 +1426,7 @@ 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,
@ -1457,6 +1458,9 @@ 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())),
@ -1492,6 +1496,7 @@ class acp_users
if (!count($error))
{
$sql_ary = array(
'user_jabber' => $data['jabber'],
'user_birthday' => $data['user_birthday'],
);
@ -1548,6 +1553,7 @@ 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,
@ -1577,6 +1583,7 @@ 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']),
@ -1647,6 +1654,7 @@ 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'],
@ -1779,11 +1787,15 @@ 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

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

View file

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

View file

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

View file

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

View file

@ -1081,7 +1081,7 @@ function display_custom_bbcodes()
$num_predefined_bbcodes = NUM_PREDEFINED_BBCODES;
$sql_ary = [
'SELECT' => 'b.bbcode_id, b.bbcode_tag, b.bbcode_helpline, b.bbcode_font_icon, b.bbcode_match',
'SELECT' => 'b.bbcode_id, b.bbcode_tag, b.bbcode_helpline, b.bbcode_match',
'FROM' => [BBCODES_TABLE => 'b'],
'WHERE' => 'b.display_on_posting = 1',
'ORDER_BY' => 'b.bbcode_tag',
@ -1124,7 +1124,6 @@ function display_custom_bbcodes()
'BBCODE_TAG' => $row['bbcode_tag'],
'BBCODE_TAG_CLEAN' => str_replace('=', '-', $row['bbcode_tag']),
'BBCODE_HELPLINE' => $row['bbcode_helpline'],
'BBCODE_FONT_ICON' => $row['bbcode_font_icon'],
];
/**
@ -1681,6 +1680,7 @@ function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabl
'S_ONLINE' => ($config['load_onlinetrack'] && $online) ? true : false,
'RANK_IMG' => $user_rank_data['img'],
'RANK_IMG_SRC' => $user_rank_data['img_src'],
'S_JABBER_ENABLED' => ($config['jab_enable']) ? true : false,
'S_WARNINGS' => ($auth->acl_getf_global('m_') || $auth->acl_get('m_warn')) ? true : false,
@ -1689,6 +1689,10 @@ 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'] && $data_ary['notify_set'] && !$data_ary['notify'])
else if (($config['email_enable'] || $config['jab_enable']) && $data_ary['notify_set'] && !$data_ary['notify'])
{
$sql = 'DELETE FROM ' . TOPICS_WATCH_TABLE . '
WHERE user_id = ' . $user->data['user_id'] . '

View file

@ -246,6 +246,7 @@ 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,
@ -1513,6 +1514,208 @@ 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
*
@ -1923,8 +2126,7 @@ function group_correct_avatar($group_id, $old_entry)
try
{
$storage->write($new_filename, $storage->read($old_filename));
$storage->delete($old_filename);
$storage->rename($old_filename, $new_filename);
$sql = 'UPDATE ' . GROUPS_TABLE . '
SET group_avatar = \'' . $db->sql_escape($new_entry) . "'
@ -2527,7 +2729,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
$sql = 'SELECT u.user_id, u.user_email, u.username, u.username_clean, u.user_notify_type, u.user_jabber, u.user_lang
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_lang
$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
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,6 +366,9 @@ 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_actkey, user_inactive_reason
$sql = 'SELECT user_id, username, user_type, user_email, user_newpasswd, user_lang, user_notify_type, user_actkey, user_inactive_reason
FROM ' . USERS_TABLE . "
WHERE user_id = $user_id";
$result = $db->sql_query($sql);
@ -131,20 +131,23 @@ class ucp_activate
$phpbb_notifications = $phpbb_container->get('notification_manager');
$phpbb_notifications->delete_notifications('notification.type.admin_activate_user', $user_row['user_id']);
/** @var \phpbb\di\service_collection $messenger_collection */
$messenger_collection = $phpbb_container->get('messenger.method_collection');
/** @var \phpbb\messenger\method\messenger_interface $messenger_method */
$messenger_method = $messenger_collection->offsetGet('messenger.method.email');
$messenger = $phpbb_container->get('messenger.method_collection');
$messenger_collection_iterator = $messenger->getIterator();
foreach ($messenger_collection_iterator as $messenger_method)
{
if ($messenger_method->get_id() == $user_row['user_notify_type'] || $user_row['user_notify_type'] == $messenger_method::NOTIFY_BOTH)
{
$messenger_method->set_use_queue(false);
$messenger_method->template('admin_welcome_activated', $user_row['user_lang']);
$messenger_method->set_addresses($user_row);
$messenger_method->anti_abuse_headers($config, $user);
$messenger_method->assign_vars([
'USERNAME' => html_entity_decode($user_row['username'], ENT_COMPAT),
]);
$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,13 +201,18 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
}
}
$u_pm = '';
$u_pm = $u_jabber = '';
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(
@ -243,6 +248,7 @@ 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'],
@ -352,6 +358,11 @@ 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,6 +42,7 @@ 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']),
@ -53,6 +54,12 @@ 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
*
@ -98,6 +105,7 @@ 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'],
@ -176,6 +184,9 @@ 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'],
@ -207,6 +218,7 @@ 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,7 +284,9 @@ class ucp_profile
$cp_data = $cp_error = array();
$data = [];
$data = array(
'jabber' => $request->variable('jabber', $user->data['user_jabber'], true),
);
if ($config['allow_birthdays'])
{
@ -316,7 +318,11 @@ class ucp_profile
if ($submit)
{
$validate_array = [];
$validate_array = array(
'jabber' => array(
array('string', true, 5, 255),
array('jabber')),
);
if ($config['allow_birthdays'])
{
@ -357,7 +363,19 @@ class ucp_profile
if (!count($error))
{
$sql_ary = [];
$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'],
);
if ($config['allow_birthdays'])
{
@ -376,16 +394,12 @@ class ucp_profile
$vars = array('cp_data', 'data', 'sql_ary');
extract($phpbb_dispatcher->trigger_event('core.ucp_profile_info_modify_sql_ary', compact($vars)));
// 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);
}
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE user_id = ' . $user->data['user_id'];
$db->sql_query($sql);
// Always update custom fields
// Update Custom Fields
$cp->update_profile_field_data($user->data['user_id'], $cp_data);
meta_refresh(3, $this->u_action);
@ -432,6 +446,8 @@ 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,31 +128,41 @@ 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
$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type
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_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\di\service_collection */
$messenger = $phpbb_container->get('messenger.method_collection');
$messenger_collection_iterator = $messenger->getIterator();
while ($row = $db->sql_fetchrow($result))
{
$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']}",
]);
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->send();
$messenger_method->send();
}
}
}
$db->sql_freeresult($result);
// Save the queue in the messenger method class (has to be called or these messages could be lost)
foreach ($messenger_collection_iterator as $messenger_method)
{
$messenger_method->save_queue();
}
}
$this->update_activation_expiration();

View file

@ -923,6 +923,7 @@ 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', '', ''),
@ -937,6 +938,7 @@ 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,6 +168,16 @@ 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', '');
@ -429,6 +439,7 @@ 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);
@ -482,6 +493,7 @@ 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);
@ -527,10 +539,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_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_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);
# -- 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_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_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, '');
# -- 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);
@ -557,7 +569,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_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_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');
# 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');
@ -575,14 +587,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_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_sendim', '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_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_sendim', '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,3 +586,31 @@ $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,6 +120,8 @@ $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',
@ -640,6 +642,7 @@ $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',
@ -683,6 +686,11 @@ $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,6 +98,7 @@ $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',
@ -167,6 +168,7 @@ $lang = array_merge($lang, array(
$lang = array_merge($lang, array(
'ACL_A_BOARD' => 'Can alter board settings/check for updates',
'ACL_A_SERVER' => 'Can alter server/communication settings',
'ACL_A_JABBER' => 'Can alter Jabber settings',
'ACL_A_PHPINFO' => 'Can view php settings',
'ACL_A_FORUM' => 'Can manage forums',

View file

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

View file

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

View file

@ -78,7 +78,6 @@ $lang = array_merge($lang, array(
'ALL_TOPICS' => 'All Topics',
'ALT_TEXT' => 'Alternative text',
'AND' => 'And',
'APPEARANCE' => 'Appearance',
'ARE_WATCHING_FORUM' => 'You have subscribed to be notified of new posts in this forum.',
'ARE_WATCHING_TOPIC' => 'You have subscribed to be notified of new posts in this topic.',
'ASCENDING' => 'Ascending',
@ -232,6 +231,8 @@ $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.',
@ -350,7 +351,6 @@ $lang = array_merge($lang, array(
'HIDE_ME' => 'Hide my online status this session',
'HOURS' => 'Hours',
'HOME' => 'Home',
'HTTP_HANDLER_NOT_FOUND' => 'The operation could not be completed because the cURL PHP extension and allow_url_fopen PHP ini setting have been disabled and no other HTTP handler could be found.',
'ICQ' => 'ICQ',
'IF' => 'If',
@ -370,6 +370,7 @@ $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',
@ -798,6 +799,7 @@ $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.',
@ -810,6 +812,7 @@ $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.',
@ -938,6 +941,7 @@ $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

@ -0,0 +1,13 @@
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

@ -0,0 +1,11 @@
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

@ -0,0 +1,13 @@
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

@ -0,0 +1,11 @@
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

@ -0,0 +1,13 @@
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

@ -0,0 +1,13 @@
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

@ -0,0 +1,13 @@
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

@ -0,0 +1,10 @@
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

@ -0,0 +1,13 @@
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

@ -0,0 +1,10 @@
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

@ -0,0 +1,11 @@
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

@ -0,0 +1,13 @@
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

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

View file

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

View file

@ -78,12 +78,16 @@ $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',
@ -121,6 +125,7 @@ $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,6 +331,7 @@ $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',
@ -353,6 +354,7 @@ $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.',
@ -532,6 +534,7 @@ $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,6 +373,120 @@ 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)
@ -669,6 +783,7 @@ 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'),
@ -835,8 +950,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',
@ -922,6 +1037,12 @@ 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'];
@ -963,7 +1084,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', 'search_group_id', 'joined_select', 'active_select', 'count_select', 'joined', 'active', 'count', 'ip');
$search_params = array('username', 'email', 'jabber', '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;
@ -972,6 +1093,7 @@ 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
@ -1011,6 +1133,7 @@ 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)
@ -1262,10 +1385,10 @@ switch ($mode)
$order_by .= $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC');
// For sorting by non-unique columns (rank, posts) add unique sort key to avoid duplicated rows in results
if ($sort_key == 'm' || $sort_key == 'd')
// Unfortunately we must do this here for sorting by rank, else the sort order is applied wrongly
if ($sort_key == 'm')
{
$order_by .= ', u.user_id ASC';
$order_by .= ', u.user_posts DESC';
}
/**
@ -1316,6 +1439,7 @@ 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'),
@ -1470,6 +1594,7 @@ switch ($mode)
$template->assign_vars(array(
'USERNAME' => $username,
'EMAIL' => $email,
'JABBER' => $jabber,
'JOINED' => implode('-', $joined),
'ACTIVE' => implode('-', $active),
'COUNT' => $count,
@ -1477,6 +1602,7 @@ 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,
@ -1704,6 +1830,7 @@ switch ($mode)
'PROFILE_IMG' => $user->img('icon_user_profile', $user->lang['PROFILE']),
'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']),
'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['EMAIL']),
'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']),
'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']),
'U_FIND_MEMBER' => ($config['load_search'] || $auth->acl_get('a_')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser' . (($start) ? "&amp;start=$start" : '') . (!empty($params) ? '&amp;' . implode('&amp;', $params) : '')) : '',

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

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