mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-02 16:18:53 +00:00
Compare commits
30 commits
bdb6d69056
...
795110c2e2
Author | SHA1 | Date | |
---|---|---|---|
|
795110c2e2 | ||
|
9adb7eb9fe | ||
|
29a74db9ec | ||
|
5e12e8b6e9 | ||
|
478d119d42 | ||
|
1f6f0a3547 | ||
|
5281807e1f | ||
|
e2554d1fb0 | ||
|
b3478d83d1 | ||
|
ff6f3b2a8c | ||
|
1cd17caf87 | ||
|
6a0c949ed1 | ||
|
146f917d19 | ||
|
c01d1967dd | ||
|
7a4b3f52ae | ||
|
b3ff1d7e34 | ||
|
7268859226 | ||
|
61bede748a | ||
|
0562984999 | ||
|
83e1886e27 | ||
|
10947f3d49 | ||
|
3eaf4829bb | ||
|
3b233d9c28 | ||
|
3801eb0946 | ||
|
3a553f07bc | ||
|
b666bc9e0a | ||
|
81c49aa6a5 | ||
|
6fd9a78872 | ||
|
7f3b37560e | ||
|
18a63b6d7d |
24 changed files with 327 additions and 105 deletions
|
@ -0,0 +1,116 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* This file is part of the phpBB Forum Software package.
|
||||||
|
*
|
||||||
|
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||||
|
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||||
|
*
|
||||||
|
* For full copyright and license information, please see
|
||||||
|
* the docs/CREDITS.txt file.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace phpbb\Sniffs\CodeLayout;
|
||||||
|
|
||||||
|
use PHP_CodeSniffer\Files\File;
|
||||||
|
use PHP_CodeSniffer\Sniffs\Sniff;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks that union type declarations follows the coding guidelines.
|
||||||
|
*/
|
||||||
|
class UnionTypesCheckSniff implements Sniff
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function register()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
T_FUNCTION,
|
||||||
|
T_CLASS,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function process(File $phpcsFile, $stackPtr)
|
||||||
|
{
|
||||||
|
$tokens = $phpcsFile->getTokens();
|
||||||
|
if ($tokens[$stackPtr]['type'] === 'T_FUNCTION')
|
||||||
|
{
|
||||||
|
$method_params = $phpcsFile->getMethodParameters($stackPtr);
|
||||||
|
$method_params_array = array_column($method_params, 'type_hint', 'token');
|
||||||
|
foreach ($method_params_array as $stack_pointer => $type_hint)
|
||||||
|
{
|
||||||
|
$this->check_union_type($phpcsFile, $stack_pointer, $type_hint);
|
||||||
|
}
|
||||||
|
|
||||||
|
$method_properties = $phpcsFile->getMethodProperties($stackPtr);
|
||||||
|
$this->check_union_type($phpcsFile, $stackPtr, $method_properties['return_type']);
|
||||||
|
}
|
||||||
|
else if ($tokens[$stackPtr]['type'] === 'T_CLASS')
|
||||||
|
{
|
||||||
|
$class_token = $tokens[$stackPtr];
|
||||||
|
$class_closer_pointer = $class_token['scope_closer'];
|
||||||
|
$first_method_pointer = $phpcsFile->findNext(T_FUNCTION, $stackPtr);
|
||||||
|
$class_members_declarations_end_pointer = $first_method_pointer ?: $class_closer_pointer;
|
||||||
|
|
||||||
|
$stack_pointer = $stackPtr;
|
||||||
|
while(($class_member_pointer = $phpcsFile->findNext(T_VARIABLE, $stack_pointer)) !== false && ($class_member_pointer < $class_members_declarations_end_pointer))
|
||||||
|
{
|
||||||
|
$properties = $phpcsFile->getMemberProperties($class_member_pointer);
|
||||||
|
$this->check_union_type($phpcsFile, $class_member_pointer, $properties['type']);
|
||||||
|
$stack_pointer = $class_member_pointer + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function check_union_type(File $phpcsFile, $stack_pointer, $type_hint)
|
||||||
|
{
|
||||||
|
if (empty($type_hint))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!strpos($type_hint, '|') && $type_hint[0] == '?') // Check nullable shortcut syntax
|
||||||
|
{
|
||||||
|
$type = substr($type_hint, 1);
|
||||||
|
$error = 'Nullable shortcut syntax must not be used. Use union type instead: %1$s|null; found %2$s';
|
||||||
|
$data = [$type, $type_hint];
|
||||||
|
$phpcsFile->addError($error, $stack_pointer, 'ShortNullableSyntax', $data);
|
||||||
|
}
|
||||||
|
else if ((count($types_array = explode('|', $type_hint))) > 1) // Check union type layout
|
||||||
|
{
|
||||||
|
$types_array_null_less = $types_array;
|
||||||
|
|
||||||
|
// Check 'null' to be the last element
|
||||||
|
$null_position = array_search('null', $types_array);
|
||||||
|
if ($null_position !== false && $null_position != array_key_last($types_array))
|
||||||
|
{
|
||||||
|
$error = 'The "null" type hint must be the last of the union type elements; found %s';
|
||||||
|
$data = [implode('|', $types_array)];
|
||||||
|
$phpcsFile->addError($error, $stack_pointer, 'NullAlwaysLast', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check types excepting 'null' to follow alphabetical order
|
||||||
|
if ($null_position !== false)
|
||||||
|
{
|
||||||
|
array_splice($types_array_null_less, $null_position, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($types_array_null_less) > 1)
|
||||||
|
{
|
||||||
|
$types_array_null_less_sorted = $types_array_null_less;
|
||||||
|
sort($types_array_null_less_sorted);
|
||||||
|
if (!empty(array_diff_assoc($types_array_null_less, $types_array_null_less_sorted)))
|
||||||
|
{
|
||||||
|
$error = 'Union type elements must be sorted alphabetically excepting the "null" type hint must be the last if any; found %s';
|
||||||
|
$data = [implode('|', $types_array)];
|
||||||
|
$phpcsFile->addError($error, $stack_pointer, 'AlphabeticalSort', $data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -11,6 +11,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace phpbb\Sniffs\Commenting;
|
||||||
|
|
||||||
use PHP_CodeSniffer\Files\File;
|
use PHP_CodeSniffer\Files\File;
|
||||||
use PHP_CodeSniffer\Sniffs\Sniff;
|
use PHP_CodeSniffer\Sniffs\Sniff;
|
||||||
|
|
||||||
|
@ -21,7 +23,7 @@ use PHP_CodeSniffer\Sniffs\Sniff;
|
||||||
* @package code_sniffer
|
* @package code_sniffer
|
||||||
* @author Manuel Pichler <mapi@phpundercontrol.org>
|
* @author Manuel Pichler <mapi@phpundercontrol.org>
|
||||||
*/
|
*/
|
||||||
class phpbb_Sniffs_Commenting_FileCommentSniff implements Sniff
|
class FileCommentSniff implements Sniff
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Returns an array of tokens this test wants to listen for.
|
* Returns an array of tokens this test wants to listen for.
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace phpbb\Sniffs\ControlStructures;
|
||||||
|
|
||||||
use PHP_CodeSniffer\Files\File;
|
use PHP_CodeSniffer\Files\File;
|
||||||
use PHP_CodeSniffer\Sniffs\Sniff;
|
use PHP_CodeSniffer\Sniffs\Sniff;
|
||||||
|
|
||||||
|
@ -18,7 +20,7 @@ use PHP_CodeSniffer\Sniffs\Sniff;
|
||||||
* Checks that the opening brace of a control structures is on the line after.
|
* Checks that the opening brace of a control structures is on the line after.
|
||||||
* From Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff
|
* From Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff
|
||||||
*/
|
*/
|
||||||
class phpbb_Sniffs_ControlStructures_OpeningBraceBsdAllmanSniff implements Sniff
|
class OpeningBraceBsdAllmanSniff implements Sniff
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Registers the tokens that this sniff wants to listen for.
|
* Registers the tokens that this sniff wants to listen for.
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
* the docs/CREDITS.txt file.
|
* the docs/CREDITS.txt file.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
namespace phpbb\Sniffs\ControlStructures;
|
||||||
|
|
||||||
use PHP_CodeSniffer\Files\File;
|
use PHP_CodeSniffer\Files\File;
|
||||||
use PHP_CodeSniffer\Sniffs\Sniff;
|
use PHP_CodeSniffer\Sniffs\Sniff;
|
||||||
|
@ -18,7 +19,7 @@ use PHP_CodeSniffer\Sniffs\Sniff;
|
||||||
* Checks that there is exactly one space between the keyword and the opening
|
* Checks that there is exactly one space between the keyword and the opening
|
||||||
* parenthesis of a control structures.
|
* parenthesis of a control structures.
|
||||||
*/
|
*/
|
||||||
class phpbb_Sniffs_ControlStructures_OpeningParenthesisSniff implements Sniff
|
class OpeningParenthesisSniff implements Sniff
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Registers the tokens that this sniff wants to listen for.
|
* Registers the tokens that this sniff wants to listen for.
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace phpbb\Sniffs\ControlStructures;
|
||||||
|
|
||||||
use PHP_CodeSniffer\Files\File;
|
use PHP_CodeSniffer\Files\File;
|
||||||
use PHP_CodeSniffer\Sniffs\Sniff;
|
use PHP_CodeSniffer\Sniffs\Sniff;
|
||||||
|
|
||||||
|
@ -18,7 +20,7 @@ use PHP_CodeSniffer\Sniffs\Sniff;
|
||||||
* Checks that the visibility qualifiers are placed after the static keyword
|
* Checks that the visibility qualifiers are placed after the static keyword
|
||||||
* according to the coding guidelines
|
* according to the coding guidelines
|
||||||
*/
|
*/
|
||||||
class phpbb_Sniffs_ControlStructures_StaticKeywordSniff implements Sniff
|
class StaticKeywordSniff implements Sniff
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Registers the tokens that this sniff wants to listen for.
|
* Registers the tokens that this sniff wants to listen for.
|
||||||
|
|
|
@ -11,13 +11,15 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace phpbb\Sniffs\Namespaces;
|
||||||
|
|
||||||
use PHP_CodeSniffer\Files\File;
|
use PHP_CodeSniffer\Files\File;
|
||||||
use PHP_CodeSniffer\Sniffs\Sniff;
|
use PHP_CodeSniffer\Sniffs\Sniff;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks that each use statement is used.
|
* Checks that each use statement is used.
|
||||||
*/
|
*/
|
||||||
class phpbb_Sniffs_Namespaces_UnusedUseSniff implements Sniff
|
class UnusedUseSniff implements Sniff
|
||||||
{
|
{
|
||||||
const FIND = [
|
const FIND = [
|
||||||
T_NS_SEPARATOR,
|
T_NS_SEPARATOR,
|
||||||
|
|
|
@ -17,9 +17,6 @@
|
||||||
<!-- There MUST not be more than one statement per line. -->
|
<!-- There MUST not be more than one statement per line. -->
|
||||||
<rule ref="Generic.Formatting.DisallowMultipleStatements" />
|
<rule ref="Generic.Formatting.DisallowMultipleStatements" />
|
||||||
|
|
||||||
<!-- Call-time pass-by-reference MUST not be used. -->
|
|
||||||
<rule ref="Generic.Functions.CallTimePassByReference.NotAllowed" />
|
|
||||||
|
|
||||||
<!-- Filenames MUST be lowercase. -->
|
<!-- Filenames MUST be lowercase. -->
|
||||||
<rule ref="Generic.Files.LowercasedFilename" />
|
<rule ref="Generic.Files.LowercasedFilename" />
|
||||||
|
|
||||||
|
|
|
@ -45,4 +45,8 @@
|
||||||
<!-- There MUST NOT be unused use statements. -->
|
<!-- There MUST NOT be unused use statements. -->
|
||||||
<rule ref="./phpbb/Sniffs/Namespaces/UnusedUseSniff.php" />
|
<rule ref="./phpbb/Sniffs/Namespaces/UnusedUseSniff.php" />
|
||||||
|
|
||||||
|
<!-- The null type SHALL be the last union type element, other types SHALL follow alphabetical order.
|
||||||
|
No nullable type shortcut syntax should be used. -->
|
||||||
|
<rule ref="./phpbb/Sniffs/CodeLayout/UnionTypesCheckSniff.php" />
|
||||||
|
|
||||||
</ruleset>
|
</ruleset>
|
||||||
|
|
10
phpBB/composer.lock
generated
10
phpBB/composer.lock
generated
|
@ -9459,16 +9459,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "squizlabs/php_codesniffer",
|
"name": "squizlabs/php_codesniffer",
|
||||||
"version": "3.12.2",
|
"version": "3.13.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
|
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
|
||||||
"reference": "6d4cf6032d4b718f168c90a96e36c7d0eaacb2aa"
|
"reference": "65ff2489553b83b4597e89c3b8b721487011d186"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/6d4cf6032d4b718f168c90a96e36c7d0eaacb2aa",
|
"url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/65ff2489553b83b4597e89c3b8b721487011d186",
|
||||||
"reference": "6d4cf6032d4b718f168c90a96e36c7d0eaacb2aa",
|
"reference": "65ff2489553b83b4597e89c3b8b721487011d186",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -9539,7 +9539,7 @@
|
||||||
"type": "thanks_dev"
|
"type": "thanks_dev"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2025-04-13T04:10:18+00:00"
|
"time": "2025-05-11T03:36:00+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/browser-kit",
|
"name": "symfony/browser-kit",
|
||||||
|
|
|
@ -1746,29 +1746,33 @@ overall_header_body_before
|
||||||
overall_header_breadcrumb_append
|
overall_header_breadcrumb_append
|
||||||
===
|
===
|
||||||
* Locations:
|
* Locations:
|
||||||
+ styles/prosilver/template/navbar_header.html
|
+ styles/prosilver/template/breadcrumbs.html
|
||||||
* Since: 3.1.0-a1
|
* Since: 3.1.0-a1
|
||||||
|
* Changed: 4.0.0-a1 Moved to breadcrumbs.html
|
||||||
* Purpose: Add links to the list of breadcrumbs in the header
|
* Purpose: Add links to the list of breadcrumbs in the header
|
||||||
|
|
||||||
overall_header_breadcrumb_prepend
|
overall_header_breadcrumb_prepend
|
||||||
===
|
===
|
||||||
* Locations:
|
* Locations:
|
||||||
+ styles/prosilver/template/navbar_header.html
|
+ styles/prosilver/template/breadcrumbs.html
|
||||||
* Since: 3.1.0-RC3
|
* Since: 3.1.0-RC3
|
||||||
|
* Changed: 4.0.0-a1 Moved to breadcrumbs.html
|
||||||
* Purpose: Add links to the list of breadcrumbs in the header (after site-home, but before board-index)
|
* Purpose: Add links to the list of breadcrumbs in the header (after site-home, but before board-index)
|
||||||
|
|
||||||
overall_header_breadcrumbs_after
|
overall_header_breadcrumbs_after
|
||||||
===
|
===
|
||||||
* Locations:
|
* Locations:
|
||||||
+ styles/prosilver/template/navbar_header.html
|
+ styles/prosilver/template/breadcrumbs.html
|
||||||
* Since: 3.1.0-RC3
|
* Since: 3.1.0-RC3
|
||||||
|
* Changed: 4.0.0-a1 Moved to breadcrumbs.html
|
||||||
* Purpose: Add content after the breadcrumbs (outside of the breadcrumbs container)
|
* Purpose: Add content after the breadcrumbs (outside of the breadcrumbs container)
|
||||||
|
|
||||||
overall_header_breadcrumbs_before
|
overall_header_breadcrumbs_before
|
||||||
===
|
===
|
||||||
* Locations:
|
* Locations:
|
||||||
+ styles/prosilver/template/navbar_header.html
|
+ styles/prosilver/template/breadcrumbs.html
|
||||||
* Since: 3.1.0-RC3
|
* Since: 3.1.0-RC3
|
||||||
|
* Changed: 4.0.0-a1 Moved to breadcrumbs.html
|
||||||
* Purpose: Add content before the breadcrumbs (outside of the breadcrumbs container)
|
* Purpose: Add content before the breadcrumbs (outside of the breadcrumbs container)
|
||||||
|
|
||||||
overall_header_content_before
|
overall_header_content_before
|
||||||
|
@ -1830,15 +1834,17 @@ overall_header_navigation_prepend
|
||||||
overall_header_navlink_append
|
overall_header_navlink_append
|
||||||
===
|
===
|
||||||
* Locations:
|
* Locations:
|
||||||
+ styles/prosilver/template/navbar_header.html
|
+ styles/prosilver/template/breadcrumbs.html
|
||||||
* Since: 3.1.0-b3
|
* Since: 3.1.0-b3
|
||||||
|
* Changed: 4.0.0-a1 Moved to breadcrumbs.html
|
||||||
* Purpose: Add content after each individual navlink (breadcrumb)
|
* Purpose: Add content after each individual navlink (breadcrumb)
|
||||||
|
|
||||||
overall_header_navlink_prepend
|
overall_header_navlink_prepend
|
||||||
===
|
===
|
||||||
* Locations:
|
* Locations:
|
||||||
+ styles/prosilver/template/navbar_header.html
|
+ styles/prosilver/template/breadcrumbs.html
|
||||||
* Since: 3.1.0-b3
|
* Since: 3.1.0-b3
|
||||||
|
* Changed: 4.0.0-a1 Moved to breadcrumbs.html
|
||||||
* Purpose: Add content before each individual navlink (breadcrumb)
|
* Purpose: Add content before each individual navlink (breadcrumb)
|
||||||
|
|
||||||
overall_header_page_body_before
|
overall_header_page_body_before
|
||||||
|
|
|
@ -475,6 +475,41 @@ class acp_profile
|
||||||
$cp->vars[$key] = $var;
|
$cp->vars[$key] = $var;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// step 3 - all arrays
|
||||||
|
if ($action == 'edit')
|
||||||
|
{
|
||||||
|
// Get language entries
|
||||||
|
$sql = 'SELECT *
|
||||||
|
FROM ' . PROFILE_FIELDS_LANG_TABLE . '
|
||||||
|
WHERE lang_id <> ' . $this->edit_lang_id . "
|
||||||
|
AND field_id = $field_id
|
||||||
|
ORDER BY option_id ASC";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
$l_lang_options = [];
|
||||||
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$l_lang_options[$row['lang_id']][$row['option_id']] = $row['lang_value'];
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
$sql = 'SELECT lang_id, lang_name, lang_explain, lang_default_value
|
||||||
|
FROM ' . PROFILE_LANG_TABLE . '
|
||||||
|
WHERE lang_id <> ' . $this->edit_lang_id . "
|
||||||
|
AND field_id = $field_id
|
||||||
|
ORDER BY lang_id ASC";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
$l_lang_name = $l_lang_explain = $l_lang_default_value = [];
|
||||||
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$l_lang_name[$row['lang_id']] = $row['lang_name'];
|
||||||
|
$l_lang_explain[$row['lang_id']] = $row['lang_explain'];
|
||||||
|
$l_lang_default_value[$row['lang_id']] = $row['lang_default_value'];
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($exclude[3] as $key)
|
foreach ($exclude[3] as $key)
|
||||||
{
|
{
|
||||||
$cp->vars[$key] = $request->variable($key, array(0 => ''), true);
|
$cp->vars[$key] = $request->variable($key, array(0 => ''), true);
|
||||||
|
|
|
@ -336,7 +336,10 @@ class mysqli extends \phpbb\db\driver\mysql_base
|
||||||
*/
|
*/
|
||||||
function sql_escape($msg)
|
function sql_escape($msg)
|
||||||
{
|
{
|
||||||
return @mysqli_real_escape_string($this->db_connect_id, $msg);
|
return @mysqli_real_escape_string(
|
||||||
|
$this->db_connect_id,
|
||||||
|
utf8_encode_ucr($msg)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -70,12 +70,12 @@ class request implements request_interface
|
||||||
|
|
||||||
foreach ($this->super_globals as $const => $super_global)
|
foreach ($this->super_globals as $const => $super_global)
|
||||||
{
|
{
|
||||||
$this->input[$const] = isset($GLOBALS[$super_global]) ? $GLOBALS[$super_global] : array();
|
$this->input[$const] = isset($GLOBALS[$super_global]) ? (array) $GLOBALS[$super_global] : array();
|
||||||
}
|
}
|
||||||
|
|
||||||
// simulate request_order = GP
|
// simulate request_order = GP
|
||||||
$this->original_request = $this->input[request_interface::REQUEST];
|
$this->original_request = (array) $this->input[request_interface::REQUEST];
|
||||||
$this->input[request_interface::REQUEST] = $this->input[request_interface::POST] + $this->input[request_interface::GET];
|
$this->input[request_interface::REQUEST] = (array) $this->input[request_interface::POST] + (array) $this->input[request_interface::GET];
|
||||||
|
|
||||||
if ($disable_super_globals)
|
if ($disable_super_globals)
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,7 +33,7 @@ class loader_resolver implements LoaderResolverInterface
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function resolve($resource, $type = null): false|\Symfony\Component\Config\Loader\LoaderInterface
|
public function resolve($resource, $type = null): \Symfony\Component\Config\Loader\LoaderInterface|false
|
||||||
{
|
{
|
||||||
/** @var \Symfony\Component\Config\Loader\LoaderInterface $loader */
|
/** @var \Symfony\Component\Config\Loader\LoaderInterface $loader */
|
||||||
foreach ($this->loaders as $loader)
|
foreach ($this->loaders as $loader)
|
||||||
|
|
53
phpBB/styles/prosilver/template/breadcrumbs.html
Normal file
53
phpBB/styles/prosilver/template/breadcrumbs.html
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
<ul id="nav-breadcrumbs" class="nav-breadcrumbs linklist navlinks" role="menubar">
|
||||||
|
{% set MICRODATA = 'itemtype="https://schema.org/ListItem" itemprop="itemListElement" itemscope' %}
|
||||||
|
{% set navlink_position = 1 %}
|
||||||
|
|
||||||
|
{% EVENT overall_header_breadcrumbs_before %}
|
||||||
|
|
||||||
|
<li class="breadcrumbs" itemscope itemtype="https://schema.org/BreadcrumbList">
|
||||||
|
{% if U_SITE_HOME %}
|
||||||
|
<span class="crumb" {{ MICRODATA }}>
|
||||||
|
{% apply spaceless %}
|
||||||
|
<a itemprop="item" href="{{ U_SITE_HOME }}" data-navbar-reference="home">
|
||||||
|
{{ Icon('font', 'home', '', true, 'fas o-icon-baseline') }}
|
||||||
|
<span itemprop="name">{{ L_SITE_HOME }}</span>
|
||||||
|
</a>
|
||||||
|
{% endapply %}
|
||||||
|
<meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}">
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% EVENT overall_header_breadcrumb_prepend %}
|
||||||
|
|
||||||
|
<span class="crumb" {{ MICRODATA }}>
|
||||||
|
{% apply spaceless %}
|
||||||
|
<a itemprop="item" href="{{ U_INDEX }}" accesskey="h" data-navbar-reference="index">
|
||||||
|
{% if not U_SITE_HOME %}{{ Icon('font', 'home', '', true, 'fas o-icon-baseline') }}{% endif %}
|
||||||
|
<span itemprop="name">{{ L_INDEX }}</span>
|
||||||
|
</a>
|
||||||
|
{% endapply %}
|
||||||
|
<meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}">
|
||||||
|
</span>
|
||||||
|
|
||||||
|
{% for navlink in navlinks %}
|
||||||
|
{% set NAVLINK_NAME = navlink.BREADCRUMB_NAME | default(navlink.FORUM_NAME) %}
|
||||||
|
{% set NAVLINK_LINK = navlink.U_BREADCRUMB | default(navlink.U_VIEW_FORUM) %}
|
||||||
|
|
||||||
|
{% EVENT overall_header_navlink_prepend %}
|
||||||
|
<span class="crumb" {{ MICRODATA }}{% if navlink.MICRODATA %} {{ navlink.MICRODATA }}{% endif %}>
|
||||||
|
{% apply spaceless %}
|
||||||
|
<a itemprop="item" href="{{ NAVLINK_LINK }}">
|
||||||
|
<span itemprop="name">{{ NAVLINK_NAME }}</span>
|
||||||
|
</a>
|
||||||
|
{% endapply %}
|
||||||
|
<meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}">
|
||||||
|
</span>
|
||||||
|
{% EVENT overall_header_navlink_append %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% EVENT overall_header_breadcrumb_append %}
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{% EVENT overall_header_breadcrumbs_after %}
|
||||||
|
</ul>
|
|
@ -44,7 +44,7 @@
|
||||||
<!-- END faq_block -->
|
<!-- END faq_block -->
|
||||||
|
|
||||||
<div class="to-top-button">
|
<div class="to-top-button">
|
||||||
<a href="#faqlinks">
|
<a href="#faqlinks" title="{{ lang('BACK_TO_TOP') }}">
|
||||||
{{ Icon('font', 'chevron-up', '', false) }}
|
{{ Icon('font', 'chevron-up', '', false) }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -203,68 +203,5 @@
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul id="nav-breadcrumbs" class="nav-breadcrumbs linklist navlinks" role="menubar">
|
|
||||||
{% set MICRODATA = 'itemtype="https://schema.org/ListItem" itemprop="itemListElement" itemscope' %}
|
|
||||||
{% set navlink_position = 1 %}
|
|
||||||
|
|
||||||
{% EVENT overall_header_breadcrumbs_before %}
|
|
||||||
|
|
||||||
<li class="breadcrumbs" itemscope itemtype="https://schema.org/BreadcrumbList">
|
|
||||||
{% if U_SITE_HOME %}
|
|
||||||
<span class="crumb" {{ MICRODATA }}>
|
|
||||||
{% apply spaceless %}
|
|
||||||
<a itemprop="item" href="{{ U_SITE_HOME }}" data-navbar-reference="home">
|
|
||||||
{{ Icon('font', 'home', '', true, 'fas o-icon-baseline') }}
|
|
||||||
<span itemprop="name">{{ L_SITE_HOME }}</span>
|
|
||||||
</a>
|
|
||||||
{% endapply %}
|
|
||||||
<meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}">
|
|
||||||
</span>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% EVENT overall_header_breadcrumb_prepend %}
|
|
||||||
|
|
||||||
<span class="crumb" {{ MICRODATA }}>
|
|
||||||
{% apply spaceless %}
|
|
||||||
<a itemprop="item" href="{{ U_INDEX }}" accesskey="h" data-navbar-reference="index">
|
|
||||||
{% if not U_SITE_HOME %}{{ Icon('font', 'home', '', true, 'fas o-icon-baseline') }}{% endif %}
|
|
||||||
<span itemprop="name">{{ L_INDEX }}</span>
|
|
||||||
</a>
|
|
||||||
{% endapply %}
|
|
||||||
<meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}">
|
|
||||||
</span>
|
|
||||||
|
|
||||||
{% for navlink in navlinks %}
|
|
||||||
{% set NAVLINK_NAME = navlink.BREADCRUMB_NAME | default(navlink.FORUM_NAME) %}
|
|
||||||
{% set NAVLINK_LINK = navlink.U_BREADCRUMB | default(navlink.U_VIEW_FORUM) %}
|
|
||||||
|
|
||||||
{% EVENT overall_header_navlink_prepend %}
|
|
||||||
<span class="crumb" {{ MICRODATA }}{% if navlink.MICRODATA %} {{ navlink.MICRODATA }}{% endif %}>
|
|
||||||
{% apply spaceless %}
|
|
||||||
<a itemprop="item" href="{{ NAVLINK_LINK }}">
|
|
||||||
<span itemprop="name">{{ NAVLINK_NAME }}</span>
|
|
||||||
</a>
|
|
||||||
{% endapply %}
|
|
||||||
<meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}">
|
|
||||||
</span>
|
|
||||||
{% EVENT overall_header_navlink_append %}
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
{% EVENT overall_header_breadcrumb_append %}
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
{% EVENT overall_header_breadcrumbs_after %}
|
|
||||||
|
|
||||||
{% if S_DISPLAY_SEARCH and not S_IN_SEARCH %}
|
|
||||||
<li class="rightside responsive-search">
|
|
||||||
<a href="{{ U_SEARCH }}" title="{{ lang('SEARCH_ADV_EXPLAIN') }}" role="menuitem">
|
|
||||||
{{ Icon('font', 'search', lang('SEARCH'), true) }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
<!-- EVENT overall_header_stylesheets_after -->
|
<!-- EVENT overall_header_stylesheets_after -->
|
||||||
|
|
||||||
{% if NOTIFICATIONS_WEBPUSH_ENABLE %}
|
{% if NOTIFICATIONS_WEBPUSH_ENABLE %}
|
||||||
{% include('ucp_notifications_webpush.html') %}
|
{% include 'ucp_notifications_webpush.html' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
@ -79,7 +79,11 @@
|
||||||
<div id="wrap" class="wrap">
|
<div id="wrap" class="wrap">
|
||||||
<a id="top" class="top-anchor" accesskey="t"></a>
|
<a id="top" class="top-anchor" accesskey="t"></a>
|
||||||
<div id="page-header">
|
<div id="page-header">
|
||||||
|
<!-- EVENT overall_header_navbar_before -->
|
||||||
|
|
||||||
<div class="headerbar" role="banner">
|
<div class="headerbar" role="banner">
|
||||||
|
|
||||||
|
{% include 'navbar_header.html' %}
|
||||||
<!-- EVENT overall_header_headerbar_before -->
|
<!-- EVENT overall_header_headerbar_before -->
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
|
|
||||||
|
@ -117,10 +121,10 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- EVENT overall_header_headerbar_after -->
|
<!-- EVENT overall_header_headerbar_after -->
|
||||||
</div>
|
</div>
|
||||||
<!-- EVENT overall_header_navbar_before -->
|
|
||||||
<!-- INCLUDE navbar_header.html -->
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% include 'breadcrumbs.html' %}
|
||||||
|
|
||||||
<!-- EVENT overall_header_page_body_before -->
|
<!-- EVENT overall_header_page_body_before -->
|
||||||
|
|
||||||
<a id="start_here" class="anchor"></a>
|
<a id="start_here" class="anchor"></a>
|
||||||
|
|
|
@ -423,9 +423,6 @@
|
||||||
<!-- EVENT viewtopic_body_postrow_back2top_before -->
|
<!-- EVENT viewtopic_body_postrow_back2top_before -->
|
||||||
<div class="back2top">
|
<div class="back2top">
|
||||||
<!-- EVENT viewtopic_body_postrow_back2top_prepend -->
|
<!-- EVENT viewtopic_body_postrow_back2top_prepend -->
|
||||||
<a href="#top" class="top" title="{L_BACK_TO_TOP}">
|
|
||||||
{{ Icon('font', 'circle-chevron-up', lang('BACK_TO_TOP'), false, 'fas c-top-icon') }}
|
|
||||||
</a>
|
|
||||||
<!-- EVENT viewtopic_body_postrow_back2top_append -->
|
<!-- EVENT viewtopic_body_postrow_back2top_append -->
|
||||||
</div>
|
</div>
|
||||||
<!-- EVENT viewtopic_body_postrow_back2top_after -->
|
<!-- EVENT viewtopic_body_postrow_back2top_after -->
|
||||||
|
@ -496,6 +493,12 @@
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="to-top-button">
|
||||||
|
<a href="#top" title="{{ lang('BACK_TO_TOP') }}">
|
||||||
|
{{ Icon('font', 'chevron-up', '', false) }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- EVENT viewtopic_body_footer_before -->
|
<!-- EVENT viewtopic_body_footer_before -->
|
||||||
<!-- INCLUDE jumpbox.html -->
|
<!-- INCLUDE jumpbox.html -->
|
||||||
|
|
||||||
|
|
|
@ -99,18 +99,19 @@ th a:hover {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* round cornered boxes and backgrounds */
|
/* round cornered boxes and backgrounds */
|
||||||
.headerbar {
|
.headerbar,
|
||||||
color: #ffffff;
|
.headerbar h1 {
|
||||||
|
color: #eaf8ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.headerbar,
|
.headerbar,
|
||||||
.forumbg {
|
.forumbg {
|
||||||
background-color: #13a4ec;
|
background-color: #4688ce;
|
||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
}
|
}
|
||||||
|
|
||||||
.forabg {
|
.forabg {
|
||||||
background-color: #13a4ec;
|
background-color: #4688ce;
|
||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,6 +119,18 @@ th a:hover {
|
||||||
background-color: #c9dee8;
|
background-color: #c9dee8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.headerbar .navbar a {
|
||||||
|
color: #eaf8ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.headerbar .navbar .dropdown a {
|
||||||
|
color: #0f4d8a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-profile {
|
||||||
|
text-shadow: 0 0 1.75rem #eaf8ff;
|
||||||
|
}
|
||||||
|
|
||||||
.panel {
|
.panel {
|
||||||
background-color: #f0f3f5;
|
background-color: #f0f3f5;
|
||||||
color: #29303d;
|
color: #29303d;
|
||||||
|
@ -814,6 +827,10 @@ dd.profile-warnings {
|
||||||
/* icon images */
|
/* icon images */
|
||||||
.site_logo { background-image: url("./images/site_logo.svg"); }
|
.site_logo { background-image: url("./images/site_logo.svg"); }
|
||||||
|
|
||||||
|
.c-hero-logo-img g {
|
||||||
|
fill: #eaf8ff;
|
||||||
|
}
|
||||||
|
|
||||||
/* colours and backgrounds for cp.css */
|
/* colours and backgrounds for cp.css */
|
||||||
|
|
||||||
/* main cp box */
|
/* main cp box */
|
||||||
|
@ -1109,6 +1126,7 @@ input.disabled {
|
||||||
|
|
||||||
.dropdown-extended .dropdown-extended-item {
|
.dropdown-extended .dropdown-extended-item {
|
||||||
border-top-color: #bdbdbd;
|
border-top-color: #bdbdbd;
|
||||||
|
color: #47536b;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-extended .dropdown-extended-item:hover {
|
.dropdown-extended .dropdown-extended-item:hover {
|
||||||
|
|
|
@ -17,7 +17,7 @@ body {
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 12px 0;
|
padding: 0 0 12px;
|
||||||
-webkit-print-color-adjust: exact;
|
-webkit-print-color-adjust: exact;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,12 +151,13 @@ a:hover {
|
||||||
/* Main blocks
|
/* Main blocks
|
||||||
---------------------------------------- */
|
---------------------------------------- */
|
||||||
.wrap {
|
.wrap {
|
||||||
border: 1px solid transparent;
|
border: solid transparent;
|
||||||
border-radius: 8px;
|
border-width: 0 1px 1px;
|
||||||
|
border-radius: 0 0 8px 8px;
|
||||||
min-width: 625px;
|
min-width: 625px;
|
||||||
max-width: 1152px;
|
max-width: 1152px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 15px;
|
padding: 0 15px 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-body {
|
.page-body {
|
||||||
|
@ -200,7 +201,7 @@ a:hover {
|
||||||
/* Round cornered boxes and backgrounds
|
/* Round cornered boxes and backgrounds
|
||||||
---------------------------------------- */
|
---------------------------------------- */
|
||||||
.headerbar {
|
.headerbar {
|
||||||
border-radius: 7px;
|
border-radius: 0 0 7px 7px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
|
@ -212,6 +213,11 @@ a:hover {
|
||||||
padding: 3px 10px;
|
padding: 3px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.headerbar .navbar {
|
||||||
|
background: none;
|
||||||
|
padding: calc(var(--ps-line-height) * 0.25) 5px calc(var(--ps-line-height) * 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
.forabg {
|
.forabg {
|
||||||
border-radius: 7px;
|
border-radius: 7px;
|
||||||
clear: both;
|
clear: both;
|
||||||
|
@ -340,6 +346,10 @@ ul.linklist .dropdown-up .dropdown {
|
||||||
bottom: 18px;
|
bottom: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul.nav-breadcrumbs {
|
||||||
|
margin: calc(var(--ps-line-height) * 0.75) 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Bulletin icons for list items
|
/* Bulletin icons for list items
|
||||||
---------------------------------------- */
|
---------------------------------------- */
|
||||||
ul.linklist.bulletin > li:before {
|
ul.linklist.bulletin > li:before {
|
||||||
|
|
|
@ -465,7 +465,7 @@ p.author {
|
||||||
clear: left;
|
clear: left;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: calc(var(--ps-font-small) * 1.4);
|
margin: calc(var(--ps-font-small) * 1.4) 0;
|
||||||
padding-top: 2px;
|
padding-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -328,7 +328,6 @@
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
max-width: 100px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Pagination
|
/* Pagination
|
||||||
|
|
|
@ -69,4 +69,32 @@ class phpbb_functional_acp_profile_field_test extends phpbb_functional_test_case
|
||||||
|
|
||||||
$this->assertContainsLang('ADDED_PROFILE_FIELD', $crawler->text());
|
$this->assertContainsLang('ADDED_PROFILE_FIELD', $crawler->text());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function test_edit_profile_fields()
|
||||||
|
{
|
||||||
|
// Custom profile fields page
|
||||||
|
$crawler = self::request('GET', 'adm/index.php?i=acp_profile&mode=profile&sid=' . $this->sid);
|
||||||
|
|
||||||
|
// Get all profile fields edit URLs
|
||||||
|
$edits = $crawler->filter('td.actions a')
|
||||||
|
->reduce(
|
||||||
|
function ($node, $i) {
|
||||||
|
$url = $node->attr('href');
|
||||||
|
return ((bool) strpos($url, 'action=edit'));
|
||||||
|
})
|
||||||
|
->each(
|
||||||
|
function ($node, $i) {
|
||||||
|
$url = $node->attr('href');
|
||||||
|
return ($url);
|
||||||
|
});
|
||||||
|
|
||||||
|
foreach ($edits as $edit_url)
|
||||||
|
{
|
||||||
|
$crawler = self::request('GET', 'adm/' . $edit_url . '&sid=' . $this->sid);
|
||||||
|
$form = $crawler->selectButton('Save')->form();
|
||||||
|
$crawler= self::submit($form);
|
||||||
|
|
||||||
|
$this->assertContainsLang('CHANGED_PROFILE_FIELD', $crawler->text());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue