summaryrefslogtreecommitdiffstats
path: root/web/template/pkg_search_results.php
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2012-09-21 08:57:29 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2012-09-24 12:23:04 +0200
commit6102759b7cb9fd23f4e7fa5f12137334ff30a410 (patch)
treefba81fdedea0dd6ca3f1e1bdd260fa55ebc36ee9 /web/template/pkg_search_results.php
parent964ea083e68310ca7c09ca938219f4146f0ca5b9 (diff)
downloadaurweb-6102759b7cb9fd23f4e7fa5f12137334ff30a410.tar.xz
Use echo shortcut syntax
Replace all occurrences of "<?php echo" and "<?php print" by "<?=" to reduce noise in templates. Note that as of PHP 5.4.0, "<?=" is always available and no longer requires "short_open_tag" to be set. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/template/pkg_search_results.php')
-rw-r--r--web/template/pkg_search_results.php80
1 files changed, 40 insertions, 40 deletions
diff --git a/web/template/pkg_search_results.php b/web/template/pkg_search_results.php
index 13e0b44..9d40d80 100644
--- a/web/template/pkg_search_results.php
+++ b/web/template/pkg_search_results.php
@@ -6,74 +6,74 @@ if (isset($_COOKIE['AURSID'])) {
}
if (!$result): ?>
- <div class="box"><p><?php echo __("Error retrieving package list.") ?></p></div>
+ <div class="box"><p><?= __("Error retrieving package list.") ?></p></div>
<?php elseif ($total == 0): ?>
- <div class="box"><p><?php echo __("No packages matched your search criteria.") ?></p></div>
+ <div class="box"><p><?= __("No packages matched your search criteria.") ?></p></div>
<?php else: ?>
<div id="pkglist-results" class="box">
<div class="pkglist-stats">
- <p><?php echo __('%d packages found. Page %d of %d.', $total, $current, $pages) ?></p>
+ <p><?= __('%d packages found. Page %d of %d.', $total, $current, $pages) ?></p>
<?php if (count($templ_pages) > 1): ?>
<p class="pkglist-nav">
<?php foreach ($templ_pages as $pagenr => $pagestart): ?>
<?php if ($pagestart === false): ?>
- <span class="page"><?php echo $pagenr ?></span>
+ <span class="page"><?= $pagenr ?></span>
<?php elseif ($pagestart + 1 == $first): ?>
- <span class="page"><?php echo $pagenr ?></span>
+ <span class="page"><?= $pagenr ?></span>
<?php else: ?>
- <a class="page" href="<?php echo get_uri('/packages/'); ?>?<?php echo mkurl('O=' . $pagestart) ?>"><?php echo $pagenr ?></a>
+ <a class="page" href="<?= get_uri('/packages/'); ?>?<?= mkurl('O=' . $pagestart) ?>"><?= $pagenr ?></a>
<?php endif; ?>
<?php endforeach; ?>
</p>
<?php endif; ?>
</div>
- <form id="pkglist-results-form" method="post" action="<?php echo get_uri('/packages/'); ?>?<?php echo htmlentities($_SERVER['QUERY_STRING']) ?>">
+ <form id="pkglist-results-form" method="post" action="<?= get_uri('/packages/'); ?>?<?= htmlentities($_SERVER['QUERY_STRING']) ?>">
<table class="results">
<thead>
<tr>
<?php if ($SID): ?>
<th>&nbsp;</th>
<?php endif; ?>
- <th><a href="?<?php echo mkurl('SB=c&SO=' . $SO_next) ?>"><?php echo __("Category") ?></a></th>
- <th><a href="?<?php echo mkurl('SB=n&SO=' . $SO_next) ?>"><?php echo __("Name") ?></a></th>
- <th><a href="?<?php echo mkurl('SB=v&SO=' . $SO_next) ?>"><?php echo __("Votes") ?></a></th>
+ <th><a href="?<?= mkurl('SB=c&SO=' . $SO_next) ?>"><?= __("Category") ?></a></th>
+ <th><a href="?<?= mkurl('SB=n&SO=' . $SO_next) ?>"><?= __("Name") ?></a></th>
+ <th><a href="?<?= mkurl('SB=v&SO=' . $SO_next) ?>"><?= __("Votes") ?></a></th>
<?php if ($SID): ?>
- <th><a href="?<?php echo mkurl('SB=w&SO=' . $SO_next) ?>"><?php echo __("Voted") ?></a></th>
- <th><a href="?<?php echo mkurl('SB=o&SO=' . $SO_next) ?>"><?php echo __("Notify") ?></a></th>
+ <th><a href="?<?= mkurl('SB=w&SO=' . $SO_next) ?>"><?= __("Voted") ?></a></th>
+ <th><a href="?<?= mkurl('SB=o&SO=' . $SO_next) ?>"><?= __("Notify") ?></a></th>
<?php endif; ?>
- <th><?php echo __("Description") ?></th>
- <th><a href="?<?php echo mkurl('SB=m&SO=' . $SO_next) ?>"><?php echo __("Maintainer") ?></a></th>
+ <th><?= __("Description") ?></th>
+ <th><a href="?<?= mkurl('SB=m&SO=' . $SO_next) ?>"><?= __("Maintainer") ?></a></th>
</tr>
</thead>
<tbody>
<?php while (list($indx, $row) = each($searchresults)): ?>
- <tr class="<?php echo ($indx % 2 == 0) ? 'odd' : 'even' ?>">
+ <tr class="<?= ($indx % 2 == 0) ? 'odd' : 'even' ?>">
<?php if ($SID): ?>
- <td><input type="checkbox" name="IDs[<?php echo $row["ID"] ?>]" value="1" /></td>
+ <td><input type="checkbox" name="IDs[<?= $row["ID"] ?>]" value="1" /></td>
<?php endif; ?>
- <td><?php echo htmlspecialchars($row["Category"]) ?></td>
- <td><a href="<?php echo htmlspecialchars(get_pkg_uri($row["Name"]), ENT_QUOTES); ?>"><?php echo htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]) ?></a></td>
- <td><?php echo $row["NumVotes"] ?></td>
+ <td><?= htmlspecialchars($row["Category"]) ?></td>
+ <td><a href="<?= htmlspecialchars(get_pkg_uri($row["Name"]), ENT_QUOTES); ?>"><?= htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]) ?></a></td>
+ <td><?= $row["NumVotes"] ?></td>
<?php if ($SID): ?>
<td>
<?php if (isset($row["Voted"])): ?>
- <?php echo __("Yes") ?>
+ <?= __("Yes") ?>
<?php endif; ?>
</td>
<td>
<?php if (isset($row["Notify"])): ?>
- <?php echo __("Yes") ?>
+ <?= __("Yes") ?>
<?php endif; ?>
</td>
<?php endif; ?>
- <td><?php echo htmlspecialchars($row['Description'], ENT_QUOTES); ?></td>
+ <td><?= htmlspecialchars($row['Description'], ENT_QUOTES); ?></td>
<td>
<?php if (isset($row["Maintainer"])): ?>
- <a href="<?php echo get_uri('/packages/'); ?>?K=<?php echo htmlspecialchars($row['Maintainer'], ENT_QUOTES) ?>&amp;SeB=m"><?php echo htmlspecialchars($row['Maintainer']) ?></a>
+ <a href="<?= get_uri('/packages/'); ?>?K=<?= htmlspecialchars($row['Maintainer'], ENT_QUOTES) ?>&amp;SeB=m"><?= htmlspecialchars($row['Maintainer']) ?></a>
<?php else: ?>
- <span><?php echo __("orphan") ?></span>
+ <span><?= __("orphan") ?></span>
<?php endif; ?>
</td>
</tr>
@@ -83,16 +83,16 @@ if (!$result): ?>
</table>
<div class="pkglist-stats">
- <p><?php echo __('%d packages found. Page %d of %d.', $total, $current, $pages) ?></p>
+ <p><?= __('%d packages found. Page %d of %d.', $total, $current, $pages) ?></p>
<?php if (count($templ_pages) > 1): ?>
<p class="pkglist-nav">
<?php foreach ($templ_pages as $pagenr => $pagestart): ?>
<?php if ($pagestart === false): ?>
- <span class="page"><?php echo $pagenr ?></span>
+ <span class="page"><?= $pagenr ?></span>
<?php elseif ($pagestart + 1 == $first): ?>
- <span class="page"><?php echo $pagenr ?></span>
+ <span class="page"><?= $pagenr ?></span>
<?php else: ?>
- <a class="page" href="<?php echo get_uri('/packages/'); ?>?<?php echo mkurl('O=' . $pagestart) ?>"><?php echo $pagenr ?></a>
+ <a class="page" href="<?= get_uri('/packages/'); ?>?<?= mkurl('O=' . $pagestart) ?>"><?= $pagenr ?></a>
<?php endif; ?>
<?php endforeach; ?>
</p>
@@ -102,24 +102,24 @@ if (!$result): ?>
<?php if ($SID): ?>
<p>
<select name="action">
- <option><?php echo __("Actions") ?></option>
- <option value="do_Flag"><?php echo __("Flag Out-of-date") ?></option>
- <option value="do_UnFlag"><?php echo __("Unflag Out-of-date") ?></option>
- <option value="do_Adopt"><?php echo __("Adopt Packages") ?></option>
- <option value="do_Disown"><?php echo __("Disown Packages") ?></option>
+ <option><?= __("Actions") ?></option>
+ <option value="do_Flag"><?= __("Flag Out-of-date") ?></option>
+ <option value="do_UnFlag"><?= __("Unflag Out-of-date") ?></option>
+ <option value="do_Adopt"><?= __("Adopt Packages") ?></option>
+ <option value="do_Disown"><?= __("Disown Packages") ?></option>
<?php if ($atype == "Trusted User" || $atype == "Developer"): ?>
- <option value="do_Delete"><?php echo __("Delete Packages") ?></option>
+ <option value="do_Delete"><?= __("Delete Packages") ?></option>
<?php endif; ?>
- <option value="do_Notify"><?php echo __("Notify") ?></option>
- <option value="do_UnNotify"><?php echo __("UnNotify") ?></option>
+ <option value="do_Notify"><?= __("Notify") ?></option>
+ <option value="do_UnNotify"><?= __("UnNotify") ?></option>
</select>
<?php if ($atype == "Trusted User" || $atype == "Developer"): ?>
- <label for="merge_Into"><?php echo __("Merge into") ?></label>
+ <label for="merge_Into"><?= __("Merge into") ?></label>
<input type="text" id="merge_Into" name="merge_Into" />
- <input type="checkbox" name="confirm_Delete" value="1" /> <?php echo __("Confirm") ?>
+ <input type="checkbox" name="confirm_Delete" value="1" /> <?= __("Confirm") ?>
<?php endif; ?>
- <input type="hidden" name="token" value="<?php echo htmlspecialchars($_COOKIE['AURSID']) ?>" />
- <input type="submit" class="button" style="width: 80px" value="<?php echo __("Go") ?>" />
+ <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
+ <input type="submit" class="button" style="width: 80px" value="<?= __("Go") ?>" />
</p>
<?php endif; # if ($SID) ?>
</form>