From 570e97c96c555dea939e10bab79613600e327ea4 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 8 Nov 2018 11:16:30 +0100 Subject: packages/pkginfo.php: fix empty output and warnings on unavailable json --- packages/pkginfo.php | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'packages') diff --git a/packages/pkginfo.php b/packages/pkginfo.php index b283b17..3e8af4d 100644 --- a/packages/pkginfo.php +++ b/packages/pkginfo.php @@ -193,16 +193,16 @@ require_once BASE . "/lib/style.php"; "mysql: " . implode(", ",$dep_it) . "
\n" . "json: " . implode(", ",$js_dep) ); - } - foreach ($dependencies as $key => $dep) { - if ($dep["dependency_type"]!="run") { - $dependencies[$key]["json"]="not required"; - continue; + foreach ($dependencies as $key => $dep) { + if ($dep["dependency_type"]!="run") { + $dependencies[$key]["json"]="not required"; + continue; + } + foreach ($js_dep as $js) + if ($js == preg_replace("/[<=>].*$/","",$dep["install_target"])) + $dependencies[$key]["json"]=$js; } - foreach ($js_dep as $js) - if ($js == preg_replace("/[<=>].*$/","",$dep["install_target"])) - $dependencies[$key]["json"]=$js; } // query dependent packages @@ -409,8 +409,8 @@ if (count($elsewhere)>0) { "/> "/> "/> - "/> - "/> + "/> + "/> "/> @@ -435,7 +435,7 @@ if (count($elsewhere)>0) { Description: @@ -443,7 +443,7 @@ if (count($elsewhere)>0) { Upstream URL: @@ -452,10 +452,11 @@ if (count($elsewhere)>0) { @@ -465,7 +466,7 @@ if (count($elsewhere)>0) { Package Size: @@ -473,7 +474,7 @@ if (count($elsewhere)>0) { Installed Size: @@ -481,7 +482,7 @@ if (count($elsewhere)>0) { Build Date: @@ -503,7 +504,7 @@ if (count($elsewhere)>0) { \n"; - if (!isset ($dep["json"])) + if (!$skip_json_checks && !isset ($dep["json"])) print " (in database only)\n"; if (count($dep["deps"]) == 0) { print " not satisfiable dependency: \"" . $dep["install_target"] . $dep["version"] . "\"\n"; -- cgit v1.2.3-70-g09d2
- + not found in pkg-api")."\n"; ?>
- +
not found in pkg-api"); + if (is_array($licenses)) + print implode(", ",$licenses); else - print $content["Licenses"]; + print $licenses; print "\n"; ?> - + not found in pkg-api")."\n"; ?>
- + not found in pkg-api")."\n"; ?>
- + not found in pkg-api")."\n"; ?>