mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 00:24:21 +02:00
Updated plugin system to force menu refresh and only run enabled plugins
This commit is contained in:
@@ -10,11 +10,15 @@ if ($vars['view'] == "admin")
|
||||
}
|
||||
else
|
||||
{
|
||||
$plugin = dbFetchRow("SELECT `plugin_name` FROM `plugins` WHERE `plugin_name` = '".$vars['p']."'");
|
||||
$plugin = dbFetchRow("SELECT `plugin_name` FROM `plugins` WHERE `plugin_name` = '".$vars['p']."' AND `plugin_active`='1'");
|
||||
if(!empty($plugin))
|
||||
{
|
||||
require('plugins/'.$plugin['plugin_name'].'/'.$plugin['plugin_name'].'.inc.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
print_error( "This plugin is either disabled or not available." );
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user