Zeile 125 | Zeile 125 |
---|
$pwverified = 1; if($forum['password'] != '') {
|
$pwverified = 1; if($forum['password'] != '') {
|
if($mybb->cookies['forumpass'][$forum['fid']] !== md5($mybb->user['uid'].$forum['password']))
| if(!isset($mybb->cookies['forumpass'][$forum['fid']]) || !my_hash_equals($mybb->cookies['forumpass'][$forum['fid']], md5($mybb->user['uid'].$forum['password'])))
|
{ $pwverified = 0; }
| { $pwverified = 0; }
|
Zeile 698 | Zeile 698 |
---|
$statussql = implode("OR", $statussql); $searchsql .= $statussql.")"; }
|
$statussql = implode("OR", $statussql); $searchsql .= $statussql.")"; }
|
| $limitsql = ""; if((int)$mybb->settings['searchhardlimit'] > 0) { $limitsql = " LIMIT ".(int)$mybb->settings['searchhardlimit']; } $searchsql .= $limitsql;
|
// Run the search $pms = array();
| // Run the search $pms = array();
|
Zeile 732 | Zeile 739 |
---|
if(!$keywords && !$search['sender']) { error($lang->error_nosearchterms);
|
if(!$keywords && !$search['sender']) { error($lang->error_nosearchterms);
|
}
| }
|
if($mybb->settings['minsearchword'] < 1) {
| if($mybb->settings['minsearchword'] < 1) {
|
Zeile 767 | Zeile 774 |
---|
{ $string = "OR"; $name_lookin = " AND (";
|
{ $string = "OR"; $name_lookin = " AND (";
|
}
if($search['document'] == 1) { $document_lookin = " {$string} ("; }
// Expand the string by double quotes $keywords_exp = explode("\"", $keywords); $inquote = false;
foreach($keywords_exp as $phrase) { // If we're not in a double quoted section
| }
if($search['document'] == 1) { $document_lookin = " {$string} ("; }
// Expand the string by double quotes $keywords_exp = explode("\"", $keywords); $inquote = false;
foreach($keywords_exp as $phrase) { // If we're not in a double quoted section
|
if(!$inquote) { // Expand out based on search operators (and, or)
| if(!$inquote) { // Expand out based on search operators (and, or)
|
Zeile 952 | Zeile 959 |
---|
* @return array Array of search data with results mixed in */ function perform_search_mysql($search)
|
* @return array Array of search data with results mixed in */ function perform_search_mysql($search)
|
{
| {
|
global $mybb, $db, $lang, $cache;
$keywords = clean_keywords($search['keywords']);
|
global $mybb, $db, $lang, $cache;
$keywords = clean_keywords($search['keywords']);
|
if(!$keywords && !$search['author']) { error($lang->error_nosearchterms); }
| |
if($mybb->settings['minsearchword'] < 1) {
| if($mybb->settings['minsearchword'] < 1) {
|
Zeile 1042 | Zeile 1045 |
---|
} // In the middle of a quote (phrase) else
|
} // In the middle of a quote (phrase) else
|
{
| {
|
$phrase = str_replace(array("+", "-", "*"), '', trim($phrase)); if(my_strlen($phrase) < $mybb->settings['minsearchword']) {
| $phrase = str_replace(array("+", "-", "*"), '', trim($phrase)); if(my_strlen($phrase) < $mybb->settings['minsearchword']) {
|
Zeile 1082 | Zeile 1085 |
---|
if($search['postthread'] == 1) { $message_lookin = " AND {$pfield} LIKE '%{$keywords}%'";
|
if($search['postthread'] == 1) { $message_lookin = " AND {$pfield} LIKE '%{$keywords}%'";
|
} } }
| } } }
|
$post_usersql = ''; $thread_usersql = ''; if($search['author'])
| $post_usersql = ''; $thread_usersql = ''; if($search['author'])
|
Zeile 1095 | Zeile 1098 |
---|
{ $user = get_user_by_username($search['author']); if($user)
|
{ $user = get_user_by_username($search['author']); if($user)
|
{
| {
|
$userids[] = $user['uid']; } }
| $userids[] = $user['uid']; } }
|
Zeile 1116 | Zeile 1119 |
---|
{ $userids[] = $user['uid']; }
|
{ $userids[] = $user['uid']; }
|
}
| }
|
if(count($userids) < 1)
|
if(count($userids) < 1)
|
{
| {
|
error($lang->error_nosearchresults);
|
error($lang->error_nosearchresults);
|
}
| }
|
else { $userids = implode(',', $userids); $post_usersql = " AND p.uid IN (".$userids.")"; $thread_usersql = " AND t.uid IN (".$userids.")";
|
else { $userids = implode(',', $userids); $post_usersql = " AND p.uid IN (".$userids.")"; $thread_usersql = " AND t.uid IN (".$userids.")";
|
} }
| } }
|
$datecut = $post_datecut = $thread_datecut = ''; if($search['postdate']) {
| $datecut = $post_datecut = $thread_datecut = ''; if($search['postdate']) {
|
Zeile 1386 | Zeile 1389 |
---|
global $mybb, $db, $lang;
$keywords = clean_keywords_ft($search['keywords']);
|
global $mybb, $db, $lang;
$keywords = clean_keywords_ft($search['keywords']);
|
if(!$keywords && !$search['author']) { error($lang->error_nosearchterms); }
|
|
// Attempt to determine minimum word length from MySQL for fulltext searches $query = $db->query("SHOW VARIABLES LIKE 'ft_min_word_len';"); $min_length = $db->fetch_field($query, 'Value');
| // Attempt to determine minimum word length from MySQL for fulltext searches $query = $db->query("SHOW VARIABLES LIKE 'ft_min_word_len';"); $min_length = $db->fetch_field($query, 'Value');
|