Changeset 1639 for branches/multiuser/api.php
- Timestamp:
- 11/24/06 16:23:35 (2 years ago)
- Files:
-
- 1 modified
-
branches/multiuser/api.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/multiuser/api.php
r1628 r1639 52 52 rss_require('extlib/JSON.php'); 53 53 $json = new Services_JSON(); 54 $query = sanitize(@$_REQUEST['q'], RSS_SANITIZER_WORDS);54 $query = preg_replace('#[^a-z0-9\s]#','',@$_REQUEST['q']); 55 55 if ($query) { 56 56 $res = osSearch($query); 57 57 } else { 58 $res = array($query,array() );58 $res = array($query,array(),array(),array()); 59 59 } 60 header('Content-Type: application/json');60 header('Content-Type: text/plain'); 61 61 die ($json->encode($res)); 62 62 break; … … 80 80 ." c.id, c.title, c.url, c.siteurl, f.name " 81 81 ." 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"; 83 84 84 85 if (hidePrivate()) { … … 149 150 ." unix_timestamp(ifnull(i.pubdate, i.added)) as idate ,i.id as iid" 150 151 ." 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"; 153 155 154 156 if ($date) { … … 216 218 } 217 219 } 218 return array($q,$results );220 return array($q,$results,array(),array()); 219 221 } 220 222 ?>
