diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2012-09-21 08:57:29 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2012-09-24 12:23:04 +0200 |
commit | 6102759b7cb9fd23f4e7fa5f12137334ff30a410 (patch) | |
tree | fba81fdedea0dd6ca3f1e1bdd260fa55ebc36ee9 /web/template/stats | |
parent | 964ea083e68310ca7c09ca938219f4146f0ca5b9 (diff) |
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/stats')
-rw-r--r-- | web/template/stats/general_stats_table.php | 34 | ||||
-rw-r--r-- | web/template/stats/updates_table.php | 8 | ||||
-rw-r--r-- | web/template/stats/user_table.php | 12 |
3 files changed, 27 insertions, 27 deletions
diff --git a/web/template/stats/general_stats_table.php b/web/template/stats/general_stats_table.php index e2b12c7..6a92c3b 100644 --- a/web/template/stats/general_stats_table.php +++ b/web/template/stats/general_stats_table.php @@ -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> diff --git a/web/template/stats/updates_table.php b/web/template/stats/updates_table.php index 2220d6a..11f0a00 100644 --- a/web/template/stats/updates_table.php +++ b/web/template/stats/updates_table.php @@ -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; ?> diff --git a/web/template/stats/user_table.php b/web/template/stats/user_table.php index 3620798..ba6751f 100644 --- a/web/template/stats/user_table.php +++ b/web/template/stats/user_table.php @@ -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&L=2&K=<?php echo $username; ?>"> -<?php print __("Packages in unsupported"); ?></a> + <a href="<?= get_uri('/packages/'); ?>?SeB=m&L=2&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&outdated=on&K=<?php echo $username; ?>"><?php print __("Out of Date"); ?></a> + <a href="<?= get_uri('/packages/'); ?>?SeB=m&outdated=on&K=<?= $username; ?>"><?= __("Out of Date"); ?></a> </td> - <td><?php echo $flagged_outdated ?></td> + <td><?= $flagged_outdated ?></td> </tr> </table> |