plugins/SpecialPageFuncs.php
changeset 1103 90225c988124
parent 1090 6c84fb196026
child 1137 9f928ce05b6b
equal deleted inserted replaced
1102:faef5e62e1e0 1103:90225c988124
    10 }
    10 }
    11 **!*/
    11 **!*/
    12 
    12 
    13 /*
    13 /*
    14  * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
    14  * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
    15  * Version 1.1.6 (Caoineag beta 1)
    15  * Copyright (C) 2006-2009 Dan Fuhry
    16  * Copyright (C) 2006-2008 Dan Fuhry
       
    17  *
    16  *
    18  * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
    17  * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
    19  * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
    18  * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
    20  *
    19  *
    21  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
    20  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
   639           $min_id = ( isset($_GET['allow_anon']) && $_GET['allow_anon'] == '1' ) ? '1' : '2';
   638           $min_id = ( isset($_GET['allow_anon']) && $_GET['allow_anon'] == '1' ) ? '1' : '2';
   640           $q = $db->sql_query('SELECT username FROM ' . table_prefix . "users WHERE " . ENANO_SQLFUNC_LOWERCASE . "(username) LIKE '$search' AND user_id >= $min_id");
   639           $q = $db->sql_query('SELECT username FROM ' . table_prefix . "users WHERE " . ENANO_SQLFUNC_LOWERCASE . "(username) LIKE '$search' AND user_id >= $min_id");
   641           if ( !$q )
   640           if ( !$q )
   642             $db->die_json();
   641             $db->die_json();
   643           
   642           
   644           while ( $row = $db->fetchrow() )
   643           while ( $row = $db->fetchrow($q) )
   645           {
   644           {
   646             $key = array(
   645             $key = array(
   647               'name' => $row['username'],
   646               'name' => $row['username'],
   648               'name_highlight' => highlight_term($_GET['userinput'], $row['username'], '<b>', '</b>')
   647               'name_highlight' => highlight_term($_GET['userinput'], $row['username'], '<b>', '</b>')
   649             );
   648             );