Changeset 3044:f2f9dfea9272
- Timestamp:
- 07/05/15 12:39:27 (10 years ago)
- Branch:
- default
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/comments.php
r2888 r3044 52 52 ); 53 53 54 55 54 /* Get comments 56 55 -------------------------------------------------------- */ … … 110 109 $params['comment_ip'] = $ip; 111 110 $show_filters = true; 111 } 112 113 // Add some sort order if spams displayed 114 if ($with_spam || ($status == -2)) { 115 $sortby_combo[__('IP')] = 'comment_ip'; 116 $sortby_combo[__('Spam filter')] = 'comment_spam_filter'; 112 117 } 113 118 … … 274 279 275 280 '</form>', 276 $show_filters 281 $show_filters, 282 ($with_spam || ($status == -2)) 277 283 ); 278 284 } -
inc/admin/lib.pager.php
r2858 r3044 374 374 class adminCommentList extends adminGenericList 375 375 { 376 public function display($page,$nb_per_page,$enclose_block='',$filter=false )376 public function display($page,$nb_per_page,$enclose_block='',$filter=false,$spam=false) 377 377 { 378 378 if ($this->rs->isEmpty()) … … 386 386 else 387 387 { 388 // Get antispam filters' name 389 $filters = array(); 390 if ($spam) { 391 if (class_exists(dcAntispam)) { 392 dcAntispam::initFilters(); 393 $fs = dcAntispam::$filters->getFilters(); 394 foreach ($fs as $fid => $f) 395 { 396 $filters[$fid] = $f->name; 397 } 398 } 399 } 400 388 401 $pager = new dcPager($page,$this->rs_count,$nb_per_page,10); 389 402 … … 413 426 '<th scope="col">'.__('Author').'</th>'. 414 427 '<th scope="col">'.__('Date').'</th>'. 415 '<th scope="col" class="txt-center">'.__('Status').'</th>'. 428 '<th scope="col" class="txt-center">'.__('Status').'</th>'; 429 if ($spam) { 430 $html_block .= 431 '<th scope="col">'.__('IP').'</th>'. 432 '<th scope="col">'.__('Spam filter').'</th>'; 433 } 434 $html_block .= 416 435 '<th scope="col" abbr="entry">'.__('Entry').'</th>'. 417 436 '</tr>%s</table></div>'; … … 429 448 while ($this->rs->fetch()) 430 449 { 431 echo $this->commentLine(isset($comments[$this->rs->comment_id]) );450 echo $this->commentLine(isset($comments[$this->rs->comment_id]),$spam,$filters); 432 451 } 433 452 … … 438 457 } 439 458 440 private function commentLine($checked=false )441 { 442 global $ author, $status, $sortby, $order, $nb_per_page;459 private function commentLine($checked=false,$spam=false,$filters=array()) 460 { 461 global $core, $author, $status, $sortby, $order, $nb_per_page; 443 462 444 463 $author_url = … … 495 514 '<td class="nowrap maximal"><a href="'.$author_url.'">'.html::escapeHTML($this->rs->comment_author).'</a></td>'. 496 515 '<td class="nowrap count">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->comment_dt).'</td>'. 497 '<td class="nowrap status txt-center">'.$img_status.'</td>'. 516 '<td class="nowrap status txt-center">'.$img_status.'</td>'; 517 if ($spam) { 518 $filter_name = ''; 519 if ($this->rs->comment_spam_filter) { 520 if (isset($filters[$this->rs->comment_spam_filter])) { 521 $filter_name = $filters[$this->rs->comment_spam_filter]; 522 } else { 523 $filter_name = $this->rs->comment_spam_filter; 524 } 525 } 526 $res .= 527 '<td class="nowrap"><a href="'.$core->adminurl->get("admin.comments",array('ip' => $this->rs->comment_ip)).'">'.$this->rs->comment_ip.'</a></td>'. 528 '<td class="nowrap">'.$filter_name.'</td>'; 529 } 530 $res .= 498 531 '<td class="nowrap discrete"><a href="'.$post_url.'">'. 499 532 $post_title.'</a>'. -
locales/fr/main.po
r3033 r3044 907 907 msgstr "Type :" 908 908 909 msgid "Spam filter" 910 msgstr "Filtre antispam" 911 909 912 msgid "comments per page" 910 913 msgstr "commentaires par page"
Note: See TracChangeset
for help on using the changeset viewer.