mirror of
https://github.com/unraid/webgui.git
synced 2026-05-05 01:09:25 -05:00
Protect from errors in Cond
This commit is contained in:
Regular → Executable
+8
-2
@@ -44,9 +44,15 @@ function build_pages($pattern) {
|
||||
|
||||
function page_enabled(&$page)
|
||||
{
|
||||
global $var,$disks,$devs,$users,$shares,$sec,$sec_nfs,$name,$display,$pool_devices;
|
||||
global $docroot,$var,$disks,$devs,$users,$shares,$sec,$sec_nfs,$name,$display,$pool_devices;
|
||||
$enabled = true;
|
||||
if (isset($page['Cond'])) eval("\$enabled={$page['Cond']};");
|
||||
if (isset($page['Cond'])) {
|
||||
$enabled = false;
|
||||
$evalContent= "\$enabled={$page['Cond']};";
|
||||
$evalFile = $page['file'];
|
||||
$evalNoBanner = true;
|
||||
include "$docroot/webGui/include/DefaultPageLayout/evalContent.php";
|
||||
}
|
||||
return $enabled;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user