diff options
| author | 2019-10-23 11:18:20 +0200 | |
|---|---|---|
| committer | 2019-10-23 11:18:20 +0200 | |
| commit | 7a5236de3f13f08b8c51eb183c0dcf1c8c85beca (patch) | |
| tree | 10a09f07458ed1279e62646188cb42e87fe0ed8f /app/views/index/logs.phtml | |
| parent | fdfd8ce9be182943e73d20ec3bff4d560c5b7503 (diff) | |
Take advantage of PHP 5.4+ short echo (#2585)
* Take advantage of PHP 5.4+ short echo
https://php.net/migration54.new-features thanks to
https://github.com/FreshRSS/FreshRSS/pull/2495
Use `<?= ?>` instead of `<?php echo; ?>`
10kB of code saved :-)
Done with regular expression:
```
<\?php echo (.+?);? *\?>
<?= \1 ?>
```
* Try Travis fix
https://github.com/squizlabs/PHP_CodeSniffer/issues/2045#issuecomment-395238272
Diffstat (limited to 'app/views/index/logs.phtml')
| -rw-r--r-- | app/views/index/logs.phtml | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/views/index/logs.phtml b/app/views/index/logs.phtml index a88f89278..2deb1c315 100644 --- a/app/views/index/logs.phtml +++ b/app/views/index/logs.phtml @@ -1,11 +1,11 @@ <div class="post content"> - <a href="<?php echo _url('index', 'index'); ?>"><?php echo _t('gen.action.back_to_rss_feeds'); ?></a> + <a href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> - <h1><?php echo _t('index.log'); ?></h1> - <form method="post" action="<?php echo _url('index', 'logs'); ?>"><p> - <input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" /> + <h1><?= _t('index.log') ?></h1> + <form method="post" action="<?= _url('index', 'logs') ?>"><p> + <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" /> <input type="hidden" name="clearLogs" /> - <button type="submit" class="btn"><?php echo _t('index.log.clear'); ?></button> + <button type="submit" class="btn"><?= _t('index.log.clear') ?></button> </p></form> <?php $items = $this->logsPaginator->items(); ?> @@ -15,12 +15,12 @@ <?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?> <?php foreach ($items as $log) { ?> - <div class="log <?php echo $log->level(); ?>"><span class="date"><?php echo @date('Y-m-d H:i:s', @strtotime($log->date())); ?></span><?php echo htmlspecialchars($log->info(), ENT_NOQUOTES, 'UTF-8'); ?></div> + <div class="log <?= $log->level() ?>"><span class="date"><?= @date('Y-m-d H:i:s', @strtotime($log->date())) ?></span><?= htmlspecialchars($log->info(), ENT_NOQUOTES, 'UTF-8') ?></div> <?php } ?> <?php $this->logsPaginator->render('logs_pagination.phtml','page'); ?> </div> <?php } else { ?> - <p class="alert alert-warn"><?php echo _t('index.log.empty'); ?></p> + <p class="alert alert-warn"><?= _t('index.log.empty') ?></p> <?php } ?> </div> |
