mirror of
https://github.com/unraid/webgui.git
synced 2026-05-06 20:30:50 -05:00
Merge branch 'master' of github.com:limetech/webgui
This commit is contained in:
@@ -55,7 +55,7 @@ function my_temp($value) {
|
||||
}
|
||||
function my_disk($name,$raw=false) {
|
||||
global $display;
|
||||
return $display['raw']||$raw ? $name : ucfirst(preg_replace('/(\d+)$/',' $1',$name));
|
||||
return $display['raw']||$raw ? $name : preg_replace('/(\d+)$/',' $1',$name);
|
||||
}
|
||||
function my_disks($disk) {
|
||||
return strpos($disk['status'],'_NP')===false;
|
||||
|
||||
@@ -67,10 +67,11 @@ function find_pages($item) {
|
||||
}
|
||||
|
||||
function tab_title($title,$path,$tag) {
|
||||
global $docroot;
|
||||
if (preg_match('/^(disk|parity)/',$title)) {
|
||||
global $docroot,$pools;
|
||||
$names = implode('|',array_merge(['disk','parity'],$pools));
|
||||
if (preg_match("/^($names)/",$title)) {
|
||||
$device = strtok($title,' ');
|
||||
$title = str_replace($device,_(my_disk($device),3),$title);
|
||||
$title = str_replace($device,_(ucfirst(my_disk($device)),3),$title);
|
||||
}
|
||||
$title = _(parse_text($title));
|
||||
if (!$tag || substr($tag,-4)=='.png') {
|
||||
|
||||
Reference in New Issue
Block a user