mirror of
https://github.com/unraid/webgui.git
synced 2026-03-14 06:51:27 -05:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -39,7 +39,7 @@ $arrWhitelist = [
|
||||
'/webGui/images/case-model.png',
|
||||
'/webGui/images/green-on.png'
|
||||
];
|
||||
if (in_array($_SERVER['REQUEST_URI'],$arrWhitelist)) {
|
||||
if (in_array(preg_replace(['/\?v=\d+/','/\?\d+/'],'',$_SERVER['REQUEST_URI']),$arrWhitelist)) {
|
||||
// authorized
|
||||
http_response_code(200);
|
||||
} else {
|
||||
|
||||
@@ -306,7 +306,7 @@ $theme_dark = in_array($display['theme'],['black','gray']);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<link type="text/css" rel="stylesheet" href="<?autov("/webGui/styles/default-cases.css")?>">
|
||||
<link type="text/css" rel="stylesheet" href="/webGui/styles/default-cases.css">
|
||||
<link type="image/png" rel="shortcut icon" href="/webGui/images/green-on.png">
|
||||
</head>
|
||||
|
||||
@@ -328,7 +328,7 @@ $theme_dark = in_array($display['theme'],['black','gray']);
|
||||
<?if (substr($mycase,-4)!='.png'):?>
|
||||
<span class='case-<?=$mycase?>'></span>
|
||||
<?else:?>
|
||||
<img src='<?=autov("/webGui/images/$mycase")?>'>
|
||||
<img src="/webGui/images/<?=$mycase?>">
|
||||
<?endif;?>
|
||||
<?else:?>
|
||||
<span class='case-define-r5'></span>
|
||||
|
||||
@@ -46,7 +46,7 @@ foreach (glob('plugins/*', GLOB_ONLYDIR) as $plugin) {
|
||||
// get variables
|
||||
$name = $_GET['name'];
|
||||
$dir = $_GET['dir'];
|
||||
$path = substr(explode('?', $_SERVER['REQUEST_URI'])[0], 1);
|
||||
$path = empty($_GET['path']) ? substr(explode('?', $_SERVER['REQUEST_URI'])[0], 1) : $_GET['path'];
|
||||
|
||||
// The current "task" is the first element of the path
|
||||
$task = strtok($path, '/');
|
||||
|
||||
Reference in New Issue
Block a user