Dotclear


Ignore:
Timestamp:
12/02/12 22:29:56 (13 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Direct access to blog pref only if antispam plugin is activated (addresses #903)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/comments.php

    r1050 r1051  
    217217           
    218218          if ($spam_count > 0) { 
    219                $moderationTTL = $core->blog->settings->antispam->antispam_moderation_ttl; 
    220219                
    221                echo  
    222                '<form action="plugin.php?p=antispam" method="post" class="fieldset">'; 
    223                 
     220               if ($core->plugins->moduleExists('antispam')) { 
     221                    echo  
     222                    '<form action="plugin.php?p=antispam" method="post" class="fieldset">'; 
     223               } 
     224 
    224225               if ($spam_count == 1) { 
    225226                    echo '<p>'.sprintf(__('You have one spam comments.'),'<strong>'.$spam_count.'</strong>').' '. 
     
    231232                
    232233               if ($core->plugins->moduleExists('antispam')) { 
     234 
     235                    $moderationTTL = $core->blog->settings->antispam->antispam_moderation_ttl; 
    233236                    $spam_redir = 
    234                     'comments.php?type='.$type. 
    235                     '&author='.preg_replace('/%/','%%',$author). 
    236                     '&status='.$status. 
    237                     '&sortby='.$sortby. 
    238                     '&ip='.preg_replace('/%/','%%',$ip). 
    239                     '&order='.$order. 
    240                     '&page='.$page. 
    241                     '&nb='.$nb_per_page; 
     237                         'comments.php?type='.$type. 
     238                         '&author='.preg_replace('/%/','%%',$author). 
     239                         '&status='.$status. 
     240                         '&sortby='.$sortby. 
     241                         '&ip='.preg_replace('/%/','%%',$ip). 
     242                         '&order='.$order. 
     243                         '&page='.$page. 
     244                         '&nb='.$nb_per_page; 
    242245                     
    243246                    echo 
     
    246249                    form::hidden('redir',$spam_redir). 
    247250                    '<input name="delete_all_spam" class="delete" type="submit" value="'.__('Delete all spams').'" /></p>'; 
     251 
     252                    if ($moderationTTL != null && $moderationTTL >=0) { 
     253                         echo '<p>'.sprintf(__('All spam comments older than %s day(s) will be automatically deleted.'), $moderationTTL).' '. 
     254                         sprintf(__('You can modify this duration in the %s'),'<a href="blog_pref.php"> '.__('Blog preferences').'</a>'). 
     255                         '</p>'; 
     256                    } 
     257 
     258                    echo '</form>'; 
    248259               } 
    249                 
    250                if ($moderationTTL != null && $moderationTTL >=0) { 
    251                     echo '<p>'.sprintf(__('All spam comments older than %s day(s) will be automatically deleted.'), $moderationTTL).' '. 
    252                     sprintf(__('You can modify this duration in the %s'),'<a href="blog_pref.php"> '.__('Blog preferences').'</a>'). 
    253                     '</p>'; 
    254                } 
    255                echo '</form>'; 
    256260          } 
    257261     } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map