mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-20 07:42:09 +02:00
[ticket/10714] Fix more comments
PHPBB3-10714
This commit is contained in:
parent
ffde887aad
commit
c2504e9300
@ -497,8 +497,10 @@ class phpbb_log implements phpbb_log_interface
|
||||
|
||||
if (isset($this->user->lang[$row['log_operation']]))
|
||||
{
|
||||
// Check if there are more occurrences of % than arguments, if there are we fill out the arguments array
|
||||
// It doesn't matter if we add more arguments than placeholders
|
||||
// Check if there are more occurrences of % than
|
||||
// arguments, if there are we fill out the arguments
|
||||
// array. It doesn't matter if we add more arguments than
|
||||
// placeholders.
|
||||
if ((substr_count($log[$i]['action'], '%') - sizeof($log_data_ary)) > 0)
|
||||
{
|
||||
$log_data_ary = array_merge($log_data_ary, array_fill(0, substr_count($log[$i]['action'], '%') - sizeof($log_data_ary), ''));
|
||||
@ -507,7 +509,7 @@ class phpbb_log implements phpbb_log_interface
|
||||
$log[$i]['action'] = vsprintf($log[$i]['action'], $log_data_ary);
|
||||
|
||||
// If within the admin panel we do not censor text out
|
||||
if (defined('IN_ADMIN'))
|
||||
if ($this->is_in_admin)
|
||||
{
|
||||
$log[$i]['action'] = bbcode_nl2br($log[$i]['action']);
|
||||
}
|
||||
@ -584,8 +586,10 @@ class phpbb_log implements phpbb_log_interface
|
||||
*/
|
||||
protected function generate_sql_keyword($keywords)
|
||||
{
|
||||
// Use no preg_quote for $keywords because this would lead to sole backslashes being added
|
||||
// We also use an OR connection here for spaces and the | string. Currently, regex is not supported for searching (but may come later).
|
||||
// Use no preg_quote for $keywords because this would lead to sole
|
||||
// backslashes being added. We also use an OR connection here for
|
||||
// spaces and the | string. Currently, regex is not supported for
|
||||
// searching (but may come later).
|
||||
$keywords = preg_split('#[\s|]+#u', utf8_strtolower($keywords), 0, PREG_SPLIT_NO_EMPTY);
|
||||
$sql_keywords = '';
|
||||
|
||||
|
@ -35,9 +35,9 @@ class phpbb_log_function_add_log_test extends phpbb_database_test_case
|
||||
'forum_id' => 56,
|
||||
'topic_id' => 78,
|
||||
),
|
||||
// user_id Can also be false, than ANONYMOUS is used
|
||||
// user_id Can also be false, then ANONYMOUS is used
|
||||
false,
|
||||
// log_mode Used to determinate the log_type
|
||||
// log_mode Used to determine the log_type
|
||||
'mod',
|
||||
// Followed by some additional arguments
|
||||
// forum_id, topic_id and reportee_id are specified before log_operation
|
||||
|
Loading…
x
Reference in New Issue
Block a user