Changeset 1606

Show
Ignore:
Timestamp:
06/17/08 08:30:54 (5 months ago)
Author:
misja
Message:

fixes #357, reverting r1602, which caused a merge conflict, see #369

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/mod/search/lib/search_suggest_users.php

    r1603 r1606  
    1010            } 
    1111             
    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 
    1314        $dbname = $db->qstr($parameter); 
    1415        $searchline = "SELECT DISTINCT name,username,MATCH(name) AGAINST (" . $dbname . ") AS score 
     
    1617    } else { 
    1718        $dbname = $db->qstr("%" . $parameter . "%"); 
    18         $searchline = "SELECT DISTINCT name,username  
    19                        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"; 
    2021    } 
    21      
     22 
    2223    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") { 
    2425            $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") { 
    2627            $run_result .= "<h2>" . __gettext("Matching communities:") . "</h2><p>"; 
    2728        } else {