1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-10 00:27:45 +02:00

Log deprecated files during fileinspector scan and prompt to delete these files in admin.php when the log contains data.

This commit is contained in:
Cameron
2020-05-20 13:31:09 -07:00
parent 74a3735488
commit 0ed1a9ae5f
2 changed files with 77 additions and 2 deletions

View File

@@ -601,7 +601,7 @@ TMPO;
{
if(file_exists($path))
{
$found[] = $path;
$found[] = str_replace(e_BASE, "", $path);
}
@@ -628,7 +628,7 @@ TMPO;
$mes = e107::getMessage();
$error = 0;
foreach($this->deprecated as $file)
{
@@ -647,9 +647,17 @@ TMPO;
{
$message = e107::getParser()->lanVars(LAN_UI_FILE_DELETED_FAILED, array('x'=>$file));
$mes->addError($message);
$error++;
}
}
$logFile = e_LOG."fileinspector/deprecatedFiles.log";
if($error === 0 && file_exists($logFile))
{
@unlink($logFile);
}
}