automatically cleanup plugin-table from removed plugins (#10533)

* automatically cleanup plugin-table from removed plugins

* Update functions.php

* mis-placed bracket
This commit is contained in:
SourceDoctor
2019-08-27 19:47:04 +02:00
committed by Tony Murray
parent 3b6af60fa6
commit 2e2c329e9c
2 changed files with 31 additions and 3 deletions

View File

@@ -3,6 +3,7 @@
if (Auth::user()->hasGlobalAdmin()) {
// Scan for new plugins and add to the database
$new_plugins = scan_new_plugins();
$removed_plugins = scan_removed_plugins();
// Check if we have to toggle enabled / disable a particular module
@@ -46,6 +47,13 @@ if ($new_plugins > 0) {
</div>
</div>';
}
if ($removed_plugins > 0) {
echo '<div class="panel-body">
<div class="alert alert-warning">
We have found '.$removed_plugins.' removed plugins
</div>
</div>';
}
?>
<table class="table table-condensed">
<tr>