Dotclear


Ignore:
Timestamp:
07/31/12 13:18:23 (13 years ago)
Author:
Dsls <dsls@…>
Branch:
sexy
Message:

sexy step 1 : no more comments ...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/search.php

    r747 r848  
    4949          } 
    5050     } 
    51      # Get comments 
    52      elseif ($qtype == 'c') 
    53      { 
    54           $starting_scripts .= dcPage::jsLoad('js/_comments.js'); 
    55            
    56           $params['search'] = $q; 
    57           $params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page); 
    58           $params['no_content'] = true; 
    59           $params['order'] = 'comment_dt DESC'; 
    60            
    61           try { 
    62                $comments = $core->blog->getComments($params); 
    63                $counter = $core->blog->getComments($params,true); 
    64                $comment_list = new adminCommentList($core,$comments,$counter->f(0)); 
    65           } catch (Exception $e) { 
    66                $core->error->add($e->getMessage()); 
    67           } 
    68      } 
    6951} 
    7052 
     
    7860'<p><label for="q">'.__('Query:').' </label>'.form::field('q',30,255,html::escapeHTML($q)).'</p>'. 
    7961'<p><label for="qtype1" class="classic">'.form::radio(array('qtype','qtype1'),'p',$qtype == 'p').' '.__('Search entries').'</label> '. 
    80 '<label for="qtype2" class="classic">'.form::radio(array('qtype','qtype2'),'c',$qtype == 'c').' '.__('Search comments').'</label></p>'. 
     62'</p>'. 
    8163'</p><input type="submit" value="'.__('Search').'" /></p>'. 
    8264'</div>'. 
     
    134116          ); 
    135117     } 
    136      # Show posts 
    137      elseif ($qtype == 'c') 
    138      { 
    139           # Actions combo box 
    140           $combo_action = array(); 
    141           if ($core->auth->check('publish,contentadmin',$core->blog->id)) 
    142           { 
    143                $combo_action[__('publish')] = 'publish'; 
    144                $combo_action[__('unpublish')] = 'unpublish'; 
    145                $combo_action[__('mark as pending')] = 'pending'; 
    146                $combo_action[__('mark as junk')] = 'junk'; 
    147           } 
    148           if ($core->auth->check('delete,contentadmin',$core->blog->id)) 
    149           { 
    150                $combo_action[__('Delete')] = 'delete'; 
    151           } 
    152            
    153           if ($counter->f(0) > 0) { 
    154                printf('<h3>'. 
    155                ($counter->f(0) == 1 ? __('%d comment found') : __('%d comments found')). 
    156                '</h3>',$counter->f(0)); 
    157           } 
    158            
    159           $comment_list->display($page,$nb_per_page, 
    160           '<form action="comments_actions.php" method="post" id="form-comments">'. 
    161            
    162           '%s'. 
    163            
    164           '<div class="two-cols">'. 
    165           '<p class="col checkboxes-helpers"></p>'. 
    166            
    167           '<p class="col right"><label for="action2" class="classic">'.__('Selected comments action:').'</label> '. 
    168           form::combo(array('action','action2'),$combo_action). 
    169           '<input type="submit" value="'.__('ok').'" /></p>'. 
    170           form::hidden('redir',preg_replace('/%/','%%',$redir)). 
    171           $core->formNonce(). 
    172           '</div>'. 
    173           '</form>' 
    174           ); 
    175      } 
    176118} 
    177119 
Note: See TracChangeset for help on using the changeset viewer.

Sites map