diff --git a/emhttp/plugins/dynamix/nchan/update_2 b/emhttp/plugins/dynamix/nchan/update_2 index c6427082c..e6345bdbd 100755 --- a/emhttp/plugins/dynamix/nchan/update_2 +++ b/emhttp/plugins/dynamix/nchan/update_2 @@ -355,7 +355,6 @@ while (true) { // parity schedule $a = 'schedule'; - $echo[$a] = []; [$delta,$bytes] = [_var($var,'mdResyncDt',0),_var($var,'mdResyncDb',0)]; $synced = create_sync($stamps); $sbSynced = array_shift($synced) ?: _var($var,'sbSynced'); @@ -365,6 +364,7 @@ while (true) { $echo[$a][] = "
"._('Elapsed time').": "._(my_clock(floor((time()-$sbSynced)/60)),2); $echo[$a][] = "
"._('Estimated finish').': '.($bytes ? _(my_clock(round(((($delta*(($size-$spot)/($bytes/100+1)))/100)/60),0)),2) : _('Unknown')); $echo[$a][] = "
".print_error(_var($var,'sbSyncErrs',0)); + $echo[$a] = implode($echo[$a]); } else { [$date,$duration,$speed,$status,$error,$action,$size] = last_parity_log(); if (_var($var,'sbSyncExit',0)!=0) { @@ -460,17 +460,14 @@ while (true) { case 'WL': $t = stage(0); break;} break; } - $echo[$a][] = "\n"; if ($check) { $frmt = _var($display,'date').(_var($display,'date')!='%c' ? ", "._var($display,'time') : ""); - $echo[$a][] = sprintf(_('Next check scheduled on **%s**'),_(my_date($frmt,$time+$t),0)); - $echo[$a][] = "
"._('Due in').": "._(my_clock(floor($t/60)),2); + $extra = sprintf(_('Next check scheduled on **%s**'),_(my_date($frmt,$time+$t),0))."
"._('Due in').": "._(my_clock(floor($t/60)),2); } else { - $echo[$a][] = _('Scheduled parity check is disabled'); + $extra = _('Scheduled parity check is disabled'); } + $echo[$a] = [implode($echo[$a]), $extra]; } - $echo[$a] = implode($echo[$a]); - $echo = json_encode($echo); $md5_new = md5($echo,true); if ($md5_new !== $md5_old) {