diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-01-22 15:56:34 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-01-22 15:56:34 +0100 |
commit | c2504e9300608feea540ab162e4cc0ac79cda7a0 (patch) | |
tree | 0eadab02d2c35e059e281eeb4bc3a554a477ea67 | |
parent | ffde887aadfcb9d3db2c42cf09e22745e5d62430 (diff) | |
download | forums-c2504e9300608feea540ab162e4cc0ac79cda7a0.tar forums-c2504e9300608feea540ab162e4cc0ac79cda7a0.tar.gz forums-c2504e9300608feea540ab162e4cc0ac79cda7a0.tar.bz2 forums-c2504e9300608feea540ab162e4cc0ac79cda7a0.tar.xz forums-c2504e9300608feea540ab162e4cc0ac79cda7a0.zip |
[ticket/10714] Fix more comments
PHPBB3-10714
-rw-r--r-- | phpBB/includes/log/log.php | 14 | ||||
-rw-r--r-- | tests/log/function_add_log_test.php | 4 |
2 files changed, 11 insertions, 7 deletions
diff --git a/phpBB/includes/log/log.php b/phpBB/includes/log/log.php index 841612f7bd..09dff10ae5 100644 --- a/phpBB/includes/log/log.php +++ b/phpBB/includes/log/log.php @@ -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 = ''; diff --git a/tests/log/function_add_log_test.php b/tests/log/function_add_log_test.php index 4e54a75dd6..864b364862 100644 --- a/tests/log/function_add_log_test.php +++ b/tests/log/function_add_log_test.php @@ -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 |