mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 19:38:53 +00:00
Compare commits
15 commits
1ee152e98f
...
2f0204c203
Author | SHA1 | Date | |
---|---|---|---|
|
2f0204c203 | ||
|
3b03f3a8f9 | ||
|
e47ba9e81d | ||
|
8d016bafa2 | ||
|
35221f8ba5 | ||
|
9219c03b36 | ||
|
72c3745868 | ||
|
579b4a8287 | ||
|
2f43c1facd | ||
|
d4a3311b76 | ||
|
8411da1819 | ||
|
b6c42b3768 | ||
|
da2733a7d8 | ||
|
b8204d24f9 | ||
|
fabef37d71 |
8 changed files with 42 additions and 5 deletions
|
@ -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 -->
|
||||
|
|
|
@ -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”).
|
||||
|
|
|
@ -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']))
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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'];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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="">
|
||||
|
|
|
@ -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/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