Show
Ignore:
Timestamp:
11/24/06 16:23:35 (2 years ago)
Author:
mdodoo
Message:

Attempted sync with trunk through "diff -r." Ignored the internationalized langugage files because i was afraid of messing something up.

It is 10:30 am. I should get some sleep.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/multiuser/api.php

    r1628 r1639  
    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; 
     
    8080           ." c.id, c.title, c.url, c.siteurl, f.name " 
    8181           ." from ".getTable("channels")." c " 
    82            . " inner join " . getTable("folders")." f on f.id = c.parent"; 
     82           ." inner join " . getTable("folders")." f " 
     83           ."  on f.id = c.parent"; 
    8384 
    8485    if (hidePrivate()) { 
     
    149150           ." unix_timestamp(ifnull(i.pubdate, i.added)) as idate ,i.id as iid" 
    150151           ." from ".getTable('item')." i " 
    151            . " inner join ".getTable('channels') ." c " 
    152            ." on i.cid=c.id where i.unread & ". RSS_MODE_UNREAD_STATE ." and c.id=$cid"; 
     152            ." inner join " .getTable('channels') ." c " 
     153            ."  on c.id = i.cid " 
     154            ." where i.unread & ". RSS_MODE_UNREAD_STATE ." and c.id=$cid"; 
    153155 
    154156    if ($date) { 
     
    216218        } 
    217219    } 
    218     return array($q,$results); 
     220    return array($q,$results,array(),array()); 
    219221} 
    220222?>