mirror of
https://github.com/phpbb/phpbb.git
synced 2025-09-12 01:00:43 +02:00
Compare commits
177 Commits
release-3.
...
release-3.
Author | SHA1 | Date | |
---|---|---|---|
|
ceca69d121 | ||
|
6a72d0305b | ||
|
7a8d9671c2 | ||
|
5b3d238804 | ||
|
51cc7202f8 | ||
|
59e50d6d53 | ||
|
b82d90eb39 | ||
|
f302440297 | ||
|
ed33f06235 | ||
|
643845306a | ||
|
95511540ea | ||
|
5b5502390d | ||
|
1db2d9c3c1 | ||
|
5ef0105a5f | ||
|
e8421dbab1 | ||
|
e0197d711f | ||
|
11563ce971 | ||
|
bbcac37e30 | ||
|
8c25f3a9f7 | ||
|
e371f3eac7 | ||
|
dc7012864b | ||
|
cd53106ec3 | ||
|
86af3a2ba4 | ||
|
a6d4b460f1 | ||
|
975ad95bff | ||
|
61c59bdc91 | ||
|
79efbcaa4e | ||
|
a8be17dd4d | ||
|
170ddeaf63 | ||
|
8db200d75f | ||
|
3638b36849 | ||
|
8804cf885b | ||
|
ad23388043 | ||
|
79a8ed4677 | ||
|
5eeb213b12 | ||
|
75df7c202e | ||
|
2ef37a8e77 | ||
|
acbcb18226 | ||
|
5d0fd9f73a | ||
|
47c583516b | ||
|
91c6edf092 | ||
|
c2873cbc01 | ||
|
a1f1c0cc9d | ||
|
f46ebf5bec | ||
|
6dd7b7e8b5 | ||
|
721a39502a | ||
|
b01a956461 | ||
|
364c6d328a | ||
|
f7487e4e5c | ||
|
84b414a4f0 | ||
|
3f9e6c6013 | ||
|
e855f5cba4 | ||
|
90fccff6f1 | ||
|
a380c78e1e | ||
|
a6a18f2c59 | ||
|
6efebf7571 | ||
|
c7c3adf762 | ||
|
2e29bb48fa | ||
|
e1fc0a9059 | ||
|
c846dd5666 | ||
|
19a5900db5 | ||
|
5de8c3dc3c | ||
|
3ae0d347c9 | ||
|
2244635a41 | ||
|
68bd4e9faa | ||
|
8c12c46869 | ||
|
aecd1fa04e | ||
|
ac781e570f | ||
|
f28eed7f30 | ||
|
2869e04756 | ||
|
4446888eb2 | ||
|
7783912e93 | ||
|
ccac4c5fe8 | ||
|
a18681cfe4 | ||
|
096dad1767 | ||
|
068f8eed25 | ||
|
dd62829f96 | ||
|
be2959fbab | ||
|
7acdef7c01 | ||
|
bd0b6fbdab | ||
|
c83b4c21a4 | ||
|
9d22731d03 | ||
|
7b5ad8bb74 | ||
|
af98278590 | ||
|
bef2a4bc41 | ||
|
f24396ac0d | ||
|
b7f57eb556 | ||
|
c452c83855 | ||
|
c9b32463de | ||
|
1177f843c5 | ||
|
cdca28eb3f | ||
|
5169a947f4 | ||
|
6a95f34d0c | ||
|
11083e59ed | ||
|
6b45c7bd5f | ||
|
c5ec036b84 | ||
|
e2cfc01964 | ||
|
f007aef3d8 | ||
|
5ad1ae4e7b | ||
|
32586407d1 | ||
|
233b2fdade | ||
|
ea7e07c1a4 | ||
|
acf0885948 | ||
|
d8ef094a9a | ||
|
c925e8ef58 | ||
|
3f518c9263 | ||
|
8a746b457d | ||
|
0502b9cc22 | ||
|
6a0b1333da | ||
|
d05abc0807 | ||
|
b734fed853 | ||
|
67f80c7942 | ||
|
bb24d619d2 | ||
|
62f59fa59d | ||
|
adacf21edb | ||
|
314ab17edd | ||
|
49974a169b | ||
|
3bb58556ea | ||
|
98713a7cbe | ||
|
43e503e0ee | ||
|
37518342c6 | ||
|
81d582a2d2 | ||
|
bcea34ee7c | ||
|
3ff99a9eb1 | ||
|
20fbe0e254 | ||
|
e22f431660 | ||
|
9c8f2007d9 | ||
|
62a45d86ec | ||
|
3e0b20820a | ||
|
2dc8e61a72 | ||
|
47321954b7 | ||
|
ecc79ea2ec | ||
|
710740d6be | ||
|
de3c0f274c | ||
|
b215f13f04 | ||
|
950d8b8a13 | ||
|
31fc85153e | ||
|
7f79849146 | ||
|
db9f54bee5 | ||
|
134482f6c2 | ||
|
9051b28e14 | ||
|
1f76aa65f3 | ||
|
a641a992f6 | ||
|
8c334f0c10 | ||
|
ecd7b14171 | ||
|
65a1ed0f82 | ||
|
f6a8981028 | ||
|
bd1033be68 | ||
|
6eb357b421 | ||
|
1482efc927 | ||
|
908245686e | ||
|
70337e99fa | ||
|
1ecc2e042b | ||
|
bcc75099ab | ||
|
2c66f69c51 | ||
|
3d5639a844 | ||
|
705cc6ee6b | ||
|
95496ebd38 | ||
|
574de287e7 | ||
|
7d48254cc9 | ||
|
50a917ab4c | ||
|
a8ffd339fe | ||
|
0897d3e381 | ||
|
4721007c02 | ||
|
f6b4031a96 | ||
|
39d89c8dbc | ||
|
8f2d84f4dc | ||
|
fe49e110bd | ||
|
22f7f491c5 | ||
|
60d6727974 | ||
|
86bbd05608 | ||
|
516d0f5b27 | ||
|
40d825d1c6 | ||
|
9ff92f2c36 | ||
|
740b2ffbf2 | ||
|
6728497434 | ||
|
9d2ab88c69 |
15
.github/check-doctum-parse-errors.sh
vendored
15
.github/check-doctum-parse-errors.sh
vendored
@@ -11,16 +11,17 @@
|
||||
set -e
|
||||
|
||||
if [ ! -f doctum.phar ]; then
|
||||
# Download the latest (5.1.x) release if the file does not exist
|
||||
# Download the latest (5.x.x) release if the file does not exist
|
||||
# Remove it to update your phar
|
||||
curl -O https://doctum.long-term.support/releases/5.1/doctum.phar
|
||||
curl -O https://doctum.long-term.support/releases/5/doctum.phar
|
||||
rm -f doctum.phar.sha256
|
||||
curl -O https://doctum.long-term.support/releases/5.1/doctum.phar.sha256
|
||||
curl -O https://doctum.long-term.support/releases/5/doctum.phar.sha256
|
||||
sha256sum --strict --check doctum.phar.sha256
|
||||
rm -f doctum.phar.sha256
|
||||
# You can fetch the latest (5.1.x) version code here:
|
||||
# https://doctum.long-term.support/releases/5.1/VERSION
|
||||
chmod +x ./doctum.phar
|
||||
# You can fetch the latest (5.x.x) version code here:
|
||||
# https://doctum.long-term.support/releases/5/VERSION
|
||||
fi
|
||||
# Show the version to inform users of the script
|
||||
php doctum.phar --version
|
||||
php doctum.phar parse build/doctum-checkout.conf.php -v
|
||||
./doctum.phar version --text
|
||||
./doctum.phar parse build/doctum-checkout.conf.php -v
|
||||
|
12
.github/setup-webserver.sh
vendored
12
.github/setup-webserver.sh
vendored
@@ -28,18 +28,12 @@ NGINX_PHP_CONF="$DIR/nginx-php.conf"
|
||||
PHP_FPM_BIN="/usr/sbin/php-fpm$PHP_VERSION"
|
||||
PHP_FPM_CONF="$DIR/php-fpm.conf"
|
||||
|
||||
if [ "$PHP_VERSION" == '8.1' ]
|
||||
if [ ! -f $PHP_FPM_BIN ] && [ -f "/usr/bin/php-fpm" ]
|
||||
then
|
||||
if [ -f "/usr/sbin/php-fpm8.0" ]
|
||||
then
|
||||
PHP_FPM_BIN="/usr/sbin/php-fpm8.0"
|
||||
elif [ ! -f $PHP_FPM_BIN ] && [ -f "/usr/bin/php-fpm" ]
|
||||
then
|
||||
PHP_FPM_BIN="/usr/bin/php-fpm"
|
||||
fi
|
||||
PHP_FPM_BIN="/usr/bin/php-fpm"
|
||||
fi
|
||||
|
||||
if [ ! -f $PHP_FPM_BIN ] && [ "$PHP_VERSION" != '8.1' ]
|
||||
if [ ! -f $PHP_FPM_BIN ]
|
||||
then
|
||||
sudo apt-get install php$PHP_VERSION-fpm php$PHP_VERSION-cli \
|
||||
php$PHP_VERSION-curl php$PHP_VERSION-xml php$PHP_VERSION-mbstring \
|
||||
|
12
.github/workflows/tests.yml
vendored
12
.github/workflows/tests.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
matrix:
|
||||
include:
|
||||
- db: 'none'
|
||||
php: '7.1'
|
||||
php: '7.2'
|
||||
NOTESTS: 1
|
||||
|
||||
name: PHP ${{ matrix.php }} - ${{ matrix.db }}
|
||||
@@ -124,8 +124,8 @@ jobs:
|
||||
db: "mysql:8.0"
|
||||
- php: '8.0'
|
||||
db: "mysql:5.7"
|
||||
#- php: '8.1'
|
||||
# db: "mysql:5.7"
|
||||
- php: '8.1'
|
||||
db: "mysql:5.7"
|
||||
|
||||
name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }}
|
||||
|
||||
@@ -448,6 +448,10 @@ jobs:
|
||||
include:
|
||||
- php: '7.4'
|
||||
db: "postgres"
|
||||
- php: '8.0'
|
||||
db: "postgres"
|
||||
- php: '8.1'
|
||||
db: "postgres"
|
||||
|
||||
name: Windows - PHP ${{ matrix.php }} - ${{ matrix.db }}
|
||||
|
||||
@@ -519,6 +523,8 @@ jobs:
|
||||
Set-ACL -Path "${env:TEMP_DIR}" -ACLObject $acl
|
||||
cd ${env:GITHUB_WORKSPACE}\phpBB
|
||||
php ..\composer.phar install
|
||||
php ..\composer.phar remove phpunit/dbunit --dev --update-with-dependencies
|
||||
php ..\composer.phar require symfony/yaml:~4.4 misantron/dbunit:~5.0 phpunit/phpunit:^9.3 --dev --update-with-all-dependencies --ignore-platform-reqs
|
||||
cd ..
|
||||
- name: Setup database
|
||||
run: |
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -30,3 +30,4 @@ node_modules
|
||||
.vagrant
|
||||
.idea
|
||||
*.DS_Store*
|
||||
/.vscode
|
||||
|
@@ -1,4 +1,4 @@
|
||||
[](https://www.phpbb.com)
|
||||
[<img src="phpBB/styles/all/imgs/svg/phpbb_logo_large_cosmic.svg" alt="phpBB" style="max-width:40%" width="400">](https://www.phpbb.com)
|
||||
|
||||
phpBB is a free open-source bulletin board written in PHP.
|
||||
|
||||
|
@@ -2,9 +2,9 @@
|
||||
|
||||
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
|
||||
<!-- a few settings for the build -->
|
||||
<property name="newversion" value="3.3.4" />
|
||||
<property name="prevversion" value="3.3.3" />
|
||||
<property name="olderversions" value="3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9, 3.2.10, 3.2.11, 3.3.0, 3.3.1, 3.3.2, 3.3.4-RC1" />
|
||||
<property name="newversion" value="3.3.5" />
|
||||
<property name="prevversion" value="3.3.4" />
|
||||
<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.5-RC1" />
|
||||
<!-- no configuration should be needed beyond this point -->
|
||||
|
||||
<property name="oldversions" value="${olderversions}, ${prevversion}" />
|
||||
@@ -128,13 +128,13 @@
|
||||
<!-- Builds docs for current branch into build/api/output/master -->
|
||||
<target name="docs">
|
||||
<exec dir="."
|
||||
command="php doctum.phar update build/doctum-checkout.conf.php"
|
||||
command="./doctum.phar update build/doctum-checkout.conf.php"
|
||||
passthru="true" />
|
||||
</target>
|
||||
<!-- Builds docs for multiple branches/tags into build/api/output/$branch -->
|
||||
<target name="docs-all">
|
||||
<exec dir="."
|
||||
command="php doctum.phar update build/doctum-all.conf.php"
|
||||
command="./doctum.phar update build/doctum-all.conf.php"
|
||||
passthru="true" />
|
||||
</target>
|
||||
|
||||
|
@@ -38,6 +38,7 @@ else
|
||||
$xml = simplexml_load_string(file_get_contents($url));
|
||||
}
|
||||
|
||||
$types = [];
|
||||
foreach ($xml->xpath('//item') as $item)
|
||||
{
|
||||
$key = (string) $item->key;
|
||||
@@ -51,17 +52,20 @@ foreach ($xml->xpath('//item') as $item)
|
||||
$types[(string) $item->type][$key] = $value;
|
||||
}
|
||||
|
||||
ksort($types);
|
||||
foreach ($types as $type => $tickets)
|
||||
if (count($types))
|
||||
{
|
||||
echo "<h4>$type</h4>\n";
|
||||
echo "<ul>\n";
|
||||
|
||||
uksort($tickets, 'strnatcasecmp');
|
||||
|
||||
foreach ($tickets as $ticket)
|
||||
ksort($types);
|
||||
foreach ($types as $type => $tickets)
|
||||
{
|
||||
echo "<li>$ticket</li>\n";
|
||||
echo "<h4>$type</h4>\n";
|
||||
echo "<ul>\n";
|
||||
|
||||
uksort($tickets, 'strnatcasecmp');
|
||||
|
||||
foreach ($tickets as $ticket)
|
||||
{
|
||||
echo "<li>$ticket</li>\n";
|
||||
}
|
||||
echo "</ul>\n";
|
||||
}
|
||||
echo "</ul>\n";
|
||||
}
|
||||
|
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
use PHP_CodeSniffer\Files\File;
|
||||
use PHP_CodeSniffer\Sniffs\Sniff;
|
||||
|
||||
/**
|
||||
* Checks that the visibility qualifiers are placed after the static keyword
|
||||
* according to the coding guidelines
|
||||
*/
|
||||
class phpbb_Sniffs_ControlStructures_StaticKeywordSniff implements Sniff
|
||||
{
|
||||
/**
|
||||
* Registers the tokens that this sniff wants to listen for.
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
return [
|
||||
T_STATIC,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes this test, when one of its tokens is encountered.
|
||||
*
|
||||
* @param File $phpcsFile The file being scanned.
|
||||
* @param int $stackPtr The position of the current token in the stack passed in $tokens.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function process(File $phpcsFile, $stackPtr)
|
||||
{
|
||||
$tokens = $phpcsFile->getTokens();
|
||||
|
||||
$disallowed_after_tokens = [
|
||||
T_PUBLIC,
|
||||
T_PROTECTED,
|
||||
T_PRIVATE,
|
||||
];
|
||||
|
||||
if (in_array($tokens[$stackPtr + 2]['code'], $disallowed_after_tokens))
|
||||
{
|
||||
$error = 'Access specifier (e.g. public) should not follow static scope attribute. Encountered "' . $tokens[$stackPtr + 2]['content'] . '" after static';
|
||||
$phpcsFile->addWarning($error, $stackPtr, 'InvalidStaticFunctionDeclaration', [], 1);
|
||||
}
|
||||
}
|
||||
}
|
@@ -89,4 +89,7 @@
|
||||
<!-- There MUST be one space between control structure and opening parenthesis -->
|
||||
<rule ref="./phpbb/Sniffs/ControlStructures/OpeningParenthesisSniff.php" />
|
||||
|
||||
<!-- Static qualifier MUST be placed before the visibility qualifiers. -->
|
||||
<rule ref="./phpbb/Sniffs/ControlStructures/StaticKeywordSniff.php" />
|
||||
|
||||
</ruleset>
|
||||
|
BIN
composer.phar
BIN
composer.phar
Binary file not shown.
BIN
doctum.phar
Normal file → Executable file
BIN
doctum.phar
Normal file → Executable file
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# A hook to check syntax of a phpBB3 commit message, per:
|
||||
# * <http://wiki.phpbb.com/display/DEV/Git>
|
||||
# * <https://area51.phpbb.com/docs/dev/master/development/git.html>
|
||||
# * <http://area51.phpbb.com/phpBB/viewtopic.php?p=209919#p209919>
|
||||
#
|
||||
# This is a commit-msg hook.
|
||||
|
@@ -31,11 +31,11 @@
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_BBCODE_HELPLINE}</legend>
|
||||
<p>{L_BBCODE_HELPLINE_EXPLAIN}</p>
|
||||
<legend>{{ lang('BBCODE_HELPLINE') }}</legend>
|
||||
<p>{{ lang('BBCODE_HELPLINE_EXPLAIN') }}</p>
|
||||
<dl>
|
||||
<dt><label for="bbcode_helpline">{L_BBCODE_HELPLINE_TEXT}</label></dt>
|
||||
<dd><input type="text" id="bbcode_helpline" name="bbcode_helpline" size="60" maxlength="255" value="{BBCODE_HELPLINE}" /></dd>
|
||||
<dt><label for="bbcode_helpline">{{ lang('BBCODE_HELPLINE_TEXT') }}</label></dt>
|
||||
<dd><textarea id="bbcode_helpline" name="bbcode_helpline" cols="60" rows="4">{{ BBCODE_HELPLINE }}</textarea></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
|
@@ -58,7 +58,6 @@
|
||||
<dl>
|
||||
<dt><label for="type">{L_BACKUP_TYPE}{L_COLON}</label></dt>
|
||||
<dd><label><input type="radio" class="radio" name="type" value="full" id="type" checked="checked" /> {L_FULL_BACKUP}</label>
|
||||
<label><input type="radio" name="type" class="radio" value="structure" /> {L_STRUCTURE_ONLY}</label>
|
||||
<label><input type="radio" class="radio" name="type" value="data" /> {L_DATA_ONLY}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
|
@@ -45,7 +45,7 @@
|
||||
</tr>
|
||||
<!-- BEGINELSE -->
|
||||
<tr>
|
||||
<td colspan="6" style="text-align: center;">{L_NO_INACTIVE_USERS}</td>
|
||||
<td colspan="7" style="text-align: center;">{L_NO_INACTIVE_USERS}</td>
|
||||
</tr>
|
||||
<!-- END inactive -->
|
||||
</tbody>
|
||||
|
@@ -96,10 +96,10 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{L_STYLE_NAME}</th>
|
||||
<th width="10%" style="white-space: nowrap; text-align: center;">{{ lang('STYLE_VERSION') }}</th>
|
||||
<th width="10%" style="white-space: nowrap; text-align: center;">{L_STYLE_PHPBB_VERSION}</th>
|
||||
<!-- IF not STYLES_LIST_HIDE_COUNT --><th width="10%" style="white-space: nowrap; text-align: center;">{L_STYLE_USED_BY}</th><!-- ENDIF -->
|
||||
<th width="25%" style="white-space: nowrap; text-align: center;">{L_ACTIONS}</th>
|
||||
<th style="width: 10%; white-space: nowrap; text-align: center;">{{ lang('STYLE_VERSION') }}</th>
|
||||
<th style="width: 10%; white-space: nowrap; text-align: center;">{L_STYLE_PHPBB_VERSION}</th>
|
||||
<!-- IF not STYLES_LIST_HIDE_COUNT --><th style="width: 10%; white-space: nowrap; text-align: center;">{L_STYLE_USED_BY}</th><!-- ENDIF -->
|
||||
<th style="width: 25%; white-space: nowrap; text-align: center;">{L_ACTIONS}</th>
|
||||
{STYLES_LIST_EXTRA}
|
||||
<th> </th>
|
||||
</tr>
|
||||
@@ -146,7 +146,7 @@
|
||||
<!-- END actions -->
|
||||
</td>
|
||||
{styles_list.EXTRA}
|
||||
<td class="{$ROW_CLASS} mark" width="20">
|
||||
<td class="{$ROW_CLASS} mark" style="width: 20px;">
|
||||
<!-- IF styles_list.STYLE_ID -->
|
||||
{% if styles_list.STYLE_NAME !== 'prosilver' %}
|
||||
<input class="checkbox" type="checkbox" name="ids[]" value="{styles_list.STYLE_ID}" />
|
||||
|
@@ -2,7 +2,6 @@
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
|
||||
<a href="<!-- IF U_LIST -->{U_LIST}<!-- ELSE -->{U_ACTION}<!-- ENDIF -->" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a>
|
||||
|
||||
<h1>{L_QUESTIONS}</h1>
|
||||
@@ -25,15 +24,18 @@
|
||||
<td style="vertical-align: top; width: 50px; text-align: center; white-space: nowrap;">{L_ACTION}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<!-- BEGIN questions -->
|
||||
<tr>
|
||||
<td style="text-align: left;">{questions.QUESTION_TEXT}</td>
|
||||
<td style="text-align: center;">{questions.QUESTION_LANG}</td>
|
||||
<td style="text-align: center;"><a href="{questions.U_EDIT}">{ICON_EDIT}</a> <a href="{questions.U_DELETE}">{ICON_DELETE}</a></td>
|
||||
</tr>
|
||||
<!-- END questions -->
|
||||
{% for question in questions %}
|
||||
<tr>
|
||||
{# RTL is already managed by CSS #}
|
||||
<td>{{ question.QUESTION_TEXT }}</td>
|
||||
<td style="text-align: center;">{{ question.QUESTION_LANG }}</td>
|
||||
<td style="text-align: center;"><a href="{{ question.U_EDIT }}">{{ ICON_EDIT }}</a> <a href="{{ question.U_DELETE }}">{{ ICON_DELETE }}</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
<fieldset class="quick">
|
||||
<input class="button1" type="submit" name="add" value="{L_ADD}" />
|
||||
|
@@ -23,7 +23,7 @@ installLang = {
|
||||
</script>
|
||||
|
||||
<script src="{T_JQUERY_LINK}"></script>
|
||||
<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery-3.5.1.min.js">\x3C/script>');</script><!-- ENDIF -->
|
||||
<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery-3.6.0.min.js">\x3C/script>');</script><!-- ENDIF -->
|
||||
<script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
|
||||
<!-- INCLUDEJS admin.js -->
|
||||
{$SCRIPTS}
|
||||
|
@@ -24,7 +24,7 @@
|
||||
|
||||
<div id="phpbb_alert" class="phpbb_alert" data-l-err="{L_ERROR}" data-l-timeout-processing-req="{L_TIMEOUT_PROCESSING_REQ}">
|
||||
<a href="#" class="alert_close"></a>
|
||||
<h3 class="alert_title"></h3><p class="alert_text"></p>
|
||||
<h3 class="alert_title"> </h3><p class="alert_text"></p>
|
||||
</div>
|
||||
<div id="phpbb_confirm" class="phpbb_alert">
|
||||
<a href="#" class="alert_close"></a>
|
||||
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
|
||||
<script src="{T_JQUERY_LINK}"></script>
|
||||
<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery-3.5.1.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
|
||||
<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery-3.6.0.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
|
||||
<script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
|
||||
<!-- INCLUDEJS ajax.js -->
|
||||
<!-- INCLUDEJS admin.js -->
|
||||
|
@@ -12,10 +12,10 @@
|
||||
|
||||
<script>
|
||||
// <![CDATA[
|
||||
var jump_page = '{LA_JUMP_PAGE}{L_COLON}';
|
||||
var on_page = '{CURRENT_PAGE}';
|
||||
var per_page = '{PER_PAGE}';
|
||||
var base_url = '{BASE_URL|e('js')}';
|
||||
var jump_page = "{{ lang_js('JUMP_PAGE') ~ lang_js('COLON') }}";
|
||||
var on_page = '{{ CURRENT_PAGE }}';
|
||||
var per_page = '{{ PER_PAGE }}';
|
||||
var base_url = "{{ BASE_URL|e('js') }}";
|
||||
|
||||
/**
|
||||
* Jump to page
|
||||
|
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
|
||||
<script src="{T_JQUERY_LINK}"></script>
|
||||
<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery-3.5.1.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
|
||||
<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery-3.6.0.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
|
||||
<script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
|
||||
|
||||
<!-- EVENT acp_simple_footer_after -->
|
||||
|
2
phpBB/assets/javascript/jquery-3.5.1.min.js
vendored
2
phpBB/assets/javascript/jquery-3.5.1.min.js
vendored
File diff suppressed because one or more lines are too long
2
phpBB/assets/javascript/jquery-3.6.0.min.js
vendored
Normal file
2
phpBB/assets/javascript/jquery-3.6.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -15,8 +15,9 @@
|
||||
"support": {
|
||||
"issues": "https://tracker.phpbb.com",
|
||||
"forum": "https://www.phpbb.com/community/",
|
||||
"wiki": "https://wiki.phpbb.com",
|
||||
"irc": "irc://irc.freenode.org/phpbb"
|
||||
"docs": "https://www.phpbb.com/support/docs/",
|
||||
"irc": "irc://irc.libera.chat/phpbb",
|
||||
"chat": "https://www.phpbb.com/support/chat/"
|
||||
},
|
||||
"scripts": {
|
||||
"post-update-cmd": "echo 'You MUST manually modify the clean-vendor-dir target in build/build.xml when adding or upgrading dependencies.'"
|
||||
@@ -34,7 +35,6 @@
|
||||
"guzzlehttp/guzzle": "~6.3",
|
||||
"lusitanian/oauth": "^0.8.1",
|
||||
"marc1706/fast-image-size": "^1.1",
|
||||
"patchwork/utf8": "^1.1",
|
||||
"s9e/text-formatter": "^2.0",
|
||||
"symfony/config": "~3.4",
|
||||
"symfony/console": "~3.4",
|
||||
@@ -45,6 +45,9 @@
|
||||
"symfony/finder": "~3.4",
|
||||
"symfony/http-foundation": "~3.4",
|
||||
"symfony/http-kernel": "~3.4",
|
||||
"symfony/polyfill-intl-normalizer": "^1.23",
|
||||
"symfony/polyfill-mbstring": "^1.23",
|
||||
"symfony/polyfill-php72": "^1.23",
|
||||
"symfony/process": "^3.4",
|
||||
"symfony/proxy-manager-bridge": "~3.4",
|
||||
"symfony/routing": "~3.4",
|
||||
|
291
phpBB/composer.lock
generated
291
phpBB/composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "aba28293c9c05523b3fb2f91dac53f17",
|
||||
"content-hash": "1b58e9d5054a0881d4c29cb2e9523908",
|
||||
"packages": [
|
||||
{
|
||||
"name": "bantu/ini-get-wrapper",
|
||||
@@ -42,16 +42,16 @@
|
||||
},
|
||||
{
|
||||
"name": "composer/package-versions-deprecated",
|
||||
"version": "1.11.99.1",
|
||||
"version": "1.11.99.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/package-versions-deprecated.git",
|
||||
"reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6"
|
||||
"reference": "fff576ac850c045158a250e7e27666e146e78d18"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/7413f0b55a051e89485c5cb9f765fe24bb02a7b6",
|
||||
"reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6",
|
||||
"url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/fff576ac850c045158a250e7e27666e146e78d18",
|
||||
"reference": "fff576ac850c045158a250e7e27666e146e78d18",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -95,7 +95,7 @@
|
||||
"description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)",
|
||||
"support": {
|
||||
"issues": "https://github.com/composer/package-versions-deprecated/issues",
|
||||
"source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.1"
|
||||
"source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -111,7 +111,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2020-11-11T10:22:58+00:00"
|
||||
"time": "2021-08-17T13:49:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "google/recaptcha",
|
||||
@@ -293,16 +293,16 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "1.7.0",
|
||||
"version": "1.8.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3"
|
||||
"reference": "dc960a912984efb74d0a90222870c72c87f10c91"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3",
|
||||
"reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91",
|
||||
"reference": "dc960a912984efb74d0a90222870c72c87f10c91",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -362,9 +362,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/psr7/issues",
|
||||
"source": "https://github.com/guzzle/psr7/tree/1.7.0"
|
||||
"source": "https://github.com/guzzle/psr7/tree/1.8.2"
|
||||
},
|
||||
"time": "2020-09-30T07:37:11+00:00"
|
||||
"time": "2021-04-26T09:17:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "lusitanian/oauth",
|
||||
@@ -571,83 +571,6 @@
|
||||
},
|
||||
"time": "2017-05-04T11:12:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "patchwork/utf8",
|
||||
"version": "v1.3.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/tchwork/utf8.git",
|
||||
"reference": "e1fa4d4a57896d074c9a8d01742b688d5db4e9d5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/tchwork/utf8/zipball/e1fa4d4a57896d074c9a8d01742b688d5db4e9d5",
|
||||
"reference": "e1fa4d4a57896d074c9a8d01742b688d5db4e9d5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"lib-pcre": ">=7.3",
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/phpunit-bridge": "^3.4|^4.4"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-iconv": "Use iconv for best performance",
|
||||
"ext-intl": "Use Intl for best performance",
|
||||
"ext-mbstring": "Use Mbstring for best performance",
|
||||
"ext-wfio": "Use WFIO for UTF-8 filesystem access on Windows"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Patchwork\\": "src/Patchwork/"
|
||||
},
|
||||
"classmap": [
|
||||
"src/Normalizer.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"(Apache-2.0 or GPL-2.0)"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
}
|
||||
],
|
||||
"description": "Portable and performant UTF-8, Unicode and Grapheme Clusters for PHP",
|
||||
"homepage": "https://github.com/tchwork/utf8",
|
||||
"keywords": [
|
||||
"grapheme",
|
||||
"i18n",
|
||||
"unicode",
|
||||
"utf-8",
|
||||
"utf8"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/tchwork/utf8/issues",
|
||||
"source": "https://github.com/tchwork/utf8/tree/v1.3.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/nicolas-grekas",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/patchwork/utf8",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"abandoned": "symfony/polyfill-mbstring or symfony/string",
|
||||
"time": "2021-01-07T16:38:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/container",
|
||||
"version": "1.0.0",
|
||||
@@ -756,16 +679,16 @@
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
"version": "1.1.3",
|
||||
"version": "1.1.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/log.git",
|
||||
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
|
||||
"reference": "d49695b909c3b7628b6289db5479a1c204601f11"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
|
||||
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
|
||||
"reference": "d49695b909c3b7628b6289db5479a1c204601f11",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -789,7 +712,7 @@
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
"homepage": "https://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interface for logging libraries",
|
||||
@@ -800,9 +723,9 @@
|
||||
"psr-3"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/php-fig/log/tree/1.1.3"
|
||||
"source": "https://github.com/php-fig/log/tree/1.1.4"
|
||||
},
|
||||
"time": "2020-03-23T09:12:05+00:00"
|
||||
"time": "2021-05-03T11:20:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ralouphie/getallheaders",
|
||||
@@ -850,21 +773,21 @@
|
||||
},
|
||||
{
|
||||
"name": "s9e/regexp-builder",
|
||||
"version": "1.4.4",
|
||||
"version": "1.4.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/s9e/RegexpBuilder.git",
|
||||
"reference": "605b33841a766abd40ba3d07c15d0f62b5e7f033"
|
||||
"reference": "45992e3389e0179672f3a3605d66891a8b64918c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/s9e/RegexpBuilder/zipball/605b33841a766abd40ba3d07c15d0f62b5e7f033",
|
||||
"reference": "605b33841a766abd40ba3d07c15d0f62b5e7f033",
|
||||
"url": "https://api.github.com/repos/s9e/RegexpBuilder/zipball/45992e3389e0179672f3a3605d66891a8b64918c",
|
||||
"reference": "45992e3389e0179672f3a3605d66891a8b64918c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"lib-pcre": ">=7.2",
|
||||
"php": ">=5.5.1"
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "*"
|
||||
@@ -886,9 +809,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/s9e/RegexpBuilder/issues",
|
||||
"source": "https://github.com/s9e/RegexpBuilder/tree/1.4.4"
|
||||
"source": "https://github.com/s9e/RegexpBuilder/tree/1.4.5"
|
||||
},
|
||||
"time": "2020-01-08T02:46:22+00:00"
|
||||
"time": "2021-04-28T21:45:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "s9e/sweetdom",
|
||||
@@ -936,16 +859,16 @@
|
||||
},
|
||||
{
|
||||
"name": "s9e/text-formatter",
|
||||
"version": "2.8.4",
|
||||
"version": "2.10.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/s9e/TextFormatter.git",
|
||||
"reference": "7856f66f4cfaf1402b8ec30c0f0ba124da4e9b76"
|
||||
"reference": "00df71d0a803c041efa320ce2f2c0e56c1a6fca9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/s9e/TextFormatter/zipball/7856f66f4cfaf1402b8ec30c0f0ba124da4e9b76",
|
||||
"reference": "7856f66f4cfaf1402b8ec30c0f0ba124da4e9b76",
|
||||
"url": "https://api.github.com/repos/s9e/TextFormatter/zipball/00df71d0a803c041efa320ce2f2c0e56c1a6fca9",
|
||||
"reference": "00df71d0a803c041efa320ce2f2c0e56c1a6fca9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -972,7 +895,7 @@
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"version": "2.8.4"
|
||||
"version": "2.10.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@@ -1004,9 +927,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/s9e/TextFormatter/issues",
|
||||
"source": "https://github.com/s9e/TextFormatter/tree/2.8.4"
|
||||
"source": "https://github.com/s9e/TextFormatter/tree/2.10.0"
|
||||
},
|
||||
"time": "2021-03-02T08:58:26+00:00"
|
||||
"time": "2021-08-11T15:45:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/config",
|
||||
@@ -1586,16 +1509,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-kernel",
|
||||
"version": "v3.4.47",
|
||||
"version": "v3.4.49",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-kernel.git",
|
||||
"reference": "a98a4c30089e6a2d52a9fa236f718159b539f6f5"
|
||||
"reference": "5aa72405f5bd5583c36ed6e756acb17d3f98ac40"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/a98a4c30089e6a2d52a9fa236f718159b539f6f5",
|
||||
"reference": "a98a4c30089e6a2d52a9fa236f718159b539f6f5",
|
||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/5aa72405f5bd5583c36ed6e756acb17d3f98ac40",
|
||||
"reference": "5aa72405f5bd5583c36ed6e756acb17d3f98ac40",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1668,7 +1591,7 @@
|
||||
"description": "Symfony HttpKernel Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/http-kernel/tree/v3.4.47"
|
||||
"source": "https://github.com/symfony/http-kernel/tree/v3.4.49"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -1684,20 +1607,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2020-11-27T08:42:42+00:00"
|
||||
"time": "2021-05-19T12:06:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.22.1",
|
||||
"version": "v1.23.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||
"reference": "c6c942b1ac76c82448322025e084cadc56048b4e"
|
||||
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e",
|
||||
"reference": "c6c942b1ac76c82448322025e084cadc56048b4e",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce",
|
||||
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1709,7 +1632,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.22-dev"
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
@@ -1747,7 +1670,7 @@
|
||||
"portable"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1"
|
||||
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -1763,20 +1686,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-07T16:49:33+00:00"
|
||||
"time": "2021-02-19T12:13:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-idn",
|
||||
"version": "v1.22.1",
|
||||
"version": "v1.23.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-idn.git",
|
||||
"reference": "2d63434d922daf7da8dd863e7907e67ee3031483"
|
||||
"reference": "65bd267525e82759e7d8c4e8ceea44f398838e65"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/2d63434d922daf7da8dd863e7907e67ee3031483",
|
||||
"reference": "2d63434d922daf7da8dd863e7907e67ee3031483",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65",
|
||||
"reference": "65bd267525e82759e7d8c4e8ceea44f398838e65",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1790,7 +1713,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.22-dev"
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
@@ -1834,7 +1757,7 @@
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.22.1"
|
||||
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.23.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -1850,20 +1773,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-22T09:19:47+00:00"
|
||||
"time": "2021-05-27T09:27:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-normalizer",
|
||||
"version": "v1.22.1",
|
||||
"version": "v1.23.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
|
||||
"reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248"
|
||||
"reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248",
|
||||
"reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8",
|
||||
"reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1875,7 +1798,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.22-dev"
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
@@ -1918,7 +1841,7 @@
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1"
|
||||
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -1934,20 +1857,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-22T09:19:47+00:00"
|
||||
"time": "2021-02-19T12:13:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.22.1",
|
||||
"version": "v1.23.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "5232de97ee3b75b0360528dae24e73db49566ab1"
|
||||
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1",
|
||||
"reference": "5232de97ee3b75b0360528dae24e73db49566ab1",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
|
||||
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1959,7 +1882,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.22-dev"
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
@@ -1998,7 +1921,7 @@
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1"
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -2014,7 +1937,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-22T09:19:47+00:00"
|
||||
"time": "2021-05-27T12:26:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php56",
|
||||
@@ -2154,16 +2077,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php72",
|
||||
"version": "v1.22.1",
|
||||
"version": "v1.23.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php72.git",
|
||||
"reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9"
|
||||
"reference": "9a142215a36a3888e30d0a9eeea9766764e96976"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
|
||||
"reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976",
|
||||
"reference": "9a142215a36a3888e30d0a9eeea9766764e96976",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2172,7 +2095,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.22-dev"
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
@@ -2210,7 +2133,7 @@
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-php72/tree/v1.22.1"
|
||||
"source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -2226,7 +2149,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-07T16:49:33+00:00"
|
||||
"time": "2021-05-27T09:17:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
@@ -3177,16 +3100,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phing/phing",
|
||||
"version": "2.16.4",
|
||||
"version": "2.17.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phingofficial/phing.git",
|
||||
"reference": "30831b22fc6bab57003f1893842668c44b7f65ae"
|
||||
"reference": "c0a3bce822c088d60b30a577c25debb42325d0f8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phingofficial/phing/zipball/30831b22fc6bab57003f1893842668c44b7f65ae",
|
||||
"reference": "30831b22fc6bab57003f1893842668c44b7f65ae",
|
||||
"url": "https://api.github.com/repos/phingofficial/phing/zipball/c0a3bce822c088d60b30a577c25debb42325d0f8",
|
||||
"reference": "c0a3bce822c088d60b30a577c25debb42325d0f8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3269,7 +3192,7 @@
|
||||
"support": {
|
||||
"irc": "irc://irc.freenode.net/phing",
|
||||
"issues": "https://www.phing.info/trac/report",
|
||||
"source": "https://github.com/phingofficial/phing/tree/2.16.4"
|
||||
"source": "https://github.com/phingofficial/phing/tree/2.17.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -3285,20 +3208,20 @@
|
||||
"type": "patreon"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-29T14:00:54+00:00"
|
||||
"time": "2021-08-31T13:33:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "php-webdriver/webdriver",
|
||||
"version": "1.10.0",
|
||||
"version": "1.11.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-webdriver/php-webdriver.git",
|
||||
"reference": "cd9290b95b7651d495bd69253d6e3ef469a7f211"
|
||||
"reference": "da16e39968f8dd5cfb7d07eef91dc2b731c69880"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/cd9290b95b7651d495bd69253d6e3ef469a7f211",
|
||||
"reference": "cd9290b95b7651d495bd69253d6e3ef469a7f211",
|
||||
"url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/da16e39968f8dd5cfb7d07eef91dc2b731c69880",
|
||||
"reference": "da16e39968f8dd5cfb7d07eef91dc2b731c69880",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3326,11 +3249,6 @@
|
||||
"ext-SimpleXML": "For Firefox profile creation"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.8.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Facebook\\WebDriver\\": "lib/"
|
||||
@@ -3354,9 +3272,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/php-webdriver/php-webdriver/issues",
|
||||
"source": "https://github.com/php-webdriver/php-webdriver/tree/1.10.0"
|
||||
"source": "https://github.com/php-webdriver/php-webdriver/tree/1.11.1"
|
||||
},
|
||||
"time": "2021-02-25T13:38:09+00:00"
|
||||
"time": "2021-05-21T15:12:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-common",
|
||||
@@ -3711,16 +3629,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-file-iterator",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
||||
"reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357"
|
||||
"reference": "28af674ff175d0768a5a978e6de83f697d4a7f05"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/4b49fb70f067272b659ef0174ff9ca40fdaa6357",
|
||||
"reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/28af674ff175d0768a5a978e6de83f697d4a7f05",
|
||||
"reference": "28af674ff175d0768a5a978e6de83f697d4a7f05",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3759,7 +3677,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
|
||||
"source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.3"
|
||||
"source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -3767,7 +3685,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2020-11-30T08:25:21+00:00"
|
||||
"time": "2021-07-19T06:46:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-text-template",
|
||||
@@ -3875,16 +3793,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-token-stream",
|
||||
"version": "3.1.2",
|
||||
"version": "3.1.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
|
||||
"reference": "472b687829041c24b25f475e14c2f38a09edf1c2"
|
||||
"reference": "9c1da83261628cb24b6a6df371b6e312b3954768"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/472b687829041c24b25f475e14c2f38a09edf1c2",
|
||||
"reference": "472b687829041c24b25f475e14c2f38a09edf1c2",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9c1da83261628cb24b6a6df371b6e312b3954768",
|
||||
"reference": "9c1da83261628cb24b6a6df371b6e312b3954768",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3922,7 +3840,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/php-token-stream/issues",
|
||||
"source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.2"
|
||||
"source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -3931,7 +3849,7 @@
|
||||
}
|
||||
],
|
||||
"abandoned": true,
|
||||
"time": "2020-11-30T08:38:46+00:00"
|
||||
"time": "2021-07-26T12:15:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
@@ -4636,6 +4554,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"abandoned": true,
|
||||
"time": "2020-11-30T07:30:19+00:00"
|
||||
},
|
||||
{
|
||||
@@ -4687,16 +4606,16 @@
|
||||
},
|
||||
{
|
||||
"name": "squizlabs/php_codesniffer",
|
||||
"version": "3.5.8",
|
||||
"version": "3.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
||||
"reference": "9d583721a7157ee997f235f327de038e7ea6dac4"
|
||||
"reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4",
|
||||
"reference": "9d583721a7157ee997f235f327de038e7ea6dac4",
|
||||
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625",
|
||||
"reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4739,7 +4658,7 @@
|
||||
"source": "https://github.com/squizlabs/PHP_CodeSniffer",
|
||||
"wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
|
||||
},
|
||||
"time": "2020-10-23T02:01:07+00:00"
|
||||
"time": "2021-04-09T00:54:41+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/browser-kit",
|
||||
|
140
phpBB/develop/export_events_for_rst.php
Normal file
140
phpBB/develop/export_events_for_rst.php
Normal file
@@ -0,0 +1,140 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
if (php_sapi_name() != 'cli')
|
||||
{
|
||||
die("This program must be run from the command line.\n");
|
||||
}
|
||||
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
$phpbb_root_path = __DIR__ . '/../';
|
||||
define('IN_PHPBB', true);
|
||||
|
||||
function usage()
|
||||
{
|
||||
echo "Usage: export_events_for_rst.php COMMAND [VERSION] [EXTENSION]\n";
|
||||
echo "\n";
|
||||
echo "COMMAND:\n";
|
||||
echo " all:\n";
|
||||
echo " Generate the complete rst for the Event List\n";
|
||||
echo "\n";
|
||||
echo " diff:\n";
|
||||
echo " Generate the Event Diff for the release highlights\n";
|
||||
echo "\n";
|
||||
echo " php:\n";
|
||||
echo " Generate the PHP event section of Event_List\n";
|
||||
echo "\n";
|
||||
echo " adm:\n";
|
||||
echo " Generate the ACP Template event section of Event_List\n";
|
||||
echo "\n";
|
||||
echo " styles:\n";
|
||||
echo " Generate the Styles Template event section of Event_List\n";
|
||||
echo "\n";
|
||||
echo "VERSION (diff only):\n";
|
||||
echo " Filter events (minimum version)\n";
|
||||
echo "\n";
|
||||
echo "EXTENSION (Optional):\n";
|
||||
echo " If not given, only core events will be exported.\n";
|
||||
echo " Otherwise only events from the extension will be exported.\n";
|
||||
echo "\n";
|
||||
exit(2);
|
||||
}
|
||||
|
||||
function validate_argument_count($arguments, $count)
|
||||
{
|
||||
if ($arguments <= $count)
|
||||
{
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
validate_argument_count($argc, 1);
|
||||
|
||||
$action = $argv[1];
|
||||
$extension = isset($argv[2]) ? $argv[2] : null;
|
||||
$min_version = null;
|
||||
require __DIR__ . '/../phpbb/event/php_exporter.' . $phpEx;
|
||||
require __DIR__ . '/../phpbb/event/md_exporter.' . $phpEx;
|
||||
require __DIR__ . '/../phpbb/event/rst_exporter.' . $phpEx;
|
||||
require __DIR__ . '/../includes/functions.' . $phpEx;
|
||||
require __DIR__ . '/../phpbb/event/recursive_event_filter_iterator.' . $phpEx;
|
||||
require __DIR__ . '/../phpbb/recursive_dot_prefix_filter_iterator.' . $phpEx;
|
||||
|
||||
switch ($action)
|
||||
{
|
||||
|
||||
case 'diff':
|
||||
echo '== Event changes ==' . "\n";
|
||||
echo "Event changes\n";
|
||||
echo "=============\n\n";
|
||||
$min_version = $extension;
|
||||
$extension = isset($argv[3]) ? $argv[3] : null;
|
||||
|
||||
case 'all':
|
||||
if ($action === 'all')
|
||||
{
|
||||
echo "==========================\n";
|
||||
echo "Events List\n";
|
||||
echo "==========================\n\n";
|
||||
}
|
||||
|
||||
|
||||
case 'php':
|
||||
$exporter = new \phpbb\event\php_exporter($phpbb_root_path, $extension, $min_version);
|
||||
$exporter->crawl_phpbb_directory_php();
|
||||
echo $exporter->export_events_for_rst($action);
|
||||
|
||||
if ($action === 'php')
|
||||
{
|
||||
break;
|
||||
}
|
||||
echo "\n\n";
|
||||
// no break;
|
||||
|
||||
case 'styles':
|
||||
$exporter = new \phpbb\event\md_exporter($phpbb_root_path, $extension, $min_version);
|
||||
if ($min_version && $action === 'diff')
|
||||
{
|
||||
$exporter->crawl_eventsmd('docs/events.md', 'styles');
|
||||
}
|
||||
else
|
||||
{
|
||||
$exporter->crawl_phpbb_directory_styles('docs/events.md');
|
||||
}
|
||||
echo $exporter->export_events_for_rst($action);
|
||||
|
||||
if ($action === 'styles')
|
||||
{
|
||||
break;
|
||||
}
|
||||
echo "\n\n";
|
||||
// no break;
|
||||
|
||||
case 'adm':
|
||||
$exporter = new \phpbb\event\md_exporter($phpbb_root_path, $extension, $min_version);
|
||||
if ($min_version && $action === 'diff')
|
||||
{
|
||||
$exporter->crawl_eventsmd('docs/events.md', 'adm');
|
||||
}
|
||||
else
|
||||
{
|
||||
$exporter->crawl_phpbb_directory_adm('docs/events.md');
|
||||
}
|
||||
echo $exporter->export_events_for_rst($action);
|
||||
|
||||
echo "\n";
|
||||
break;
|
||||
|
||||
default:
|
||||
usage();
|
||||
}
|
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Rebuild BOTS
|
||||
*
|
||||
* You should make a backup from your whole database. Things can and will go wrong.
|
||||
* You should make a backup from your whole database. Things can and will go wrong.
|
||||
* This will only work if no BOTs were added.
|
||||
*
|
||||
*/
|
||||
@@ -24,10 +24,14 @@ $user->setup();
|
||||
|
||||
$bots = array(
|
||||
'AdsBot [Google]' => array('AdsBot-Google', ''),
|
||||
'Ahrefs [Bot]' => array('AhrefsBot/', ''),
|
||||
'Alexa [Bot]' => array('ia_archiver', ''),
|
||||
'Alta Vista [Bot]' => array('Scooter/', ''),
|
||||
'Amazon [Bot]' => array('Amazonbot/', ''),
|
||||
'Ask Jeeves [Bot]' => array('Ask Jeeves', ''),
|
||||
'Baidu [Spider]' => array('Baiduspider+(', ''),
|
||||
'Baidu [Spider]' => array('Baiduspider', ''),
|
||||
'Bing [Bot]' => array('bingbot/', ''),
|
||||
'DuckDuckGo [Bot]' => array('DuckDuckBot/', ''),
|
||||
'Exabot [Bot]' => array('Exabot/', ''),
|
||||
'FAST Enterprise [Crawler]' => array('FAST Enterprise Crawler', ''),
|
||||
'FAST WebCrawler [Crawler]' => array('FAST-WebCrawler/', ''),
|
||||
@@ -41,7 +45,7 @@ $bots = array(
|
||||
'Heritrix [Crawler]' => array('heritrix/1.', ''),
|
||||
'IBM Research [Bot]' => array('ibm.com/cs/crawler', ''),
|
||||
'ICCrawler - ICjobs' => array('ICCrawler - ICjobs', ''),
|
||||
'ichiro [Crawler]' => array('ichiro/2', ''),
|
||||
'ichiro [Crawler]' => array('ichiro/', ''),
|
||||
'Majestic-12 [Bot]' => array('MJ12bot/', ''),
|
||||
'Metager [Bot]' => array('MetagerBot/', ''),
|
||||
'MSN NewsBlogs' => array('msnbot-NewsBlogs/', ''),
|
||||
@@ -54,6 +58,7 @@ $bots = array(
|
||||
'Online link [Validator]' => array('online link validator', ''),
|
||||
'psbot [Picsearch]' => array('psbot/0', ''),
|
||||
'Seekport [Bot]' => array('Seekbot/', ''),
|
||||
'Semrush [Bot]' => array('SemrushBot/', ''),
|
||||
'Sensis [Crawler]' => array('Sensis Web Crawler', ''),
|
||||
'SEO Crawler' => array('SEO search Crawler/', ''),
|
||||
'Seoma [Crawler]' => array('Seoma [SEO Crawler]', ''),
|
||||
@@ -63,7 +68,7 @@ $bots = array(
|
||||
'Synoo [Bot]' => array('SynooBot/', ''),
|
||||
'Telekom [Bot]' => array('crawleradmin.t-info@telekom.de', ''),
|
||||
'TurnitinBot [Bot]' => array('TurnitinBot/', ''),
|
||||
'Voyager [Bot]' => array('voyager/1.0', ''),
|
||||
'Voyager [Bot]' => array('voyager/', ''),
|
||||
'W3 [Sitesearch]' => array('W3 SiteSearch Crawler', ''),
|
||||
'W3C [Linkcheck]' => array('W3C-checklink/', ''),
|
||||
'W3C [Validator]' => array('W3C_*Validator', ''),
|
||||
@@ -74,7 +79,7 @@ $bots = array(
|
||||
'Yahoo [Bot]' => array('Yahoo! Slurp', ''),
|
||||
'YahooSeeker [Bot]' => array('YahooSeeker/', ''),
|
||||
);
|
||||
|
||||
|
||||
$bot_ids = array();
|
||||
user_get_id_name($bot_ids, array_keys($bots), USER_IGNORE);
|
||||
foreach($bot_ids as $bot)
|
||||
|
@@ -50,6 +50,8 @@
|
||||
<ol>
|
||||
<li><a href="#changelog">Changelog</a>
|
||||
<ul>
|
||||
<li><a href="#v335rc1">Changes since 3.3.5-RC1</a></li>
|
||||
<li><a href="#v334">Changes since 3.3.4</a></li>
|
||||
<li><a href="#v334rc1">Changes since 3.3.4-RC1</a></li>
|
||||
<li><a href="#v333">Changes since 3.3.3</a></li>
|
||||
<li><a href="#v332">Changes since 3.3.2</a></li>
|
||||
@@ -156,6 +158,82 @@
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
<a name="v335rc1"></a><h3>Changes since 3.3.5-RC1</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16878">PHPBB3-16878</a>] - Error in password_hash() with ARGON2 + Sodium & threadcount > 1</li>
|
||||
</ul>
|
||||
<h4>Hardening</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/SECURITY-254">SECURITY-254</a>] - Disallow whitespace characters that might be invisible</li>
|
||||
</ul>
|
||||
|
||||
<a name="v334"></a><h3>Changes since 3.3.4</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-12075">PHPBB3-12075</a>] - Language file Modules needs to be added to acp_extensions</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-13700">PHPBB3-13700</a>] - Column 'field_show_on_pm' not created before migration profilefield_interests</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16292">PHPBB3-16292</a>] - Database errors during conversion not propagated</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16570">PHPBB3-16570</a>] - Automatic updater no longer handles merge conflicts</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16657">PHPBB3-16657</a>] - Encoded characters inserted from live search for usernames</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16729">PHPBB3-16729</a>] - Unknown named parameter $log_data in phpbb/log/log.php</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16730">PHPBB3-16730</a>] - Build changelog throwing PHP warnings on no changes in version</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16749">PHPBB3-16749</a>] - SQL error on installation</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16757">PHPBB3-16757</a>] - RTL problem in random question text in ACP</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16765">PHPBB3-16765</a>] - contact_admin_acp_module migration lacks effectively_installed check</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16766">PHPBB3-16766</a>] - Updater only shows truncated error messages</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16767">PHPBB3-16767</a>] - Migrator shows wrong migration as missing if unfulfillable</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16770">PHPBB3-16770</a>] - Invalid position of static qualifier in 3.3.4 migration</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16772">PHPBB3-16772</a>] - Emoji not supported in email signature</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16773">PHPBB3-16773</a>] - PostgreSQL backups are missing constraint declarations</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16784">PHPBB3-16784</a>] - Ignore .vscode files in git</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16785">PHPBB3-16785</a>] - Latest release missing from previous versions in build.xml</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16787">PHPBB3-16787</a>] - Error message when "fsockopen" is deactivated</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16789">PHPBB3-16789</a>] - user_delete documentation incorrect</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16793">PHPBB3-16793</a>] - PHP Warning when checking topic/post attachment visibility in PHP 8</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16799">PHPBB3-16799</a>] - OAuth external account linking triggers fatal error on PHP 8</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16808">PHPBB3-16808</a>] - Container used before initialization causes error in PHP8</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16810">PHPBB3-16810</a>] - The no closing tag in Custom BBCodes is still shown onclick</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16812">PHPBB3-16812</a>] - login_body.html missing dt tag for autologin</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16823">PHPBB3-16823</a>] - Datetime class incorrectly handles edge yesterday/today/tomorrow cases</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16832">PHPBB3-16832</a>] - Wrong singular language shown in UCP attachments</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16865">PHPBB3-16865</a>] - Update IRC + discord links in composer and documentation and update docs</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16870">PHPBB3-16870</a>] - Setting float config value can fail with CLI db:migrate</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-15729">PHPBB3-15729</a>] - Don't unnecessarily encode email headers in Base64</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-15925">PHPBB3-15925</a>] - Add core events for sync and mcp functions</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16138">PHPBB3-16138</a>] - Eliminate redundant f= and t= parameters from board urls</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16736">PHPBB3-16736</a>] - Enforce placement of visibility qualifiers after static</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16748">PHPBB3-16748</a>] - Update coding guidelines to place static after visibility qualifiers</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16752">PHPBB3-16752</a>] - Create event exporter to restructured text</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16754">PHPBB3-16754</a>] - Update doctum</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16771">PHPBB3-16771</a>] - Add core events to MCP</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16783">PHPBB3-16783</a>] - Remove structure only backup</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16788">PHPBB3-16788</a>] - Update s9e/text-formatter to latest</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16795">PHPBB3-16795</a>] - Add template events around signature in viewtopic</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16798">PHPBB3-16798</a>] - Scale down phpBB logo in readme</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16804">PHPBB3-16804</a>] - Extend bbcode help line tooltip</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16809">PHPBB3-16809</a>] - Reset UCP preferences at end of test</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16816">PHPBB3-16816</a>] - acp style html validation fixes</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16822">PHPBB3-16822</a>] - Replace patchwork/utf8 with symfony/polyfill</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16829">PHPBB3-16829</a>] - Add forumtitle and lastsubject text decoration hover</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16831">PHPBB3-16831</a>] - fix tabs missing delimiters and remove old commented classes</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16850">PHPBB3-16850</a>] - Update webfont.js to latest</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16851">PHPBB3-16851</a>] - Add Amazonbot, AhrefsBot and SemrushBot</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16858">PHPBB3-16858</a>] - Update to the latest version of jQuery 3.6.0</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16867">PHPBB3-16867</a>] - Update symfony and text-formatter to latest versions</li>
|
||||
</ul>
|
||||
<h4>New Feature</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16856">PHPBB3-16856</a>] - Add lang_js() function to twig as replacement for LA_</li>
|
||||
</ul>
|
||||
<h4>Task</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16769">PHPBB3-16769</a>] - Update composer to latest version</li>
|
||||
</ul>
|
||||
|
||||
<a name="v334rc1"></a><h3>Changes since 3.3.4-RC1</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
|
@@ -204,7 +204,7 @@
|
||||
|
||||
<a name="irc"></a><h3>3.iv Internet Relay Chat</h3>
|
||||
|
||||
<p>Another place you may find help is our IRC channel. This operates on the Freenode IRC network, <a href="irc://irc.freenode.net">irc.freenode.net</a> and the channel is <em>#phpbb</em> and can be accessed by any decent IRC client such as mIRC, XChat, etc. Again, please do not abuse this service and be respectful of other users.</p>
|
||||
<p>Another place you may find help is our IRC channel. This operates on the Libera IRC network, <a href="irc://irc.libera.chat">irc.libera.chat</a> and the channel is <em>#phpbb</em> and can be accessed by any decent IRC client such as mIRC, XChat, etc. Again, please do not abuse this service and be respectful of other users.</p>
|
||||
|
||||
<p>There are other IRC channels available, please see <a href="https://www.phpbb.com/support/irc/">https://www.phpbb.com/support/irc/</a> for the complete list.</p>
|
||||
|
||||
|
@@ -718,18 +718,18 @@ switch ($mode)
|
||||
<h4>Class Members</h4>
|
||||
<p>Use the explicit visibility qualifiers <code>public</code>, <code>private</code> and <code>protected</code> for all properties instead of <code>var</code>.
|
||||
|
||||
<p>Place the <code>static</code> qualifier before the visibility qualifiers.</p>
|
||||
<p>Place the <code>static</code> qualifier after the visibility qualifiers.</p>
|
||||
|
||||
<p class="bad">//Wrong </p>
|
||||
<div class="codebox"><pre>
|
||||
var $x;
|
||||
private static function f()</pre>
|
||||
static private function f()</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// Right </p>
|
||||
<div class="codebox"><pre>
|
||||
public $x;
|
||||
static private function f()</pre>
|
||||
private static function f()</pre>
|
||||
</div>
|
||||
|
||||
<h4>Constants</h4>
|
||||
|
@@ -3359,6 +3359,20 @@ viewtopic_body_postrow_rank_before
|
||||
* Purpose: Add data before the rank on the user profile when viewing
|
||||
a post
|
||||
|
||||
viewtopic_body_postrow_signature_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
* Since: 3.3.5-RC1
|
||||
* Purpose: Add content after the signature
|
||||
|
||||
viewtopic_body_postrow_signature_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
* Since: 3.3.5-RC1
|
||||
* Purpose: Add content before the signature
|
||||
|
||||
viewtopic_body_topic_actions_before
|
||||
===
|
||||
* Locations:
|
||||
|
@@ -220,7 +220,7 @@ else
|
||||
{
|
||||
phpbb_download_handle_forum_auth($db, $auth, $attachment['topic_id']);
|
||||
|
||||
$sql = 'SELECT forum_id, post_visibility
|
||||
$sql = 'SELECT forum_id, poster_id, post_visibility
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE post_id = ' . (int) $attachment['post_msg_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
|
@@ -1278,7 +1278,7 @@ class acp_attachments
|
||||
|
||||
'S_IN_MESSAGE' => (bool) $row['in_message'],
|
||||
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$row['topic_id']}&p={$row['post_msg_id']}") . "#p{$row['post_msg_id']}",
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p={$row['post_msg_id']}") . "#p{$row['post_msg_id']}",
|
||||
'U_FILE' => append_sid($phpbb_root_path . 'download/file.' . $phpEx, 'mode=view&id=' . $row['attach_id']))
|
||||
);
|
||||
}
|
||||
|
@@ -235,7 +235,7 @@ class acp_bbcodes
|
||||
trigger_error($user->lang['BBCODE_TAG_DEF_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if (strlen($bbcode_helpline) > 255)
|
||||
if (strlen($bbcode_helpline) > 3000)
|
||||
{
|
||||
trigger_error($user->lang['BBCODE_HELPLINE_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
@@ -589,6 +589,7 @@ class acp_board
|
||||
'site_home_text',
|
||||
'board_index_text',
|
||||
'board_disable_msg',
|
||||
'board_email_sig',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@@ -69,20 +69,6 @@ class acp_database
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$store = true;
|
||||
$structure = false;
|
||||
$schema_data = false;
|
||||
|
||||
if ($type == 'full' || $type == 'structure')
|
||||
{
|
||||
$structure = true;
|
||||
}
|
||||
|
||||
if ($type == 'full' || $type == 'data')
|
||||
{
|
||||
$schema_data = true;
|
||||
}
|
||||
|
||||
@set_time_limit(1200);
|
||||
@set_time_limit(0);
|
||||
|
||||
@@ -92,14 +78,14 @@ class acp_database
|
||||
|
||||
/** @var phpbb\db\extractor\extractor_interface $extractor Database extractor */
|
||||
$extractor = $phpbb_container->get('dbal.extractor');
|
||||
$extractor->init_extractor($format, $filename, $time, false, $store);
|
||||
$extractor->init_extractor($format, $filename, $time, false, true);
|
||||
|
||||
$extractor->write_start($table_prefix);
|
||||
|
||||
foreach ($table as $table_name)
|
||||
{
|
||||
// Get the table structure
|
||||
if ($structure)
|
||||
if ($type == 'full')
|
||||
{
|
||||
$extractor->write_table($table_name);
|
||||
}
|
||||
@@ -123,15 +109,11 @@ class acp_database
|
||||
|
||||
default:
|
||||
$extractor->flush('TRUNCATE TABLE ' . $table_name . ";\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Data
|
||||
if ($schema_data)
|
||||
{
|
||||
$extractor->write_data($table_name);
|
||||
}
|
||||
// Only supported types are full and data, therefore always write the data
|
||||
$extractor->write_data($table_name);
|
||||
}
|
||||
|
||||
$extractor->write_end();
|
||||
|
@@ -53,7 +53,7 @@ class acp_extensions
|
||||
$this->phpbb_container = $phpbb_container;
|
||||
$this->php_ini = $this->phpbb_container->get('php_ini');
|
||||
|
||||
$this->user->add_lang(array('install', 'acp/extensions', 'migrator'));
|
||||
$this->user->add_lang(array('install', 'acp/extensions', 'acp/modules', 'migrator'));
|
||||
|
||||
$this->page_title = 'ACP_EXTENSIONS';
|
||||
|
||||
|
@@ -2277,7 +2277,7 @@ class acp_users
|
||||
}
|
||||
else
|
||||
{
|
||||
$view_topic = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$row['topic_id']}&p={$row['post_msg_id']}") . '#p' . $row['post_msg_id'];
|
||||
$view_topic = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p={$row['post_msg_id']}") . '#p' . $row['post_msg_id'];
|
||||
}
|
||||
|
||||
$template->assign_block_vars('attach', array(
|
||||
|
@@ -28,7 +28,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
|
||||
// phpBB Version
|
||||
@define('PHPBB_VERSION', '3.3.4');
|
||||
@define('PHPBB_VERSION', '3.3.5');
|
||||
|
||||
// QA-related
|
||||
// define('PHPBB_QA', 1);
|
||||
|
@@ -1075,7 +1075,7 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis
|
||||
* @param string $sql_limit Limits the size of unread topics list, 0 for unlimited query
|
||||
* @param string $sql_limit_offset Sets the offset of the first row to search, 0 to search from the start
|
||||
*
|
||||
* @return array[int][int] Topic ids as keys, mark_time of topic as value
|
||||
* @return int[] Topic ids as keys, mark_time of topic as value
|
||||
*/
|
||||
function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $sql_limit = 1001, $sql_limit_offset = 0)
|
||||
{
|
||||
@@ -1464,10 +1464,9 @@ function tracking_unserialize($string, $max_depth = 3)
|
||||
* @return string The corrected url.
|
||||
*
|
||||
* Examples:
|
||||
* <code>
|
||||
* append_sid("{$phpbb_root_path}viewtopic.$phpEx?t=1&f=2");
|
||||
* append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=1&f=2');
|
||||
* append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=1&f=2', false);
|
||||
* <code> append_sid("{$phpbb_root_path}viewtopic.$phpEx?t=1");
|
||||
* append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=1');
|
||||
* append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=1', false);
|
||||
* append_sid("{$phpbb_root_path}viewtopic.$phpEx", array('t' => 1, 'f' => 2));
|
||||
* </code>
|
||||
*
|
||||
@@ -2996,7 +2995,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||
|
||||
// Check the error reporting level and return if the error level does not match
|
||||
// If DEBUG is defined the default level is E_ALL
|
||||
if (($errno & ($phpbb_container->getParameter('debug.show_errors') ? E_ALL : error_reporting())) == 0)
|
||||
if (($errno & ($phpbb_container != null && $phpbb_container->getParameter('debug.show_errors') ? E_ALL : error_reporting())) == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -4070,7 +4069,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
|
||||
|
||||
'T_FONT_AWESOME_LINK' => !empty($config['allow_cdn']) && !empty($config['load_font_awesome_url']) ? $config['load_font_awesome_url'] : "{$web_path}assets/css/font-awesome.min.css?assets_version=" . $config['assets_version'],
|
||||
|
||||
'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery-3.5.1.min.js?assets_version=" . $config['assets_version'],
|
||||
'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery-3.6.0.min.js?assets_version=" . $config['assets_version'],
|
||||
'S_ALLOW_CDN' => !empty($config['allow_cdn']),
|
||||
'S_COOKIE_NOTICE' => !empty($config['cookie_notice']),
|
||||
|
||||
|
@@ -178,7 +178,7 @@ function adm_page_footer($copyright_html = true)
|
||||
'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
|
||||
'S_COPYRIGHT_HTML' => $copyright_html,
|
||||
'CREDIT_LINE' => $user->lang('POWERED_BY', '<a href="https://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Limited'),
|
||||
'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$phpbb_root_path}assets/javascript/jquery-3.5.1.min.js",
|
||||
'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$phpbb_root_path}assets/javascript/jquery-3.6.0.min.js",
|
||||
'S_ALLOW_CDN' => !empty($config['allow_cdn']),
|
||||
'VERSION' => $config['version'])
|
||||
);
|
||||
|
@@ -1324,7 +1324,7 @@ function update_posted_info(&$topic_ids)
|
||||
*/
|
||||
function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, $sync_extra = false)
|
||||
{
|
||||
global $db;
|
||||
global $db, $phpbb_dispatcher;
|
||||
|
||||
if (is_array($where_ids))
|
||||
{
|
||||
@@ -1826,11 +1826,26 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
// 5: Retrieve last_post infos
|
||||
if (count($post_ids))
|
||||
{
|
||||
$sql = 'SELECT p.post_id, p.poster_id, p.post_subject, p.post_time, p.post_username, u.username, u.user_colour
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . '
|
||||
AND p.poster_id = u.user_id';
|
||||
$result = $db->sql_query($sql);
|
||||
$sql_ary = array(
|
||||
'SELECT' => 'p.post_id, p.poster_id, p.post_subject, p.post_time, p.post_username, u.username, u.user_colour',
|
||||
'FROM' => array(
|
||||
POSTS_TABLE => 'p',
|
||||
USERS_TABLE => 'u',
|
||||
),
|
||||
'WHERE' => $db->sql_in_set('p.post_id', $post_ids) . '
|
||||
AND p.poster_id = u.user_id',
|
||||
);
|
||||
|
||||
/**
|
||||
* Event to modify the SQL array to get the post and user data from all forums' last posts
|
||||
*
|
||||
* @event core.sync_forum_last_post_info_sql
|
||||
* @var array sql_ary SQL array with some post and user data from the last posts list
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = ['sql_ary'];
|
||||
extract($phpbb_dispatcher->trigger_event('core.sync_forum_last_post_info_sql', compact($vars)));
|
||||
$result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
@@ -1862,7 +1877,6 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($post_info);
|
||||
}
|
||||
|
||||
// 6: Now do that thing
|
||||
@@ -1873,6 +1887,23 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
array_push($fieldnames, 'posts_approved', 'posts_unapproved', 'posts_softdeleted', 'topics_approved', 'topics_unapproved', 'topics_softdeleted');
|
||||
}
|
||||
|
||||
/**
|
||||
* Event to modify the SQL array to get the post and user data from all forums' last posts
|
||||
*
|
||||
* @event core.sync_modify_forum_data
|
||||
* @var array forum_data Array with data to update for all forum ids
|
||||
* @var array post_info Array with some post and user data from the last posts list
|
||||
* @var array fieldnames Array with the partial column names that are being updated
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'forum_data',
|
||||
'post_info',
|
||||
'fieldnames',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.sync_modify_forum_data', compact($vars)));
|
||||
unset($post_info);
|
||||
|
||||
foreach ($forum_data as $forum_id => $row)
|
||||
{
|
||||
$sql_ary = array();
|
||||
@@ -2041,11 +2072,31 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
unset($delete_topics, $delete_topic_ids);
|
||||
}
|
||||
|
||||
$sql = 'SELECT p.post_id, p.topic_id, p.post_visibility, p.poster_id, p.post_subject, p.post_username, p.post_time, u.username, u.user_colour
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . '
|
||||
AND u.user_id = p.poster_id';
|
||||
$result = $db->sql_query($sql);
|
||||
$sql_ary = array(
|
||||
'SELECT' => 'p.post_id, p.topic_id, p.post_visibility, p.poster_id, p.post_subject, p.post_username, p.post_time, u.username, u.user_colour',
|
||||
'FROM' => array(
|
||||
POSTS_TABLE => 'p',
|
||||
USERS_TABLE => 'u',
|
||||
),
|
||||
'WHERE' => $db->sql_in_set('p.post_id', $post_ids) . '
|
||||
AND u.user_id = p.poster_id',
|
||||
);
|
||||
|
||||
$custom_fieldnames = [];
|
||||
/**
|
||||
* Event to modify the SQL array to get the post and user data from all topics' last posts
|
||||
*
|
||||
* @event core.sync_topic_last_post_info_sql
|
||||
* @var array sql_ary SQL array with some post and user data from the last posts list
|
||||
* @var array custom_fieldnames Empty array for custom fieldnames to update the topics_table with
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'sql_ary',
|
||||
'custom_fieldnames',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.sync_topic_last_post_info_sql', compact($vars)));
|
||||
$result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
@@ -2067,6 +2118,22 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
$topic_data[$topic_id]['last_poster_name'] = ($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username'];
|
||||
$topic_data[$topic_id]['last_poster_colour'] = $row['user_colour'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Event to modify the topic_data when syncing topics
|
||||
*
|
||||
* @event core.sync_modify_topic_data
|
||||
* @var array topic_data Array with the topics' data we are syncing
|
||||
* @var array row Array with some of the current user and post data
|
||||
* @var int topic_id The current topic_id of $row
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'topic_data',
|
||||
'row',
|
||||
'topic_id',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.sync_modify_topic_data', compact($vars)));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@@ -2182,6 +2249,10 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
// These are fields that will be synchronised
|
||||
$fieldnames = array('time', 'visibility', 'posts_approved', 'posts_unapproved', 'posts_softdeleted', 'poster', 'first_post_id', 'first_poster_name', 'first_poster_colour', 'last_post_id', 'last_post_subject', 'last_post_time', 'last_poster_id', 'last_poster_name', 'last_poster_colour');
|
||||
|
||||
// Add custom fieldnames
|
||||
$fieldnames = array_merge($fieldnames, $custom_fieldnames);
|
||||
unset($custom_fieldnames);
|
||||
|
||||
if ($sync_extra)
|
||||
{
|
||||
// This routine assumes that post_reported values are correct
|
||||
@@ -2418,7 +2489,7 @@ function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_fr
|
||||
* must be carried through for the moderators table.
|
||||
*
|
||||
* @param \phpbb\db\driver\driver_interface $db Database connection
|
||||
* @param \phpbb\cache\driver\driver_interface Cache driver
|
||||
* @param \phpbb\cache\driver\driver_interface $cache Cache driver
|
||||
* @param \phpbb\auth\auth $auth Authentication object
|
||||
* @return null
|
||||
*/
|
||||
@@ -2605,7 +2676,7 @@ function phpbb_cache_moderators($db, $cache, $auth)
|
||||
* @param mixed $forum_id Restrict the log entries to the given forum_id (can also be an array of forum_ids)
|
||||
* @param int $topic_id Restrict the log entries to the given topic_id
|
||||
* @param int $user_id Restrict the log entries to the given user_id
|
||||
* @param int $log_time Only get log entries newer than the given timestamp
|
||||
* @param int $limit_days Only get log entries newer than the given timestamp
|
||||
* @param string $sort_by SQL order option, e.g. 'l.log_time DESC'
|
||||
* @param string $keywords Will only return log entries that have the keywords in log_operation or log_data
|
||||
*
|
||||
|
@@ -223,12 +223,12 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port
|
||||
/**
|
||||
* Add log entry
|
||||
*
|
||||
* @param string $mode The mode defines which log_type is used and from which log the entry is retrieved
|
||||
* @param int $forum_id Mode 'mod' ONLY: forum id of the related item, NOT INCLUDED otherwise
|
||||
* @param int $topic_id Mode 'mod' ONLY: topic id of the related item, NOT INCLUDED otherwise
|
||||
* @param int $reportee_id Mode 'user' ONLY: user id of the reportee, NOT INCLUDED otherwise
|
||||
* @param string $log_operation Name of the operation
|
||||
* @param array $additional_data More arguments can be added, depending on the log_type
|
||||
* string $mode The mode defines which log_type is used and from which log the entry is retrieved
|
||||
* int $forum_id Mode 'mod' ONLY: forum id of the related item, NOT INCLUDED otherwise
|
||||
* int $topic_id Mode 'mod' ONLY: topic id of the related item, NOT INCLUDED otherwise
|
||||
* int $reportee_id Mode 'user' ONLY: user id of the reportee, NOT INCLUDED otherwise
|
||||
* string $log_operation Name of the operation
|
||||
* array $additional_data More arguments can be added, depending on the log_type
|
||||
*
|
||||
* @return int|bool Returns the log_id, if the entry was added to the database, false otherwise.
|
||||
*
|
||||
@@ -345,7 +345,8 @@ function set_config_count($config_name, $increment, $is_dynamic = false, \phpbb\
|
||||
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
|
||||
* @param bool $cookie This param is mapped to \phpbb\request\request_interface::COOKIE as the last param for
|
||||
* \phpbb\request\request_interface::variable for backwards compatability reasons.
|
||||
* @param \phpbb\request\request_interface|null|false If an instance of \phpbb\request\request_interface is given the instance is stored in
|
||||
* @param \phpbb\request\request_interface|null|false $request
|
||||
* If an instance of \phpbb\request\request_interface is given the instance is stored in
|
||||
* a static variable and used for all further calls where this parameters is null. Until
|
||||
* the function is called with an instance it automatically creates a new \phpbb\request\request
|
||||
* instance on every call. By passing false this per-call instantiation can be restored
|
||||
|
@@ -1127,6 +1127,7 @@ function add_user_group($group_id, $user_id, $group_leader = false)
|
||||
*
|
||||
* @param string $group The name of the special group to add to
|
||||
* @param string $select_query An SQL query to retrieve the user(s) to add to the group
|
||||
* @param bool $use_src_db
|
||||
*/
|
||||
function user_group_auth($group, $select_query, $use_src_db)
|
||||
{
|
||||
@@ -1835,10 +1836,12 @@ function add_bots()
|
||||
|
||||
$bots = array(
|
||||
'AdsBot [Google]' => array('AdsBot-Google', ''),
|
||||
'Ahrefs [Bot]' => array('AhrefsBot/', ''),
|
||||
'Alexa [Bot]' => array('ia_archiver', ''),
|
||||
'Alta Vista [Bot]' => array('Scooter/', ''),
|
||||
'Amazon [Bot]' => array('Amazonbot/', ''),
|
||||
'Ask Jeeves [Bot]' => array('Ask Jeeves', ''),
|
||||
'Baidu [Spider]' => array('Baiduspider+(', ''),
|
||||
'Baidu [Spider]' => array('Baiduspider', ''),
|
||||
'Bing [Bot]' => array('bingbot/', ''),
|
||||
'DuckDuckGo [Bot]' => array('DuckDuckBot/', ''),
|
||||
'Exabot [Bot]' => array('Exabot/', ''),
|
||||
@@ -1854,7 +1857,7 @@ function add_bots()
|
||||
'Heritrix [Crawler]' => array('heritrix/1.', ''),
|
||||
'IBM Research [Bot]' => array('ibm.com/cs/crawler', ''),
|
||||
'ICCrawler - ICjobs' => array('ICCrawler - ICjobs', ''),
|
||||
'ichiro [Crawler]' => array('ichiro/2', ''),
|
||||
'ichiro [Crawler]' => array('ichiro/', ''),
|
||||
'Majestic-12 [Bot]' => array('MJ12bot/', ''),
|
||||
'Metager [Bot]' => array('MetagerBot/', ''),
|
||||
'MSN NewsBlogs' => array('msnbot-NewsBlogs/', ''),
|
||||
@@ -1867,6 +1870,7 @@ function add_bots()
|
||||
'Online link [Validator]' => array('online link validator', ''),
|
||||
'psbot [Picsearch]' => array('psbot/0', ''),
|
||||
'Seekport [Bot]' => array('Seekbot/', ''),
|
||||
'Semrush [Bot]' => array('SemrushBot/', ''),
|
||||
'Sensis [Crawler]' => array('Sensis Web Crawler', ''),
|
||||
'SEO Crawler' => array('SEO search Crawler/', ''),
|
||||
'Seoma [Crawler]' => array('Seoma [SEO Crawler]', ''),
|
||||
@@ -1876,7 +1880,7 @@ function add_bots()
|
||||
'Synoo [Bot]' => array('SynooBot/', ''),
|
||||
'Telekom [Bot]' => array('crawleradmin.t-info@telekom.de', ''),
|
||||
'TurnitinBot [Bot]' => array('TurnitinBot/', ''),
|
||||
'Voyager [Bot]' => array('voyager/1.0', ''),
|
||||
'Voyager [Bot]' => array('voyager/', ''),
|
||||
'W3 [Sitesearch]' => array('W3 SiteSearch Crawler', ''),
|
||||
'W3C [Linkcheck]' => array('W3C-checklink/', ''),
|
||||
'W3C [Validator]' => array('W3C_*Validator', ''),
|
||||
|
@@ -551,7 +551,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
}
|
||||
$last_post_time = $user->format_date($row['forum_last_post_time']);
|
||||
$last_post_time_rfc3339 = gmdate(DATE_RFC3339, $row['forum_last_post_time']);
|
||||
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
|
||||
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1086,12 +1086,12 @@ function display_custom_bbcodes()
|
||||
// Start counting from 22 for the bbcode ids (every bbcode takes two ids - opening/closing)
|
||||
$num_predefined_bbcodes = NUM_PREDEFINED_BBCODES;
|
||||
|
||||
$sql_ary = array(
|
||||
'SELECT' => 'b.bbcode_id, b.bbcode_tag, b.bbcode_helpline',
|
||||
'FROM' => array(BBCODES_TABLE => 'b'),
|
||||
$sql_ary = [
|
||||
'SELECT' => 'b.bbcode_id, b.bbcode_tag, b.bbcode_helpline, b.bbcode_match',
|
||||
'FROM' => [BBCODES_TABLE => 'b'],
|
||||
'WHERE' => 'b.display_on_posting = 1',
|
||||
'ORDER_BY' => 'b.bbcode_tag',
|
||||
);
|
||||
];
|
||||
|
||||
/**
|
||||
* Event to modify the SQL query before custom bbcode data is queried
|
||||
@@ -1119,13 +1119,18 @@ function display_custom_bbcodes()
|
||||
// Convert Numeric Character References to UTF-8 chars.
|
||||
$row['bbcode_helpline'] = utf8_decode_ncr($row['bbcode_helpline']);
|
||||
|
||||
$custom_tags = array(
|
||||
'BBCODE_NAME' => "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'",
|
||||
// Does the closing bbcode tag exists? If so display it.
|
||||
$bbcode_close_tag = '%\[\/' . utf8_strtolower($row['bbcode_tag']) . '\]%';
|
||||
$bbcode_match_str = utf8_strtolower($row['bbcode_match']);
|
||||
$bbcode_name_clean = preg_match($bbcode_close_tag, $bbcode_match_str) ? "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'" : "'[{$row['bbcode_tag']}]', ''";
|
||||
|
||||
$custom_tags = [
|
||||
'BBCODE_NAME' => $bbcode_name_clean,
|
||||
'BBCODE_ID' => $num_predefined_bbcodes + ($i * 2),
|
||||
'BBCODE_TAG' => $row['bbcode_tag'],
|
||||
'BBCODE_TAG_CLEAN' => str_replace('=', '-', $row['bbcode_tag']),
|
||||
'BBCODE_HELPLINE' => $row['bbcode_helpline'],
|
||||
);
|
||||
];
|
||||
|
||||
/**
|
||||
* Event to modify the template data block of a custom bbcode
|
||||
|
@@ -656,15 +656,15 @@ function phpbb_download_handle_forum_auth($db, $auth, $topic_id)
|
||||
{
|
||||
global $phpbb_container;
|
||||
|
||||
$sql_array = array(
|
||||
'SELECT' => 't.topic_visibility, t.forum_id, f.forum_name, f.forum_password, f.parent_id',
|
||||
'FROM' => array(
|
||||
$sql_array = [
|
||||
'SELECT' => 't.forum_id, t.topic_poster, t.topic_visibility, f.forum_name, f.forum_password, f.parent_id',
|
||||
'FROM' => [
|
||||
TOPICS_TABLE => 't',
|
||||
FORUMS_TABLE => 'f',
|
||||
),
|
||||
'WHERE' => 't.topic_id = ' . (int) $topic_id . '
|
||||
],
|
||||
'WHERE' => 't.topic_id = ' . (int) $topic_id . '
|
||||
AND t.forum_id = f.forum_id',
|
||||
);
|
||||
];
|
||||
|
||||
$sql = $db->sql_build_query('SELECT', $sql_array);
|
||||
$result = $db->sql_query($sql);
|
||||
|
@@ -51,8 +51,18 @@ function phpbb_module_warn_url($mode, $module_row)
|
||||
{
|
||||
global $forum_id, $post_id;
|
||||
|
||||
$url_extra = ($forum_id) ? "&f=$forum_id" : '';
|
||||
$url_extra .= ($post_id) ? "&p=$post_id" : '';
|
||||
if ($post_id)
|
||||
{
|
||||
$url_extra = "&p=$post_id";
|
||||
}
|
||||
else if ($forum_id)
|
||||
{
|
||||
$url_extra = "&f=$forum_id";
|
||||
}
|
||||
else
|
||||
{
|
||||
$url_extra = '';
|
||||
}
|
||||
|
||||
return $url_extra;
|
||||
}
|
||||
@@ -93,10 +103,22 @@ function phpbb_extra_url()
|
||||
{
|
||||
global $forum_id, $topic_id, $post_id, $report_id, $user_id;
|
||||
|
||||
$url_extra = '';
|
||||
$url_extra .= ($forum_id) ? "&f=$forum_id" : '';
|
||||
$url_extra .= ($topic_id) ? "&t=$topic_id" : '';
|
||||
$url_extra .= ($post_id) ? "&p=$post_id" : '';
|
||||
if ($post_id)
|
||||
{
|
||||
$url_extra = "&p=$post_id";
|
||||
}
|
||||
else if ($topic_id)
|
||||
{
|
||||
$url_extra = "&t=$topic_id";
|
||||
}
|
||||
else if ($forum_id)
|
||||
{
|
||||
$url_extra = "&f=$forum_id";
|
||||
}
|
||||
else
|
||||
{
|
||||
$url_extra = '';
|
||||
}
|
||||
$url_extra .= ($user_id) ? "&u=$user_id" : '';
|
||||
$url_extra .= ($report_id) ? "&r=$report_id" : '';
|
||||
|
||||
@@ -383,7 +405,7 @@ function phpbb_get_pm_data($pm_ids)
|
||||
/**
|
||||
* sorting in mcp
|
||||
*
|
||||
* @param string $where_sql should either be WHERE (default if ommited) or end with AND or OR
|
||||
* $where_sql should either be WHERE (default if ommited) or end with AND or OR
|
||||
*
|
||||
* $mode reports and reports_closed: the $where parameters uses aliases p for posts table and r for report table
|
||||
* $mode unapproved_posts: the $where parameters uses aliases p for posts table and t for topic table
|
||||
@@ -684,7 +706,7 @@ function phpbb_mcp_sorting($mode, &$sort_days_val, &$sort_key_val, &$sort_dir_va
|
||||
* @param string $table The table to find the ids in
|
||||
* @param string $sql_id The ids relevant column name
|
||||
* @param array $acl_list A list of permissions the user need to have
|
||||
* @param mixed $singe_forum Limit to one forum id (int) or the first forum found (true)
|
||||
* @param mixed $single_forum Limit to one forum id (int) or the first forum found (true)
|
||||
*
|
||||
* @return mixed False if no ids were able to be retrieved, true if at least one id left.
|
||||
* Additionally, this value can be the forum_id assigned if $single_forum was set.
|
||||
|
@@ -1848,18 +1848,27 @@ class smtp_class
|
||||
*
|
||||
* Please note that this version fully supports RFC 2045 section 6.8.
|
||||
*
|
||||
* @param string $str
|
||||
* @param string $eol End of line we are using (optional to be backwards compatible)
|
||||
*/
|
||||
function mail_encode($str, $eol = "\r\n")
|
||||
{
|
||||
// define start delimimter, end delimiter and spacer
|
||||
$start = "=?UTF-8?B?";
|
||||
// Check if string contains ASCII only characters
|
||||
$is_ascii = strlen($str) === utf8_strlen($str);
|
||||
|
||||
// Define start delimimter, end delimiter and spacer
|
||||
// Use the Quoted-Printable encoding for ASCII strings to avoid unnecessary encoding in Base64
|
||||
$start = $is_ascii ? "=?US-ASCII?Q?" : "=?UTF-8?B?";
|
||||
$end = "?=";
|
||||
$delimiter = "$eol ";
|
||||
|
||||
// Maximum length is 75. $split_length *must* be a multiple of 4, but <= 75 - strlen($start . $delimiter . $end)!!!
|
||||
$split_length = 60;
|
||||
$encoded_str = base64_encode($str);
|
||||
// Maximum encoded-word length is 75 as per RFC 2047 section 2.
|
||||
// $split_length *must* be a multiple of 4, but <= 75 - strlen($start . $delimiter . $end)!!!
|
||||
$split_length = 75 - strlen($start . $delimiter . $end);
|
||||
$split_length = $split_length - $split_length % 4;
|
||||
|
||||
// Use the Quoted-Printable encoding for ASCII strings to avoid unnecessary encoding in Base64
|
||||
$encoded_str = $is_ascii ? quoted_printable_encode($str) : base64_encode($str);
|
||||
|
||||
// If encoded string meets the limits, we just return with the correct data.
|
||||
if (strlen($encoded_str) <= $split_length)
|
||||
@@ -1868,7 +1877,7 @@ function mail_encode($str, $eol = "\r\n")
|
||||
}
|
||||
|
||||
// If there is only ASCII data, we just return what we want, correctly splitting the lines.
|
||||
if (strlen($str) === utf8_strlen($str))
|
||||
if ($is_ascii)
|
||||
{
|
||||
return $start . implode($end . $delimiter . $start, str_split($encoded_str, $split_length)) . $end;
|
||||
}
|
||||
|
@@ -256,7 +256,7 @@ function generate_smilies($mode, $forum_id)
|
||||
*/
|
||||
function update_post_information($type, $ids, $return_update_sql = false)
|
||||
{
|
||||
global $db;
|
||||
global $db, $phpbb_dispatcher;
|
||||
|
||||
if (empty($ids))
|
||||
{
|
||||
@@ -340,14 +340,35 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
||||
|
||||
if (count($last_post_ids))
|
||||
{
|
||||
$sql = 'SELECT p.' . $type . '_id, p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
WHERE p.poster_id = u.user_id
|
||||
AND ' . $db->sql_in_set('p.post_id', $last_post_ids);
|
||||
$result = $db->sql_query($sql);
|
||||
$sql_ary = array(
|
||||
'SELECT' => 'p.' . $type . '_id, p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour',
|
||||
'FROM' => array(
|
||||
POSTS_TABLE => 'p',
|
||||
USERS_TABLE => 'u',
|
||||
),
|
||||
'WHERE' => $db->sql_in_set('p.post_id', $last_post_ids) . '
|
||||
AND p.poster_id = u.user_id',
|
||||
);
|
||||
|
||||
/**
|
||||
* Event to modify the SQL array to get the post and user data from all last posts
|
||||
*
|
||||
* @event core.update_post_info_modify_posts_sql
|
||||
* @var string type The table being updated (forum or topic)
|
||||
* @var array sql_ary SQL array to get some of the last posts' data
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'type',
|
||||
'sql_ary',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.update_post_info_modify_posts_sql', compact($vars)));
|
||||
$result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
|
||||
|
||||
$rowset = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$rowset[] = $row;
|
||||
$update_sql[$row["{$type}_id"]][] = $type . '_last_post_id = ' . (int) $row['post_id'];
|
||||
$update_sql[$row["{$type}_id"]][] = "{$type}_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
|
||||
$update_sql[$row["{$type}_id"]][] = $type . '_last_post_time = ' . (int) $row['post_time'];
|
||||
@@ -356,6 +377,23 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
||||
$update_sql[$row["{$type}_id"]][] = "{$type}_last_poster_name = '" . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['post_username']) : $db->sql_escape($row['username'])) . "'";
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
/**
|
||||
* Event to modify the update_sql array to add new update data for forum or topic last posts
|
||||
*
|
||||
* @event core.update_post_info_modify_sql
|
||||
* @var string type The table being updated (forum or topic)
|
||||
* @var array rowset Array with the posts data
|
||||
* @var array update_sql Array with SQL data to update the forums or topics table with
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'type',
|
||||
'rowset',
|
||||
'update_sql',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.update_post_info_modify_sql', compact($vars)));
|
||||
unset($rowset);
|
||||
}
|
||||
unset($empty_forums, $ids, $last_post_ids);
|
||||
|
||||
@@ -937,10 +975,10 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0, $pm_action = '', $ms
|
||||
$topic_forum_id = ($topic_rows[$draft['topic_id']]['forum_id']) ? $topic_rows[$draft['topic_id']]['forum_id'] : $forum_id;
|
||||
|
||||
$link_topic = true;
|
||||
$view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_forum_id . '&t=' . $draft['topic_id']);
|
||||
$view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $draft['topic_id']);
|
||||
$title = $topic_rows[$draft['topic_id']]['topic_title'];
|
||||
|
||||
$insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 'f=' . $topic_forum_id . '&t=' . $draft['topic_id'] . '&mode=reply&d=' . $draft['draft_id']);
|
||||
$insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 't=' . $draft['topic_id'] . '&mode=reply&d=' . $draft['draft_id']);
|
||||
}
|
||||
else if ($draft['forum_id'] && $auth->acl_get('f_read', $draft['forum_id']))
|
||||
{
|
||||
@@ -1160,7 +1198,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||
$post_subject = censor_text($post_subject);
|
||||
|
||||
$post_anchor = ($mode == 'post_review') ? 'ppr' . $row['post_id'] : 'pr' . $row['post_id'];
|
||||
$u_show_post = append_sid($phpbb_root_path . 'viewtopic.' . $phpEx, "f=$forum_id&t=$topic_id&p={$row['post_id']}&view=show#p{$row['post_id']}");
|
||||
$u_show_post = append_sid($phpbb_root_path . 'viewtopic.' . $phpEx, "t=$topic_id&p={$row['post_id']}&view=show#p{$row['post_id']}");
|
||||
|
||||
$l_deleted_message = '';
|
||||
if ($row['post_visibility'] == ITEM_DELETED)
|
||||
@@ -1209,7 +1247,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||
'POST_TIME' => $row['post_time'],
|
||||
'USER_ID' => $row['user_id'],
|
||||
'U_MINI_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . '#p' . $row['post_id'],
|
||||
'U_MCP_DETAILS' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=post_details&f=' . $forum_id . '&p=' . $row['post_id'], true, $user->session_id) : '',
|
||||
'U_MCP_DETAILS' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=post_details&p=' . $row['post_id'], true, $user->session_id) : '',
|
||||
'POSTER_QUOTE' => ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) ? addslashes(get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '',
|
||||
);
|
||||
|
||||
@@ -2503,27 +2541,35 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
|
||||
}
|
||||
}
|
||||
|
||||
$params = $add_anchor = '';
|
||||
$params = [];
|
||||
$add_anchor = '';
|
||||
$url = "{$phpbb_root_path}viewtopic.$phpEx";
|
||||
|
||||
if ($post_visibility == ITEM_APPROVED ||
|
||||
($auth->acl_get('m_softdelete', $data_ary['forum_id']) && $post_visibility == ITEM_DELETED) ||
|
||||
($auth->acl_get('m_approve', $data_ary['forum_id']) && in_array($post_visibility, array(ITEM_UNAPPROVED, ITEM_REAPPROVE))))
|
||||
{
|
||||
$params .= '&t=' . $data_ary['topic_id'];
|
||||
|
||||
if ($mode != 'post')
|
||||
{
|
||||
$params .= '&p=' . $data_ary['post_id'];
|
||||
$params['p'] = $data_ary['post_id'];
|
||||
$add_anchor = '#p' . $data_ary['post_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$params['t'] = $data_ary['topic_id'];
|
||||
}
|
||||
}
|
||||
else if ($mode != 'post' && $post_mode != 'edit_first_post' && $post_mode != 'edit_topic')
|
||||
{
|
||||
$params .= '&t=' . $data_ary['topic_id'];
|
||||
$params['t'] = $data_ary['topic_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$url = "{$phpbb_root_path}viewforum.$phpEx";
|
||||
$params['f'] = $data_ary['forum_id'];
|
||||
}
|
||||
|
||||
$url = (!$params) ? "{$phpbb_root_path}viewforum.$phpEx" : "{$phpbb_root_path}viewtopic.$phpEx";
|
||||
$url = append_sid($url, 'f=' . $data_ary['forum_id'] . $params) . $add_anchor;
|
||||
$url = append_sid($url, $params) . $add_anchor;
|
||||
|
||||
$poll = $poll_ary;
|
||||
$data = $data_ary;
|
||||
@@ -2584,7 +2630,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
|
||||
* - 'topic_last_poster_name'
|
||||
* - 'topic_last_poster_colour'
|
||||
* @param int $bump_time The time at which topic was bumped, usually it is a current time as obtained via time().
|
||||
* @return string An URL to the bumped topic, example: ./viewtopic.php?forum_id=1&topic_id=2&p=3#p3
|
||||
* @return string An URL to the bumped topic, example: ./viewtopic.php?p=3#p3
|
||||
*/
|
||||
function phpbb_bump_topic($forum_id, $topic_id, $post_data, $bump_time = false)
|
||||
{
|
||||
@@ -2673,7 +2719,7 @@ function phpbb_bump_topic($forum_id, $topic_id, $post_data, $bump_time = false)
|
||||
$post_data['topic_title']
|
||||
));
|
||||
|
||||
$url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&p={$post_data['topic_last_post_id']}") . "#p{$post_data['topic_last_post_id']}";
|
||||
$url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p={$post_data['topic_last_post_id']}") . "#p{$post_data['topic_last_post_id']}";
|
||||
|
||||
return $url;
|
||||
}
|
||||
@@ -2804,7 +2850,7 @@ function phpbb_handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $
|
||||
$delete_reason
|
||||
));
|
||||
|
||||
$meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&p=$next_post_id") . "#p$next_post_id";
|
||||
$meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p=$next_post_id") . "#p$next_post_id";
|
||||
$message = $user->lang['POST_DELETED'];
|
||||
|
||||
if (!$request->is_ajax())
|
||||
|
@@ -425,7 +425,7 @@ function user_add($user_row, $cp_data = false, $notifications_data = null)
|
||||
/**
|
||||
* Delete user(s) and their related data
|
||||
*
|
||||
* @param string $mode Mode of posts deletion (retain|delete)
|
||||
* @param string $mode Mode of posts deletion (retain|remove)
|
||||
* @param mixed $user_ids Either an array of integers or an integer
|
||||
* @param bool $retain_username True if username should be retained, false otherwise
|
||||
* @return bool
|
||||
@@ -464,7 +464,7 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
* Event before of the performing of the user(s) delete action
|
||||
*
|
||||
* @event core.delete_user_before
|
||||
* @var string mode Mode of posts deletion (retain|delete)
|
||||
* @var string mode Mode of posts deletion (retain|remove)
|
||||
* @var array user_ids ID(s) of the user(s) bound to be deleted
|
||||
* @var bool retain_username True if username should be retained, false otherwise
|
||||
* @var array user_rows Array containing data of the user(s) bound to be deleted
|
||||
@@ -774,7 +774,7 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
* Event after the user(s) delete action has been performed
|
||||
*
|
||||
* @event core.delete_user_after
|
||||
* @var string mode Mode of posts deletion (retain|delete)
|
||||
* @var string mode Mode of posts deletion (retain|remove)
|
||||
* @var array user_ids ID(s) of the deleted user(s)
|
||||
* @var bool retain_username True if username should be retained, false otherwise
|
||||
* @var array user_rows Array containing data of the deleted user(s)
|
||||
@@ -797,6 +797,8 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
* Flips user_type from active to inactive and vice versa, handles group membership updates
|
||||
*
|
||||
* @param string $mode can be flip for flipping from active/inactive, activate or deactivate
|
||||
* @param array $user_id_ary
|
||||
* @param int $reason
|
||||
*/
|
||||
function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
|
||||
{
|
||||
@@ -919,6 +921,7 @@ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
|
||||
* @param string $ban_len_other Ban length as a date (YYYY-MM-DD)
|
||||
* @param boolean $ban_exclude Exclude these entities from banning?
|
||||
* @param string $ban_reason String describing the reason for this ban
|
||||
* @param string $ban_give_reason
|
||||
* @return boolean
|
||||
*/
|
||||
function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason = '')
|
||||
@@ -1611,6 +1614,7 @@ function validate_num($num, $optional = false, $min = 0, $max = 1E99)
|
||||
/**
|
||||
* Validate Date
|
||||
* @param string $date_string a date in the dd-mm-yyyy format
|
||||
* @param bool $optional
|
||||
* @return boolean
|
||||
*/
|
||||
function validate_date($date_string, $optional = false)
|
||||
@@ -1748,7 +1752,8 @@ function validate_username($username, $allowed_username = false, $allow_all_name
|
||||
}
|
||||
|
||||
// ... fast checks first.
|
||||
if (strpos($username, '"') !== false || strpos($username, '"') !== false || empty($clean_username))
|
||||
if (strpos($username, '"') !== false || strpos($username, '"') !== false || empty($clean_username)
|
||||
|| preg_match('/[\x{180E}\x{2005}-\x{200D}\x{202F}\x{205F}\x{2060}\x{FEFF}]/u', $username))
|
||||
{
|
||||
return 'INVALID_CHARS';
|
||||
}
|
||||
@@ -1882,6 +1887,7 @@ function validate_password($password)
|
||||
* Check to see if email address is a valid address and contains a MX record
|
||||
*
|
||||
* @param string $email The email to check
|
||||
* @param $config
|
||||
*
|
||||
* @return mixed Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)
|
||||
*/
|
||||
@@ -3621,7 +3627,8 @@ function group_update_listings($group_id)
|
||||
/**
|
||||
* Funtion to make a user leave the NEWLY_REGISTERED system group.
|
||||
* @access public
|
||||
* @param $user_id The id of the user to remove from the group
|
||||
* @param int $user_id The id of the user to remove from the group
|
||||
* @param mixed $user_data The id of the user to remove from the group
|
||||
*/
|
||||
function remove_newly_registered($user_id, $user_data = false)
|
||||
{
|
||||
|
@@ -542,8 +542,8 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
|
||||
sync('forum', 'forum_id', $sync_forums, true, true);
|
||||
|
||||
// Link to the new topic
|
||||
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&t=' . $to_topic_id) . '">', '</a>');
|
||||
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&t=$to_topic_id");
|
||||
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $to_topic_id) . '">', '</a>');
|
||||
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?t=$to_topic_id");
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
/**
|
||||
|
@@ -105,7 +105,7 @@ function mcp_front_view($id, $mode, $action)
|
||||
* @var int total Number of unapproved posts
|
||||
* @var array post_list List of unapproved posts
|
||||
* @var array forum_list List of forums that contain the posts
|
||||
* @var array forum_names Associative array with forum_id as key and it's corresponding forum_name as value
|
||||
* @var array forum_names Associative array with forum_id as key and its corresponding forum_name as value
|
||||
* @since 3.1.0-RC3
|
||||
*/
|
||||
$vars = array('total', 'post_list', 'forum_list', 'forum_names');
|
||||
@@ -119,16 +119,37 @@ function mcp_front_view($id, $mode, $action)
|
||||
AND t.topic_id = p.topic_id
|
||||
AND p.poster_id = u.user_id
|
||||
ORDER BY p.post_time DESC, p.post_id DESC';
|
||||
|
||||
/**
|
||||
* Alter posts data SQL query
|
||||
*
|
||||
* @event core.mcp_front_view_modify_posts_data_sql
|
||||
* @var array forum_list List of forums that contain the posts
|
||||
* @var array forum_names Associative array with forum_id as key and its corresponding forum_name as value
|
||||
* @var array post_list List of unapproved posts
|
||||
* @var string sql String with the SQL query to be executed
|
||||
* @var int total Number of unapproved posts
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'forum_list',
|
||||
'forum_names',
|
||||
'post_list',
|
||||
'sql',
|
||||
'total',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_front_view_modify_posts_data_sql', compact($vars)));
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$template->assign_block_vars('unapproved', array(
|
||||
'U_POST_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $row['forum_id'] . '&p=' . $row['post_id']),
|
||||
$unapproved_post_row = [
|
||||
'U_POST_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&p=' . $row['post_id']),
|
||||
'U_MCP_FORUM' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=forum_view&f=' . $row['forum_id']),
|
||||
'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=topic_view&f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
|
||||
'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=topic_view&t=' . $row['topic_id']),
|
||||
'U_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
|
||||
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
|
||||
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $row['topic_id']),
|
||||
|
||||
'AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour']),
|
||||
'AUTHOR' => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour']),
|
||||
@@ -141,7 +162,27 @@ function mcp_front_view($id, $mode, $action)
|
||||
'SUBJECT' => ($row['post_subject']) ? $row['post_subject'] : $user->lang['NO_SUBJECT'],
|
||||
'POST_TIME' => $user->format_date($row['post_time']),
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
));
|
||||
];
|
||||
|
||||
/**
|
||||
* Alter unapproved posts template block for MCP front page
|
||||
*
|
||||
* @event core.mcp_front_view_modify_unapproved_post_row
|
||||
* @var array forum_names Array containing forum names
|
||||
* @var string mode MCP front view mode
|
||||
* @var array row Array with unapproved post data
|
||||
* @var array unapproved_post_row Template block array of the unapproved post
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'forum_names',
|
||||
'mode',
|
||||
'row',
|
||||
'unapproved_post_row',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_front_view_modify_unapproved_post_row', compact($vars)));
|
||||
|
||||
$template->assign_block_vars('unapproved', $unapproved_post_row);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
@@ -238,12 +279,12 @@ function mcp_front_view($id, $mode, $action)
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$template->assign_block_vars('report', array(
|
||||
'U_POST_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . '&p=' . $row['post_id'] . "&i=reports&mode=report_details"),
|
||||
$reported_post_row = [
|
||||
'U_POST_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'p=' . $row['post_id'] . "&i=reports&mode=report_details"),
|
||||
'U_MCP_FORUM' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . "&i=$id&mode=forum_view"),
|
||||
'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id'] . "&i=$id&mode=topic_view"),
|
||||
'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 't=' . $row['topic_id'] . "&i=$id&mode=topic_view"),
|
||||
'U_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
|
||||
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
|
||||
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $row['topic_id']),
|
||||
|
||||
'REPORTER_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
'REPORTER' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
@@ -261,7 +302,27 @@ function mcp_front_view($id, $mode, $action)
|
||||
'REPORT_TIME' => $user->format_date($row['report_time']),
|
||||
'POST_TIME' => $user->format_date($row['post_time']),
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
));
|
||||
];
|
||||
|
||||
/**
|
||||
* Alter reported posts template block for MCP front page
|
||||
*
|
||||
* @event core.mcp_front_view_modify_reported_post_row
|
||||
* @var array forum_list List of forums that contain the posts
|
||||
* @var string mode MCP front view mode
|
||||
* @var array reported_post_row Template block array of the reported post
|
||||
* @var array row Array with reported post data
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'forum_list',
|
||||
'mode',
|
||||
'reported_post_row',
|
||||
'row',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_front_view_modify_reported_post_row', compact($vars)));
|
||||
|
||||
$template->assign_block_vars('report', $reported_post_row);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
@@ -1171,7 +1171,7 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
|
||||
$return_link = array();
|
||||
if ($affected_topics == 1 && $topic_id)
|
||||
{
|
||||
$return_link[] = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id") . '">', '</a>');
|
||||
$return_link[] = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t=$topic_id") . '">', '</a>');
|
||||
}
|
||||
$return_link[] = sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
|
||||
|
||||
@@ -1230,7 +1230,7 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
|
||||
$return_link = array();
|
||||
if ($affected_topics == 1 && !$deleted_topics && $topic_id)
|
||||
{
|
||||
$return_link[] = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id") . '">', '</a>');
|
||||
$return_link[] = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t=$topic_id") . '">', '</a>');
|
||||
}
|
||||
$return_link[] = sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
|
||||
|
||||
@@ -1563,6 +1563,26 @@ function mcp_fork_topic($topic_ids)
|
||||
$counter[$row['poster_id']] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify the forked post's sql array before it's inserted into the database.
|
||||
*
|
||||
* @event core.mcp_main_modify_fork_post_sql
|
||||
* @var int new_topic_id The newly created topic ID
|
||||
* @var int to_forum_id The forum ID where the forked topic has been moved to
|
||||
* @var array sql_ary SQL Array with the post's data
|
||||
* @var array row Post data
|
||||
* @var array counter Array with post counts
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'new_topic_id',
|
||||
'to_forum_id',
|
||||
'sql_ary',
|
||||
'row',
|
||||
'counter',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_main_modify_fork_post_sql', compact($vars)));
|
||||
$db->sql_query('INSERT INTO ' . POSTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
|
||||
$new_post_id = $db->sql_nextid();
|
||||
|
||||
|
@@ -220,7 +220,7 @@ function mcp_post_details($id, $mode, $action)
|
||||
$mcp_post_template_data = array(
|
||||
'U_MCP_ACTION' => "$url&i=main&quickmod=1&mode=post_details", // Use this for mode paramaters
|
||||
'U_POST_ACTION' => "$url&i=$id&mode=post_details", // Use this for action parameters
|
||||
'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&p=$post_id&f={$post_info['forum_id']}"),
|
||||
'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&p=$post_id"),
|
||||
|
||||
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
|
||||
'S_CAN_CHGPOSTER' => $auth->acl_get('m_chgposter', $post_info['forum_id']),
|
||||
@@ -236,18 +236,18 @@ function mcp_post_details($id, $mode, $action)
|
||||
'DELETED_MESSAGE' => $l_deleted_by,
|
||||
'DELETE_REASON' => $post_info['post_delete_reason'],
|
||||
|
||||
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '',
|
||||
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&p={$post_info['post_id']}") : '',
|
||||
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp_chgposter&field=username&select_single=true'),
|
||||
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&p=' . $post_id),
|
||||
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&p=' . $post_id),
|
||||
'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $post_info['user_id']),
|
||||
'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '',
|
||||
'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&p=' . $post_info['post_id'] . '#p' . $post_info['post_id']),
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']),
|
||||
'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $post_info['post_id'] . '#p' . $post_info['post_id']),
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $post_info['topic_id']),
|
||||
|
||||
'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'UNREAD_POST') : $user->img('icon_post_target', 'POST'),
|
||||
|
||||
'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$post_info['forum_id']}&p=$post_id") . "#p$post_id\">", '</a>'),
|
||||
'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p=$post_id") . "#p$post_id\">", '</a>'),
|
||||
'RETURN_FORUM' => sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", "f={$post_info['forum_id']}&start={$start}") . '">', '</a>'),
|
||||
'REPORTED_IMG' => $user->img('icon_topic_reported', $user->lang['POST_REPORTED']),
|
||||
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', $user->lang['POST_UNAPPROVED']),
|
||||
|
@@ -278,12 +278,12 @@ class mcp_queue
|
||||
$l_deleted_by = '';
|
||||
}
|
||||
|
||||
$post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&p=' . $post_info['post_id'] . '#p' . $post_info['post_id']);
|
||||
$topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']);
|
||||
$post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $post_info['post_id'] . '#p' . $post_info['post_id']);
|
||||
$topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $post_info['topic_id']);
|
||||
|
||||
$post_data = array(
|
||||
'S_MCP_QUEUE' => true,
|
||||
'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&p=$post_id&f=$forum_id"),
|
||||
'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&p=$post_id"),
|
||||
'S_CAN_DELETE_POST' => $auth->acl_get('m_delete', $post_info['forum_id']),
|
||||
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
|
||||
'S_POST_REPORTED' => $post_info['post_reported'],
|
||||
@@ -294,9 +294,9 @@ class mcp_queue
|
||||
'DELETED_MESSAGE' => $l_deleted_by,
|
||||
'DELETE_REASON' => $post_info['post_delete_reason'],
|
||||
|
||||
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '',
|
||||
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&p={$post_info['post_id']}") : '',
|
||||
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&p=' . $post_id),
|
||||
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&p=' . $post_id),
|
||||
'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $post_info['user_id']),
|
||||
'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '',
|
||||
'U_VIEW_POST' => $post_url,
|
||||
@@ -324,7 +324,7 @@ class mcp_queue
|
||||
'POST_ID' => $post_info['post_id'],
|
||||
'S_FIRST_POST' => ($post_info['topic_first_post_id'] == $post_id),
|
||||
|
||||
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id . '&lookup=' . $post_info['poster_ip']) . '#ip' : '',
|
||||
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&p=' . $post_id . '&lookup=' . $post_info['poster_ip']) . '#ip' : '',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -614,10 +614,10 @@ class mcp_queue
|
||||
}
|
||||
|
||||
$post_row = array(
|
||||
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
|
||||
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $row['topic_id']),
|
||||
'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
|
||||
'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&p=' . $row['post_id']) . (($mode == 'unapproved_posts') ? '#p' . $row['post_id'] : ''),
|
||||
'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&start=$start&mode=approve_details&f={$row['forum_id']}&p={$row['post_id']}" . (($mode == 'unapproved_topics') ? "&t={$row['topic_id']}" : '')),
|
||||
'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . (($mode == 'unapproved_posts') ? '#p' . $row['post_id'] : ''),
|
||||
'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&start=$start&mode=approve_details&p={$row['post_id']}" . (($mode == 'unapproved_topics') ? "&t={$row['topic_id']}" : '')),
|
||||
|
||||
'POST_AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
|
||||
'POST_AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
|
||||
@@ -746,7 +746,7 @@ class mcp_queue
|
||||
$topic_info[$topic_id]['last_post'] = true;
|
||||
}
|
||||
|
||||
$post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$post_data['forum_id']}&t={$post_data['topic_id']}&p={$post_data['post_id']}") . '#p' . $post_data['post_id'];
|
||||
$post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p={$post_data['post_id']}") . '#p' . $post_data['post_id'];
|
||||
|
||||
$approve_log[] = array(
|
||||
'forum_id' => $post_data['forum_id'],
|
||||
@@ -984,7 +984,7 @@ class mcp_queue
|
||||
$phpbb_content_visibility->set_topic_visibility(ITEM_APPROVED, $topic_id, $topic_data['forum_id'], $user->data['user_id'], time(), '');
|
||||
$first_post_ids[$topic_id] = (int) $topic_data['topic_first_post_id'];
|
||||
|
||||
$topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$topic_data['forum_id']}&t={$topic_id}");
|
||||
$topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$topic_id}");
|
||||
|
||||
$approve_log[] = array(
|
||||
'forum_id' => $topic_data['forum_id'],
|
||||
@@ -1430,7 +1430,7 @@ class mcp_queue
|
||||
{
|
||||
// However this is only possible if the topic still exists,
|
||||
// Otherwise we go back to the viewforum page
|
||||
$redirect = append_sid($phpbb_root_path . 'viewforum.' . $phpEx, 'f=' . $request->variable('f', 0));
|
||||
$redirect = append_sid($phpbb_root_path . 'viewforum.' . $phpEx, 'f=' . $post_data['forum_id']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -251,7 +251,7 @@ class mcp_reports
|
||||
// So it can be sent through the event below.
|
||||
$report_template = array(
|
||||
'S_MCP_REPORT' => true,
|
||||
'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&p=' . $post_id),
|
||||
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
|
||||
'S_POST_REPORTED' => $post_info['post_reported'],
|
||||
'S_POST_UNAPPROVED' => $post_info['post_visibility'] == ITEM_UNAPPROVED || $post_info['post_visibility'] == ITEM_REAPPROVE,
|
||||
@@ -259,16 +259,16 @@ class mcp_reports
|
||||
'S_REPORT_CLOSED' => $report['report_closed'],
|
||||
'S_USER_NOTES' => true,
|
||||
|
||||
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '',
|
||||
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&p={$post_info['post_id']}") : '',
|
||||
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&p=' . $post_id),
|
||||
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&p=' . $post_id),
|
||||
'U_MCP_REPORTER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $report['user_id']),
|
||||
'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $post_info['user_id']),
|
||||
'U_MCP_WARN_REPORTER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $report['user_id']) : '',
|
||||
'U_MCP_WARN_USER' => ($auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '',
|
||||
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $post_info['forum_id']),
|
||||
'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&p=' . $post_info['post_id'] . '#p' . $post_info['post_id']),
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']),
|
||||
'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $post_info['post_id'] . '#p' . $post_info['post_id']),
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $post_info['topic_id']),
|
||||
|
||||
'EDIT_IMG' => $user->img('icon_post_edit', $user->lang['EDIT_POST']),
|
||||
'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'UNREAD_POST') : $user->img('icon_post_target', 'POST'),
|
||||
@@ -300,7 +300,7 @@ class mcp_reports
|
||||
'POST_ID' => $post_info['post_id'],
|
||||
'SIGNATURE' => $post_info['user_sig'],
|
||||
|
||||
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? $this->u_action . '&r=' . $report_id . '&p=' . $post_id . '&f=' . $forum_id . '&lookup=' . $post_info['poster_ip'] . '#ip' : '',
|
||||
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? $this->u_action . '&r=' . $report_id . '&p=' . $post_id . '&lookup=' . $post_info['poster_ip'] . '#ip' : '',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -493,14 +493,33 @@ class mcp_reports
|
||||
AND ru.user_id = r.user_id
|
||||
AND r.pm_id = 0
|
||||
ORDER BY ' . $sort_order_sql;
|
||||
|
||||
/**
|
||||
* Alter sql query to get reports data for requested forum and topic or just forum
|
||||
*
|
||||
* @event core.mcp_reports_modify_reports_data_sql
|
||||
* @var string sql String with the query to be executed
|
||||
* @var array forum_list List of forums that contain the posts
|
||||
* @var int topic_id topic_id in the page request
|
||||
* @var string sort_order_sql String with the ORDER BY SQL code used in this query
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'sql',
|
||||
'forum_list',
|
||||
'topic_id',
|
||||
'sort_order_sql',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_reports_modify_reports_data_sql', compact($vars)));
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$template->assign_block_vars('postrow', array(
|
||||
$post_row = [
|
||||
'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
|
||||
'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&p=' . $row['post_id']) . '#p' . $row['post_id'],
|
||||
'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=reports&start=$start&mode=report_details&f={$row['forum_id']}&r={$row['report_id']}"),
|
||||
'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . '#p' . $row['post_id'],
|
||||
'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=reports&start=$start&mode=report_details&r={$row['report_id']}"),
|
||||
|
||||
'POST_AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
|
||||
'POST_AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
|
||||
@@ -520,13 +539,37 @@ class mcp_reports
|
||||
'REPORT_TIME' => $user->format_date($row['report_time']),
|
||||
'TOPIC_TITLE' => $row['topic_title'],
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
));
|
||||
];
|
||||
|
||||
/**
|
||||
* Alter posts template block for MCP reports
|
||||
*
|
||||
* @event core.mcp_reports_modify_post_row
|
||||
* @var string mode Post report mode
|
||||
* @var array forum_data Array containing forum data
|
||||
* @var array post_row Template block array of the post
|
||||
* @var array row Array with original post and report data
|
||||
* @var int start Start item of this page
|
||||
* @var int topic_id topic_id in the page request
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'mode',
|
||||
'forum_data',
|
||||
'post_row',
|
||||
'row',
|
||||
'start',
|
||||
'topic_id',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_reports_modify_post_row', compact($vars)));
|
||||
|
||||
$template->assign_block_vars('postrow', $post_row);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
unset($report_ids, $row);
|
||||
}
|
||||
|
||||
$base_url = $this->u_action . "&f=$forum_id&t=$topic_id&st=$sort_days&sk=$sort_key&sd=$sort_dir";
|
||||
$base_url = $this->u_action . "&t=$topic_id&st=$sort_days&sk=$sort_key&sd=$sort_dir";
|
||||
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total, $config['topics_per_page'], $start);
|
||||
|
||||
// Now display the page
|
||||
@@ -830,7 +873,7 @@ function close_report($report_id_list, $mode, $action, $pm = false)
|
||||
|
||||
if (count($topic_ids) === 1)
|
||||
{
|
||||
$return_topic = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . current($topic_ids) . '&f=' . current($forum_ids)) . '">', '</a>') . '<br /><br />';
|
||||
$return_topic = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . current($topic_ids)) . '">', '</a>') . '<br /><br />';
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -288,9 +288,9 @@ function mcp_topic_view($id, $mode, $action)
|
||||
'S_CHECKED' => (($submitted_id_list && !in_array(intval($row['post_id']), $submitted_id_list)) || in_array(intval($row['post_id']), $checked_ids)) ? true : false,
|
||||
'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,
|
||||
|
||||
'U_POST_DETAILS' => "$url&i=$id&p={$row['post_id']}&mode=post_details" . (($forum_id) ? "&f=$forum_id" : ''),
|
||||
'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '',
|
||||
'U_MCP_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '',
|
||||
'U_POST_DETAILS' => "$url&i=$id&p={$row['post_id']}&mode=post_details",
|
||||
'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&p=' . $row['post_id']) : '',
|
||||
'U_MCP_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&p=' . $row['post_id']) : '',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -379,12 +379,12 @@ function mcp_topic_view($id, $mode, $action)
|
||||
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total, $posts_per_page, $start);
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
$topic_row = [
|
||||
'TOPIC_TITLE' => $topic_info['topic_title'],
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_info['forum_id'] . '&t=' . $topic_info['topic_id']),
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $topic_info['topic_id']),
|
||||
|
||||
'TO_TOPIC_ID' => $to_topic_id,
|
||||
'TO_TOPIC_INFO' => ($to_topic_id) ? sprintf($user->lang['YOU_SELECTED_TOPIC'], $to_topic_id, '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_topic_info['forum_id'] . '&t=' . $to_topic_id) . '">' . $to_topic_info['topic_title'] . '</a>') : '',
|
||||
'TO_TOPIC_INFO' => ($to_topic_id) ? sprintf($user->lang['YOU_SELECTED_TOPIC'], $to_topic_id, '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $to_topic_id) . '">' . $to_topic_info['topic_title'] . '</a>') : '',
|
||||
|
||||
'SPLIT_SUBJECT' => $subject,
|
||||
'POSTS_PER_PAGE' => $posts_per_page,
|
||||
@@ -416,11 +416,53 @@ function mcp_topic_view($id, $mode, $action)
|
||||
|
||||
'U_SELECT_TOPIC' => "$url&i=$id&mode=forum_view&action=merge_select" . (($forum_id) ? "&f=$forum_id" : ''),
|
||||
|
||||
'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$topic_info['forum_id']}&t={$topic_info['topic_id']}&start=$start") . '">', '</a>'),
|
||||
'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$topic_info['topic_id']}&start=$start") . '">', '</a>'),
|
||||
'RETURN_FORUM' => sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", "f={$topic_info['forum_id']}&start=$start") . '">', '</a>'),
|
||||
|
||||
'TOTAL_POSTS' => $user->lang('VIEW_TOPIC_POSTS', (int) $total),
|
||||
));
|
||||
];
|
||||
|
||||
/**
|
||||
* Event to modify the template data block for topic data output in the MCP
|
||||
*
|
||||
* @event core.mcp_topic_review_modify_topic_row
|
||||
* @var string action Moderation action type to be performed with the topic
|
||||
* @var bool has_unapproved_posts Flag indicating if the topic has unapproved posts
|
||||
* @var int icon_id Split topic icon ID
|
||||
* @var int id ID of the tab we are displaying
|
||||
* @var string mode Mode of the MCP page we are displaying
|
||||
* @var int topic_id The topic ID we are currently reviewing
|
||||
* @var int forum_id The forum ID we are currently in
|
||||
* @var bool s_topic_icons Flag indicating if split topic icon to be displayed
|
||||
* @var int start Start item of this page
|
||||
* @var string subject Subject of the topic to be split
|
||||
* @var array topic_info Array with topic data
|
||||
* @var int to_forum_id Forum id the topic is being moved to
|
||||
* @var int to_topic_id Topic ID the topic is being merged with
|
||||
* @var array topic_row Topic template data array
|
||||
* @var int total Total posts count
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'action',
|
||||
'has_unapproved_posts',
|
||||
'icon_id',
|
||||
'id',
|
||||
'mode',
|
||||
'topic_id',
|
||||
'forum_id',
|
||||
's_topic_icons',
|
||||
'start',
|
||||
'subject',
|
||||
'topic_info',
|
||||
'to_forum_id',
|
||||
'to_topic_id',
|
||||
'topic_row',
|
||||
'total',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_topic_review_modify_topic_row', compact($vars)));
|
||||
|
||||
$template->assign_vars($topic_row);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -692,10 +734,36 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
|
||||
$config->increment('num_topics', 1, false);
|
||||
|
||||
// Link back to both topics
|
||||
$return_link = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']) . '">', '</a>') . '<br /><br />' . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&t=' . $to_topic_id) . '">', '</a>');
|
||||
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&t=$to_topic_id");
|
||||
$return_link = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $post_info['topic_id']) . '">', '</a>') . '<br /><br />' . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $to_topic_id) . '">', '</a>');
|
||||
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?t=$to_topic_id");
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
/**
|
||||
* Event to access topic data after split
|
||||
*
|
||||
* @event core.mcp_topic_split_topic_after
|
||||
* @var string action Split action type to be performed with the topic
|
||||
* @var int topic_id The topic ID we are currently splitting
|
||||
* @var int forum_id The forum ID we are currently in
|
||||
* @var int start Start item of this page
|
||||
* @var string subject Subject of the topic to be split
|
||||
* @var array topic_info Array with topic data
|
||||
* @var int to_forum_id Forum id the topic is being moved to
|
||||
* @var int to_topic_id Topic ID the topic is being split to
|
||||
* @since 3.3.5-RC1
|
||||
*/
|
||||
$vars = [
|
||||
'action',
|
||||
'topic_id',
|
||||
'forum_id',
|
||||
'start',
|
||||
'subject',
|
||||
'topic_info',
|
||||
'to_forum_id',
|
||||
'to_topic_id',
|
||||
];
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_topic_split_topic_after', compact($vars)));
|
||||
|
||||
meta_refresh(3, $redirect);
|
||||
trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
|
||||
}
|
||||
@@ -789,7 +857,7 @@ function merge_posts($topic_id, $to_topic_id)
|
||||
|
||||
if ($row)
|
||||
{
|
||||
$return_link .= sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $topic_id) . '">', '</a>');
|
||||
$return_link .= sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $topic_id) . '">', '</a>');
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -812,8 +880,8 @@ function merge_posts($topic_id, $to_topic_id)
|
||||
sync('forum', 'forum_id', $sync_forums, true, true);
|
||||
|
||||
// Link to the new topic
|
||||
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&t=' . $to_topic_id) . '">', '</a>');
|
||||
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&t=$to_topic_id");
|
||||
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $to_topic_id) . '">', '</a>');
|
||||
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?t=$to_topic_id");
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
/**
|
||||
|
@@ -238,10 +238,10 @@ class mcp_warn
|
||||
|
||||
$user_id = $user_row['user_id'];
|
||||
|
||||
if (strpos($this->u_action, "&f=$forum_id&p=$post_id") === false)
|
||||
if (strpos($this->u_action, "&p=$post_id") === false)
|
||||
{
|
||||
$this->p_master->adjust_url("&f=$forum_id&p=$post_id");
|
||||
$this->u_action .= "&f=$forum_id&p=$post_id";
|
||||
$this->p_master->adjust_url("&p=$post_id");
|
||||
$this->u_action .= "&p=$post_id";
|
||||
}
|
||||
|
||||
// Check if can send a notification
|
||||
@@ -358,7 +358,7 @@ class mcp_warn
|
||||
'AVATAR_IMG' => $avatar_img,
|
||||
'RANK_IMG' => $user_rank_data['img'],
|
||||
|
||||
'L_WARNING_POST_DEFAULT' => sprintf($user->lang['WARNING_POST_DEFAULT'], generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&p=$post_id#p$post_id"),
|
||||
'L_WARNING_POST_DEFAULT' => sprintf($user->lang['WARNING_POST_DEFAULT'], generate_board_url() . "/viewtopic.$phpEx?p=$post_id#p$post_id"),
|
||||
|
||||
'S_CAN_NOTIFY' => $s_can_notify,
|
||||
));
|
||||
|
@@ -38,7 +38,7 @@ class phpbb_questionnaire_data_collector
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string
|
||||
* @param string $install_id
|
||||
*/
|
||||
function __construct($install_id)
|
||||
{
|
||||
|
@@ -159,7 +159,7 @@ class ucp_attachments
|
||||
}
|
||||
else
|
||||
{
|
||||
$view_topic = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$row['topic_id']}&p={$row['post_msg_id']}") . "#p{$row['post_msg_id']}";
|
||||
$view_topic = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p={$row['post_msg_id']}") . "#p{$row['post_msg_id']}";
|
||||
}
|
||||
|
||||
$template->assign_block_vars('attachrow', array(
|
||||
@@ -194,7 +194,7 @@ class ucp_attachments
|
||||
|
||||
$template->assign_vars(array(
|
||||
'TOTAL_ATTACHMENTS' => $num_attachments,
|
||||
'NUM_ATTACHMENTS' => $user->lang('NUM_ATTACHMENTS', $num_attachments),
|
||||
'NUM_ATTACHMENTS' => $user->lang('NUM_ATTACHMENTS', (int) $num_attachments),
|
||||
|
||||
'L_TITLE' => $user->lang['UCP_ATTACHMENTS'],
|
||||
|
||||
|
@@ -184,10 +184,10 @@ class ucp_main
|
||||
'S_UNREAD' => $unread_topic,
|
||||
|
||||
'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&p=" . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
|
||||
'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p=" . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
|
||||
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
||||
'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=unread") . '#unread',
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id"),
|
||||
'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t=$topic_id&view=unread") . '#unread',
|
||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t=$topic_id"),
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -396,7 +396,7 @@ class ucp_main
|
||||
if ($row['forum_last_post_id'])
|
||||
{
|
||||
$last_post_time = $user->format_date($row['forum_last_post_time']);
|
||||
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&p=" . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
|
||||
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p=" . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -677,10 +677,10 @@ class ucp_main
|
||||
if (isset($topic_rows[$draft['topic_id']]) && $auth->acl_get('f_read', $topic_rows[$draft['topic_id']]['forum_id']))
|
||||
{
|
||||
$link_topic = true;
|
||||
$view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_rows[$draft['topic_id']]['forum_id'] . '&t=' . $draft['topic_id']);
|
||||
$view_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $draft['topic_id']);
|
||||
$title = $topic_rows[$draft['topic_id']]['topic_title'];
|
||||
|
||||
$insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 'f=' . $topic_rows[$draft['topic_id']]['forum_id'] . '&t=' . $draft['topic_id'] . '&mode=reply&d=' . $draft['draft_id']);
|
||||
$insert_url = append_sid("{$phpbb_root_path}posting.$phpEx", 't=' . $draft['topic_id'] . '&mode=reply&d=' . $draft['draft_id']);
|
||||
}
|
||||
else if ($auth->acl_get('f_read', $draft['forum_id']))
|
||||
{
|
||||
@@ -940,7 +940,7 @@ class ucp_main
|
||||
$folder_img = $folder_alt = $topic_type = '';
|
||||
topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type);
|
||||
|
||||
$view_topic_url_params = "f=$forum_id&t=$topic_id";
|
||||
$view_topic_url_params = "t=$topic_id";
|
||||
$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params);
|
||||
|
||||
// Send vars to template
|
||||
@@ -1022,7 +1022,7 @@ class ucp_main
|
||||
|
||||
$template->assign_block_vars('topicrow', $template_vars);
|
||||
|
||||
$pagination->generate_template_pagination(append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . "&t=$topic_id"), 'topicrow.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true);
|
||||
$pagination->generate_template_pagination(append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t=$topic_id"), 'topicrow.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -22,11 +22,9 @@ if (!defined('IN_PHPBB'))
|
||||
setlocale(LC_CTYPE, 'C');
|
||||
|
||||
/**
|
||||
* Setup the UTF-8 portability layer
|
||||
*/
|
||||
Patchwork\Utf8\Bootup::initUtf8Encode();
|
||||
Patchwork\Utf8\Bootup::initMbstring();
|
||||
Patchwork\Utf8\Bootup::initIntl();
|
||||
* UTF-8 portability layer is provided by
|
||||
* symfony/polyfill-mbstring, symfony/polyfill-intl-normalizer, symfony/polyfill-php72
|
||||
*/
|
||||
|
||||
/**
|
||||
* UTF-8 tools
|
||||
@@ -171,7 +169,7 @@ function utf8_strspn($str, $mask, $start = null, $length = null)
|
||||
* Make a string's first character uppercase
|
||||
*
|
||||
* @author Harry Fuecks
|
||||
* @param string
|
||||
* @param string $str
|
||||
* @return string with first character as upper case (if applicable)
|
||||
*/
|
||||
function utf8_ucfirst($str)
|
||||
|
@@ -38,7 +38,7 @@ $dbms = $phpbb_config_php_file->convert_30_dbms_to_31($dbms);
|
||||
$convertor_data = array(
|
||||
'forum_name' => 'phpBB 2.0.x',
|
||||
'version' => '1.0.3',
|
||||
'phpbb_version' => '3.3.4',
|
||||
'phpbb_version' => '3.3.5',
|
||||
'author' => '<a href="https://www.phpbb.com/">phpBB Limited</a>',
|
||||
'dbms' => $dbms,
|
||||
'dbhost' => $dbhost,
|
||||
|
@@ -23,7 +23,7 @@ if (php_sapi_name() !== 'cli')
|
||||
define('IN_PHPBB', true);
|
||||
define('IN_INSTALL', true);
|
||||
define('PHPBB_ENVIRONMENT', 'production');
|
||||
define('PHPBB_VERSION', '3.3.4');
|
||||
define('PHPBB_VERSION', '3.3.5');
|
||||
$phpbb_root_path = __DIR__ . '/../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
|
||||
|
@@ -200,7 +200,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_lastread', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_track', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_font_awesome_url', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jumpbox', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_moderators', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_notifications', '1');
|
||||
@@ -316,7 +316,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('update_hashes_lock
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('use_system_cron', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.3.4');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.3.5');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');
|
||||
|
||||
|
@@ -49,13 +49,19 @@ function phpbb_include_updated($path, $phpbb_root_path, $optional = false)
|
||||
|
||||
function installer_msg_handler($errno, $msg_text, $errfile, $errline)
|
||||
{
|
||||
global $phpbb_installer_container;
|
||||
global $phpbb_installer_container, $msg_long_text;
|
||||
|
||||
if (error_reporting() == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// If the message handler is stripping text, fallback to the long version if available
|
||||
if (!$msg_text && !empty($msg_long_text))
|
||||
{
|
||||
$msg_text = $msg_long_text;
|
||||
}
|
||||
|
||||
switch ($errno)
|
||||
{
|
||||
case E_NOTICE:
|
||||
@@ -87,6 +93,21 @@ function installer_msg_handler($errno, $msg_text, $errfile, $errline)
|
||||
case E_USER_ERROR:
|
||||
$msg = '<b>General Error:</b><br>' . $msg_text . '<br> in file ' . $errfile . ' on line ' . $errline . '<br><br>';
|
||||
|
||||
if (!empty($phpbb_installer_container))
|
||||
{
|
||||
try
|
||||
{
|
||||
/** @var \phpbb\install\helper\iohandler\iohandler_interface $iohandler */
|
||||
$iohandler = $phpbb_installer_container->get('installer.helper.iohandler');
|
||||
$iohandler->add_error_message($msg);
|
||||
$iohandler->send_response(true);
|
||||
exit();
|
||||
}
|
||||
catch (\phpbb\install\helper\iohandler\exception\iohandler_not_implemented_exception $e)
|
||||
{
|
||||
throw new \phpbb\exception\runtime_exception($msg);
|
||||
}
|
||||
}
|
||||
throw new \phpbb\exception\runtime_exception($msg);
|
||||
break;
|
||||
case E_DEPRECATED:
|
||||
|
@@ -70,7 +70,6 @@ $lang = array_merge($lang, array(
|
||||
'START_RESTORE' => 'Start restore',
|
||||
'STORE_AND_DOWNLOAD' => 'Store and download',
|
||||
'STORE_LOCAL' => 'Store file locally',
|
||||
'STRUCTURE_ONLY' => 'Structure only',
|
||||
|
||||
'TABLE_SELECT' => 'Table select',
|
||||
'TABLE_SELECT_ERROR'=> 'You must select at least one table.',
|
||||
|
@@ -980,23 +980,26 @@ switch ($mode)
|
||||
WHERE ' . $db->sql_in_set('user_type', $user_types) . '
|
||||
AND username_clean ' . $db->sql_like_expression(utf8_clean_string($username_chars) . $db->get_any_char());
|
||||
$result = $db->sql_query_limit($sql, 10);
|
||||
$user_list = array();
|
||||
|
||||
$user_list = [];
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$user_list[] = array(
|
||||
$user_list[] = [
|
||||
'user_id' => (int) $row['user_id'],
|
||||
'result' => $row['username'],
|
||||
'result' => htmlspecialchars_decode($row['username']),
|
||||
'username_full' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
'display' => get_username_string('no_profile', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
);
|
||||
];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$json_response = new \phpbb\json_response();
|
||||
$json_response->send(array(
|
||||
|
||||
$json_response->send([
|
||||
'keyword' => $username_chars,
|
||||
'results' => $user_list,
|
||||
));
|
||||
]);
|
||||
|
||||
break;
|
||||
|
||||
|
@@ -85,7 +85,7 @@ abstract class base implements provider_interface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function login_link_has_necessary_data($login_link_data)
|
||||
public function login_link_has_necessary_data(array $login_link_data)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@@ -163,7 +163,7 @@ class oauth extends base
|
||||
$provider = $this->request->variable('oauth_service', '', false);
|
||||
$service_name = $this->get_service_name($provider);
|
||||
|
||||
if ($provider === '' || !array_key_exists($service_name, $this->service_providers))
|
||||
if ($provider === '' || !$this->service_providers->offsetExists($service_name))
|
||||
{
|
||||
return [
|
||||
'status' => LOGIN_ERROR_EXTERNAL_AUTH,
|
||||
@@ -411,7 +411,7 @@ class oauth extends base
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function login_link_has_necessary_data($login_link_data)
|
||||
public function login_link_has_necessary_data(array $login_link_data)
|
||||
{
|
||||
if (empty($login_link_data))
|
||||
{
|
||||
@@ -452,7 +452,7 @@ class oauth extends base
|
||||
|
||||
$service_name = $this->get_service_name($link_data['oauth_service']);
|
||||
|
||||
if (!array_key_exists($service_name, $this->service_providers))
|
||||
if (!$this->service_providers->offsetExists($service_name))
|
||||
{
|
||||
return 'LOGIN_ERROR_OAUTH_SERVICE_DOES_NOT_EXIST';
|
||||
}
|
||||
|
@@ -154,7 +154,7 @@ interface provider_interface
|
||||
* @return string|null Returns a string with a language constant if there
|
||||
* is data missing or null if there is no error.
|
||||
*/
|
||||
public function login_link_has_necessary_data($login_link_data);
|
||||
public function login_link_has_necessary_data(array $login_link_data);
|
||||
|
||||
/**
|
||||
* Links an external account to a phpBB account.
|
||||
|
@@ -15,8 +15,9 @@
|
||||
"support": {
|
||||
"issues": "https://tracker.phpbb.com",
|
||||
"forum": "https://www.phpbb.com/community/",
|
||||
"wiki": "https://wiki.phpbb.com",
|
||||
"irc": "irc://irc.freenode.org/phpbb"
|
||||
"docs": "https://www.phpbb.com/support/docs/",
|
||||
"irc": "irc://irc.libera.chat/phpbb",
|
||||
"chat": "https://www.phpbb.com/support/chat/"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [""]
|
||||
|
@@ -13,20 +13,23 @@
|
||||
|
||||
namespace phpbb\config;
|
||||
|
||||
use phpbb\cache\driver\driver_interface as cache_interface;
|
||||
use phpbb\db\driver\driver_interface as db_interface;
|
||||
|
||||
/**
|
||||
* Configuration container class
|
||||
*/
|
||||
class db extends \phpbb\config\config
|
||||
class db extends config
|
||||
{
|
||||
/**
|
||||
* Cache instance
|
||||
* @var \phpbb\cache\driver\driver_interface
|
||||
* @var cache_interface
|
||||
*/
|
||||
protected $cache;
|
||||
|
||||
/**
|
||||
* Database connection
|
||||
* @var \phpbb\db\driver\driver_interface
|
||||
* @var db_interface
|
||||
*/
|
||||
protected $db;
|
||||
|
||||
@@ -39,16 +42,28 @@ class db extends \phpbb\config\config
|
||||
/**
|
||||
* Creates a configuration container with a default set of values
|
||||
*
|
||||
* @param \phpbb\db\driver\driver_interface $db Database connection
|
||||
* @param \phpbb\cache\driver\driver_interface $cache Cache instance
|
||||
* @param db_interface $db Database connection
|
||||
* @param cache_interface $cache Cache instance
|
||||
* @param string $table Configuration table name
|
||||
*/
|
||||
public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\cache\driver\driver_interface $cache, $table)
|
||||
public function __construct(db_interface $db, cache_interface $cache, $table)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->cache = $cache;
|
||||
$this->table = $table;
|
||||
|
||||
$this->initialise($cache);
|
||||
|
||||
parent::__construct($this->config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialise config with database and/or cached entries
|
||||
*
|
||||
* @param cache_interface $cache
|
||||
*/
|
||||
public function initialise(cache_interface $cache)
|
||||
{
|
||||
if (($config = $cache->get('config')) !== false)
|
||||
{
|
||||
$sql = 'SELECT config_name, config_value
|
||||
@@ -84,7 +99,7 @@ class db extends \phpbb\config\config
|
||||
$cache->put('config', $cached_config);
|
||||
}
|
||||
|
||||
parent::__construct($config);
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,7 +108,7 @@ class db extends \phpbb\config\config
|
||||
* @param String $key The configuration option's name
|
||||
* @param bool $use_cache Whether this variable should be cached or if it
|
||||
* changes too frequently to be efficiently cached
|
||||
* @return null
|
||||
* @return void
|
||||
*/
|
||||
public function delete($key, $use_cache = true)
|
||||
{
|
||||
@@ -155,8 +170,8 @@ class db extends \phpbb\config\config
|
||||
if (!isset($this->config[$key]))
|
||||
{
|
||||
$sql = 'INSERT INTO ' . $this->table . ' ' . $this->db->sql_build_array('INSERT', array(
|
||||
'config_name' => $key,
|
||||
'config_value' => $new_value,
|
||||
'config_name' => $this->db->sql_escape($key),
|
||||
'config_value' => $this->db->sql_escape($new_value),
|
||||
'is_dynamic' => ($use_cache) ? 0 : 1));
|
||||
$this->db->sql_query($sql);
|
||||
}
|
||||
|
@@ -58,6 +58,10 @@ class migrate extends \phpbb\console\command\db\migration_command
|
||||
$this->migrator->create_migrations_table();
|
||||
|
||||
$this->cache->purge();
|
||||
if ($this->config instanceof \phpbb\config\db)
|
||||
{
|
||||
$this->config->initialise($this->cache->get_driver());
|
||||
}
|
||||
|
||||
$this->load_migrations();
|
||||
$orig_version = $this->config['version'];
|
||||
|
@@ -97,19 +97,19 @@ class datetime extends \DateTime
|
||||
|
||||
$midnight = $midnight->getTimestamp();
|
||||
|
||||
if ($timestamp <= $midnight + 2 * 86400)
|
||||
if ($timestamp < $midnight + 2 * 86400)
|
||||
{
|
||||
$day = false;
|
||||
|
||||
if ($timestamp > $midnight + 86400)
|
||||
if ($timestamp >= $midnight + 86400)
|
||||
{
|
||||
$day = 'TOMORROW';
|
||||
}
|
||||
else if ($timestamp > $midnight)
|
||||
else if ($timestamp >= $midnight)
|
||||
{
|
||||
$day = 'TODAY';
|
||||
}
|
||||
else if ($timestamp > $midnight - 86400)
|
||||
else if ($timestamp >= $midnight - 86400)
|
||||
{
|
||||
$day = 'YESTERDAY';
|
||||
}
|
||||
|
@@ -71,6 +71,13 @@ class mysqli extends \phpbb\db\driver\mysql_base
|
||||
// Disable loading local files on client side
|
||||
@mysqli_options($this->db_connect_id, MYSQLI_OPT_LOCAL_INFILE, false);
|
||||
|
||||
/*
|
||||
* As of PHP 8.1 MySQLi default error mode is set to MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT
|
||||
* See https://wiki.php.net/rfc/mysqli_default_errmode
|
||||
* Since phpBB implements own SQL errors handling, explicitly set it back to MYSQLI_REPORT_OFF
|
||||
*/
|
||||
mysqli_report(MYSQLI_REPORT_OFF);
|
||||
|
||||
@mysqli_query($this->db_connect_id, "SET NAMES 'utf8'");
|
||||
|
||||
// enforce strict mode on databases that support it
|
||||
|
@@ -207,14 +207,16 @@ class postgres extends \phpbb\db\driver\driver
|
||||
return false;
|
||||
}
|
||||
|
||||
$safe_query_id = $this->clean_query_id($this->query_result);
|
||||
|
||||
if ($cache && $cache_ttl)
|
||||
{
|
||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||
$this->open_queries[$safe_query_id] = $this->query_result;
|
||||
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
|
||||
}
|
||||
else if (strpos($query, 'SELECT') === 0)
|
||||
{
|
||||
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
||||
$this->open_queries[$safe_query_id] = $this->query_result;
|
||||
}
|
||||
}
|
||||
else if ($this->debug_sql_explain)
|
||||
@@ -555,6 +557,15 @@ class postgres extends \phpbb\db\driver\driver
|
||||
*/
|
||||
private function clean_query_id($query_id)
|
||||
{
|
||||
return is_resource($query_id) ? (int) $query_id : $query_id;
|
||||
// As of PHP 8.1 PgSQL functions accept/return \PgSQL\* objects instead of "pgsql *" resources
|
||||
// Attempting to cast object to int will throw error, hence correctly handle all cases
|
||||
if (is_resource($query_id))
|
||||
{
|
||||
return function_exists('get_resource_id') ? get_resource_id($query_id) : (int) $query_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
return is_object($query_id) ? spl_object_id($query_id) : $query_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -208,7 +208,7 @@ class postgres_extractor extends base_extractor
|
||||
}
|
||||
|
||||
// Generate constraint clauses for CHECK constraints
|
||||
$sql_checks = "SELECT pc.conname AS index_name, pg_get_constraintdef(pc.oid)
|
||||
$sql_checks = "SELECT pc.conname AS index_name, pg_get_expr(pc.conbin, pc.conrelid) AS constraint_expr
|
||||
FROM pg_constraint pc, pg_class bc
|
||||
WHERE pc.conrelid = bc.oid
|
||||
AND bc.relname = '" . $this->db->sql_escape($table_name) . "'
|
||||
@@ -225,9 +225,9 @@ class postgres_extractor extends base_extractor
|
||||
// Add the constraints to the sql file.
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
if (!is_null($row['consrc']))
|
||||
if (!empty($row['constraint_expr']))
|
||||
{
|
||||
$lines[] = ' CONSTRAINT ' . $row['index_name'] . ' CHECK ' . $row['consrc'];
|
||||
$lines[] = ' CONSTRAINT ' . $row['index_name'] . ' CHECK ' . $row['constraint_expr'];
|
||||
}
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
|
@@ -15,6 +15,20 @@ namespace phpbb\db\migration\data\v310;
|
||||
|
||||
class contact_admin_acp_module extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
$sql = 'SELECT module_id
|
||||
FROM ' . MODULES_TABLE . "
|
||||
WHERE module_class = 'acp'
|
||||
AND module_basename = 'acp_contact'
|
||||
AND module_langname = 'ACP_CONTACT_SETTINGS'";
|
||||
$result = $this->db->sql_query($sql);
|
||||
$module_id = $this->db->sql_fetchfield('module_id');
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
return $module_id != false;
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
|
@@ -20,7 +20,7 @@ class add_display_unapproved_posts_config extends \phpbb\db\migration\migration
|
||||
return $this->config->offsetExists('display_unapproved_posts');
|
||||
}
|
||||
|
||||
public static function depends_on()
|
||||
static public function depends_on()
|
||||
{
|
||||
return ['\phpbb\db\migration\data\v330\dev',];
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ class remove_attachment_flash extends \phpbb\db\migration\migration
|
||||
self::ATTACHMENT_CATEGORY_FLASH,
|
||||
);
|
||||
|
||||
public static function depends_on()
|
||||
static public function depends_on()
|
||||
{
|
||||
return ['\phpbb\db\migration\data\v330\dev',];
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@ class remove_max_pass_chars extends \phpbb\db\migration\migration
|
||||
return !$this->config->offsetExists('max_pass_chars');
|
||||
}
|
||||
|
||||
public static function depends_on()
|
||||
static public function depends_on()
|
||||
{
|
||||
return [
|
||||
'\phpbb\db\migration\data\v330\dev',
|
||||
|
104
phpBB/phpbb/db/migration/data/v33x/bot_update_v2.php
Normal file
104
phpBB/phpbb/db/migration/data/v33x/bot_update_v2.php
Normal file
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\migration\data\v33x;
|
||||
|
||||
class bot_update_v2 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public static function depends_on()
|
||||
{
|
||||
return ['\phpbb\db\migration\data\v33x\v334'];
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return [
|
||||
['custom', [[$this, 'add_bots']]],
|
||||
];
|
||||
}
|
||||
|
||||
public function add_bots()
|
||||
{
|
||||
$bots = [
|
||||
'Ahrefs [Bot]' => 'AhrefsBot/',
|
||||
'Amazon [Bot]' => 'Amazonbot/',
|
||||
'Semrush [Bot]' => 'SemrushBot/',
|
||||
];
|
||||
|
||||
$group_row = [];
|
||||
|
||||
foreach ($bots as $bot_name => $bot_agent)
|
||||
{
|
||||
$bot_name_clean = utf8_clean_string($bot_name);
|
||||
|
||||
$sql = 'SELECT user_id
|
||||
FROM ' . $this->table_prefix . 'users
|
||||
WHERE ' . $this->db->sql_build_array('SELECT', ['username_clean' => $bot_name_clean]);
|
||||
$result = $this->db->sql_query($sql);
|
||||
$bot_exists = (bool) $this->db->sql_fetchfield('user_id');
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
if ($bot_exists)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!count($group_row))
|
||||
{
|
||||
$sql = 'SELECT group_id, group_colour
|
||||
FROM ' . $this->table_prefix . 'groups
|
||||
WHERE ' . $this->db->sql_build_array('SELECT', ['group_name' => 'BOTS']);
|
||||
$result = $this->db->sql_query($sql);
|
||||
$group_row = $this->db->sql_fetchrow($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
// Default fallback, should never get here
|
||||
if (!count($group_row))
|
||||
{
|
||||
$group_row['group_id'] = 6;
|
||||
$group_row['group_colour'] = '9E8DA7';
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('user_add'))
|
||||
{
|
||||
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
|
||||
}
|
||||
|
||||
$user_row = [
|
||||
'user_type' => USER_IGNORE,
|
||||
'group_id' => $group_row['group_id'],
|
||||
'username' => $bot_name,
|
||||
'user_regdate' => time(),
|
||||
'user_password' => '',
|
||||
'user_colour' => $group_row['group_colour'],
|
||||
'user_email' => '',
|
||||
'user_lang' => $this->config['default_lang'],
|
||||
'user_style' => $this->config['default_style'],
|
||||
'user_timezone' => 0,
|
||||
'user_dateformat' => $this->config['default_dateformat'],
|
||||
'user_allow_massemail' => 0,
|
||||
];
|
||||
|
||||
$user_id = user_add($user_row);
|
||||
$sql = 'INSERT INTO ' . $this->table_prefix . 'bots ' . $this->db->sql_build_array('INSERT', [
|
||||
'bot_active' => 1,
|
||||
'bot_name' => $bot_name,
|
||||
'user_id' => (int) $user_id,
|
||||
'bot_agent' => $bot_agent,
|
||||
'bot_ip' => '',
|
||||
]);
|
||||
$this->db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
}
|
@@ -20,7 +20,7 @@ class default_search_return_chars extends \phpbb\db\migration\migration
|
||||
return $this->config->offsetExists('default_search_return_chars');
|
||||
}
|
||||
|
||||
public static function depends_on()
|
||||
static public function depends_on()
|
||||
{
|
||||
return [
|
||||
'\phpbb\db\migration\data\v330\v330',
|
||||
|
51
phpBB/phpbb/db/migration/data/v33x/extend_bbcode_tooltip.php
Normal file
51
phpBB/phpbb/db/migration/data/v33x/extend_bbcode_tooltip.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\migration\data\v33x;
|
||||
|
||||
class extend_bbcode_tooltip extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
return !$this->db_tools->sql_column_exists($this->table_prefix . 'bbcodes', 'bbcode_helpline');
|
||||
}
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return [
|
||||
'\phpbb\db\migration\data\v33x\v334'
|
||||
];
|
||||
}
|
||||
|
||||
public function update_schema()
|
||||
{
|
||||
return [
|
||||
'change_columns' => [
|
||||
$this->table_prefix . 'bbcodes' => [
|
||||
'bbcode_helpline' => ['TEXT_UNI', ''],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function revert_schema()
|
||||
{
|
||||
return [
|
||||
'change_columns' => [
|
||||
$this->table_prefix . 'bbcodes' => [
|
||||
'bbcode_helpline' => ['VCHAR_UNI', ''],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
@@ -20,7 +20,7 @@ class google_recaptcha_v3 extends \phpbb\db\migration\migration
|
||||
return $this->config->offsetExists('recaptcha_v3_key');
|
||||
}
|
||||
|
||||
public static function depends_on()
|
||||
static public function depends_on()
|
||||
{
|
||||
return [
|
||||
'\phpbb\db\migration\data\v330\v330',
|
||||
@@ -38,7 +38,7 @@ class google_recaptcha_v3 extends \phpbb\db\migration\migration
|
||||
|
||||
foreach (\phpbb\captcha\plugins\recaptcha_v3::get_actions() as $action)
|
||||
{
|
||||
$data[] = ['config.add', ["recaptcha_v3_threshold_{$action}", 0.5]];
|
||||
$data[] = ['config.add', ["recaptcha_v3_threshold_{$action}", '0.5']];
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
36
phpBB/phpbb/db/migration/data/v33x/jquery_update_v2.php
Normal file
36
phpBB/phpbb/db/migration/data/v33x/jquery_update_v2.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\migration\data\v33x;
|
||||
|
||||
use phpbb\db\migration\migration;
|
||||
|
||||
class jquery_update_v2 extends migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
return $this->config['load_jquery_url'] === '//ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js';
|
||||
}
|
||||
|
||||
public static function depends_on()
|
||||
{
|
||||
return ['\phpbb\db\migration\data\v33x\v334'];
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return [
|
||||
['config.update', ['load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js']],
|
||||
];
|
||||
}
|
||||
}
|
@@ -20,7 +20,7 @@ class v334 extends \phpbb\db\migration\migration
|
||||
return version_compare($this->config['version'], '3.3.4', '>=');
|
||||
}
|
||||
|
||||
static public function depends_on()
|
||||
public static function depends_on()
|
||||
{
|
||||
return [
|
||||
'\phpbb\db\migration\data\v33x\v334rc1',
|
||||
|
36
phpBB/phpbb/db/migration/data/v33x/v335.php
Normal file
36
phpBB/phpbb/db/migration/data/v33x/v335.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\migration\data\v33x;
|
||||
|
||||
class v335 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
return version_compare($this->config['version'], '3.3.5', '>=');
|
||||
}
|
||||
|
||||
public static function depends_on()
|
||||
{
|
||||
return [
|
||||
'\phpbb\db\migration\data\v33x\v335rc1',
|
||||
];
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return [
|
||||
['config.update', ['version', '3.3.5']],
|
||||
];
|
||||
}
|
||||
}
|
38
phpBB/phpbb/db/migration/data/v33x/v335rc1.php
Normal file
38
phpBB/phpbb/db/migration/data/v33x/v335rc1.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\migration\data\v33x;
|
||||
|
||||
class v335rc1 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
return version_compare($this->config['version'], '3.3.5-RC1', '>=');
|
||||
}
|
||||
|
||||
public static function depends_on()
|
||||
{
|
||||
return [
|
||||
'\phpbb\db\migration\data\v33x\extend_bbcode_tooltip',
|
||||
'\phpbb\db\migration\data\v33x\bot_update_v2',
|
||||
'\phpbb\db\migration\data\v33x\jquery_update_v2',
|
||||
];
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return [
|
||||
['config.update', ['version', '3.3.5-RC1']],
|
||||
];
|
||||
}
|
||||
}
|
@@ -339,9 +339,10 @@ class migrator
|
||||
$depend = $this->get_valid_name($depend);
|
||||
|
||||
// Test all possible namings before throwing exception
|
||||
if ($this->unfulfillable($depend) !== false)
|
||||
$missing = $this->unfulfillable($depend);
|
||||
if ($missing !== false)
|
||||
{
|
||||
throw new \phpbb\db\migration\exception('MIGRATION_NOT_FULFILLABLE', $name, $depend);
|
||||
throw new \phpbb\db\migration\exception('MIGRATION_NOT_FULFILLABLE', $name, $missing);
|
||||
}
|
||||
|
||||
if (!isset($this->migration_state[$depend]) ||
|
||||
|
@@ -30,7 +30,7 @@ class mssql extends tools
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function get_dbms_type_map()
|
||||
static public function get_dbms_type_map()
|
||||
{
|
||||
return array(
|
||||
'mssql' => array(
|
||||
|
@@ -24,7 +24,7 @@ class postgres extends tools
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function get_dbms_type_map()
|
||||
static public function get_dbms_type_map()
|
||||
{
|
||||
return array(
|
||||
'postgres' => array(
|
||||
|
@@ -24,7 +24,7 @@ use Symfony\Component\Debug\ExceptionHandler;
|
||||
*/
|
||||
class debug
|
||||
{
|
||||
private static $enabled = false;
|
||||
static private $enabled = false;
|
||||
|
||||
/**
|
||||
* Enables the debug tools.
|
||||
@@ -37,7 +37,7 @@ class debug
|
||||
* @param int $errorReportingLevel The level of error reporting you want
|
||||
* @param bool $displayErrors Whether to display errors (for development) or just log them (for production)
|
||||
*/
|
||||
public static function enable($errorReportingLevel = null, $displayErrors = true)
|
||||
static public function enable($errorReportingLevel = null, $displayErrors = true)
|
||||
{
|
||||
if (static::$enabled)
|
||||
{
|
||||
|
@@ -243,10 +243,11 @@ class md_exporter
|
||||
}
|
||||
|
||||
/**
|
||||
* Format the php events as a wiki table
|
||||
* Format the md events as a wiki table
|
||||
*
|
||||
* @param string $action
|
||||
* @return string Number of events found
|
||||
* @return string Number of events found * @deprecated since 3.2
|
||||
* @deprecated 3.3.5-RC1 (To be removed: 4.0.0-a1)
|
||||
*/
|
||||
public function export_events_for_wiki($action = '')
|
||||
{
|
||||
@@ -298,6 +299,71 @@ class md_exporter
|
||||
return $wiki_page;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format the md events as a rst table
|
||||
*
|
||||
* @param string $action
|
||||
* @return string Number of events found
|
||||
*/
|
||||
public function export_events_for_rst(string $action = ''): string
|
||||
{
|
||||
$rst_exporter = new rst_exporter();
|
||||
|
||||
if ($this->filter === 'adm')
|
||||
{
|
||||
if ($action === 'diff')
|
||||
{
|
||||
$rst_exporter->add_section_header('h3', 'ACP Template Events');
|
||||
}
|
||||
else
|
||||
{
|
||||
$rst_exporter->add_section_header('h2', 'ACP Template Events');
|
||||
}
|
||||
|
||||
$rst_exporter->set_columns([
|
||||
'event' => 'Identifier',
|
||||
'files' => 'Placement',
|
||||
'since' => 'Added in Release',
|
||||
'description' => 'Explanation',
|
||||
]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($action === 'diff')
|
||||
{
|
||||
$rst_exporter->add_section_header('h3', 'Template Events');
|
||||
}
|
||||
else
|
||||
{
|
||||
$rst_exporter->add_section_header('h2', 'Template Events');
|
||||
}
|
||||
|
||||
$rst_exporter->set_columns([
|
||||
'event' => 'Identifier',
|
||||
'files' => 'Prosilver Placement (If applicable)',
|
||||
'since' => 'Added in Release',
|
||||
'description' => 'Explanation',
|
||||
]);
|
||||
}
|
||||
|
||||
$events = [];
|
||||
foreach ($this->events as $event_name => $event)
|
||||
{
|
||||
$files = $this->filter === 'adm' ? implode(', ', $event['files']['adm']) : implode(', ', $event['files']['prosilver']);
|
||||
|
||||
$events[] = [
|
||||
'event' => $event_name,
|
||||
'files' => $files,
|
||||
'since' => $event['since'],
|
||||
'description' => str_replace("\n", '<br>', rtrim($event['description'])),
|
||||
];
|
||||
}
|
||||
|
||||
$rst_exporter->generate_events_table($events);
|
||||
|
||||
return $rst_exporter->get_rst_output();
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates a template event name
|
||||
*
|
||||
|
@@ -161,6 +161,7 @@ class php_exporter
|
||||
*
|
||||
* @param string $action
|
||||
* @return string
|
||||
* @deprecated 3.3.5-RC1 (To be removed: 4.0.0-a1)
|
||||
*/
|
||||
public function export_events_for_wiki($action = '')
|
||||
{
|
||||
@@ -184,6 +185,28 @@ class php_exporter
|
||||
return $wiki_page;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format the PHP events as a rst table
|
||||
*
|
||||
* @param string $action
|
||||
* @return string
|
||||
*/
|
||||
public function export_events_for_rst(string $action = ''): string
|
||||
{
|
||||
$rst_exporter = new rst_exporter();
|
||||
$rst_exporter->add_section_header($action === 'diff' ? 'h3' : 'h2', 'PHP Events');
|
||||
$rst_exporter->set_columns([
|
||||
'event' => 'Identifier',
|
||||
'file' => 'Placement',
|
||||
'arguments' => 'Arguments',
|
||||
'since' => 'Added in Release',
|
||||
'description' => 'Explanation',
|
||||
]);
|
||||
$rst_exporter->generate_events_table($this->events);
|
||||
|
||||
return $rst_exporter->get_rst_output();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $file
|
||||
* @return int Number of events found in this file
|
||||
@@ -287,24 +310,32 @@ class php_exporter
|
||||
array_pop($description_lines);
|
||||
}
|
||||
|
||||
$description = trim(implode('<br/>', $description_lines));
|
||||
$description = trim(implode('<br>', $description_lines));
|
||||
sort($arguments);
|
||||
|
||||
if (isset($this->events[$this->current_event]))
|
||||
{
|
||||
throw new \LogicException("The event '{$this->current_event}' from file "
|
||||
. "'{$this->current_file}:{$event_line_num}' already exists in file "
|
||||
. "'{$this->events[$this->current_event]['file']}'", 10);
|
||||
}
|
||||
if ($this->events[$this->current_event]['arguments'] != $arguments ||
|
||||
$this->events[$this->current_event]['since'] != $since)
|
||||
{
|
||||
throw new \LogicException("The event '{$this->current_event}' from file "
|
||||
. "'{$this->current_file}:{$event_line_num}' already exists in file "
|
||||
. "'{$this->events[$this->current_event]['file']}'", 10);
|
||||
}
|
||||
|
||||
sort($arguments);
|
||||
$this->events[$this->current_event] = array(
|
||||
'event' => $this->current_event,
|
||||
'file' => $this->current_file,
|
||||
'arguments' => $arguments,
|
||||
'since' => $since,
|
||||
'description' => $description,
|
||||
);
|
||||
$num_events_found++;
|
||||
$this->events[$this->current_event]['file'] .= '<br>' . $this->current_file;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->events[$this->current_event] = array(
|
||||
'event' => $this->current_event,
|
||||
'file' => $this->current_file,
|
||||
'arguments' => $arguments,
|
||||
'since' => $since,
|
||||
'description' => $description,
|
||||
);
|
||||
$num_events_found++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
184
phpBB/phpbb/event/rst_exporter.php
Normal file
184
phpBB/phpbb/event/rst_exporter.php
Normal file
@@ -0,0 +1,184 @@
|
||||
<?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\event;
|
||||
|
||||
class rst_exporter
|
||||
{
|
||||
/** @var array Column keys */
|
||||
private $columns = [];
|
||||
|
||||
/** @var array Column headers map */
|
||||
private $column_headers = [];
|
||||
|
||||
/** @var array Maximum lengths of columns */
|
||||
private $max_lengths = [];
|
||||
|
||||
/** @var string rst data */
|
||||
private $rst_data = '';
|
||||
|
||||
/**
|
||||
* Set columns with array where key is column name and value is title of column in table
|
||||
*
|
||||
* @param array $column_data
|
||||
*/
|
||||
public function set_columns(array $column_data): void
|
||||
{
|
||||
foreach ($column_data as $column_key => $column_header)
|
||||
{
|
||||
$this->columns[] = $column_key;
|
||||
$this->column_headers[$column_key] = $column_header;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add header to rst page
|
||||
*
|
||||
* @param string $type Type of header; allowed are h2, h3, h4 corresponding to HTML
|
||||
* @param string $header_text Text of header
|
||||
*/
|
||||
public function add_section_header(string $type, string $header_text): void
|
||||
{
|
||||
$this->rst_data .= $header_text . "\n";
|
||||
|
||||
switch ($type)
|
||||
{
|
||||
case 'h2':
|
||||
$header_character = '=';
|
||||
break;
|
||||
|
||||
default:
|
||||
case 'h3':
|
||||
$header_character = '-';
|
||||
break;
|
||||
|
||||
case 'h4':
|
||||
$header_character = '~';
|
||||
break;
|
||||
}
|
||||
|
||||
$this->rst_data .= str_repeat($header_character, strlen($header_text)) . "\n\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Fill table with event data
|
||||
*
|
||||
* @param array $event_data
|
||||
*/
|
||||
public function generate_events_table(array $event_data): void
|
||||
{
|
||||
$this->rst_data .= ".. table::\n";
|
||||
$this->rst_data .= " :class: events-list\n\n";
|
||||
|
||||
$this->set_max_lengths($event_data);
|
||||
|
||||
// Create table header
|
||||
$this->rst_data .= $this->get_separator_line();
|
||||
$this->rst_data .= " |";
|
||||
foreach ($this->columns as $column)
|
||||
{
|
||||
$this->rst_data .= $this->get_column($column, $this->column_headers[$column]);
|
||||
}
|
||||
|
||||
$this->rst_data .= "\n" . $this->get_separator_line('=');
|
||||
|
||||
foreach ($event_data as $event)
|
||||
{
|
||||
$event_data = [];
|
||||
$max_column_rows = 1;
|
||||
foreach ($event as $key => $value)
|
||||
{
|
||||
$column_rows = !is_array($value) ? substr_count($value, '<br>') + 1 : 1;
|
||||
$max_column_rows = max($max_column_rows, $column_rows);
|
||||
$event_data[$key] = $column_rows > 1 ? explode('<br>', $value) : [is_array($value) ? implode(', ', $value) : $value];
|
||||
}
|
||||
|
||||
for ($i = 0; $i < $max_column_rows; $i++)
|
||||
{
|
||||
$this->rst_data .= ' |';
|
||||
|
||||
foreach ($this->columns as $column)
|
||||
{
|
||||
$this->rst_data .= $this->get_column($column, $event_data[$column][$i] ?? '');
|
||||
}
|
||||
$this->rst_data .= "\n";
|
||||
}
|
||||
$this->rst_data .= $this->get_separator_line();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get rst output
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_rst_output(): string
|
||||
{
|
||||
return $this->rst_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set maximum lengths array
|
||||
*
|
||||
* @param array $event_data
|
||||
*/
|
||||
private function set_max_lengths(array $event_data): void
|
||||
{
|
||||
$this->max_lengths = [];
|
||||
|
||||
foreach ($this->columns as $column)
|
||||
{
|
||||
$this->max_lengths[$column] = strlen($this->column_headers[$column]);
|
||||
}
|
||||
|
||||
foreach ($event_data as $event)
|
||||
{
|
||||
foreach ($this->columns as $column)
|
||||
{
|
||||
$event_column = is_array($event[$column]) ? implode(', ', $event[$column]) : $event[$column];
|
||||
$this->max_lengths[$column] = max($this->max_lengths[$column], strlen($event_column));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get separator line
|
||||
*
|
||||
* @param string $separator_character
|
||||
* @return string
|
||||
*/
|
||||
private function get_separator_line(string $separator_character = '-'): string
|
||||
{
|
||||
$line = " +";
|
||||
|
||||
foreach ($this->columns as $column)
|
||||
{
|
||||
$line .= str_repeat($separator_character, $this->max_lengths[$column] + 2) . '+';
|
||||
}
|
||||
|
||||
return $line . "\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Get table data column
|
||||
*
|
||||
* @param string $type Column type
|
||||
* @param string $content Column content
|
||||
* @return string
|
||||
*/
|
||||
private function get_column(string $type, string $content): string
|
||||
{
|
||||
$content = rtrim($content);
|
||||
return ' ' . $content . str_repeat(' ' , $this->max_lengths[$type] - strlen($content) + 1) . '|';
|
||||
}
|
||||
}
|
@@ -47,7 +47,7 @@ abstract class post_base extends attachments_base
|
||||
*/
|
||||
public function adjust_item(&$item_row, &$row)
|
||||
{
|
||||
$item_row['link'] = $this->helper->append_sid('viewtopic.' . $this->phpEx, "t={$row['topic_id']}&p={$row['post_id']}#p{$row['post_id']}");
|
||||
$item_row['link'] = $this->helper->append_sid('viewtopic.' . $this->phpEx, "p={$row['post_id']}#p{$row['post_id']}");
|
||||
|
||||
if ($this->config['feed_item_statistics'])
|
||||
{
|
||||
|
@@ -47,7 +47,7 @@ abstract class topic_base extends attachments_base
|
||||
*/
|
||||
public function adjust_item(&$item_row, &$row)
|
||||
{
|
||||
$item_row['link'] = $this->helper->append_sid('viewtopic.' . $this->phpEx, 't=' . $row['topic_id'] . '&p=' . $row['post_id'] . '#p' . $row['post_id']);
|
||||
$item_row['link'] = $this->helper->append_sid('viewtopic.' . $this->phpEx, 'p=' . $row['post_id'] . '#p' . $row['post_id']);
|
||||
|
||||
if ($this->config['feed_item_statistics'])
|
||||
{
|
||||
|
@@ -42,7 +42,9 @@ class file_downloader
|
||||
$this->error_number = 0;
|
||||
$this->error_string = '';
|
||||
|
||||
if ($socket = @fsockopen(($port == 443 ? 'ssl://' : '') . $host, $port, $this->error_number, $this->error_string, $timeout))
|
||||
if (function_exists('fsockopen') &&
|
||||
$socket = @fsockopen(($port == 443 ? 'ssl://' : '') . $host, $port, $this->error_number, $this->error_string, $timeout)
|
||||
)
|
||||
{
|
||||
@fputs($socket, "GET $directory/$filename HTTP/1.0\r\n");
|
||||
@fputs($socket, "HOST: $host\r\n");
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user