From ddaeb305bc9ed5ac4087d8b64ead5d71fc5957bd Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Sat, 21 Jul 2018 19:24:03 +0200 Subject: [PATCH] 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 --- mod/admin.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index 03035d9e11..7e90e44cb7 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -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, [