mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
38eb8d2a3a
commit
9553790cfc
5 changed files with 157 additions and 16 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue