Changeset 1052:de274bbd7b80 for plugins/antispam
- Timestamp:
- 12/03/12 14:14:58 (13 years ago)
- Branch:
- default
- Location:
- plugins/antispam
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/antispam/_admin.php
r324 r1052 49 49 $core->addBehavior('adminBlogPreferencesForm',array('antispamBehaviors','adminBlogPreferencesForm')); 50 50 $core->addBehavior('adminBeforeBlogSettingsUpdate',array('antispamBehaviors','adminBeforeBlogSettingsUpdate')); 51 $core->addBehavior('adminCommentsSpamForm',array('antispamBehaviors','adminCommentsSpamForm')); 51 52 } 52 53 53 54 class antispamBehaviors 54 55 { 56 public static function adminCommentsSpamForm($core) 57 { 58 $ttl = $core->blog->settings->antispam->antispam_moderation_ttl; 59 if ($ttl != null && $ttl >=0) { 60 echo '<p>'.sprintf(__('All spam comments older than %s day(s) will be automatically deleted.'), $ttl).' '. 61 sprintf(__('You can modify this duration in the %s'),'<a href="blog_pref.php"> '.__('Blog preferences').'</a>'). 62 '</p>'; 63 } 64 } 65 55 66 public static function adminBlogPreferencesForm($core,$settings) 56 67 { -
plugins/antispam/antispam.js
r1049 r1052 4 4 dragsort.makeTableSortable(this,dotclear.sortable.setHandle, dotclear.sortable.saveOrder); 5 5 }); 6 $('form input[type=submit][name=delete_all _spam]').click(function(){6 $('form input[type=submit][name=delete_all]').click(function(){ 7 7 return window.confirm(dotclear.msg.confirm_spam_delete); 8 8 }); -
plugins/antispam/index.php
r1049 r1052 20 20 $default_tab = null; 21 21 22 $redir = isset($_POST['redir']) && strpos($_POST['redir'],'://') === false ?23 $_POST['redir'] : $p_url;24 25 22 try 26 23 { … … 41 38 42 39 # Remove all spam 43 if (!empty($_POST['delete_all _spam']))40 if (!empty($_POST['delete_all'])) 44 41 { 45 42 $ts = dt::str('%Y-%m-%d %H:%M:%S',$_POST['ts'],$core->blog->settings->system->blog_timezone); 46 43 47 44 dcAntispam::delAllSpam($core,$ts); 48 http::redirect($ redir.'&delspam=1');45 http::redirect($p_url.'&del=1'); 49 46 } 50 47 … … 141 138 '<h3>'.__('Information').'</h3>'; 142 139 143 if (!empty($_GET['del spam'])) {140 if (!empty($_GET['del'])) { 144 141 dcPage::message(__('Spam comments have been successfully deleted.')); 145 142 } … … 158 155 '<p>'.$core->formNonce(). 159 156 form::hidden('ts',time()). 160 '<input name="delete_all _spam" class="delete" type="submit" value="'.__('Delete all spams').'" /></p>';157 '<input name="delete_all" class="delete" type="submit" value="'.__('Delete all spams').'" /></p>'; 161 158 } 162 159 if ($moderationTTL != null && $moderationTTL >=0) {
Note: See TracChangeset
for help on using the changeset viewer.