mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Always use virtual URLs
Support for non-virtual URLs has been broken for a long time and is no longer used on the official AUR setup. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
bef4fc9f44
commit
571b74b901
9 changed files with 47 additions and 171 deletions
|
@ -22,7 +22,6 @@ max_filesize_uncompressed = 8388608
|
||||||
disable_http_login = 1
|
disable_http_login = 1
|
||||||
aur_location = http://localhost
|
aur_location = http://localhost
|
||||||
package_url = /packages/
|
package_url = /packages/
|
||||||
use_virtual_urls = 1
|
|
||||||
max_rpc_results = 5000
|
max_rpc_results = 5000
|
||||||
aur_request_ml = aur-requests@archlinux.org
|
aur_request_ml = aur-requests@archlinux.org
|
||||||
request_idle_time = 1209600
|
request_idle_time = 1209600
|
||||||
|
|
|
@ -21,3 +21,5 @@ INSERT INTO PackageCategories (Category) VALUES ('wayland');
|
||||||
4. The configuration file format has been changed. Make sure you convert
|
4. The configuration file format has been changed. Make sure you convert
|
||||||
web/lib/config.inc.php to the new format (see conf/config.proto for an example
|
web/lib/config.inc.php to the new format (see conf/config.proto for an example
|
||||||
configuration) and put the resulting file in conf/config.
|
configuration) and put the resulting file in conf/config.
|
||||||
|
|
||||||
|
5. Support for non-virtual URLs has been removed.
|
||||||
|
|
|
@ -236,7 +236,6 @@ function pkgbase_display_details($base_id, $row, $SID="") {
|
||||||
include('pkgbase_details.php');
|
include('pkgbase_details.php');
|
||||||
|
|
||||||
if ($SID) {
|
if ($SID) {
|
||||||
include('actions_form.php');
|
|
||||||
include('pkg_comment_form.php');
|
include('pkg_comment_form.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -481,7 +481,6 @@ function pkg_display_details($id=0, $row, $SID="") {
|
||||||
include('pkg_details.php');
|
include('pkg_details.php');
|
||||||
|
|
||||||
if ($SID) {
|
if ($SID) {
|
||||||
include('actions_form.php');
|
|
||||||
include('pkg_comment_form.php');
|
include('pkg_comment_form.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,10 +26,6 @@ $PKGBASE_PATH = '/pkgbase';
|
||||||
$PKGREQ_PATH = '/requests';
|
$PKGREQ_PATH = '/requests';
|
||||||
$USER_PATH = '/account';
|
$USER_PATH = '/account';
|
||||||
|
|
||||||
function use_virtual_urls() {
|
|
||||||
return config_get_bool('options', 'use_virtual_urls');
|
|
||||||
}
|
|
||||||
|
|
||||||
function get_route($path) {
|
function get_route($path) {
|
||||||
global $ROUTES;
|
global $ROUTES;
|
||||||
|
|
||||||
|
@ -42,13 +38,7 @@ function get_route($path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_uri($path) {
|
function get_uri($path) {
|
||||||
global $ROUTES;
|
return $path;
|
||||||
|
|
||||||
if (use_virtual_urls()) {
|
|
||||||
return $path;
|
|
||||||
} else {
|
|
||||||
return get_route($path);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_pkg_route() {
|
function get_pkg_route() {
|
||||||
|
@ -68,22 +58,12 @@ function get_pkgreq_route() {
|
||||||
|
|
||||||
function get_pkg_uri($pkgname) {
|
function get_pkg_uri($pkgname) {
|
||||||
global $PKG_PATH;
|
global $PKG_PATH;
|
||||||
|
return $PKG_PATH . '/' . urlencode($pkgname) . '/';
|
||||||
if (use_virtual_urls()) {
|
|
||||||
return $PKG_PATH . '/' . urlencode($pkgname) . '/';
|
|
||||||
} else {
|
|
||||||
return '/' . get_route($PKG_PATH) . '?N=' . urlencode($pkgname);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_pkgbase_uri($pkgbase_name) {
|
function get_pkgbase_uri($pkgbase_name) {
|
||||||
global $PKGBASE_PATH;
|
global $PKGBASE_PATH;
|
||||||
|
return $PKGBASE_PATH . '/' . urlencode($pkgbase_name) . '/';
|
||||||
if (use_virtual_urls()) {
|
|
||||||
return $PKGBASE_PATH . '/' . urlencode($pkgbase_name) . '/';
|
|
||||||
} else {
|
|
||||||
return '/' . get_route($PKGBASE_PATH) . '?N=' . urlencode($pkgbase_name);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_user_route() {
|
function get_user_route() {
|
||||||
|
@ -93,10 +73,5 @@ function get_user_route() {
|
||||||
|
|
||||||
function get_user_uri($username) {
|
function get_user_uri($username) {
|
||||||
global $USER_PATH;
|
global $USER_PATH;
|
||||||
|
return $USER_PATH . '/' . urlencode($username) . '/';
|
||||||
if (use_virtual_urls()) {
|
|
||||||
return $USER_PATH . '/' . urlencode($username) . '/';
|
|
||||||
} else {
|
|
||||||
return '/' . get_route($USER_PATH) . '?U=' . urlencode($username);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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; ?>
|
|
|
@ -83,7 +83,7 @@ $sources = pkg_sources($row["ID"]);
|
||||||
<li><a href="<?= $urlpath . '/' . $row['BaseName'] ?>.tar.gz"><?= __('Download tarball') ?></a></li>
|
<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><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>
|
<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): ?>
|
<?php if ($row["OutOfDateTS"] === NULL): ?>
|
||||||
<li>
|
<li>
|
||||||
<form action="<?= get_pkgbase_uri($row['BaseName']) . 'flag/'; ?>" method="post">
|
<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; ?>
|
<?php endif; ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= __('Submitter') .': ' ?></th>
|
<th><?= __('Submitter') .': ' ?></th>
|
||||||
<?php
|
<?php if ($row["SubmitterUID"] && $SID): ?>
|
||||||
if ($row["SubmitterUID"]):
|
<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>
|
||||||
if ($SID):
|
<?php elseif ($row["SubmitterUID"] && !$SID): ?>
|
||||||
if (!use_virtual_urls()):
|
<td><?= html_format_username($submitter) ?></td>
|
||||||
?>
|
<?php else: ?>
|
||||||
<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: ?>
|
|
||||||
<td><?= __('None') ?></td>
|
<td><?= __('None') ?></td>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= __('Maintainer') .': ' ?></th>
|
<th><?= __('Maintainer') .': ' ?></th>
|
||||||
<?php
|
<?php if ($row["MaintainerUID"] && $SID): ?>
|
||||||
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: ?>
|
|
||||||
<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>
|
<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 elseif ($row["MaintainerUID"] && !$SID): ?>
|
||||||
<?php else: ?>
|
<td><?= html_format_username($maintainer) ?></td>
|
||||||
<td><?= html_format_username($maintainer) ?></td>
|
<?php else: ?>
|
||||||
<?php endif; ?>
|
|
||||||
<?php else: ?>
|
|
||||||
<td><?= __('None') ?></td>
|
<td><?= __('None') ?></td>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= __('Last Packager') .': ' ?></th>
|
<th><?= __('Last Packager') .': ' ?></th>
|
||||||
<?php
|
<?php if ($row["PackagerUID"] && $SID): ?>
|
||||||
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: ?>
|
|
||||||
<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>
|
<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 elseif ($row["PackagerUID"] && !$SID): ?>
|
||||||
<?php else: ?>
|
<td><?= html_format_username($packager) ?></td>
|
||||||
<td><?= html_format_username($packager) ?></td>
|
<?php else: ?>
|
||||||
<?php endif; ?>
|
|
||||||
<?php else: ?>
|
|
||||||
<td><?= __('None') ?></td>
|
<td><?= __('None') ?></td>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= __('Votes') . ': ' ?></th>
|
<th><?= __('Votes') . ': ' ?></th>
|
||||||
<?php if (has_credential(CRED_PKGBASE_LIST_VOTERS)): ?>
|
<?php if (has_credential(CRED_PKGBASE_LIST_VOTERS)): ?>
|
||||||
<?php if (use_virtual_urls()): ?>
|
<td><a href="<?= get_pkgbase_uri($row['Name']); ?>voters/"><?= $votes ?></a></td>
|
||||||
<td><a href="<?= get_pkgbase_uri($row['BaseName']); ?>voters/"><?= $votes ?></a></td>
|
<?php else: ?>
|
||||||
<?php else: ?>
|
|
||||||
<td><a href="<?= get_uri('/voters/'); ?>?N=<?= htmlspecialchars($row['BaseName'], ENT_QUOTES) ?>"><?= $votes ?></a></td>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php else: ?>
|
|
||||||
<td><?= $votes ?></td>
|
<td><?= $votes ?></td>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= __('First Submitted') . ': ' ?></th>
|
<th><?= __('First Submitted') . ': ' ?></th>
|
||||||
|
|
|
@ -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="<?= $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><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>
|
<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): ?>
|
<?php if ($row["OutOfDateTS"] === NULL): ?>
|
||||||
<li>
|
<li>
|
||||||
<form action="<?= get_pkgbase_uri($row['Name']) . 'flag/'; ?>" method="post">
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= __('Submitter') .': ' ?></th>
|
<th><?= __('Submitter') .': ' ?></th>
|
||||||
<?php
|
<?php if ($row["SubmitterUID"] && $SID): ?>
|
||||||
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, ENT_QUOTES) ?>" title="<?= __('View account information for %s', html_format_username($submitter)) ?>"><?= html_format_username($submitter) ?></a></td>
|
<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 elseif ($row["SubmitterUID"] && !$SID): ?>
|
||||||
<?php else: ?>
|
<td><?= html_format_username($submitter) ?></td>
|
||||||
<td><?= html_format_username($submitter) ?></td>
|
<?php else: ?>
|
||||||
<?php endif; ?>
|
|
||||||
<?php else: ?>
|
|
||||||
<td><?= __('None') ?></td>
|
<td><?= __('None') ?></td>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= __('Maintainer') .': ' ?></th>
|
<th><?= __('Maintainer') .': ' ?></th>
|
||||||
<?php
|
<?php if ($row["MaintainerUID"] && $SID): ?>
|
||||||
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: ?>
|
|
||||||
<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>
|
<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 elseif ($row["MaintainerUID"] && !$SID): ?>
|
||||||
<?php else: ?>
|
<td><?= html_format_username($maintainer) ?></td>
|
||||||
<td><?= html_format_username($maintainer) ?></td>
|
<?php else: ?>
|
||||||
<?php endif; ?>
|
|
||||||
<?php else: ?>
|
|
||||||
<td><?= __('None') ?></td>
|
<td><?= __('None') ?></td>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= __('Last Packager') .': ' ?></th>
|
<th><?= __('Last Packager') .': ' ?></th>
|
||||||
<?php
|
<?php if ($row["PackagerUID"] && $SID): ?>
|
||||||
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: ?>
|
|
||||||
<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>
|
<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 elseif ($row["PackagerUID"] && !$SID): ?>
|
||||||
<?php else: ?>
|
<td><?= html_format_username($packager) ?></td>
|
||||||
<td><?= html_format_username($packager) ?></td>
|
<?php else: ?>
|
||||||
<?php endif; ?>
|
|
||||||
<?php else: ?>
|
|
||||||
<td><?= __('None') ?></td>
|
<td><?= __('None') ?></td>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= __('Votes') . ': ' ?></th>
|
<th><?= __('Votes') . ': ' ?></th>
|
||||||
<?php if (has_credential(CRED_PKGBASE_LIST_VOTERS)): ?>
|
<?php if (has_credential(CRED_PKGBASE_LIST_VOTERS)): ?>
|
||||||
<?php if (use_virtual_urls()): ?>
|
|
||||||
<td><a href="<?= get_pkgbase_uri($row['Name']); ?>voters/"><?= $votes ?></a></td>
|
<td><a href="<?= get_pkgbase_uri($row['Name']); ?>voters/"><?= $votes ?></a></td>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<td><a href="<?= get_uri('/voters/'); ?>?N=<?= htmlspecialchars($row['Name'], ENT_QUOTES) ?>"><?= $votes ?></a></td>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php else: ?>
|
|
||||||
<td><?= $votes ?></td>
|
<td><?= $votes ?></td>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= __('First Submitted') . ': ' ?></th>
|
<th><?= __('First Submitted') . ': ' ?></th>
|
||||||
|
|
|
@ -21,11 +21,7 @@
|
||||||
?>
|
?>
|
||||||
<tr class="<?= $c ?>">
|
<tr class="<?= $c ?>">
|
||||||
<td>
|
<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>
|
<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>
|
||||||
<td>
|
<td>
|
||||||
<a href="<?= get_uri('/tu/'); ?>?id=<?= $row['LastVote'] ?>"><?= intval($row["LastVote"]) ?></a>
|
<a href="<?= get_uri('/tu/'); ?>?id=<?= $row['LastVote'] ?>"><?= intval($row["LastVote"]) ?></a>
|
||||||
|
|
Loading…
Add table
Reference in a new issue