diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-04-26 14:40:07 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-04-26 14:48:19 +0200 |
commit | 9553790cfc9a3bcb5c4bf2266565862082c26613 (patch) | |
tree | e3511cc1a1c23269867cabbdfeecc6b5db765a9c /web/template | |
parent | 38eb8d2a3ab0b7f35618d151613211d45f6ec4d8 (diff) | |
download | aur-9553790cfc9a3bcb5c4bf2266565862082c26613.tar.gz aur-9553790cfc9a3bcb5c4bf2266565862082c26613.tar.xz |
Support multiple licenses per package
Split out package licenses into two separate tables in order to support
multiple licenses per package. The code on the package details page is
adjusted accordingly.
UPGRADING contains instructions on how to convert existing licenses in
the database to the new layout.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/template')
-rw-r--r-- | web/template/pkg_details.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index ff3f710a..7836596f 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -22,6 +22,7 @@ $out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("Y-m-d", intval($ $urlpath = URL_DIR . substr($row['BaseName'], 0, 2) . "/" . $row['BaseName']; +$lics = pkg_licenses($row["ID"]); $grps = pkg_groups($row["ID"]); $deps = pkg_dependencies($row["ID"]); @@ -170,10 +171,22 @@ if ($SID && ($uid == $row["MaintainerUID"] || <?php endif; ?> </td> </tr> + <?php if (count($lics) > 0): ?> <tr> - <th><?= __('License') . ': ' ?></th> - <td><?= htmlspecialchars($license) ?></td> + <th><?= __('Licenses') . ': ' ?></th> + <td class="wrap"> + <?php foreach($lics as $lic): ?> + <span class="related"> + <?php if ($lic !== end($lics)): ?> + <?= htmlspecialchars($lic) ?>, + <?php else: ?> + <?= htmlspecialchars($lic) ?> + <?php endif; ?> + </span> + <?php endforeach; ?> + </td> </tr> + <?php endif; ?> <?php if (count($grps) > 0): ?> <tr> <th><?= __('Groups') . ': ' ?></th> |