Dotclear


Ignore:
Timestamp:
11/10/11 16:12:01 (14 years ago)
Author:
Dsls <dsls@…>
Branch:
formfilters
Message:
  • Adapted comments.php do new filters
  • added author filter, with autocompletion
  • added comment_author parameter to dcBlog::getComments
  • removed jquery.autocomplete
  • added jquery UI (should be refined, this is quite raw...)
  • added dcPager::jqueryUI
  • adapted tags plugin to new jquery ui autocomplete
File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/services.php

    r0 r756  
    2525$core->rest->addFunction('delMeta',array('dcRestMethods','delMeta')); 
    2626$core->rest->addFunction('setPostMeta',array('dcRestMethods','setPostMeta')); 
     27$core->rest->addFunction('searchCommentAuthor',array('dcRestMethods','searchCommentAuthor')); 
    2728$core->rest->addFunction('searchMeta',array('dcRestMethods','searchMeta')); 
    2829 
     
    393394          return $rsp; 
    394395     } 
     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 
    395421} 
    396422?> 
Note: See TracChangeset for help on using the changeset viewer.

Sites map