Skip to content

Commit

Permalink
Check for old files and remove if present
Browse files Browse the repository at this point in the history
  • Loading branch information
Moc committed Jan 24, 2021
1 parent 671825f commit 20d72b0
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions admin_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,31 @@ public function init()
{
e107::getMessage()->addWarning("This plugin is not yet installed. Saving and loading of preference or table data will fail."); // DO NOT TRANSLATE
}

$old_files = array(
'index.html',
'e_module.php',
'plugin.php',
);

foreach($old_files as $old_file)
{
if(file_exists($old_file))
{
@unlink($old_file);

if(file_exists($old_file))
{
e107::getMessage()->addDebug("Please remove the following outdated file: ".$old_file); // DO NOT TRANSLATE
}
else
{
e107::getMessage()->addSuccess("Outdated file removed: ".$old_file);
e107::getPlug()->clearCache()->buildAddonPrefLists();
}
}
}

}


Expand Down

0 comments on commit 20d72b0

Please sign in to comment.