[ticket/10737] Set the username as the input value instead of redirecting.

PHPBB3-10737
This commit is contained in:
Cesar G 2014-04-08 05:33:24 -07:00
parent 333a18d846
commit 3fec8dff2c
2 changed files with 7 additions and 6 deletions

View file

@ -665,11 +665,11 @@ phpbb.search.showResults = function(results, el, container, callback) {
$.each(results, function(i, item) { $.each(results, function(i, item) {
row = tpl.clone(); row = tpl.clone();
row.find('.search-result').html(item.result); row.find('.search-result').html(item.display);
if (callback === 'function') { if (typeof callback === 'function') {
callback.call(this, el, item, row, container); callback.call(this, el, item, row, container);
} }
row.appendTo(resultContainer).show(); row.appendTo(resultContainer).show();
}); });
container.show(); container.show();
@ -836,7 +836,7 @@ phpbb.addAjaxCallback = function(id, callback) {
* This callback handles live member searches. * This callback handles live member searches.
*/ */
phpbb.addAjaxCallback('member_search', function(res) { phpbb.addAjaxCallback('member_search', function(res) {
phpbb.search.handleResponse(res, $(this), false); phpbb.search.handleResponse(res, $(this), false, phpbb.getFunctionByName('phpbb.search.setValueOnClick'));
}); });
/** /**

View file

@ -996,8 +996,9 @@ switch ($mode)
{ {
$user_list[] = array( $user_list[] = array(
'user_id' => (int) $row['user_id'], 'user_id' => (int) $row['user_id'],
'username' => $row['username'], 'result' => $row['username'],
'result' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), 'username_full' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
'display' => get_username_string('no_profile', $row['user_id'], $row['username'], $row['user_colour']),
); );
} }
$db->sql_freeresult($result); $db->sql_freeresult($result);