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>
This commit is contained in:
Lukas Fleischer 2012-09-21 08:57:29 +02:00
parent 964ea083e6
commit 6102759b7c
26 changed files with 368 additions and 366 deletions

View file

@ -1,36 +1,36 @@
<h3><?php echo __("Statistics") ?></h3>
<h3><?= __("Statistics") ?></h3>
<table>
<tr>
<td><?php print __("Packages"); ?></td>
<td><?php print $unsupported_count; ?></td>
<td><?= __("Packages"); ?></td>
<td><?= $unsupported_count; ?></td>
</tr>
<tr>
<td><?php print __("Orphan Packages"); ?></td>
<td><?php print $orphan_count; ?></td>
<td><?= __("Orphan Packages"); ?></td>
<td><?= $orphan_count; ?></td>
</tr>
<tr>
<td><?php print __("Packages added in the past 7 days"); ?></td>
<td><?php print $add_count; ?></td>
<td><?= __("Packages added in the past 7 days"); ?></td>
<td><?= $add_count; ?></td>
</tr>
<tr>
<td><?php print __("Packages updated in the past 7 days"); ?></td>
<td><?php print $update_count; ?></td>
<td><?= __("Packages updated in the past 7 days"); ?></td>
<td><?= $update_count; ?></td>
</tr>
<tr>
<td><?php print __("Packages updated in the past year"); ?></td>
<td><?php print $update_year_count; ?></td>
<td><?= __("Packages updated in the past year"); ?></td>
<td><?= $update_year_count; ?></td>
</tr>
<tr>
<td><?php print __("Packages never updated"); ?></td>
<td><?php print $never_update_count; ?></td>
<td><?= __("Packages never updated"); ?></td>
<td><?= $never_update_count; ?></td>
</tr>
<tr>
<td><?php print __("Registered Users"); ?></td>
<td><?php print $user_count; ?></td>
<td><?= __("Registered Users"); ?></td>
<td><?= $user_count; ?></td>
</tr>
<tr>
<td><?php print __("Trusted Users"); ?></td>
<td><?php print $tu_count; ?></td>
<td><?= __("Trusted Users"); ?></td>
<td><?= $tu_count; ?></td>
</tr>
</table>

View file

@ -1,13 +1,13 @@
<h3><?php echo __("Recent Updates") ?></h3>
<h3><?= __("Recent Updates") ?></h3>
<a href="<?php echo get_uri('/rss/') ?>" title="Arch Package Updates RSS Feed" class="rss-icon"><img src="/images/feed-icon-14x14.png" alt="RSS Feed" /></a>
<a href="<?= get_uri('/rss/') ?>" title="Arch Package Updates RSS Feed" class="rss-icon"><img src="/images/feed-icon-14x14.png" alt="RSS Feed" /></a>
<table>
<tbody>
<?php foreach ($newest_packages->getIterator() as $row): ?>
<tr>
<td class="pkg-name">
<a href="<?php echo get_pkg_uri($row["Name"]); ?>"><?php print htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]); ?></a>
<a href="<?= get_pkg_uri($row["Name"]); ?>"><?= htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]); ?></a>
</td>
<td class="pkg-new">
<?php if ($row["ModifiedTS"] === $row["SubmittedTS"]): ?>
@ -15,7 +15,7 @@
<?php endif; ?>
</td>
<td>
<span><?php print gmdate("Y-m-d H:i", intval($row["ModifiedTS"])); ?></span>
<span><?= gmdate("Y-m-d H:i", intval($row["ModifiedTS"])); ?></span>
</td>
</tr>
<?php endforeach; ?>

View file

@ -2,20 +2,20 @@
$username = username_from_sid($_COOKIE["AURSID"]);
?>
<h3><?php echo __("My Statistics"); ?></h3>
<h3><?= __("My Statistics"); ?></h3>
<table>
<tr>
<td>
<a href="<?php echo get_uri('/packages/'); ?>?SeB=m&amp;L=2&amp;K=<?php echo $username; ?>">
<?php print __("Packages in unsupported"); ?></a>
<a href="<?= get_uri('/packages/'); ?>?SeB=m&amp;L=2&amp;K=<?= $username; ?>">
<?= __("Packages in unsupported"); ?></a>
</td>
<td><?php print $maintainer_unsupported_count; ?></td>
<td><?= $maintainer_unsupported_count; ?></td>
</tr>
<tr>
<td>
<a href="<?php echo get_uri('/packages/'); ?>?SeB=m&amp;outdated=on&amp;K=<?php echo $username; ?>"><?php print __("Out of Date"); ?></a>
<a href="<?= get_uri('/packages/'); ?>?SeB=m&amp;outdated=on&amp;K=<?= $username; ?>"><?= __("Out of Date"); ?></a>
</td>
<td><?php echo $flagged_outdated ?></td>
<td><?= $flagged_outdated ?></td>
</tr>
</table>