mirror of
https://github.com/unraid/webgui.git
synced 2026-05-03 00:09:27 -05:00
ignore errors parsing cfg file
This commit is contained in:
@@ -40,7 +40,7 @@ function upcEnv(str) {
|
||||
<?
|
||||
// Determine what source we should use for web components
|
||||
if (file_exists('/boot/config/plugins/dynamix.my.servers/myservers.cfg')) { // context needed for the UPC ENV local check for signed out users
|
||||
extract(parse_ini_file('/boot/config/plugins/dynamix.my.servers/myservers.cfg',true));
|
||||
@extract(parse_ini_file('/boot/config/plugins/dynamix.my.servers/myservers.cfg',true));
|
||||
}
|
||||
// When signed out and there's no cookie, UPC ENV should be 'local' to avoid use of external resource. Otherwise default of 'production'.
|
||||
$UPC_ENV = $_COOKIE['UPC_ENV'] ?? ((empty($remote['apikey']) || empty($var['regFILE'])) ? 'local' : 'production');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!-- myservers2 -->
|
||||
<?
|
||||
if (file_exists('/boot/config/plugins/dynamix.my.servers/myservers.cfg')) {
|
||||
extract(parse_ini_file('/boot/config/plugins/dynamix.my.servers/myservers.cfg',true));
|
||||
@extract(parse_ini_file('/boot/config/plugins/dynamix.my.servers/myservers.cfg',true));
|
||||
}
|
||||
|
||||
$serverstate = [
|
||||
@@ -475,4 +475,4 @@
|
||||
theme="<?=$display['theme']?>"
|
||||
uptime="<?=1000*(time() - round(strtok(exec("cat /proc/uptime"),' ')))?>"
|
||||
></unraid-user-profile>
|
||||
<!-- /myservers2 -->
|
||||
<!-- /myservers2 -->
|
||||
|
||||
@@ -22,7 +22,7 @@ $var = (array)parse_ini_file('state/var.ini');
|
||||
$license_state = strtoupper(empty($var['regCheck']) ? $var['regTy'] : $var['regCheck']);
|
||||
$key_contents = str_replace(['+','/','='], ['-','_',''], trim(base64_encode(@file_get_contents($var['regFILE']))));
|
||||
if (file_exists('/boot/config/plugins/dynamix.my.servers/myservers.cfg')) {
|
||||
extract(parse_ini_file('/boot/config/plugins/dynamix.my.servers/myservers.cfg',true));
|
||||
@extract(parse_ini_file('/boot/config/plugins/dynamix.my.servers/myservers.cfg',true));
|
||||
}
|
||||
|
||||
$arr = [];
|
||||
|
||||
Reference in New Issue
Block a user