Changeset 1049:1d17674d50ad
- Timestamp:
- 12/02/12 16:04:27 (13 years ago)
- Branch:
- default
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/comments.php
r796 r1049 211 211 if (!$with_spam) { 212 212 $spam_count = $core->blog->getComments(array('comment_status'=>-2),true)->f(0); 213 if ($spam_count == 1) { 214 echo '<p>'.sprintf(__('You have one spam comments.'),'<strong>'.$spam_count.'</strong>').' '. 215 '<a href="comments.php?status=-2">'.__('Show it.').'</a></p>'; 216 } elseif ($spam_count > 1) { 217 echo '<p>'.sprintf(__('You have %s spam comments.'),'<strong>'.$spam_count.'</strong>').' '. 218 '<a href="comments.php?status=-2">'.__('Show them.').'</a></p>'; 213 214 if (!empty($_GET['delspam'])) { 215 dcPage::message(__('Spam comments have been successfully deleted.')); 216 } 217 218 if ($spam_count > 0) { 219 $moderationTTL = $core->blog->settings->antispam->antispam_moderation_ttl; 220 221 echo 222 '<form action="plugin.php?p=antispam" method="post" class="fieldset">'; 223 224 if ($spam_count == 1) { 225 echo '<p>'.sprintf(__('You have one spam comments.'),'<strong>'.$spam_count.'</strong>').' '. 226 '<a href="comments.php?status=-2">'.__('Show it.').'</a></p>'; 227 } elseif ($spam_count > 1) { 228 echo '<p>'.sprintf(__('You have %s spam comments.'),'<strong>'.$spam_count.'</strong>').' '. 229 '<a href="comments.php?status=-2">'.__('Show them.').'</a></p>'; 230 } 231 232 if ($core->plugins->moduleExists('antispam')) { 233 $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; 242 243 echo 244 $core->formNonce(). 245 form::hidden('ts',time()). 246 form::hidden('redir',$spam_redir). 247 '<input name="delete_all_spam" class="delete" type="submit" value="'.__('Delete all spams').'" /></p>'; 248 } 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 __('You can modify this duration in '). 253 '<a href="blog_pref.php"> '.__('Blog preferences').'</a></p>'; 254 } 255 echo '</form>'; 219 256 } 220 257 } -
admin/js/_comments.js
r1034 r1049 115 115 $('#form-comments td input[type=checkbox]').enableShiftClick(); 116 116 dotclear.commentsActionsHelper(); 117 $('form input[type=submit][name=delete_all_spam]').click(function(){ 118 return window.confirm(dotclear.msg.confirm_spam_delete); 119 }); 117 120 }); -
inc/admin/lib.dc.page.php
r1039 r1049 433 433 self::jsVar('dotclear.msg.confirm_delete_post', 434 434 __("Are you sure you want to delete this entry?")). 435 self::jsVar('dotclear.msg.confirm_spam_delete', 436 __('Are you sure you want to delete all spams?')). 435 437 self::jsVar('dotclear.msg.confirm_delete_comments', 436 438 __('Are you sure you want to delete selected comments (%s)?')). -
plugins/antispam/antispam.js
r1040 r1049 4 4 dragsort.makeTableSortable(this,dotclear.sortable.setHandle, dotclear.sortable.saveOrder); 5 5 }); 6 $('form input[type=submit][name=delete_all ]').click(function(){6 $('form input[type=submit][name=delete_all_spam]').click(function(){ 7 7 return window.confirm(dotclear.msg.confirm_spam_delete); 8 8 }); -
plugins/antispam/index.php
r1040 r1049 20 20 $default_tab = null; 21 21 22 $redir = isset($_POST['redir']) && strpos($_POST['redir'],'://') === false ? 23 $_POST['redir'] : $p_url; 24 22 25 try 23 26 { … … 38 41 39 42 # Remove all spam 40 if (!empty($_POST['delete_all ']))43 if (!empty($_POST['delete_all_spam'])) 41 44 { 42 45 $ts = dt::str('%Y-%m-%d %H:%M:%S',$_POST['ts'],$core->blog->settings->system->blog_timezone); 43 46 44 47 dcAntispam::delAllSpam($core,$ts); 45 http::redirect($ p_url.'&del=1');48 http::redirect($redir.'&delspam=1'); 46 49 } 47 50 … … 138 141 '<h3>'.__('Information').'</h3>'; 139 142 140 if (!empty($_GET['del '])) {143 if (!empty($_GET['delspam'])) { 141 144 dcPage::message(__('Spam comments have been successfully deleted.')); 142 145 } … … 155 158 '<p>'.$core->formNonce(). 156 159 form::hidden('ts',time()). 157 '<input name="delete_all " class="delete" type="submit" value="'.__('Delete all spams').'" /></p>';160 '<input name="delete_all_spam" class="delete" type="submit" value="'.__('Delete all spams').'" /></p>'; 158 161 } 159 162 if ($moderationTTL != null && $moderationTTL >=0) {
Note: See TracChangeset
for help on using the changeset viewer.