diff options
author | canyonknight <canyonknight@gmail.com> | 2012-09-27 02:48:06 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2012-09-28 08:57:25 +0200 |
commit | 9052aac127bdd412b09dbb433bd165ec541f9df8 (patch) | |
tree | 067005edb57a16911b6a5d49052e9cf39f7d2658 /web | |
parent | fb093c0dd66f3bfa1606d7a554856fb243fbd6ad (diff) | |
download | aur-9052aac127bdd412b09dbb433bd165ec541f9df8.tar.gz aur-9052aac127bdd412b09dbb433bd165ec541f9df8.tar.xz |
pkg_details.php: Utilize account details virtual URL
When virtual URLs are enabled, simpler links can be used to access
a user's account details page. Change this for both the maintainer and
submitter links.
Keeps backwards compatibility with virtual URLs being disabled.
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web')
-rw-r--r-- | web/template/pkg_details.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index 182722d0..b2866643 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -126,8 +126,12 @@ if ($SID && ($uid == $row["MaintainerUID"] || <?php if ($row["SubmitterUID"]): if ($SID): + if (!$USE_VIRTUAL_URLS): ?> <td><a href="<?= get_uri('/account/'); ?>?Action=AccountInfo&ID=<?= htmlspecialchars($row['SubmitterUID'], ENT_QUOTES) ?>" title="<?= __('View account information for')?> <?= htmlspecialchars($submitter) ?>"><?= htmlspecialchars($submitter) ?></a></td> + <?php else: ?> + <td><a href="<?= get_uri('/account/') . htmlspecialchars($submitter, ENT_QUOTES) ?>" title="<?= __('View account information for %s', htmlspecialchars($submitter)) ?>"><?= htmlspecialchars($submitter) ?></a></td> + <?php endif; ?> <?php else: ?> <td><?= htmlspecialchars($submitter) ?></td> <?php endif; ?> @@ -139,8 +143,12 @@ if ($row["SubmitterUID"]): <?php if ($row["MaintainerUID"]): if ($SID): + if (!$USE_VIRTUAL_URLS): ?> <td><a href="<?= get_uri('/account/'); ?>?Action=AccountInfo&ID=<?= htmlspecialchars($row['MaintainerUID'], ENT_QUOTES) ?>" title="<?= __('View account information for')?> <?= htmlspecialchars($maintainer) ?>"><?= htmlspecialchars($maintainer) ?></a></td> + <?php else: ?> + <td><a href="<?= get_uri('/account/') . htmlspecialchars($maintainer, ENT_QUOTES) ?>" title="<?= __('View account information for %s', htmlspecialchars($maintainer)) ?>"><?= htmlspecialchars($maintainer) ?></a></td> + <?php endif; ?> <?php else: ?> <td><?= htmlspecialchars($maintainer) ?></td> <?php endif; ?> |