aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorJim Wigginton <terrafrost@phpbb.com>2009-08-21 21:47:19 +0000
committerJim Wigginton <terrafrost@phpbb.com>2009-08-21 21:47:19 +0000
commit69aa05376bd6cd04e23b6edcfe0d44e9e5f5f7e2 (patch)
tree6e613c5e9d1d2cffee1f877daa47fbdf1d2bccef /phpBB
parenta3c00e88d919a7b352635d869d068e163288b143 (diff)
downloadforums-69aa05376bd6cd04e23b6edcfe0d44e9e5f5f7e2.tar
forums-69aa05376bd6cd04e23b6edcfe0d44e9e5f5f7e2.tar.gz
forums-69aa05376bd6cd04e23b6edcfe0d44e9e5f5f7e2.tar.bz2
forums-69aa05376bd6cd04e23b6edcfe0d44e9e5f5f7e2.tar.xz
forums-69aa05376bd6cd04e23b6edcfe0d44e9e5f5f7e2.zip
- replaced the drop down menu log filter thing with log searching
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10041 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/style/acp_logs.html2
-rw-r--r--phpBB/includes/acp/acp_logs.php88
-rw-r--r--phpBB/includes/db/dbal.php4
-rw-r--r--phpBB/includes/functions_admin.php42
-rw-r--r--phpBB/includes/mcp/mcp_logs.php58
-rw-r--r--phpBB/includes/mcp/mcp_notes.php26
-rw-r--r--phpBB/includes/utf/utf_tools.php47
-rw-r--r--phpBB/styles/prosilver/template/mcp_logs.html2
-rw-r--r--phpBB/styles/prosilver/template/mcp_notes_user.html2
-rw-r--r--phpBB/styles/subsilver2/template/mcp_logs.html2
-rw-r--r--phpBB/styles/subsilver2/template/mcp_notes_user.html2
11 files changed, 103 insertions, 172 deletions
diff --git a/phpBB/adm/style/acp_logs.html b/phpBB/adm/style/acp_logs.html
index 1c5c8940d2..6e93dba940 100644
--- a/phpBB/adm/style/acp_logs.html
+++ b/phpBB/adm/style/acp_logs.html
@@ -9,7 +9,7 @@
<form id="list" method="post" action="{U_ACTION}">
<fieldset class="display-options" style="float: left">
- {L_SELECT_LANG_KEY}: <select name="log_operation">{S_LANG_KEYS}</select>&nbsp;<input type="submit" class="button2" name="filter" value="{L_FILTER}" />
+ {L_SEARCH_KEYWORDS}: <input type="text" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
</fieldset>
<!-- IF PAGINATION -->
diff --git a/phpBB/includes/acp/acp_logs.php b/phpBB/includes/acp/acp_logs.php
index 861df90777..35f2a3bf6b 100644
--- a/phpBB/includes/acp/acp_logs.php
+++ b/phpBB/includes/acp/acp_logs.php
@@ -105,87 +105,8 @@ class acp_logs
$sql_where = ($sort_days) ? (time() - ($sort_days * 86400)) : 0;
$sql_sort = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
- $log_operation = request_var('log_operation', '');
- $log_operation_param = !empty($log_operation) ? '&amp;log_operation=' . urlencode(htmlspecialchars_decode($log_operation)) : '';
- $s_lang_keys = '<option value="">' . $user->lang['SHOW_ALL_OPERATIONS'] . '</option>';
-
- switch ($mode)
- {
- case 'admin':
- $log_type = LOG_ADMIN;
- $sql_forum = '';
- break;
-
- case 'mod':
- $log_type = LOG_MOD;
-
- if ($topic_id)
- {
- $sql_forum = 'AND topic_id = ' . intval($topic_id);
- }
- else if (is_array($forum_id))
- {
- $sql_forum = 'AND ' . $db->sql_in_set('forum_id', array_map('intval', $forum_id));
- }
- else
- {
- $sql_forum = ($forum_id) ? 'AND forum_id = ' . intval($forum_id) : '';
- }
- break;
-
- case 'user':
- $log_type = LOG_USERS;
- $sql_forum = 'AND reportee_id = ' . (int) $user_id;
- break;
-
- case 'users':
- $log_type = LOG_USERS;
- $sql_forum = '';
- break;
-
- case 'critical':
- $log_type = LOG_CRITICAL;
- $sql_forum = '';
- break;
-
- default:
- return;
- }
-
- $sql = "SELECT DISTINCT log_operation
- FROM " . LOG_TABLE . "
- WHERE log_type = $log_type
- " . (($limit_days) ? "AND log_time >= $sql_where " : ' ') .
- $sql_forum;
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- if (empty($row['log_operation']))
- {
- continue;
- }
-
- $selected = ($log_operation == $row['log_operation']) ? ' selected="selected"' : '';
-
- if (isset($user->lang[$row['log_operation']]))
- {
- $text = htmlspecialchars(strip_tags(str_replace('<br />', ' ', $user->lang[$row['log_operation']])), ENT_COMPAT, 'UTF-8');
-
- // Fill in sprintf placeholders with translated placeholder text
- if (substr_count($text, '%'))
- {
- $text = vsprintf($text, array_fill(0, substr_count($text, '%'), $user->lang['LOGS_PLACEHOLDER']));
- }
- }
- else
- {
- $text = ucfirst(str_replace('_', ' ', strtolower($row['log_operation'])));
- }
-
- $s_lang_keys .= '<option value="' . $row['log_operation'] . '"' . $selected . '>' . $text . '</option>';
- }
- $db->sql_freeresult($result);
+ $keywords = utf8_normalize_nfc(request_var('keywords', '', true));
+ $keywords_param = !empty($keywords) ? '&amp;keywords=' . urlencode(htmlspecialchars_decode($keywords)) : '';
$l_title = $user->lang['ACP_' . strtoupper($mode) . '_LOGS'];
$l_title_explain = $user->lang['ACP_' . strtoupper($mode) . '_LOGS_EXPLAIN'];
@@ -206,7 +127,7 @@ class acp_logs
// Grab log data
$log_data = array();
$log_count = 0;
- view_log($mode, $log_data, $log_count, $config['topics_per_page'], $start, $forum_id, 0, 0, $sql_where, $sql_sort, $log_operation);
+ view_log($mode, $log_data, $log_count, $config['topics_per_page'], $start, $forum_id, 0, 0, $sql_where, $sql_sort, $keywords);
$template->assign_vars(array(
'L_TITLE' => $l_title,
@@ -214,13 +135,14 @@ class acp_logs
'U_ACTION' => $this->u_action,
'S_ON_PAGE' => on_page($log_count, $config['topics_per_page'], $start),
- 'PAGINATION' => generate_pagination($this->u_action . "&amp;$u_sort_param$log_operation_param", $log_count, $config['topics_per_page'], $start, true),
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;$u_sort_param$keywords_param", $log_count, $config['topics_per_page'], $start, true),
'S_LIMIT_DAYS' => $s_limit_days,
'S_SORT_KEY' => $s_sort_key,
'S_SORT_DIR' => $s_sort_dir,
'S_LANG_KEYS' => $s_lang_keys,
'S_CLEARLOGS' => $auth->acl_get('a_clearlogs'),
+ 'S_KEYWORDS' => $keywords,
)
);
diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php
index 5418ed394b..a962696bb8 100644
--- a/phpBB/includes/db/dbal.php
+++ b/phpBB/includes/db/dbal.php
@@ -235,8 +235,8 @@ class dbal
*/
function sql_like_expression($expression)
{
- $expression = str_replace(array('_', '%'), array("\_", "\%"), $expression);
- $expression = str_replace(array(chr(0) . "\_", chr(0) . "\%"), array('_', '%'), $expression);
+ $expression = utf8_str_replace(array('_', '%'), array("\_", "\%"), $expression);
+ $expression = utf8_str_replace(array(chr(0) . "\_", chr(0) . "\%"), array('_', '%'), $expression);
return $this->_sql_like_expression('LIKE \'' . $this->sql_escape($expression) . '\'');
}
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 2f8670a147..d84216701a 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -338,13 +338,12 @@ function copy_forum_permissions($src_forum_id, $dest_forum_ids, $clear_dest_perm
return false;
}
- // Check if source forum exists
+ // Check if source forums exists
$sql = 'SELECT forum_name
FROM ' . FORUMS_TABLE . '
WHERE forum_id = ' . $src_forum_id;
$result = $db->sql_query($sql);
$src_forum_name = $db->sql_fetchfield('forum_name');
- $db->sql_freeresult($result);
// Source forum doesn't exist
if (empty($src_forum_name))
@@ -358,7 +357,6 @@ function copy_forum_permissions($src_forum_id, $dest_forum_ids, $clear_dest_perm
WHERE ' . $db->sql_in_set('forum_id', $dest_forum_ids);
$result = $db->sql_query($sql);
- $dest_forum_ids = $dest_forum_names = array();
while ($row = $db->sql_fetchrow($result))
{
$dest_forum_ids[] = (int) $row['forum_id'];
@@ -2497,7 +2495,7 @@ function cache_moderators()
/**
* View log
*/
-function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id = 0, $topic_id = 0, $user_id = 0, $limit_days = 0, $sort_by = 'l.log_time DESC', $log_operation = '')
+function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id = 0, $topic_id = 0, $user_id = 0, $limit_days = 0, $sort_by = 'l.log_time DESC', $keywords = '')
{
global $db, $user, $auth, $phpEx, $phpbb_root_path, $phpbb_admin_path;
@@ -2548,12 +2546,40 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
return;
}
+ $keywords = preg_split('#[\s+\-|*()]+#u', utf8_strtolower(preg_quote($keywords, '#')), 0, PREG_SPLIT_NO_EMPTY);
+ $sql_keywords = '';
+
+ if (!empty($keywords))
+ {
+ $keywords_pattern = '#' . implode('|', $keywords) . '#ui';
+ for ($i = 0, $num_keywords = sizeof($keywords); $i < $num_keywords; $i++)
+ {
+ $keywords[$i] = $db->sql_like_expression($db->any_char . $keywords[$i] . $db->any_char);
+ }
+
+ $operations = array();
+ foreach ($user->lang as $key=>$value)
+ {
+ if (substr($key, 0, 4) == 'LOG_' && preg_match($keywords_pattern, $value))
+ {
+ $operations[] = $key;
+ }
+ }
+
+ $sql_keywords = 'AND (';
+ if (!empty($operations))
+ {
+ $sql_keywords.= $db->sql_in_set('l.log_operation', $operations) . ' OR ';
+ }
+ $sql_keywords.= 'LOWER(l.log_data) ' . implode(' OR LOWER(l.log_data) ', $keywords) . ')';
+ }
+
$sql = "SELECT l.*, u.username, u.username_clean, u.user_colour
FROM " . LOG_TABLE . " l, " . USERS_TABLE . " u
WHERE l.log_type = $log_type
AND u.user_id = l.user_id
- " . (($limit_days) ? "AND l.log_time >= $limit_days" : '') .
- (!empty($log_operation) ? " AND l.log_operation = '" . $db->sql_escape($log_operation) . "'" : '') . "
+ " . (($limit_days) ? "AND l.log_time >= $limit_days" : '') . "
+ $sql_keywords
$sql_forum
ORDER BY $sort_by";
$result = $db->sql_query_limit($sql, $limit, $offset);
@@ -2718,8 +2744,8 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
$sql = 'SELECT COUNT(l.log_id) AS total_entries
FROM ' . LOG_TABLE . " l
WHERE l.log_type = $log_type
- AND l.log_time >= $limit_days " .
- (!empty($log_operation) ? "AND l.log_operation = '" . $db->sql_escape($log_operation) . "'" : '') . "
+ AND l.log_time >= $limit_days
+ $sql_keywords
$sql_forum";
$result = $db->sql_query($sql);
$log_count = (int) $db->sql_fetchfield('total_entries');
diff --git a/phpBB/includes/mcp/mcp_logs.php b/phpBB/includes/mcp/mcp_logs.php
index a73227f158..11b5f23c12 100644
--- a/phpBB/includes/mcp/mcp_logs.php
+++ b/phpBB/includes/mcp/mcp_logs.php
@@ -164,67 +164,18 @@ class mcp_logs
$sql_where = ($sort_days) ? (time() - ($sort_days * 86400)) : 0;
$sql_sort = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
- $log_operation = request_var('log_operation', '');
- $log_operation_param = !empty($log_operation) ? '&amp;log_operation=' . urlencode(htmlspecialchars_decode($log_operation)) : '';
- $s_lang_keys = '<option value="">' . $user->lang['SHOW_ALL_OPERATIONS'] . '</option>';
-
- if ($topic_id)
- {
- $sql_forum = 'AND topic_id = ' . intval($topic_id);
- }
- else if (is_array($forum_id))
- {
- $sql_forum = 'AND ' . $db->sql_in_set('forum_id', array_map('intval', $forum_id));
- }
- else
- {
- $sql_forum = ($forum_id) ? 'AND forum_id = ' . intval($forum_id) : '';
- }
-
- $sql = "SELECT DISTINCT log_operation
- FROM " . LOG_TABLE . '
- WHERE log_type = ' . LOG_MOD . '
- ' . (($limit_days) ? "AND log_time >= $sql_where " : ' ') .
- $sql_forum;
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- if (empty($row['log_operation']))
- {
- continue;
- }
-
- $selected = ($log_operation == $row['log_operation']) ? ' selected="selected"' : '';
-
- if (isset($user->lang[$row['log_operation']]))
- {
- $text = htmlspecialchars(strip_tags(str_replace('<br />', ' ', $user->lang[$row['log_operation']])), ENT_COMPAT, 'UTF-8');
-
- // Fill in sprintf placeholders with translated placeholder text
- if (substr_count($text, '%'))
- {
- $text = vsprintf($text, array_fill(0, substr_count($text, '%'), $user->lang['LOGS_PLACEHOLDER']));
- }
- }
- else
- {
- $text = ucfirst(str_replace('_', ' ', strtolower($row['log_operation'])));
- }
-
- $s_lang_keys .= '<option value="' . $row['log_operation'] . '"' . $selected . '>' . $text . '</option>';
- }
- $db->sql_freeresult($result);
+ $keywords = utf8_normalize_nfc(request_var('keywords', '', true));
+ $keywords_param = !empty($keywords) ? '&amp;keywords=' . urlencode(htmlspecialchars_decode($keywords)) : '';
// Grab log data
$log_data = array();
$log_count = 0;
- view_log('mod', $log_data, $log_count, $config['topics_per_page'], $start, $forum_list, $topic_id, 0, $sql_where, $sql_sort, $log_operation);
+ view_log('mod', $log_data, $log_count, $config['topics_per_page'], $start, $forum_list, $topic_id, 0, $sql_where, $sql_sort, $keywords);
$template->assign_vars(array(
'PAGE_NUMBER' => on_page($log_count, $config['topics_per_page'], $start),
'TOTAL' => ($log_count == 1) ? $user->lang['TOTAL_LOG'] : sprintf($user->lang['TOTAL_LOGS'], $log_count),
- 'PAGINATION' => generate_pagination($this->u_action . "&amp;$u_sort_param$log_operation_param", $log_count, $config['topics_per_page'], $start),
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;$u_sort_param$log_operation_param$keywords_param", $log_count, $config['topics_per_page'], $start, true),
'L_TITLE' => $user->lang['MCP_LOGS'],
@@ -235,6 +186,7 @@ class mcp_logs
'S_SELECT_SORT_DAYS' => $s_limit_days,
'S_LANG_KEYS' => $s_lang_keys,
'S_LOGS' => ($log_count > 0),
+ 'S_KEYWORDS' => $keywords,
)
);
diff --git a/phpBB/includes/mcp/mcp_notes.php b/phpBB/includes/mcp/mcp_notes.php
index bc4c1df42f..7706ea6a99 100644
--- a/phpBB/includes/mcp/mcp_notes.php
+++ b/phpBB/includes/mcp/mcp_notes.php
@@ -193,29 +193,12 @@ class mcp_notes
$sql_where = ($st) ? (time() - ($st * 86400)) : 0;
$sql_sort = $sort_by_sql[$sk] . ' ' . (($sd == 'd') ? 'DESC' : 'ASC');
- $log_operation = request_var('log_operation', '');
- $log_operation_param = !empty($log_operation) ? '&amp;log_operation=' . urlencode(htmlspecialchars_decode($log_operation)) : '';
- $s_lang_keys = '<option value="">' . $user->lang['SHOW_ALL_OPERATIONS'] . '</option>';
-
- $sql = "SELECT DISTINCT log_operation
- FROM " . LOG_TABLE . '
- WHERE log_type = ' . LOG_USERS .
- (($limit_days) ? " AND log_time >= $sql_where" : '');
- $result = $db->sql_query($sql);
- while ($row = $db->sql_fetchrow($result))
- {
- if (empty($row['log_operation']))
- {
- continue;
- }
- $selected = ($log_operation == $row['log_operation']) ? ' selected="selected"' : '';
- $s_lang_keys .= '<option value="' . $row['log_operation'] . '"' . $selected . '>' . htmlspecialchars(strip_tags($user->lang[$row['log_operation']]), ENT_COMPAT, 'UTF-8') . '</option>';
- }
- $db->sql_freeresult($result);
+ $keywords = utf8_normalize_nfc(request_var('keywords', '', true));
+ $keywords_param = !empty($keywords) ? '&amp;keywords=' . urlencode(htmlspecialchars_decode($keywords)) : '';
$log_data = array();
$log_count = 0;
- view_log('user', $log_data, $log_count, $config['posts_per_page'], $start, 0, 0, $user_id, $sql_where, $sql_sort, $log_operation);
+ view_log('user', $log_data, $log_count, $config['posts_per_page'], $start, 0, 0, $user_id, $sql_where, $sql_sort, $keywords);
if ($log_count)
{
@@ -240,11 +223,12 @@ class mcp_notes
'S_SELECT_SORT_KEY' => $s_sort_key,
'S_SELECT_SORT_DAYS' => $s_limit_days,
'S_LANG_KEYS' => $s_lang_keys,
+ 'S_KEYWORDS' => $keywords,
'L_TITLE' => $user->lang['MCP_NOTES_USER'],
'PAGE_NUMBER' => on_page($log_count, $config['posts_per_page'], $start),
- 'PAGINATION' => generate_pagination($this->u_action . "&amp;st=$st&amp;sk=$sk&amp;sd=$sd$log_operation_param", $log_count, $config['posts_per_page'], $start),
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;$u_sort_param$keywords_param", $log_count, $config['topics_per_page'], $start, true),
'TOTAL_REPORTS' => ($log_count == 1) ? $user->lang['LIST_REPORT'] : sprintf($user->lang['LIST_REPORTS'], $log_count),
'RANK_TITLE' => $rank_title,
diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php
index 9ee87a5425..6f3ac93305 100644
--- a/phpBB/includes/utf/utf_tools.php
+++ b/phpBB/includes/utf/utf_tools.php
@@ -1945,4 +1945,51 @@ function utf8_basename($filename)
return $filename;
}
+/**
+* UTF8-safe str_replace() function
+*
+* @param string $search The value to search for
+* @param string $replace The replacement string
+* @param string $subject The target string
+* @return string The resultant string
+*/
+function utf8_str_replace($search, $replace, $subject)
+{
+ if (!is_array($search))
+ {
+ $search = array($search);
+ if (is_array($replace))
+ {
+ $replace = (string) $replace;
+ trigger_error('Array to string conversion', E_USER_NOTICE);
+ }
+ }
+
+ $length = sizeof($search);
+
+ if (!is_array($replace))
+ {
+ $replace = array_fill(0, $length, $replace);
+ }
+ else
+ {
+ $replace = array_pad($replace, $length, '');
+ }
+
+ for ($i = 0; $i < $length; $i++)
+ {
+ $search_length = utf8_strlen($search[$i]);
+ $replace_length = utf8_strlen($replace[$i]);
+
+ $offset = 0;
+ while (($start = utf8_strpos($subject, $search[$i], $offset)) !== false)
+ {
+ $subject = utf8_substr($subject, 0, $start) . $replace[$i] . utf8_substr($subject, $start + $search_length);
+ $offset = $start + $replace_length;
+ }
+ }
+
+ return $subject;
+}
+
?> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_logs.html b/phpBB/styles/prosilver/template/mcp_logs.html
index ef2b4f4ab6..073e216611 100644
--- a/phpBB/styles/prosilver/template/mcp_logs.html
+++ b/phpBB/styles/prosilver/template/mcp_logs.html
@@ -9,7 +9,7 @@
<ul class="linklist">
<li class="leftside">
- {L_SELECT_LANG_KEY}: <select name="log_operation">{S_LANG_KEYS}</select>&nbsp;<input type="submit" class="button2" name="filter" value="{L_FILTER}" />
+ {L_SEARCH_KEYWORDS}: <input type="text" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
</li>
<li class="rightside pagination">
<!-- IF TOTAL -->{TOTAL} <!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/mcp_notes_user.html b/phpBB/styles/prosilver/template/mcp_notes_user.html
index aecb9b817a..b738af4020 100644
--- a/phpBB/styles/prosilver/template/mcp_notes_user.html
+++ b/phpBB/styles/prosilver/template/mcp_notes_user.html
@@ -52,7 +52,7 @@
<ul class="linklist">
<li class="leftside">
- {L_SELECT_LANG_KEY}: <select name="log_operation">{S_LANG_KEYS}</select>&nbsp;<input type="submit" class="button2" name="filter" value="{L_FILTER}" />
+ {L_SEARCH_KEYWORDS}: <input type="text" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
</li>
<li class="rightside pagination">
<!-- IF TOTAL_REPORTS -->{TOTAL_REPORTS} <!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/mcp_logs.html b/phpBB/styles/subsilver2/template/mcp_logs.html
index 04c4228645..6b78df3e5e 100644
--- a/phpBB/styles/subsilver2/template/mcp_logs.html
+++ b/phpBB/styles/subsilver2/template/mcp_logs.html
@@ -22,7 +22,7 @@
</tr>
<!-- END log -->
<tr align="center">
- <td class="row3" colspan="<!-- IF S_CLEAR_ALLOWED -->5<!-- ELSE -->4<!-- ENDIF -->"><span class="gensmall">{L_SELECT_LANG_KEY}:</span> <select name="log_operation">{S_LANG_KEYS}</select>&nbsp;<input type="submit" class="button2" name="filter" value="{L_FILTER}" /></td>
+ <td class="row3" colspan="<!-- IF S_CLEAR_ALLOWED -->5<!-- ELSE -->4<!-- ENDIF -->"><span class="gensmall">{L_SEARCH_KEYWORDS}:</span> <input type="text" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" /></td>
</tr>
<tr align="center">
<td class="row3" colspan="<!-- IF S_CLEAR_ALLOWED -->5<!-- ELSE -->4<!-- ENDIF -->"><span class="gensmall">{L_DISPLAY_LOG}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" value="{L_GO}" name="sort" /></td>
diff --git a/phpBB/styles/subsilver2/template/mcp_notes_user.html b/phpBB/styles/subsilver2/template/mcp_notes_user.html
index f4cb776a52..522c19fa05 100644
--- a/phpBB/styles/subsilver2/template/mcp_notes_user.html
+++ b/phpBB/styles/subsilver2/template/mcp_notes_user.html
@@ -55,7 +55,7 @@
<!-- IF S_USER_NOTES -->
<tr align="center">
- <td colspan="5" class="row3"><span class="gensmall">{L_SELECT_LANG_KEY}:</span> <select name="log_operation">{S_LANG_KEYS}</select>&nbsp;<input type="submit" class="button2" name="filter" value="{L_FILTER}" /></td>
+ <td colspan="5" class="row3"><span class="gensmall">{L_SEARCH_KEYWORDS}:</span> <input type="text" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" /></td>
</tr>
<tr align="center">
<td colspan="5" class="row3"><span class="gensmall">{L_DISPLAY_LOG}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}:</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" value="{L_GO}" name="sort" /></td>