Skip to content

Commit

Permalink
Add disable option
Browse files Browse the repository at this point in the history
Add feature to disable cleaning, just in-case anyone ever has a issues with people abusing
Disable cleaner by default
  • Loading branch information
GM-Script-Writer-62850 committed Oct 11, 2015
1 parent c1cc619 commit b175f7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cleaner.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
$maxAge=86400;// max age in seconds, scans older that this will be deleted
$maxAge=-1;// Max age in seconds, scans older that this will be deleted; use a negative value to disable
if(isset($_GET['file'])){
if(is_numeric(strrpos($_GET['file'], "/")))
$_GET['file']=substr($_GET['file'],strrpos($_GET['file'],"/")+1);
$file=$_GET['file'];
$file0=substr($file,0,strrpos($file,"."));
echo '{"state":'.((@unlink("scans/thumb/Preview_$file0.jpg")&&@unlink("scans/file/Scan_$file"))?0:1).',"file":"'.$file.'"}';
}
else{
else if($maxAge>-1){
echo "<pre>\n";
$loc=$_SERVER['DOCUMENT_ROOT'].str_replace('cleaner.php','scans/file',$_SERVER['SCRIPT_NAME']);
$lst=scandir($loc);
Expand Down

0 comments on commit b175f7f

Please sign in to comment.