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/auth/formLogin.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/auth/formLogin.phtml')
| -rw-r--r-- | app/views/auth/formLogin.phtml | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/app/views/auth/formLogin.phtml b/app/views/auth/formLogin.phtml index 01d1d4736..ecac7aced 100644 --- a/app/views/auth/formLogin.phtml +++ b/app/views/auth/formLogin.phtml @@ -1,33 +1,33 @@ <div class="prompt"> - <h1><?php echo _t('gen.auth.login'); ?></h1> + <h1><?= _t('gen.auth.login') ?></h1> <?php if (!max_registrations_reached()) { ?> - <a href="<?php echo _url('auth', 'register'); ?>"><?php echo _t('gen.auth.registration.ask'); ?></a> + <a href="<?= _url('auth', 'register') ?>"><?= _t('gen.auth.registration.ask') ?></a> <?php } ?> - <form id="crypto-form" method="post" action="<?php echo _url('auth', 'login'); ?>"> - <input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" /> + <form id="crypto-form" method="post" action="<?= _url('auth', 'login') ?>"> + <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" /> <div> - <label for="username"><?php echo _t('gen.auth.username'); ?></label> - <input type="text" id="username" name="username" autocomplete="username" size="16" required="required" pattern="<?php echo FreshRSS_user_Controller::USERNAME_PATTERN; ?>" autofocus="autofocus" /> + <label for="username"><?= _t('gen.auth.username') ?></label> + <input type="text" id="username" name="username" autocomplete="username" size="16" required="required" pattern="<?= FreshRSS_user_Controller::USERNAME_PATTERN ?>" autofocus="autofocus" /> </div> <div> - <label for="passwordPlain"><?php echo _t('gen.auth.password'); ?></label> + <label for="passwordPlain"><?= _t('gen.auth.password') ?></label> <input type="password" id="passwordPlain" required="required" /> <input type="hidden" id="challenge" name="challenge" /><br /> - <noscript><strong><?php echo _t('gen.js.should_be_activated'); ?></strong></noscript> + <noscript><strong><?= _t('gen.js.should_be_activated') ?></strong></noscript> </div> <div> <label class="checkbox" for="keep_logged_in"> <input type="checkbox" name="keep_logged_in" id="keep_logged_in" value="1" /> - <?php echo _t('gen.auth.keep_logged_in', $this->cookie_days); ?> + <?= _t('gen.auth.keep_logged_in', $this->cookie_days) ?> </label> <br /> </div> <div> - <button id="loginButton" type="submit" class="btn btn-important"><?php echo _t('gen.auth.login'); ?></button> + <button id="loginButton" type="submit" class="btn btn-important"><?= _t('gen.auth.login') ?></button> </div> </form> - <p><a href="<?php echo _url('index', 'about'); ?>"><?php echo _t('gen.freshrss.about'); ?></a></p> + <p><a href="<?= _url('index', 'about') ?>"><?= _t('gen.freshrss.about') ?></a></p> </div> |
