Dotclear


Ignore:
Timestamp:
04/04/13 16:04:11 (12 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Children:
1144:4af82896ca3d, 1155:49ba58cbf593
Message:

Display "Delete all spams" button as far as it is useful. Fixes #1398

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/comments.php

    r1054 r1143  
    225225     '</form>'; 
    226226      
    227      if (!$with_spam) { 
    228  
    229           $spam_count = $core->blog->getComments(array('comment_status'=>-2),true)->f(0); 
     227     $spam_count = $core->blog->getComments(array('comment_status'=>-2),true)->f(0); 
     228     if ($spam_count > 0) { 
    230229           
    231           if ($spam_count > 0) { 
    232                 
    233                echo  
    234                     '<form action="comments.php" method="post" class="fieldset">'; 
    235  
     230          echo  
     231               '<form action="comments.php" method="post" class="fieldset">'; 
     232 
     233          if (!$with_spam || ($status != -2)) { 
    236234               if ($spam_count == 1) { 
    237235                    echo '<p>'.sprintf(__('You have one spam comments.'),'<strong>'.$spam_count.'</strong>').' '. 
     
    241239                    '<a href="comments.php?status=-2">'.__('Show them.').'</a></p>'; 
    242240               } 
    243                 
    244                echo 
    245                     $core->formNonce(). 
    246                     '<input name="delete_all_spam" class="delete" type="submit" value="'.__('Delete all spams').'" /></p>'; 
    247  
    248                # --BEHAVIOR-- adminCommentsSpamForm 
    249                $core->callBehavior('adminCommentsSpamForm',$core); 
    250  
    251                echo '</form>'; 
    252241          } 
     242           
     243          echo 
     244               $core->formNonce(). 
     245               '<input name="delete_all_spam" class="delete" type="submit" value="'.__('Delete all spams').'" /></p>'; 
     246 
     247          # --BEHAVIOR-- adminCommentsSpamForm 
     248          $core->callBehavior('adminCommentsSpamForm',$core); 
     249 
     250          echo '</form>'; 
    253251     } 
    254252      
Note: See TracChangeset for help on using the changeset viewer.

Sites map