diff --git a/emhttp/plugins/dynamix/ArrayDevices.page b/emhttp/plugins/dynamix/ArrayDevices.page index 033761024..4d6427f4f 100644 --- a/emhttp/plugins/dynamix/ArrayDevices.page +++ b/emhttp/plugins/dynamix/ArrayDevices.page @@ -37,7 +37,7 @@ function toggle_state(device,name,action) { button = '[id^=button-]'; } devices.stop(); - $.post('/webGui/include/ToggleState.php',{device:device,name:name,action:action,state:'',csrf:''},function(){setTimeout(function(){devices.start();},1000);if (button) $(button).prop('disabled',false);}); + $.post('/webGui/include/ToggleState.php',{device:device,name:name,action:action},function(){setTimeout(function(){devices.start();},1000);if (button) $(button).prop('disabled',false);}); } function display_diskio() { if ($.cookie('diskio')===undefined) { diff --git a/emhttp/plugins/dynamix/include/ToggleState.php b/emhttp/plugins/dynamix/include/ToggleState.php index b04ce54fe..f71c2f8a1 100644 --- a/emhttp/plugins/dynamix/include/ToggleState.php +++ b/emhttp/plugins/dynamix/include/ToggleState.php @@ -12,26 +12,15 @@ ?> '/var/run/emhttpd.socket', CURLOPT_POST => 1, CURLOPT_POSTFIELDS => "$cmd&startState=$state&csrf_token=$csrf"]; - curl_setopt_array($ch, $options); - curl_exec($ch); - curl_close($ch); + exec("emcmd $cmd"); } - switch ($device) { case 'New': emhttpd("cmdSpin{$action}={$name}"); @@ -57,7 +46,7 @@ default: foreach ($disks as $disk) { if (_var($disk,'status') != 'DISK_OK') continue; $array = ($name=='array' && in_array(_var($disk,'type'),['Parity','Data'])); - if ($array || prefix(_var($disk,'name'))==$name) emhttpd("cmdSpin{$action}="._var($disk,'name')); + if ($array || explode($tilde,prefix(_var($disk,'name')))[0]==$name) emhttpd("cmdSpin{$action}="._var($disk,'name')); } break; } diff --git a/emhttp/plugins/dynamix/nchan/device_list b/emhttp/plugins/dynamix/nchan/device_list index 939153cf2..42ac86c8f 100755 --- a/emhttp/plugins/dynamix/nchan/device_list +++ b/emhttp/plugins/dynamix/nchan/device_list @@ -487,7 +487,7 @@ while (true) { if (strcmp($root,$pool)!=0) $cache[$root]['devices'] += $cache[$pool]['devices']; if (strcmp($pool,$print)==0) { delete_file($pool_log); - if (_var($display,'total') && _var($cache[$root],'devices',0)>1) $echo[$n] .= show_totals(sprintf(_('Pool of %s devices'),my_word($cache[$root]['devices'])),strpos($pool,$tilde)!==false,"$pool*"); + if (_var($display,'total') && _var($cache[$root],'devices',0)>1) $echo[$n] .= show_totals(sprintf(_('Pool of %s devices'),my_word($cache[$root]['devices'])),strpos($pool,$tilde)!==false,"$root*"); $sum = initSum(); } }