"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Upload/xmlhttp.php" between
mybb_1821.zip and mybb_1822.zip

About: MyBB is a multilingual, standards-compliant and free forum (discussion board) software.

xmlhttp.php  (mybb_1821):xmlhttp.php  (mybb_1822)
skipping to change at line 225 skipping to change at line 225
$lang->error_boardclosed .= "<br /><em>{$mybb->settings['boardclosed_reas on']}</em>"; $lang->error_boardclosed .= "<br /><em>{$mybb->settings['boardclosed_reas on']}</em>";
xmlhttp_error($lang->error_boardclosed); xmlhttp_error($lang->error_boardclosed);
} }
// Fetch a list of usernames beginning with a certain string (used for auto comp letion) // Fetch a list of usernames beginning with a certain string (used for auto comp letion)
if($mybb->input['action'] == "get_users") if($mybb->input['action'] == "get_users")
{ {
$mybb->input['query'] = ltrim($mybb->get_input('query')); $mybb->input['query'] = ltrim($mybb->get_input('query'));
$search_type = $mybb->get_input('search_type', MyBB::INPUT_INT); // 0: co ntains, 1: starts with, 2: ends with $search_type = $mybb->get_input('search_type', MyBB::INPUT_INT); // 0: st arts with, 1: ends with, 2: contains
// If the string is less than 2 characters, quit. // If the string is less than 2 characters, quit.
if(my_strlen($mybb->input['query']) < 2) if(my_strlen($mybb->input['query']) < 2)
{ {
exit; exit;
} }
if($mybb->get_input('getone', MyBB::INPUT_INT) == 1) if($mybb->get_input('getone', MyBB::INPUT_INT) == 1)
{ {
$limit = 1; $limit = 1;
skipping to change at line 258 skipping to change at line 258
"order_dir" => "asc", "order_dir" => "asc",
"limit_start" => 0, "limit_start" => 0,
"limit" => $limit "limit" => $limit
); );
$plugins->run_hooks("xmlhttp_get_users_start"); $plugins->run_hooks("xmlhttp_get_users_start");
$likestring = $db->escape_string_like($mybb->input['query']); $likestring = $db->escape_string_like($mybb->input['query']);
if($search_type == 1) if($search_type == 1)
{ {
$likestring .= '%'; $likestring = '%'.$likestring;
} }
elseif($search_type == 2) elseif($search_type == 2)
{ {
$likestring = '%'.$likestring; $likestring = '%'.$likestring.'%';
} }
else else
{ {
$likestring = '%'.$likestring.'%'; $likestring .= '%';
} }
$query = $db->simple_select("users", "uid, username", "username LIKE '{$l ikestring}'", $query_options); $query = $db->simple_select("users", "uid, username", "username LIKE '{$l ikestring}'", $query_options);
if($limit == 1) if($limit == 1)
{ {
$user = $db->fetch_array($query); $user = $db->fetch_array($query);
$data = array('uid' => $user['uid'], 'id' => $user['username'], ' text' => $user['username']); $data = array('uid' => $user['uid'], 'id' => $user['username'], ' text' => $user['username']);
} }
else else
{ {
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)