Permalink
Browse files

Update afdbot.php

Add transclusion timer to prevent hasty transclusions.
  • Loading branch information...
cyberpower678 committed Dec 7, 2013
1 parent 9b92508 commit c5abcf0ae40fb25707005e370d30cdc2327866d1
Showing with 7 additions and 2 deletions.
  1. +7 −2 SnotBot/afdbot.php
View
@@ -62,7 +62,12 @@
if( !in_array( $logpagename, $logpages ) ) {
$logpagedata = $site->initPage( $logpagename )->get_text( true );
if( str_ireplace( str_replace( "_", " ", $afd['title'] ), "", str_replace( "_", " ", $logpagedata ) ) == str_replace( "_", " ", $logpagedata ) ) {
transclude( $afd['title'], logPageName( time() ) );
if( time() - $creationdate > 600 ) {
transclude( $afd['title'], logPageName( time() ) );
}
else {
$checkedafds = array_diff( $checkedafds, array( $afd['title'] ) );
}
}
}
else {
@@ -569,4 +574,4 @@ function getLogPages() {
function logPageName( $dt ) {
return "Wikipedia:Articles for deletion/Log/".date( 'Y F j', $dt );
}
}

0 comments on commit c5abcf0

Please sign in to comment.