Changeset 1606
- Timestamp:
- 06/17/08 08:30:54 (6 months ago)
- Files:
-
- devel/mod/search/lib/search_suggest_users.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/mod/search/lib/search_suggest_users.php
r1603 r1606 10 10 } 11 11 12 if ($CFG->dbtype == 'mysql') { 12 if (FALSE && $CFG->dbtype == 'mysql') { 13 // FIXME: full-text indexing turned off because it will only search for whole words and not parts 13 14 $dbname = $db->qstr($parameter); 14 15 $searchline = "SELECT DISTINCT name,username,MATCH(name) AGAINST (" . $dbname . ") AS score … … 16 17 } else { 17 18 $dbname = $db->qstr("%" . $parameter . "%"); 18 $searchline = "SELECT DISTINCT name,username19 FROM ".$CFG->prefix."users WHERE (name LIKE " . $dbname . " ) $typeline LIMIT 20";19 $searchline = "SELECT DISTINCT username,name,ident 20 FROM ".$CFG->prefix."users WHERE (name LIKE " . $dbname . " OR username LIKE " . $dbname . ") $typeline LIMIT 20"; 20 21 } 21 22 22 23 if ($results = get_records_sql($searchline)) { 23 if ( !empty($PAGE->search_type_unformatted) &&$PAGE->search_type_unformatted == "person") {24 if ($PAGE->search_type_unformatted == "person") { 24 25 $run_result .= "<h2>" . __gettext("Matching users:") . "</h2><p>"; 25 } else if ( !empty($PAGE->search_type_unformatted) &&$PAGE->search_type_unformatted == "community") {26 } else if ($PAGE->search_type_unformatted == "community") { 26 27 $run_result .= "<h2>" . __gettext("Matching communities:") . "</h2><p>"; 27 28 } else {
