mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-20 18:28:55 +00:00
Merge branch 'develop-ascraeus' into develop
* develop-ascraeus: [ticket/12388] Add tests for lang() use on log actions without data [ticket/12388] Fix translation of log entries without additional log data
This commit is contained in:
commit
6f375d4615
2 changed files with 9 additions and 3 deletions
|
@ -558,6 +558,10 @@ class log implements \phpbb\log\log_interface
|
|||
$log[$i]['action'] = make_clickable($log[$i]['action']);
|
||||
*/
|
||||
}
|
||||
else
|
||||
{
|
||||
$log[$i]['action'] = $this->user->lang($log[$i]['action']);
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
|
|
@ -164,7 +164,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
|
|||
'topic_id' => 45,
|
||||
|
||||
'viewforum' => '',
|
||||
'action' => '{LOG MOD2}',
|
||||
'action' => 'LOG_MOD2',
|
||||
'viewtopic' => '',
|
||||
'viewlogs' => '',
|
||||
),
|
||||
|
@ -185,7 +185,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
|
|||
'topic_id' => 0,
|
||||
|
||||
'viewforum' => '',
|
||||
'action' => '{LOG USER}<br />admin',
|
||||
'action' => 'LOG_USER admin',
|
||||
),
|
||||
9 => array(
|
||||
'id' => 9,
|
||||
|
@ -204,7 +204,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
|
|||
'topic_id' => 0,
|
||||
|
||||
'viewforum' => '',
|
||||
'action' => '{LOG USER}<br />guest',
|
||||
'action' => 'LOG_USER guest',
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -331,6 +331,8 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
|
|||
// Test sprintf() of the data into the action
|
||||
$user->lang = array(
|
||||
'LOG_INSTALL_INSTALLED' => 'installed: %s',
|
||||
'LOG_USER' => 'User<br /> %s',
|
||||
'LOG_MOD2' => 'Mod2',
|
||||
);
|
||||
|
||||
$phpbb_log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE);
|
||||
|
|
Loading…
Add table
Reference in a new issue