summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-04-14 11:22:04 +0200
committerErich Eckner <git@eckner.net>2018-04-14 11:22:04 +0200
commit7c2cf88e2180cec54ade61ecf961bcbdac783b65 (patch)
tree95ad432529903c4a02cfe3491e9b533405c4d30e
parentb1bb752ea5308a0942af61a65c2b06e5db13aa23 (diff)
downloadarchweb32-7c2cf88e2180cec54ade61ecf961bcbdac783b65.tar.xz
packages/pkginfo.php: retrieve json from mysql
-rw-r--r--packages/pkginfo.php6
1 files 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";