Skip to content

Commit a88bff5

Browse files
committed
better sys/uuls - new email(s) field array
1 parent 5892d4c commit a88bff5

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

app/Http/Controllers/SystemController.php

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,20 @@ public function sysGetSpoolList(){
221221
if(!empty($output[$i])) {
222222
$fields = explode(" ", $output[$i]);
223223
if ( $fields[6] != "uuadmin"){
224+
$count=count($fields);
225+
$emails=array();
226+
$size= 0;
227+
if($count>11){
228+
for($j = 7 ; $j < $count-3 ; $j++){
229+
$emails[]=$fields[$j];
230+
}
231+
$size = $fields[$count-2];
232+
}
233+
else{
234+
$size = $fields[9];
235+
$emails[] = $fields[7];
236+
237+
}
224238
$uuid = explode(".",$fields[0]);
225239
$spool[] = [
226240
'uuidhost' => $uuid[0],
@@ -230,8 +244,9 @@ public function sysGetSpoolList(){
230244
'date' => $fields[3],
231245
'time' => $fields[4],
232246
'type' => $fields[5] == "Executing" ? "Mail" : "HMP",
233-
'size' => $fields[5] == "Executing" ? $fields[9] : explode("(",$fields[7])[1],
234-
'destpath' => $fields[5] == "Executing" ? null : $fields[10] ,
247+
'size' => $size,
248+
'destpath' => $fields[5] == "Executing" ? null: $fields[10] ,
249+
'emails' => $emails,
235250
];
236251
}
237252
}

0 commit comments

Comments
 (0)