pkg_search_results.php: Link to account when logged in

Replace the maintainer package search links with links to the
maintainer's account when browsing the search results as a logged-in
user.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2014-04-05 16:52:15 +02:00
parent 6ed9da2c3e
commit f08bfa5d01

View file

@ -73,7 +73,11 @@ if (!$result): ?>
<td class="wrap"><?= htmlspecialchars($row['Description'], ENT_QUOTES); ?></td> <td class="wrap"><?= htmlspecialchars($row['Description'], ENT_QUOTES); ?></td>
<td> <td>
<?php if (isset($row["Maintainer"])): ?> <?php if (isset($row["Maintainer"])): ?>
<?php if ($SID): ?>
<a href="<?= get_uri('/account/') . htmlspecialchars($row['Maintainer'], ENT_QUOTES) ?>" title="<?= __('View account information for %s', htmlspecialchars($row['Maintainer'])) ?>"><?= htmlspecialchars($row['Maintainer']) ?></a>
<?php else: ?>
<a href="<?= get_uri('/packages/'); ?>?K=<?= htmlspecialchars($row['Maintainer'], ENT_QUOTES) ?>&amp;SeB=m"><?= htmlspecialchars($row['Maintainer']) ?></a> <a href="<?= get_uri('/packages/'); ?>?K=<?= htmlspecialchars($row['Maintainer'], ENT_QUOTES) ?>&amp;SeB=m"><?= htmlspecialchars($row['Maintainer']) ?></a>
<?php endif; ?>
<?php else: ?> <?php else: ?>
<span><?= __("orphan") ?></span> <span><?= __("orphan") ?></span>
<?php endif; ?> <?php endif; ?>