Merge branch 'master' of github.com:limetech/webgui

This commit is contained in:
Tom Mortensen
2022-03-10 09:44:47 -08:00
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -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;
+4 -3
View File
@@ -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') {