Changeset 1548
- Timestamp:
- 03/08/08 16:37:32 (2 months ago)
- Files:
-
- branches/punbb-1.3-dev/upload/search.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/punbb-1.3-dev/upload/search.php
r1543 r1548 82 82 if (!$keywords && !$author) 83 83 message($lang_search['No terms']); 84 85 if ($author)86 $author = str_replace('*', '%', $author);87 84 88 85 $show_as = (isset($_GET['show_as'])) ? $_GET['show_as'] : 'posts'; … … 216 213 'SELECT' => 'u.id', 217 214 'FROM' => 'users AS u', 218 'WHERE' => 'u.username '.($db_type == 'pgsql' ? 'ILIKE' : 'LIKE').' \''.$db->escape( $author).'\''215 'WHERE' => 'u.username '.($db_type == 'pgsql' ? 'ILIKE' : 'LIKE').' \''.$db->escape(str_replace('*', '%', $author)).'\'' 219 216 ); 220 217 … … 396 393 WHERE 397 394 (fp.read_forum IS NULL OR fp.read_forum=1) 398 '.($author ? 'AND p.poster LIKE \''.$db->escape( $author).'\'' : '').'395 '.($author ? 'AND p.poster LIKE \''.$db->escape(str_replace('*', '%', $author)).'\'' : '').' 399 396 '.($keywords ? 'AND MATCH(p.message) AGAINST(\''.$db->escape($keywords).'\' IN BOOLEAN MODE)' : '').' 400 397 '.$forum_where.' … … 411 408 WHERE 412 409 (fp.read_forum IS NULL OR fp.read_forum=1) 413 '.($author ? 'AND t.poster LIKE \''.$db->escape( $author).'\'' : '').'410 '.($author ? 'AND t.poster LIKE \''.$db->escape(str_replace('*', '%', $author)).'\'' : '').' 414 411 '.($keywords ? 'AND MATCH(t.subject) AGAINST(\''.$db->escape($keywords).'\' IN BOOLEAN MODE)' : '').' 415 412 '.$forum_where.' … … 420 417 WHERE 421 418 (fp.read_forum IS NULL OR fp.read_forum=1) 422 '.($author ? 'AND p.poster LIKE \''.$db->escape( $author).'\'' : '').'419 '.($author ? 'AND p.poster LIKE \''.$db->escape(str_replace('*', '%', $author)).'\'' : '').' 423 420 '.($keywords ? 'AND MATCH(p.message) AGAINST(\''.$db->escape($keywords).'\' IN BOOLEAN MODE)' : '').' 424 421 '.$forum_where.'
