Worker-details: Using json_decode instead of reinventing hot water (#5441)

* Using json_decode instead of reinventing hot water

Guys, you could have told me ;)

* changed spaces to tabs
This commit is contained in:
Jeroen De Meerleer 2018-07-21 19:24:03 +02:00 committed by Hypolite Petovan
parent c5cbf565d9
commit ddaeb305bc

View file

@ -784,10 +784,7 @@ function admin_page_workerqueue(App $a)
$statement = DBA::select('workerqueue', ['id', 'parameter', 'created', 'priority'], ['done' => 0], ['order'=> ['priority']]);
$r = DBA::inArray($statement);
for($i = 0; $i < count($r); $i++) {
$r[$i]['parameter'] = stripslashes(implode(': ', explode('","', $r[$i]['parameter'])));
$r[$i]['parameter'] = substr($r[$i]['parameter'], 2, -2);
}
$r[$i]['parameter'] = implode(json_decode($r[$i]['parameter']), ': ');
$t = get_markup_template('admin/workerqueue.tpl');
return replace_macros($t, [