From: Jeroen De Meerleer Date: Sat, 21 Jul 2018 17:24:03 +0000 (+0200) Subject: Worker-details: Using json_decode instead of reinventing hot water (#5441) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ddaeb305bc9ed5ac4087d8b64ead5d71fc5957bd;p=friendica.git 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 --- 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, [