Compare commits

...

15 commits

Author SHA1 Message Date
IdfbAn
2f0204c203
Merge fabef37d71 into 3b03f3a8f9 2025-06-22 21:43:10 +04:00
Marc Alexander
3b03f3a8f9
Merge pull request #6833 from iMattPro/ticket/17519
[ticket/17519] Revert cron url escape back to html_attr
2025-06-17 19:42:42 +02:00
Matt Friedman
e47ba9e81d
[ticket/17519] Fix tests
PHPBB-17519
2025-06-17 09:19:40 -07:00
Matt Friedman
8d016bafa2
[ticket/17519] Revert cron url escape back to html_attr
PHPBB-17519
2025-06-17 07:59:04 -07:00
Marc Alexander
35221f8ba5
Merge pull request #6826 from danieltj27/ticket/17522
[ticket/17522] Add event to member list to modify template vars
2025-06-17 14:04:28 +02:00
Marc Alexander
9219c03b36
Merge pull request #6831 from rxu/ticket/17527
[ticket/17527] Add Twig extensions existence check while registering
2025-06-17 11:30:52 +02:00
Daniel James
72c3745868 [ticket/17522] Change event name and update var type
PHPBB-17522
2025-06-17 07:18:41 +01:00
rxu
579b4a8287
[ticket/17527] Add Twig extensions existence check while registering
PHPBB-17527
2025-06-16 22:25:59 +07:00
Marc Alexander
2f43c1facd
[ticket/17399] Fix docblock and use space-ship operator
PHPBB-17399
2025-06-16 10:34:38 +02:00
Marc Alexander
d4a3311b76
Merge pull request #6829 from battye/ticket/17399
[ticket/17399] Fix selected language bug in installer
2025-06-15 09:08:49 +02:00
battye
8411da1819 [ticket/17399] Fix selected language in installer
This fixes a bug where a user could have other languages in the installer
but the language dropdown did not match the language shown.

PHPBB-17399
2025-06-14 14:35:18 +00:00
Daniel James
b6c42b3768 [ticket/17522] Switch array syntax to short code
PHPBB-17522
2025-06-06 11:50:49 +01:00
Daniel James
da2733a7d8 [ticket/17522] Change since from beta to release candidate
PHPBB-17522
2025-06-06 11:03:10 +01:00
Daniel James
b8204d24f9 [ticket/17522] Add event to member list to modify template vars
PHPBB-17522
2025-06-05 22:18:51 +01:00
IdfbAn
fabef37d71 [ticket/17110] Change "slanderous" to "libellous" in T&C
Slander is spoken and libel is written, so "libellous" is more accurate here.

PHPBB-17110
2025-03-31 20:36:21 +04:00
8 changed files with 42 additions and 5 deletions

View file

@ -19,7 +19,7 @@
<form method="post" action="#" id="language_selector">
<fieldset class="nobg">
<label for="language">{L_SELECT_LANG}{L_COLON}</label>
<select id="language" name="language">
<select id="language" name="language">
<!-- BEGIN language_select_item -->
<option value="{language_select_item.VALUE}"<!-- IF language_select_item.SELECTED --> selected="selected"<!-- ENDIF -->>{language_select_item.NAME}</option>
<!-- END language_select_item -->

View file

@ -42,7 +42,7 @@ $lang = array_merge($lang, array(
<br><br>
Our forums are powered by phpBB (hereinafter “they”, “them”, “their”, “phpBB software”, “www.phpbb.com”, “phpBB Limited”, “phpBB Teams”) which is a bulletin board solution released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a> (hereinafter “GPL”) and can be downloaded from <a href="https://www.phpbb.com/">www.phpbb.com</a>. The phpBB software only facilitates internet based discussions; phpBB Limited is not responsible for what we allow and/or disallow as permissible content and/or conduct. For further information about phpBB, please see: <a href="https://www.phpbb.com/">https://www.phpbb.com/</a>.
<br><br>
You agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate any laws be it of your country, the country where %1$s” is hosted or International Law. Doing so may lead to you being immediately and permanently banned, with notification of your Internet Service Provider if deemed required by us. The IP address of all posts are recorded to aid in enforcing these conditions. You agree that %1$s” have the right to remove, edit, move or close any topic at any time should we see fit. As a user you agree to any information you have entered to being stored in a database. While this information will not be disclosed to any third party without your consent, neither %1$s” nor phpBB shall be held responsible for any hacking attempt that may lead to the data being compromised.
You agree not to post any abusive, obscene, vulgar, libellous, hateful, threatening, sexually-orientated or any other material that may violate any laws be it of your country, the country where %1$s” is hosted or International Law. Doing so may lead to you being immediately and permanently banned, with notification of your Internet Service Provider if deemed required by us. The IP address of all posts are recorded to aid in enforcing these conditions. You agree that %1$s” have the right to remove, edit, move or close any topic at any time should we see fit. As a user you agree to any information you have entered to being stored in a database. While this information will not be disclosed to any third party without your consent, neither %1$s” nor phpBB shall be held responsible for any hacking attempt that may lead to the data being compromised.
',
'PRIVACY_POLICY' => 'This policy explains in detail how %1$s” along with its affiliated companies (hereinafter “we”, “us”, “our”, %1$s”, %2$s”) and phpBB (hereinafter “they”, “them”, “their”, “phpBB software”, “www.phpbb.com”, “phpBB Limited”, “phpBB Teams”) use any information collected during any session of usage by you (hereinafter “your information”).

View file

@ -1812,6 +1812,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']))

View file

@ -339,6 +339,14 @@ class helper
protected function render_language_select($selected_language = null)
{
$langs = $this->lang_helper->get_available_languages();
// The first language will be selected by default. Unless a user has consciously included
// other languages in the installation process, it will be British English anyway.
if ($selected_language === null && count($langs))
{
$selected_language = $langs[0]['iso'];
}
foreach ($langs as $lang)
{
$this->template->assign_block_vars('language_select_item', array(

View file

@ -67,6 +67,20 @@ class language_file_helper
);
}
usort($available_languages, [$this, 'sort_by_local_name']);
return $available_languages;
}
/**
* Sorts the languages by their name instead of iso code
*
* @param mixed $a First language data
* @param mixed $b Second language data
* @return int
*/
private static function sort_by_local_name($a, $b): int
{
return $a['local_name'] <=> $b['local_name'];
}
}

View file

@ -99,7 +99,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

View file

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

View file

@ -67,7 +67,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&#x2F;cron&#x2F;foo&#x3F;f&#x3D;5" width="1" height="1" alt="">', str_replace(["\n", "\t"], '', $this->wrapper->get_html_tag()));
}
public function test_is_parametrized_false()