Dotclear


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

Clearer wording and layout on filter configuration pages (IP and Bad words), fixes #1341

Location:
plugins/antispam/filters
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • plugins/antispam/filters/class.dc.filter.ip.php

    r536 r893  
    130130          if ($core->auth->isSuperAdmin()) { 
    131131               $res .= '<label class="classic" for="globalip_'.$type.'">'.form::checkbox(array('globalip', 'globalip_'.$type),1).' '. 
    132                __('Global IP').'</label> '; 
     132               __('Global IP (used for all blogs)').'</label> '; 
    133133          } 
    134134 
     
    152152               '<div style="'.$this->style_list.'">'; 
    153153 
     154               $res_global = ''; 
     155               $res_local = ''; 
    154156               while ($rs->fetch()) 
    155157               { 
     
    166168                    } 
    167169 
    168                     $res .= 
     170                    $item = 
    169171                    '<p style="'.$p_style.'"><label class="classic" for="'.$type.'-ip-'.$rs->rule_id.'">'. 
    170172                    form::checkbox(array('delip[]',$type.'-ip-'.$rs->rule_id),$rs->rule_id,false,'','',$disabled_ip).' '. 
    171173                    html::escapeHTML($pattern). 
    172174                    '</label></p>'; 
    173                } 
     175 
     176                    if ($rs->blog_id) { 
     177                         // local list 
     178                         if ($res_local == '') { 
     179                              $res_local = '<h4>'.__('Local IPs (used only for this blog)').'</h4>'; 
     180                         } 
     181                         $res_local .= $item; 
     182                    } else { 
     183                         // global list 
     184                         if ($res_global == '') { 
     185                              $res_global = '<h4>'.__('Global IPs (used for all blogs)').'</h4>'; 
     186                         } 
     187                         $res_global .= $item; 
     188                    } 
     189               } 
     190               $res .= $res_local.$res_global; 
     191 
    174192               $res .= 
    175193               '</div>'. 
  • plugins/antispam/filters/class.dc.filter.words.php

    r536 r893  
    124124          if ($core->auth->isSuperAdmin()) { 
    125125               $res .= '<label class="classic" for="globalsw">'.form::checkbox('globalsw',1).' '. 
    126                __('Global word').'</label> '; 
     126               __('Global word (used for all blogs)').'</label> '; 
    127127          } 
    128128 
     
    145145               '<div style="'.$this->style_list.'">'; 
    146146 
     147               $res_global = ''; 
     148               $res_local = ''; 
    147149               while ($rs->fetch()) 
    148150               { 
     
    154156                    } 
    155157 
    156                     $res .= 
    157                     '<p style="'.$p_style.'"><label class="classic" for="word-'.$rs->rule_id.'">'. 
    158                     form::checkbox(array('swd[]', 'word-'.$rs->rule_id),$rs->rule_id,false,'','',$disabled_word).' '. 
    159                     html::escapeHTML($rs->rule_content). 
    160                     '</label></p>'; 
    161                } 
     158                    $item = '<p style="'.$p_style.'"><label class="classic" for="word-'.$rs->rule_id.'">'. 
     159                         form::checkbox(array('swd[]', 'word-'.$rs->rule_id),$rs->rule_id,false,'','',$disabled_word).' '. 
     160                         html::escapeHTML($rs->rule_content). 
     161                         '</label></p>'; 
     162 
     163                    if ($rs->blog_id) { 
     164                         // local list 
     165                         if ($res_local == '') { 
     166                              $res_local = '<h4>'.__('Local words (used only for this blog)').'</h4>'; 
     167                         } 
     168                         $res_local .= $item; 
     169                    } else { 
     170                         // global list 
     171                         if ($res_global == '') { 
     172                              $res_global = '<h4>'.__('Global words (used for all blogs)').'</h4>'; 
     173                         } 
     174                         $res_global .= $item; 
     175                    } 
     176               } 
     177               $res .= $res_local.$res_global; 
    162178 
    163179               $res .= 
Note: See TracChangeset for help on using the changeset viewer.

Sites map