diff options
Diffstat (limited to 'web/template')
-rw-r--r-- | web/template/actions_form.php | 38 | ||||
-rw-r--r-- | web/template/pkg_details.php | 72 | ||||
-rw-r--r-- | web/template/pkgbase_details.php | 66 | ||||
-rw-r--r-- | web/template/tu_last_votes_list.php | 4 |
4 files changed, 41 insertions, 139 deletions
diff --git a/web/template/actions_form.php b/web/template/actions_form.php deleted file mode 100644 index f18c01c..0000000 --- a/web/template/actions_form.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php if (!use_virtual_urls()): ?> -<div class="box"> - <form action="<?= htmlspecialchars(get_pkg_uri($row['Name']), ENT_QUOTES); ?>" method="post"> - <fieldset> - <input type="hidden" name="IDs[<?= $row['ID'] ?>]" value="1" /> - <input type="hidden" name="ID" value="<?= $row['ID'] ?>" /> - <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" /> - - <?php if (pkgbase_user_voted($uid, $row['ID'])): ?> - <input type="submit" class="button" name="do_UnVote" value="<?= __("UnVote") ?>" /> - <?php else: ?> - <input type="submit" class="button" name="do_Vote" value="<?= __("Vote") ?>" /> - <?php endif; ?> - - <?php if (pkgbase_user_notify($uid, $row['ID'])): ?> - <input type="submit" class="button" name="do_UnNotify" value="<?= __("UnNotify") ?>" title="<?= __("No New Comment Notification") ?>" /> - <?php else: ?> - <input type="submit" class="button" name="do_Notify" value="<?= __("Notify") ?>" title="<?= __("New Comment Notification") ?>" /> - <?php endif; ?> - - <?php if ($row["OutOfDateTS"] === NULL): ?> - <input type="submit" class="button" name="do_Flag" value="<?= __("Flag Out-of-date") ?>" /> - <?php elseif (($row["OutOfDateTS"] !== NULL) && has_credential(CRED_PKGBASE_UNFLAG, array($row["MaintainerUID"]))): ?> - <input type="submit" class="button" name="do_UnFlag" value="<?= __("UnFlag Out-of-date") ?>" /> - <?php endif; ?> - - <?php if (has_credential(CRED_PKGBASE_DELETE)): ?> - <input type="submit" class="button" name="do_Delete" value="<?= __("Delete Packages") ?>" /> - <label for="merge_Into" ><?= __("Merge into") ?></label> - <input type="text" id="merge_Into" name="merge_Into" /> - <input type="checkbox" name="confirm_Delete" value="1" /> - <?= __("Confirm") ?> - <?php endif; ?> - - </fieldset> - </form> -</div> -<?php endif; ?> diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index faec0dc..a8a0b3e 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -83,7 +83,7 @@ $sources = pkg_sources($row["ID"]); <li><a href="<?= $urlpath . '/' . $row['BaseName'] ?>.tar.gz"><?= __('Download tarball') ?></a></li> <li><a href="https://wiki.archlinux.org/index.php/Special:Search?search=<?= urlencode($row['Name']) ?>"><?= __('Search wiki') ?></a></li> <li><span class="flagged"><?php if ($row["OutOfDateTS"] !== NULL) { echo __('Flagged out-of-date')." (${out_of_date_time})"; } ?></span></li> - <?php if (use_virtual_urls() && $uid): ?> + <?php if ($uid): ?> <?php if ($row["OutOfDateTS"] === NULL): ?> <li> <form action="<?= get_pkgbase_uri($row['BaseName']) . 'flag/'; ?>" method="post"> @@ -279,69 +279,41 @@ if (has_credential(CRED_PKGBASE_CHANGE_CATEGORY, array($row["MaintainerUID"]))): <?php endif; ?> <tr> <th><?= __('Submitter') .': ' ?></th> -<?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')?> <?= html_format_username($submitter) ?>"><?= html_format_username($submitter) ?></a></td> - <?php else: ?> - <td><a href="<?= get_uri('/account/') . html_format_username($submitter) ?>" title="<?= __('View account information for %s', html_format_username($submitter)) ?>"><?= html_format_username($submitter) ?></a></td> - <?php endif; ?> -<?php else: ?> - <td><?= html_format_username($submitter) ?></td> - <?php endif; ?> -<?php else: ?> + <?php if ($row["SubmitterUID"] && $SID): ?> + <td><a href="<?= get_uri('/account/') . html_format_username($submitter, ENT_QUOTES) ?>" title="<?= __('View account information for %s', html_format_username($submitter)) ?>"><?= html_format_username($submitter) ?></a></td> + <?php elseif ($row["SubmitterUID"] && !$SID): ?> + <td><?= html_format_username($submitter) ?></td> + <?php else: ?> <td><?= __('None') ?></td> -<?php endif; ?> + <?php endif; ?> </tr> <tr> <th><?= __('Maintainer') .': ' ?></th> -<?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')?> <?= html_format_username($maintainer) ?>"><?= html_format_username($maintainer) ?></a></td> - <?php else: ?> + <?php if ($row["MaintainerUID"] && $SID): ?> <td><a href="<?= get_uri('/account/') . html_format_username($maintainer) ?>" title="<?= __('View account information for %s', html_format_username($maintainer)) ?>"><?= html_format_username($maintainer) ?></a></td> - <?php endif; ?> - <?php else: ?> - <td><?= html_format_username($maintainer) ?></td> - <?php endif; ?> -<?php else: ?> + <?php elseif ($row["MaintainerUID"] && !$SID): ?> + <td><?= html_format_username($maintainer) ?></td> + <?php else: ?> <td><?= __('None') ?></td> -<?php endif; ?> + <?php endif; ?> </tr> <tr> - <th><?= __('Last Packager') .': ' ?></th> -<?php -if ($row["PackagerUID"]): - if ($SID): - if (!use_virtual_urls()): -?> - <td><a href="<?= get_uri('/account/'); ?>?Action=AccountInfo&ID=<?= htmlspecialchars($row['PackagerUID'], ENT_QUOTES) ?>" title="<?= __('View account information for')?> <?= html_format_username($packager) ?>"><?= html_format_username($packager) ?></a></td> - <?php else: ?> + <th><?= __('Last Packager') .': ' ?></th> + <?php if ($row["PackagerUID"] && $SID): ?> <td><a href="<?= get_uri('/account/') . html_format_username($packager) ?>" title="<?= __('View account information for %s', html_format_username($packager)) ?>"><?= html_format_username($packager) ?></a></td> - <?php endif; ?> - <?php else: ?> - <td><?= html_format_username($packager) ?></td> - <?php endif; ?> -<?php else: ?> + <?php elseif ($row["PackagerUID"] && !$SID): ?> + <td><?= html_format_username($packager) ?></td> + <?php else: ?> <td><?= __('None') ?></td> -<?php endif; ?> + <?php endif; ?> </tr> <tr> <th><?= __('Votes') . ': ' ?></th> -<?php if (has_credential(CRED_PKGBASE_LIST_VOTERS)): ?> -<?php if (use_virtual_urls()): ?> - <td><a href="<?= get_pkgbase_uri($row['BaseName']); ?>voters/"><?= $votes ?></a></td> -<?php else: ?> - <td><a href="<?= get_uri('/voters/'); ?>?N=<?= htmlspecialchars($row['BaseName'], ENT_QUOTES) ?>"><?= $votes ?></a></td> -<?php endif; ?> -<?php else: ?> + <?php if (has_credential(CRED_PKGBASE_LIST_VOTERS)): ?> + <td><a href="<?= get_pkgbase_uri($row['Name']); ?>voters/"><?= $votes ?></a></td> + <?php else: ?> <td><?= $votes ?></td> -<?php endif; ?> + <?php endif; ?> </tr> <tr> <th><?= __('First Submitted') . ': ' ?></th> diff --git a/web/template/pkgbase_details.php b/web/template/pkgbase_details.php index 406408b..b8d36ed 100644 --- a/web/template/pkgbase_details.php +++ b/web/template/pkgbase_details.php @@ -34,7 +34,7 @@ $pkgs = pkgbase_get_pkgnames($base_id); <li><a href="<?= $urlpath . '/' . $row['Name'] ?>.tar.gz"><?= __('Download tarball') ?></a></li> <li><a href="https://wiki.archlinux.org/index.php/Special:Search?search=<?= urlencode($row['Name']) ?>"><?= __('Search wiki') ?></a></li> <li><span class="flagged"><?php if ($row["OutOfDateTS"] !== NULL) { echo __('Flagged out-of-date')." (${out_of_date_time})"; } ?></span></li> - <?php if (use_virtual_urls() && $uid): ?> + <?php if ($uid): ?> <?php if ($row["OutOfDateTS"] === NULL): ?> <li> <form action="<?= get_pkgbase_uri($row['Name']) . 'flag/'; ?>" method="post"> @@ -138,69 +138,41 @@ if (has_credential(CRED_PKGBASE_CHANGE_CATEGORY, array($row["MaintainerUID"]))): </tr> <tr> <th><?= __('Submitter') .': ' ?></th> -<?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')?> <?= html_format_username($submitter) ?>"><?= html_format_username($submitter) ?></a></td> - <?php else: ?> + <?php if ($row["SubmitterUID"] && $SID): ?> <td><a href="<?= get_uri('/account/') . html_format_username($submitter, ENT_QUOTES) ?>" title="<?= __('View account information for %s', html_format_username($submitter)) ?>"><?= html_format_username($submitter) ?></a></td> - <?php endif; ?> -<?php else: ?> - <td><?= html_format_username($submitter) ?></td> - <?php endif; ?> -<?php else: ?> + <?php elseif ($row["SubmitterUID"] && !$SID): ?> + <td><?= html_format_username($submitter) ?></td> + <?php else: ?> <td><?= __('None') ?></td> -<?php endif; ?> + <?php endif; ?> </tr> <tr> <th><?= __('Maintainer') .': ' ?></th> -<?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')?> <?= html_format_username($maintainer) ?>"><?= html_format_username($maintainer) ?></a></td> - <?php else: ?> + <?php if ($row["MaintainerUID"] && $SID): ?> <td><a href="<?= get_uri('/account/') . html_format_username($maintainer) ?>" title="<?= __('View account information for %s', html_format_username($maintainer)) ?>"><?= html_format_username($maintainer) ?></a></td> - <?php endif; ?> - <?php else: ?> - <td><?= html_format_username($maintainer) ?></td> - <?php endif; ?> -<?php else: ?> + <?php elseif ($row["MaintainerUID"] && !$SID): ?> + <td><?= html_format_username($maintainer) ?></td> + <?php else: ?> <td><?= __('None') ?></td> -<?php endif; ?> + <?php endif; ?> </tr> <tr> <th><?= __('Last Packager') .': ' ?></th> -<?php -if ($row["PackagerUID"]): - if ($SID): - if (!use_virtual_urls()): -?> - <td><a href="<?= get_uri('/account/'); ?>?Action=AccountInfo&ID=<?= htmlspecialchars($row['PackagerUID'], ENT_QUOTES) ?>" title="<?= __('View account information for')?> <?= html_format_username($packager) ?>"><?= html_format_username($packager) ?></a></td> - <?php else: ?> + <?php if ($row["PackagerUID"] && $SID): ?> <td><a href="<?= get_uri('/account/') . html_format_username($packager) ?>" title="<?= __('View account information for %s', html_format_username($packager)) ?>"><?= html_format_username($packager) ?></a></td> - <?php endif; ?> - <?php else: ?> - <td><?= html_format_username($packager) ?></td> - <?php endif; ?> -<?php else: ?> + <?php elseif ($row["PackagerUID"] && !$SID): ?> + <td><?= html_format_username($packager) ?></td> + <?php else: ?> <td><?= __('None') ?></td> -<?php endif; ?> + <?php endif; ?> </tr> <tr> <th><?= __('Votes') . ': ' ?></th> -<?php if (has_credential(CRED_PKGBASE_LIST_VOTERS)): ?> -<?php if (use_virtual_urls()): ?> + <?php if (has_credential(CRED_PKGBASE_LIST_VOTERS)): ?> <td><a href="<?= get_pkgbase_uri($row['Name']); ?>voters/"><?= $votes ?></a></td> -<?php else: ?> - <td><a href="<?= get_uri('/voters/'); ?>?N=<?= htmlspecialchars($row['Name'], ENT_QUOTES) ?>"><?= $votes ?></a></td> -<?php endif; ?> -<?php else: ?> + <?php else: ?> <td><?= $votes ?></td> -<?php endif; ?> + <?php endif; ?> </tr> <tr> <th><?= __('First Submitted') . ': ' ?></th> diff --git a/web/template/tu_last_votes_list.php b/web/template/tu_last_votes_list.php index 0b0ee48..f7b07bc 100644 --- a/web/template/tu_last_votes_list.php +++ b/web/template/tu_last_votes_list.php @@ -21,11 +21,7 @@ ?> <tr class="<?= $c ?>"> <td> - <?php if (!use_virtual_urls()): ?> - <a href="<?= get_uri('/account/'); ?>?Action=AccountInfo&ID=<?= htmlspecialchars($row['UserID'], ENT_QUOTES) ?>" title="<?= __('View account information for')?> <?= html_format_username($username) ?>"><?= html_format_username($username) ?></a></td> - <?php else: ?> <a href="<?= get_uri('/account/') . html_format_username($username) ?>" title="<?= __('View account information for %s', html_format_username($username)) ?>"><?= html_format_username($username) ?></a> - <?php endif; ?> </td> <td> <a href="<?= get_uri('/tu/'); ?>?id=<?= $row['LastVote'] ?>"><?= intval($row["LastVote"]) ?></a> |