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/global.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/global.phtml')
| -rw-r--r-- | app/views/index/global.phtml | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/app/views/index/global.phtml b/app/views/index/global.phtml index 2f25b6dc2..a49e16525 100644 --- a/app/views/index/global.phtml +++ b/app/views/index/global.phtml @@ -9,7 +9,7 @@ } ?> -<div id="stream" class="global<?php echo $class; ?>"> +<div id="stream" class="global<?= $class ?>"> <?php $params = Minz_Request::fetchGET(); unset($params['c']); @@ -26,8 +26,8 @@ if (!empty($feeds)) { ?> - <div class="box category" data-unread="<?php echo $cat->nbNotRead(); ?>"> - <div class="box-title"><a class="title" data-unread="<?php echo format_number($cat->nbNotRead()); ?>" href="<?php echo Minz_Url::display($url_base); ?>"><?php echo $cat->name(); ?></a></div> + <div class="box category" data-unread="<?= $cat->nbNotRead() ?>"> + <div class="box-title"><a class="title" data-unread="<?= format_number($cat->nbNotRead()) ?>" href="<?= Minz_Url::display($url_base) ?>"><?= $cat->name() ?></a></div> <ul class="box-content"> <?php @@ -37,9 +37,9 @@ $empty = $feed->nbEntries() === 0 ? ' empty' : ''; $url_base['params']['get'] = 'f_' . $feed->id(); ?> - <li id="f_<?php echo $feed->id(); ?>" class="item feed<?php echo $error, $empty, $feed->mute() ? ' mute' : ''; ?>" data-unread="<?php echo $feed->nbNotRead(); ?>" data-priority="<?php echo $feed->priority(); ?>"> - <img class="favicon" src="<?php echo $feed->favicon(); ?>" alt="✇" /> - <a class="item-title" data-unread="<?php echo format_number($feed->nbNotRead()); ?>" href="<?php echo Minz_Url::display($url_base); ?>"><?php echo $feed->name(); ?></a> + <li id="f_<?= $feed->id() ?>" class="item feed<?= $error, $empty, $feed->mute() ? ' mute' : '' ?>" data-unread="<?= $feed->nbNotRead() ?>" data-priority="<?= $feed->priority() ?>"> + <img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" /> + <a class="item-title" data-unread="<?= format_number($feed->nbNotRead()) ?>" href="<?= Minz_Url::display($url_base) ?>"><?= $feed->name() ?></a> </li> <?php } ?> </ul> @@ -51,7 +51,7 @@ </div> <div id="overlay"> - <a class="close" href="#"><?php echo _i('close'); ?></a> + <a class="close" href="#"><?= _i('close') ?></a> </div> -<div id="panel"<?php echo FreshRSS_Context::$user_conf->display_posts ? '' : ' class="hide_posts"'; ?>> +<div id="panel"<?= FreshRSS_Context::$user_conf->display_posts ? '' : ' class="hide_posts"' ?>> </div> |
