mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 19:38:53 +00:00
Compare commits
18 commits
22a9d25d21
...
f29a89d285
Author | SHA1 | Date | |
---|---|---|---|
|
f29a89d285 | ||
|
4f10e6e212 | ||
|
3b03f3a8f9 | ||
|
e47ba9e81d | ||
|
8d016bafa2 | ||
|
6d6f4fdeba | ||
|
35221f8ba5 | ||
|
03031e846d | ||
|
9219c03b36 | ||
|
72c3745868 | ||
|
579b4a8287 | ||
|
b8c49f9711 | ||
|
2f43c1facd | ||
|
9c49a2b86b | ||
|
b6c42b3768 | ||
|
da2733a7d8 | ||
|
b8204d24f9 | ||
|
50cf4892ea |
6 changed files with 28 additions and 8 deletions
|
@ -1681,6 +1681,18 @@ switch ($mode)
|
|||
$memberrow = array_merge($memberrow, $cp_row['row']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify the memberrow data before template variables are assigned.
|
||||
*
|
||||
* @event core.memberlist_modify_memberrow
|
||||
* @var int user_id The current user ID.
|
||||
* @var array row Array of raw user data.
|
||||
* @var array memberrow Array of member template variables.
|
||||
* @since 3.3.16-RC1
|
||||
*/
|
||||
$vars = ['user_id', 'row', 'memberrow'];
|
||||
extract($phpbb_dispatcher->trigger_event('core.memberlist_modify_memberrow', compact($vars)));
|
||||
|
||||
$template->assign_block_vars('memberrow', $memberrow);
|
||||
|
||||
if (isset($cp_row['blockrow']) && count($cp_row['blockrow']))
|
||||
|
|
|
@ -441,12 +441,15 @@ class content_visibility
|
|||
{
|
||||
$post_ids[] = (int) $row['post_id'];
|
||||
|
||||
if ($row['post_visibility'] != $visibility)
|
||||
if ($row['post_visibility'] != $visibility )
|
||||
{
|
||||
if ($row['post_postcount'] && !isset($poster_postcounts[(int) $row['poster_id']]))
|
||||
{
|
||||
$poster_postcounts[(int) $row['poster_id']] = 1;
|
||||
if($row['post_visibility'] != 0 || $visibility != ITEM_DELETED ){
|
||||
$poster_postcounts[(int) $row['poster_id']] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
else if ($row['post_postcount'])
|
||||
{
|
||||
$poster_postcounts[(int) $row['poster_id']]++;
|
||||
|
|
|
@ -129,10 +129,12 @@ class language_file_helper
|
|||
/**
|
||||
* Sorts the languages by their name instead of iso code
|
||||
*
|
||||
* @return array
|
||||
* @param mixed $a First language data
|
||||
* @param mixed $b Second language data
|
||||
* @return int
|
||||
*/
|
||||
private static function sort_by_local_name($a, $b)
|
||||
private static function sort_by_local_name(mixed $a, mixed $b): int
|
||||
{
|
||||
return $a['local_name'] > $b['local_name'];
|
||||
return $a['local_name'] <=> $b['local_name'];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -88,7 +88,10 @@ class twig extends \phpbb\template\base
|
|||
|
||||
foreach ($extensions as $extension)
|
||||
{
|
||||
$this->twig->addExtension($extension);
|
||||
if (!$this->twig->hasExtension(get_class($extension)))
|
||||
{
|
||||
$this->twig->addExtension($extension);
|
||||
}
|
||||
}
|
||||
|
||||
// Add admin namespace
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
to hide visually and `aria-hidden="true"` to hide from screen-readers; using
|
||||
`hidden` or `display: none` would prevent the task from running.
|
||||
#}
|
||||
<img class="sr-only" aria-hidden="true" src="{{ CRON_TASK_URL|e('url') }}" width="1" height="1" alt="">
|
||||
<img class="sr-only" aria-hidden="true" src="{{ CRON_TASK_URL|e('html_attr') }}" width="1" height="1" alt="">
|
||||
|
|
|
@ -60,7 +60,7 @@ class phpbb_cron_wrapper_test extends phpbb_template_template_test_case
|
|||
$this->template
|
||||
);
|
||||
|
||||
$this->assertEquals('<img class="sr-only" aria-hidden="true" src="app.php%2Fcron%2Ffoo%3Ff%3D5" width="1" height="1" alt="">', str_replace(["\n", "\t"], '', $this->wrapper->get_html_tag()));
|
||||
$this->assertEquals('<img class="sr-only" aria-hidden="true" src="app.php/cron/foo?f=5" width="1" height="1" alt="">', str_replace(["\n", "\t"], '', $this->wrapper->get_html_tag()));
|
||||
}
|
||||
|
||||
public function test_is_parametrized_false()
|
||||
|
|
Loading…
Add table
Reference in a new issue