mirror of
https://github.com/unraid/webgui.git
synced 2026-05-14 08:09:52 -05:00
Merge pull request #102 from bergware/master
Fixed regression error in erroneous display of disk table on Dashboard
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?PHP
|
||||
/* Copyright 2005-2016, Lime Technology
|
||||
* Copyright 2012-2016, Bergware International.
|
||||
/* Copyright 2005-2017, Lime Technology
|
||||
* Copyright 2012-2017, Bergware International.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2,
|
||||
@@ -24,9 +24,9 @@ function my_insert(&$source,$string) {
|
||||
function my_smart(&$source,$name,$page) {
|
||||
global $var,$disks,$path,$failed,$numbers,$saved;
|
||||
$disk = &$disks[$name];
|
||||
$select = isset($disk['smSelect']) ? $disk['smSelect'] : -1; if ($select==-1) $select = isset($var['smSelect']) ? $var['smSelect'] : 0;
|
||||
$level = isset($disk['smLevel']) ? $disk['smLevel'] : -1; if ($level==-1) $level = isset($var['smLevel']) ? $var['smLevel'] : 1;
|
||||
$events = isset($disk['smEvents']) ? explode('|',$disk['smEvents']) : (isset($var['smEvents']) ? explode('|',$var['smEvents']) : $numbers);
|
||||
$select = $disk['smSelect'] ?? -1; if ($select==-1) $select = $var['smSelect'] ?? 0;
|
||||
$level = $disk['smLevel'] ?? -1; if ($level==-1) $level = $var['smLevel'] ?? 1;
|
||||
$events = explode('|',$disk['smEvents'] ?? $var['smEvents'] ?? $numbers);
|
||||
$title = '';
|
||||
$thumb = 'good';
|
||||
$file = "state/smart/$name";
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?? '/usr/local/emhttp';
|
||||
$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
|
||||
|
||||
function normalize($text, $glue='_') {
|
||||
$words = explode($glue,$text);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/php -q
|
||||
<?PHP
|
||||
/* Copyright 2005-2016, Lime Technology
|
||||
* Copyright 2012-2016, Bergware International.
|
||||
/* Copyright 2005-2017, Lime Technology
|
||||
* Copyright 2012-2017, Bergware International.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2,
|
||||
@@ -111,10 +111,10 @@ function check_temp($name,$temp,$text,$info) {
|
||||
function check_smart($name,$port,$text,$info) {
|
||||
global $var,$disks,$notify,$saved,$server,$numbers;
|
||||
$disk = &$disks[$name];
|
||||
$select = isset($disk['smSelect']) ? $disk['smSelect'] : -1; if ($select==-1) $select = isset($all['smSelect']) ? $var['smSelect'] : 0;
|
||||
$level = isset($disk['smLevel']) ? $disk['smLevel'] : -1; if ($level==-1) $level = isset($var['smLevel']) ? $var['smLevel'] : 1;
|
||||
$events = isset($disk['smEvents']) ? explode('|',$disk['smEvents']) : (isset($var['smEvents']) ? explode('|',$var['smEvents']) : $numbers);
|
||||
$type = isset($disk['smType']) ? $disk['smType'] : -1; if ($type==-1) $type = isset($var['smType']) ? $var['smType'] : '';
|
||||
$select = $disk['smSelect'] ?? -1; if ($select==-1) $select = $var['smSelect'] ?? 0;
|
||||
$level = $disk['smLevel'] ?? -1; if ($level==-1) $level = $var['smLevel'] ?? 1;
|
||||
$events = explode('|',$disk['smEvents'] ?? $var['smEvents'] ?? $numbers);
|
||||
$type = $disk['smType'] ?? -1; if ($type==-1) $type = $var['smType'] ?? '';
|
||||
if ($type) {
|
||||
$ports = [];
|
||||
if (!empty($disk['smDevice'])) $port = $disk['smDevice'];
|
||||
|
||||
Reference in New Issue
Block a user