Show
Ignore:
Timestamp:
11/07/06 14:23:57 (2 years ago)
Author:
mbonetti
Message:

403 Error message, updated Vietnamese, tiny changes to Admin, API

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/api.php

    r1613 r1629  
    5252        rss_require('extlib/JSON.php'); 
    5353        $json = new Services_JSON(); 
    54         $query = sanitize(@$_REQUEST['q'], RSS_SANITIZER_WORDS); 
     54        $query = preg_replace('#[^a-z0-9\s]#','',@$_REQUEST['q']); 
    5555        if ($query) { 
    5656            $res = osSearch($query); 
    5757        } else { 
    58             $res = array($query,array()); 
     58            $res = array($query,array(),array(),array()); 
    5959        } 
    60         header('Content-Type: application/json'); 
     60        header('Content-Type: text/plain'); 
    6161        die ($json->encode($res)); 
    6262        break; 
     
    218218        } 
    219219    } 
    220     return array($q,$results); 
     220    return array($q,$results,array(),array()); 
    221221} 
    222222?>