Changeset 2986:1e5a2d6a0074 for plugins
Legend:
- Unmodified
- Added
- Removed
-
plugins/antispam/filters/class.dc.filter.words.php
r2566 r2986 113 113 114 114 if ($core->auth->isSuperAdmin()) { 115 $res .= '<label class="classic" for="globalsw">'.form::checkbox('globalsw',1).'</label> '.116 __('Global word (used for all blogs)');115 $res .= form::checkbox('globalsw',1). 116 '<label class="classic" for="globalsw">'.__('Global word (used for all blogs)').'</label> '; 117 117 } 118 118 … … 167 167 } 168 168 } 169 $res .= $res_local.$res_global; 169 $res .= '<div class="local">'.$res_local.'</div>'; 170 $res .= '<div class="global">'.$res_global.'</div>'; 170 171 171 172 $res .= … … 208 209 "WHERE rule_type = 'word' ". 209 210 "AND rule_content = '".$this->con->escape($content)."' "; 211 if (!$general) { 212 $strReq .= ' AND blog_id = \''.$this->core->blog->id.'\''; 213 } 210 214 $rs = $this->con->select($strReq); 211 215 212 if (!$rs->isEmpty() ) {216 if (!$rs->isEmpty() && !$general) { 213 217 throw new Exception(__('This word exists')); 214 218 } … … 228 232 } 229 233 230 $cur->insert(); 234 if (!$rs->isEmpty() && $general) { 235 $cur->update(); 236 } else { 237 $cur->insert(); 238 } 231 239 } 232 240
Note: See TracChangeset
for help on using the changeset viewer.