Dotclear

Changeset 223:e44ed54b1001 for plugins


Ignore:
Timestamp:
05/08/11 21:44:10 (14 years ago)
Author:
annso <as.tranchet@…>
Branch:
default
Children:
224:23ec5a339bcf, 225:411ee50a8664, 249:d0a17b7ca6e0
Message:

Ajout de label et title dans les formulaires du plugin antispam

Location:
plugins/antispam
Files:
4 edited

Legend:

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

    r3 r223  
    1616     public $name = 'IP Filter'; 
    1717     public $has_gui = true; 
    18       
     18 
    1919     private $style_list = 'height: 200px; overflow: auto; margin-bottom: 1em; '; 
    2020     private $style_p = 'margin: 1px 0 0 0; padding: 0.2em 0.5em; '; 
    2121     private $style_global = 'background: #ccff99; '; 
    22       
     22 
    2323     private $con; 
    2424     private $table; 
    25       
     25 
    2626     public function __construct($core) 
    2727     { 
     
    3030          $this->table = $core->prefix.'spamrule'; 
    3131     } 
    32       
     32 
    3333     protected function setInfo() 
    3434     { 
    3535          $this->description = __('IP Blacklist / Whitelist Filter'); 
    3636     } 
    37       
     37 
    3838     public function getStatusMessage($status,$comment_id) 
    3939     { 
    4040          return sprintf(__('Filtered by %1$s with rule %2$s.'),$this->guiLink(),$status); 
    4141     } 
    42       
     42 
    4343     public function isSpam($type,$author,$email,$site,$ip,$content,$post_id,&$status) 
    4444     { 
     
    4646               return; 
    4747          } 
    48            
     48 
    4949          # White list check 
    5050          if ($this->checkIP($ip,'white') !== false) { 
    5151               return false; 
    5252          } 
    53            
     53 
    5454          # Black list check 
    5555          if (($s = $this->checkIP($ip,'black')) !== false) { 
     
    5858          } 
    5959     } 
    60       
     60 
    6161     public function gui($url) 
    6262     { 
    6363          global $default_tab; 
    6464          $core =& $this->core; 
    65            
     65 
    6666          # Set current type and tab 
    6767          $ip_type = 'black'; 
     
    7070          } 
    7171          $default_tab = 'tab_'.$ip_type; 
    72            
     72 
    7373          # Add IP to list 
    7474          if (!empty($_POST['addip'])) 
     
    7777               { 
    7878                    $global = !empty($_POST['globalip']) && $core->auth->isSuperAdmin(); 
    79                      
     79 
    8080                    $this->addIP($ip_type,$_POST['addip'],$global); 
    8181                    http::redirect($url.'&added=1&ip_type='.$ip_type); 
     
    8686               } 
    8787          } 
    88            
     88 
    8989          # Remove IP from list 
    9090          if (!empty($_POST['delip']) && is_array($_POST['delip'])) 
     
    9797               } 
    9898          } 
    99            
     99 
    100100          /* DISPLAY 
    101101          ---------------------------------------------- */ 
    102102          $res = ''; 
    103            
     103 
    104104          if (!empty($_GET['added'])) { 
    105105               $res .= '<p class="message">'.__('IP address has been successfully added.').'</p>'; 
     
    108108               $res .= '<p class="message">'.__('IP addresses have been successfully removed.').'</p>'; 
    109109          } 
    110            
     110 
    111111          $res .= 
    112112          $this->displayForms($url,'black',__('Blacklist')). 
    113113          $this->displayForms($url,'white',__('Whitelist')); 
    114            
     114 
    115115          return $res; 
    116116     } 
    117       
     117 
    118118     private function displayForms($url,$type,$title) 
    119119     { 
    120120          $core =& $this->core; 
    121            
     121 
    122122          $res = 
    123123          '<div class="multi-part" id="tab_'.$type.'" title="'.$title.'">'. 
    124            
     124 
    125125          '<form action="'.html::escapeURL($url).'" method="post">'. 
    126126          '<fieldset><legend>'.__('Add an IP address').'</legend><p>'. 
    127127          form::hidden(array('ip_type'),$type). 
    128           form::field(array('addip'),18,255).' '; 
    129            
     128          '<label class="classic" for="addip_'.$type.'">'.__('Add an IP address').' '. 
     129          form::field(array('addip', 'addip_'.$type),18,255). 
     130          '</label>'; 
    130131          if ($core->auth->isSuperAdmin()) { 
    131                $res .= '<label class="classic">'.form::checkbox(array('globalip'),1).' '. 
     132               $res .= '<label class="classic" for="globalip_'.$type.'">'.form::checkbox(array('globalip', 'globalip_'.$type),1).' '. 
    132133               __('Global IP').'</label> '; 
    133134          } 
    134            
     135 
    135136          $res .= 
    136137          $core->formNonce(). 
    137138          '<input type="submit" value="'.__('Add').'"/></p>'. 
    138139          '</fieldset></form>'; 
    139            
     140 
    140141          $rs = $this->getRules($type); 
    141            
     142 
    142143          if ($rs->isEmpty()) 
    143144          { 
     
    150151               '<fieldset><legend>' . __('IP list') . '</legend>'. 
    151152               '<div style="'.$this->style_list.'">'; 
    152                 
     153 
    153154               while ($rs->fetch()) 
    154155               { 
     
    157158                    $ip = $bits[1]; 
    158159                    $bitmask = $bits[2]; 
    159                      
     160 
    160161                    $disabled_ip = false; 
    161162                    $p_style = $this->style_p; 
     
    164165                         $p_style .= $this->style_global; 
    165166                    } 
    166                      
     167 
    167168                    $res .= 
    168169                    '<p style="'.$p_style.'"><label class="classic">'. 
    169                     form::checkbox(array('delip[]'),$rs->rule_id,false,'','',$disabled_ip).' '. 
     170                    form::checkbox(array('delip[]'),$rs->rule_id,false,'','',$disabled_ip, 'title="'.html::escapeHTML($pattern).'"').' '. 
    170171                    html::escapeHTML($pattern). 
    171172                    '</label></p>'; 
     
    178179               '</p>'. 
    179180               '</fieldset></form>'; 
    180           }     
    181            
     181          } 
     182 
    182183          $res .= '</div>'; 
    183            
     184 
    184185          return $res; 
    185186     } 
    186       
     187 
    187188     private function ipmask($pattern,&$ip,&$mask) 
    188189     { 
    189190          $bits = explode('/',$pattern); 
    190            
     191 
    191192          # Set IP 
    192193          $bits[0] .= str_repeat(".0", 3 - substr_count($bits[0], ".")); 
    193194          $ip = ip2long($bits[0]); 
    194            
     195 
    195196          if (!$ip || $ip == -1) { 
    196197               throw new Exception('Invalid IP address'); 
    197198          } 
    198            
     199 
    199200          # Set mask 
    200201          if (!isset($bits[1])) { 
     
    209210          } 
    210211     } 
    211       
     212 
    212213     private function addIP($type,$pattern,$global) 
    213214     { 
     
    215216          $pattern = long2ip($ip).($mask != -1 ? '/'.long2ip($mask) : ''); 
    216217          $content = $pattern.':'.$ip.':'.$mask; 
    217            
     218 
    218219          $old = $this->getRuleCIDR($type,$global,$ip,$mask); 
    219220          $cur = $this->con->openCursor($this->table); 
    220            
     221 
    221222          if ($old->isEmpty()) 
    222223          { 
    223224               $id = $this->con->select('SELECT MAX(rule_id) FROM '.$this->table)->f(0) + 1; 
    224                 
     225 
    225226               $cur->rule_id = $id; 
    226227               $cur->rule_type = (string) $type; 
    227228               $cur->rule_content = (string) $content; 
    228                 
     229 
    229230               if ($global && $this->core->auth->isSuperAdmin()) { 
    230231                    $cur->blog_id = null; 
     
    232233                    $cur->blog_id = $this->core->blog->id; 
    233234               } 
    234                 
     235 
    235236               $cur->insert(); 
    236237          } 
     
    242243          } 
    243244     } 
    244       
     245 
    245246     private function getRules($type='all') 
    246247     { 
     
    251252          "AND (blog_id = '".$this->core->blog->id."' OR blog_id IS NULL) ". 
    252253          'ORDER BY blog_id ASC, rule_content ASC '; 
    253            
     254 
    254255          return $this->con->select($strReq); 
    255256     } 
    256       
     257 
    257258     private function getRuleCIDR($type,$global,$ip,$mask) 
    258259     { 
     
    262263          "AND rule_content LIKE '%:".(integer) $ip.":".(integer) $mask."' ". 
    263264          'AND blog_id '.($global ? 'IS NULL ' : "= '".$this->core->blog->id."' "); 
    264            
     265 
    265266          return $this->con->select($strReq); 
    266267     } 
    267       
     268 
    268269     private function checkIP($cip,$type) 
    269270     { 
    270271          $core =& $this->core; 
    271            
     272 
    272273          $strReq = 
    273274          'SELECT DISTINCT(rule_content) '. 
     
    276277          "AND (blog_id = '".$this->core->blog->id."' OR blog_id IS NULL) ". 
    277278          'ORDER BY rule_content ASC '; 
    278            
     279 
    279280          $rs = $this->con->select($strReq); 
    280281          while ($rs->fetch()) 
     
    287288          return false; 
    288289     } 
    289       
     290 
    290291     private function removeRule($ids) 
    291292     { 
    292293          $strReq = 'DELETE FROM '.$this->table.' '; 
    293            
     294 
    294295          if (is_array($ids)) { 
    295296               foreach ($ids as $i => $v) { 
     
    301302               $strReq .= 'WHERE rule_id = '.$ids.' '; 
    302303          } 
    303            
     304 
    304305          if (!$this->core->auth->isSuperAdmin()) { 
    305306               $strReq .= "AND blog_id = '".$this->core->blog->id."' "; 
    306307          } 
    307            
     308 
    308309          $this->con->execute($strReq); 
    309310     } 
    310311} 
    311312?> 
     313 
  • plugins/antispam/filters/class.dc.filter.iplookup.php

    r0 r223  
    1616     public $name = 'IP Lookup'; 
    1717     public $has_gui = true; 
    18       
     18 
    1919     private $default_bls = 'sbl-xbl.spamhaus.org , bsb.spamlookup.net'; 
    20       
     20 
    2121     public function __construct($core) 
    2222     { 
    2323          parent::__construct($core); 
    24            
     24 
    2525          if (defined('DC_DNSBL_SUPER') && DC_DNSBL_SUPER && !$core->auth->isSuperAdmin()) { 
    2626               $this->has_gui = false; 
    2727          } 
    2828     } 
    29       
     29 
    3030     protected function setInfo() 
    3131     { 
    3232          $this->description = __('Checks sender IP address against DNSBL servers'); 
    3333     } 
    34       
     34 
    3535     public function getStatusMessage($status,$comment_id) 
    3636     { 
    3737          return sprintf(__('Filtered by %1$s with server %2$s.'),$this->guiLink(),$status); 
    3838     } 
    39       
     39 
    4040     public function isSpam($type,$author,$email,$site,$ip,$content,$post_id,&$status) 
    4141     { 
     
    4343               return; 
    4444          } 
    45            
     45 
    4646          $match = array(); 
    47            
     47 
    4848          $bls = $this->getServers(); 
    4949          $bls = preg_split('/\s*,\s*/',$bls); 
    50            
     50 
    5151          foreach ($bls as $bl) 
    5252          { 
     
    5555               } 
    5656          } 
    57            
     57 
    5858          if (!empty($match)) { 
    5959               $status = substr(implode(', ',$match),0,128); 
     
    6161          } 
    6262     } 
    63       
     63 
    6464     public function gui($url) 
    6565     { 
    6666          $bls = $this->getServers(); 
    67            
     67 
    6868          if (isset($_POST['bls'])) 
    6969          { 
     
    7676               } 
    7777          } 
    78            
     78 
    7979          /* DISPLAY 
    8080          ---------------------------------------------- */ 
    8181          $res = ''; 
    82            
     82 
    8383          $res .= 
    8484          '<form action="'.html::escapeURL($url).'" method="post">'. 
    8585          '<fieldset><legend>' . __('IP Lookup servers') . '</legend>'. 
    86           '<p>'.__('Add here a coma separated list of servers.').'</p>'. 
    87           '<p>'.form::textarea('bls',40,3,html::escapeHTML($bls),'maximal').'</p>'. 
     86          '<p>'.'<label for="bls">'.__('Add here a coma separated list of servers.').'</label>'. 
     87          form::textarea('bls',40,3,html::escapeHTML($bls),'maximal').'</p>'. 
    8888          '<p><input type="submit" value="'.__('Save').'" />'. 
    8989          $this->core->formNonce().'</p>'. 
    9090          '</fieldset>'. 
    9191          '</form>'; 
    92            
     92 
    9393          return $res; 
    9494     } 
    95       
     95 
    9696     private function getServers() 
    9797     { 
     
    102102               return $this->default_bls; 
    103103          } 
    104            
     104 
    105105          return $bls; 
    106106     } 
    107       
     107 
    108108     private function dnsblLookup($ip,$bl) 
    109109     { 
    110110          $revIp = implode('.',array_reverse(explode('.',$ip))); 
    111            
     111 
    112112          $host = $revIp.'.'.$bl.'.'; 
    113113          if (gethostbyname($host) != $host) { 
    114114               return true; 
    115115          } 
    116            
     116 
    117117          return false; 
    118118     } 
    119119} 
    120120?> 
     121 
  • plugins/antispam/filters/class.dc.filter.words.php

    r3 r223  
    1616     public $has_gui = true; 
    1717     public $name = 'Bad Words'; 
    18       
     18 
    1919     private $style_list = 'height: 200px; overflow: auto; margin-bottom: 1em; '; 
    2020     private $style_p = 'margin: 1px 0 0 0; padding: 0.2em 0.5em; '; 
    2121     private $style_global = 'background: #ccff99; '; 
    22       
     22 
    2323     private $con; 
    2424     private $table; 
    25       
     25 
    2626     public function __construct($core) 
    2727     { 
     
    3030          $this->table = $core->prefix.'spamrule'; 
    3131     } 
    32       
     32 
    3333     protected function setInfo() 
    3434     { 
    3535          $this->description = __('Words Blacklist'); 
    3636     } 
    37       
     37 
    3838     public function getStatusMessage($status,$comment_id) 
    3939     { 
    4040          return sprintf(__('Filtered by %1$s with word %2$s.'),$this->guiLink(),'<em>'.$status.'</em>'); 
    4141     } 
    42       
     42 
    4343     public function isSpam($type,$author,$email,$site,$ip,$content,$post_id,&$status) 
    4444     { 
    4545          $str = $author.' '.$email.' '.$site.' '.$content; 
    46            
     46 
    4747          $rs = $this->getRules(); 
    48            
     48 
    4949          while ($rs->fetch()) 
    5050          { 
    5151               $word = $rs->rule_content; 
    52                 
     52 
    5353               if (substr($word,0,1) == '/' && substr($word,-1,1) == '/') { 
    5454                    $reg = substr(substr($word,1),0,-1); 
     
    5757                    $reg = '(^|\s+|>|<)'.$reg.'(>|<|\s+|\.|$)'; 
    5858               } 
    59                 
     59 
    6060               if (preg_match('/'.$reg.'/msiu',$str)) { 
    6161                    $status = $word; 
     
    6464          } 
    6565     } 
    66       
     66 
    6767     public function gui($url) 
    6868     { 
    6969          $core =& $this->core; 
    70            
     70 
    7171          # Create list 
    7272          if (!empty($_POST['createlist'])) 
     
    7979               } 
    8080          } 
    81            
     81 
    8282          # Adding a word 
    8383          if (!empty($_POST['swa'])) 
    8484          { 
    8585               $globalsw = !empty($_POST['globalsw']) && $core->auth->isSuperAdmin(); 
    86                 
     86 
    8787               try { 
    8888                    $this->addRule($_POST['swa'],$globalsw); 
     
    9292               } 
    9393          } 
    94            
     94 
    9595          # Removing spamwords 
    9696          if (!empty($_POST['swd']) && is_array($_POST['swd'])) 
     
    103103               } 
    104104          } 
    105            
     105 
    106106          /* DISPLAY 
    107107          ---------------------------------------------- */ 
    108108          $res = ''; 
    109            
     109 
    110110          if (!empty($_GET['list'])) { 
    111111               $res .= '<p class="message">'.__('Words have been successfully added.').'</p>'; 
     
    117117               $res .= '<p class="message">'.__('Words have been successfully removed.').'</p>'; 
    118118          } 
    119            
     119 
    120120          $res .= 
    121121          '<form action="'.html::escapeURL($url).'" method="post">'. 
    122122          '<fieldset><legend>'.__('Add a word').'</legend>'. 
    123           '<p>'.form::field('swa',20,128).' '; 
    124            
     123          '<p><label class="classic" for="swa">'.__('Add a word').' '.form::field('swa',20,128).'</label>'; 
     124 
    125125          if ($core->auth->isSuperAdmin()) { 
    126                $res .= '<label class="classic">'.form::checkbox('globalsw',1).' '. 
     126               $res .= '<label class="classic" for="globalsw">'.form::checkbox('globalsw',1).' '. 
    127127               __('Global word').'</label> '; 
    128128          } 
    129            
     129 
    130130          $res .= 
    131131          $core->formNonce(). 
     
    133133          '</fieldset>'. 
    134134          '</form>'; 
    135            
     135 
    136136          $rs = $this->getRules(); 
    137137          if ($rs->isEmpty()) 
     
    145145               '<fieldset><legend>' . __('List') . '</legend>'. 
    146146               '<div style="'.$this->style_list.'">'; 
    147                 
     147 
    148148               while ($rs->fetch()) 
    149149               { 
     
    154154                         $p_style .= $this->style_global; 
    155155                    } 
    156                      
     156 
    157157                    $res .= 
    158158                    '<p style="'.$p_style.'"><label class="classic">'. 
    159                     form::checkbox(array('swd[]'),$rs->rule_id,false,'','',$disabled_word).' '. 
     159                    form::checkbox(array('swd[]'),$rs->rule_id,false,'','',$disabled_word, 'title="'.html::escapeHTML($rs->rule_content).'"').' '. 
    160160                    html::escapeHTML($rs->rule_content). 
    161161                    '</label></p>'; 
    162162               } 
    163                 
     163 
    164164               $res .= 
    165165               '</div>'. 
     
    169169               '</fieldset></form>'; 
    170170          } 
    171            
     171 
    172172          if ($core->auth->isSuperAdmin()) 
    173173          { 
     
    180180               '</form>'; 
    181181          } 
    182            
     182 
    183183          return $res; 
    184184     } 
    185       
     185 
    186186     private function getRules() 
    187187     { 
     
    192192                    "OR blog_id IS NULL ) ". 
    193193                    'ORDER BY blog_id ASC, rule_content ASC '; 
    194            
     194 
    195195          return $this->con->select($strReq); 
    196196     } 
    197       
     197 
    198198     private function addRule($content,$general=false) 
    199199     { 
     
    202202                    "AND rule_content = '".$this->con->escape($content)."' "; 
    203203          $rs = $this->con->select($strReq); 
    204            
     204 
    205205          if (!$rs->isEmpty()) { 
    206206               throw new Exception(__('This word exists')); 
    207207          } 
    208            
     208 
    209209          $rs = $this->con->select('SELECT MAX(rule_id) FROM '.$this->table); 
    210210          $id = (integer) $rs->f(0) + 1; 
    211            
     211 
    212212          $cur = $this->con->openCursor($this->table); 
    213213          $cur->rule_id = $id; 
    214214          $cur->rule_type = 'word'; 
    215215          $cur->rule_content = (string) $content; 
    216            
     216 
    217217          if ($general && $this->core->auth->isSuperAdmin()) { 
    218218               $cur->blog_id = null; 
     
    220220               $cur->blog_id = $this->core->blog->id; 
    221221          } 
    222            
     222 
    223223          $cur->insert(); 
    224224     } 
    225       
     225 
    226226     private function removeRule($ids) 
    227227     { 
    228228          $strReq = 'DELETE FROM '.$this->table.' '; 
    229            
     229 
    230230          if (is_array($ids)) { 
    231231               foreach ($ids as &$v) { 
     
    237237               $strReq .= 'WHERE rule_id = '.$ids.' '; 
    238238          } 
    239            
     239 
    240240          if (!$this->core->auth->isSuperAdmin()) { 
    241241               $strReq .= "AND blog_id = '".$this->con->escape($this->core->blog->id)."' "; 
    242242          } 
    243            
     243 
    244244          $this->con->execute($strReq); 
    245245     } 
    246       
     246 
    247247     public function defaultWordsList() 
    248248     { 
     
    347347               'zolus' 
    348348          ); 
    349            
     349 
    350350          foreach ($words as $w) { 
    351351               try { 
     
    356356} 
    357357?> 
     358 
  • plugins/antispam/index.php

    r3 r223  
    2828               throw new Exception(__('Filter does not exist.')); 
    2929          } 
    30            
     30 
    3131          if (!$filters[$_GET['f']]->hasGUI()) { 
    3232               throw new Exception(__('Filter has no user interface.')); 
    3333          } 
    34            
     34 
    3535          $filter = $filters[$_GET['f']]; 
    3636          $filter_gui = $filter->gui($filter->guiURL()); 
    3737     } 
    38       
     38 
    3939     # Remove all spam 
    4040     if (!empty($_POST['delete_all'])) 
    4141     { 
    4242          $ts = dt::str('%Y-%m-%d %H:%M:%S',$_POST['ts'],$core->blog->settings->system->blog_timezone); 
    43            
     43 
    4444          dcAntispam::delAllSpam($core,$ts); 
    4545          http::redirect($p_url.'&del=1'); 
    4646     } 
    47       
     47 
    4848     # Update filters 
    4949     if (isset($_POST['filters_upd'])) 
     
    5555               $i++; 
    5656          } 
    57            
     57 
    5858          # Enable active filters 
    5959          if (isset($_POST['filters_active']) && is_array($_POST['filters_active'])) { 
     
    6262               } 
    6363          } 
    64            
     64 
    6565          # Order filters 
    6666          if (!empty($_POST['f_order']) && empty($_POST['filters_order'])) 
     
    7474               $order = explode(',',trim($_POST['filters_order'],',')); 
    7575          } 
    76            
     76 
    7777          if (isset($order)) { 
    7878               foreach ($order as $i => $f) { 
     
    8080               } 
    8181          } 
    82            
     82 
    8383          # Set auto delete flag 
    8484          if (isset($_POST['filters_auto_del']) && is_array($_POST['filters_auto_del'])) { 
     
    8787               } 
    8888          } 
    89            
     89 
    9090          dcAntispam::$filters->saveFilterOpts($filters_opt); 
    9191          http::redirect($p_url.'&upd=1'); 
     
    116116     echo '<p><a href="'.$p_url.'">'.__('Return to filters').'</a></p>'; 
    117117     printf('<h3>'.__('%s configuration').'</h3>',$filter->name); 
    118       
     118 
    119119     echo $filter_gui; 
    120120} 
     
    125125     $published_count = dcAntispam::countPublishedComments($core); 
    126126     $moderationTTL = $core->blog->settings->antispam->antispam_moderation_ttl; 
    127       
     127 
    128128     echo 
    129129     '<form action="'.$p_url.'" method="post">'. 
    130130     '<fieldset><legend>'.__('Information').'</legend>'; 
    131       
     131 
    132132     if (!empty($_GET['del'])) { 
    133133          echo '<p class="message">'.__('Spam comments have been successfully deleted.').'</p>'; 
    134134     } 
    135       
     135 
    136136     echo 
    137137     '<ul class="spaminfo">'. 
     
    141141     $published_count.'</li>'. 
    142142     '</ul>'; 
    143       
     143 
    144144     if ($spam_count > 0) 
    145145     { 
     
    153153     } 
    154154     echo '</fieldset></form>'; 
    155       
    156       
     155 
     156 
    157157     # Filters 
    158158     echo 
    159159     '<form action="'.$p_url.'" method="post">'. 
    160160     '<fieldset><legend>'.__('Available spam filters').'</legend>'; 
    161       
     161 
    162162     if (!empty($_GET['upd'])) { 
    163163          echo '<p class="message">'.__('Filters configuration has been successfully saved.').'</p>'; 
    164164     } 
    165       
     165 
    166166     echo 
    167167     '<table class="dragable">'. 
     
    169169     '<th>'.__('Order').'</th>'. 
    170170     '<th>'.__('Active').'</th>'. 
    171      '<th>'.__('Auto Del.').'</th>'.     
     171     '<th>'.__('Auto Del.').'</th>'. 
    172172     '<th class="nowrap">'.__('Filter name').'</th>'. 
    173173     '<th colspan="2">'.__('Description').'</th>'. 
    174174     '</tr></thead>'. 
    175175     '<tbody id="filters-list" >'; 
    176       
     176 
    177177     $i = 0; 
    178178     foreach ($filters as $fid => $f) 
     
    185185               'title="'.__('Filter configuration').'" /></a>'; 
    186186          } 
    187            
     187 
    188188          echo 
    189189          '<tr class="line'.($f->active ? '' : ' offline').'" id="f_'.$fid.'">'. 
    190           '<td class="handle">'.form::field(array('f_order['.$fid.']'),2,5,(string) $i).'</td>'. 
    191           '<td class="nowrap">'.form::checkbox(array('filters_active[]'),$fid,$f->active).'</td>'. 
    192           '<td class="nowrap">'.form::checkbox(array('filters_auto_del[]'),$fid,$f->auto_delete).'</td>'.           
     190          '<td class="handle">'.form::field(array('f_order['.$fid.']'),2,5,(string) $i, '', '', false, 'title="'.__('position').'"').'</td>'. 
     191          '<td class="nowrap">'.form::checkbox(array('filters_active[]'),$fid,$f->active, '', '', false, 'title="'.__('Active').'"').'</td>'. 
     192          '<td class="nowrap">'.form::checkbox(array('filters_auto_del[]'),$fid,$f->auto_delete, '', '', false, 'title="'.__('Auto Del.').'"').'</td>'. 
    193193          '<td class="nowrap">'.$f->name.'</td>'. 
    194194          '<td class="maximal">'.$f->description.'</td>'. 
     
    203203     '<input type="submit" name="filters_upd" value="'.__('Save').'" /></p>'. 
    204204     '</fieldset></form>'; 
    205       
    206       
     205 
     206 
    207207     # Syndication 
    208208     if (DC_ADMIN_URL) 
    209209     { 
    210           $ham_feed = $core->blog->url.$core->url->getBase('hamfeed').'/'.$code = dcAntispam::getUserCode($core);  
     210          $ham_feed = $core->blog->url.$core->url->getBase('hamfeed').'/'.$code = dcAntispam::getUserCode($core); 
    211211          $spam_feed = $core->blog->url.$core->url->getBase('spamfeed').'/'.$code = dcAntispam::getUserCode($core); 
    212            
     212 
    213213          echo 
    214214          '<fieldset><legend>'.__('Syndication').'</legend>'. 
     
    224224</body> 
    225225</html> 
     226 
Note: See TracChangeset for help on using the changeset viewer.

Sites map