From 7c2cf88e2180cec54ade61ecf961bcbdac783b65 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sat, 14 Apr 2018 11:22:04 +0200 Subject: packages/pkginfo.php: retrieve json from mysql --- packages/pkginfo.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/pkginfo.php b/packages/pkginfo.php index 3e57725..39c6dfd 100644 --- a/packages/pkginfo.php +++ b/packages/pkginfo.php @@ -77,7 +77,7 @@ "SELECT DISTINCT " . "`dependency_types`.`name` AS `dependency_type`," . "GROUP_CONCAT(" . - "CONCAT(\"[\",`install_target_providers`.`id`,\"]: \",\"{\\n\"," . + "CONCAT(\"\\\"\",`install_target_providers`.`id`,\"\\\": \",\"{\\n\"," . "\" \\\"repo\\\": \\\"\",`repositories`.`name`,\"\\\",\\n\"," . "\" \\\"arch\\\": \\\"\",`architectures`.`name`,\"\\\",\\n\"," . "\" \\\"pkgname\\\": \\\"\",`binary_packages`.`pkgname`,\"\\\"\\n\"," . @@ -102,8 +102,10 @@ die_500("Query failed: " . $mysql->error); $dependencies = array(); - while ($row = $mysql_result -> fetch_assoc()) + while ($row = $mysql_result -> fetch_assoc()) { + $row["deps"] = json_decode("{".$row["deps"]."}",true); $dependencies[] = $row; + } function dependency_is_runtime($dep) { return $dep["dependency_type"]=="run"; -- cgit v1.2.3-70-g09d2