Changeset 756:5127beea4a3a for admin/services.php
- Timestamp:
- 11/10/11 16:12:01 (14 years ago)
- Branch:
- formfilters
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/services.php
r0 r756 25 25 $core->rest->addFunction('delMeta',array('dcRestMethods','delMeta')); 26 26 $core->rest->addFunction('setPostMeta',array('dcRestMethods','setPostMeta')); 27 $core->rest->addFunction('searchCommentAuthor',array('dcRestMethods','searchCommentAuthor')); 27 28 $core->rest->addFunction('searchMeta',array('dcRestMethods','searchMeta')); 28 29 … … 393 394 return $rsp; 394 395 } 396 397 public static function searchCommentAuthor($core,$get) 398 { 399 $q = !empty($get['q']) ? strtoupper($get['q']) : null; 400 401 $strReq = 'SELECT DISTINCT C.comment_author '. 402 'FROM '.$core->prefix.'comment C '. 403 'INNER JOIN '.$core->prefix.'post P on C.post_id = P.post_id '. 404 'WHERE P.blog_id = \''.$core->blog->id.'\' '. 405 'AND UPPER(comment_author) like \'%'.$core->con->escape($q).'%\'' 406 ; 407 //echo $strReq; 408 $rs = $core->con->select($strReq); 409 $rsp = new xmlTag(); 410 411 while ($rs->fetch()) 412 { 413 $author = new xmlTag('author'); 414 $author->name=$rs->comment_author; 415 $rsp->insertNode($author); 416 } 417 418 return $rsp; 419 } 420 395 421 } 396 422 ?>
Note: See TracChangeset
for help on using the changeset viewer.