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/register.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/register.phtml')
| -rw-r--r-- | app/views/auth/register.phtml | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/app/views/auth/register.phtml b/app/views/auth/register.phtml index b90950510..4233f7fd4 100644 --- a/app/views/auth/register.phtml +++ b/app/views/auth/register.phtml @@ -1,36 +1,36 @@ <div class="prompt"> - <h1><?php echo _t('gen.auth.registration'); ?></h1> + <h1><?= _t('gen.auth.registration') ?></h1> - <form method="post" action="<?php echo _url('user', 'create'); ?>"> - <input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" /> + <form method="post" action="<?= _url('user', 'create') ?>"> + <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" /> <div> - <label class="group-name" for="new_user_name"><?php echo _t('gen.auth.username'), '<br />', _i('help'), ' ', _t('gen.auth.username.format'); ?></label> - <input id="new_user_name" name="new_user_name" type="text" size="16" required="required" autocomplete="off" pattern="<?php echo FreshRSS_user_Controller::USERNAME_PATTERN; ?>" /> + <label class="group-name" for="new_user_name"><?= _t('gen.auth.username'), '<br />', _i('help'), ' ', _t('gen.auth.username.format') ?></label> + <input id="new_user_name" name="new_user_name" type="text" size="16" required="required" autocomplete="off" pattern="<?= FreshRSS_user_Controller::USERNAME_PATTERN ?>" /> </div> <?php if ($this->show_email_field) { ?> <div> <label class="group-name" for="new_user_email"> - <?php echo _t('gen.auth.email'); ?> + <?= _t('gen.auth.email') ?> </label> <input id="new_user_email" name="new_user_email" type="email" required /> </div> <?php } ?> <div> - <label class="group-name" for="new_user_passwordPlain"><?php echo _t('gen.auth.password'), '<br />', _i('help'), ' ', _t('gen.auth.password.format'); ?></label> + <label class="group-name" for="new_user_passwordPlain"><?= _t('gen.auth.password'), '<br />', _i('help'), ' ', _t('gen.auth.password.format') ?></label> <div class="stick"> <input type="password" id="new_user_passwordPlain" name="new_user_passwordPlain" required="required" autocomplete="new-password" pattern=".{7,}" /> - <a class="btn toggle-password" data-toggle="new_user_passwordPlain"><?php echo _i('key'); ?></a> + <a class="btn toggle-password" data-toggle="new_user_passwordPlain"><?= _i('key') ?></a> </div> - <noscript><b><?php echo _t('gen.js.should_be_activated'); ?></b></noscript> + <noscript><b><?= _t('gen.js.should_be_activated') ?></b></noscript> </div> <?php if ($this->show_tos_checkbox) { ?> <div> <label class="checkbox" for="accept-tos"> <input type="checkbox" name="accept_tos" id="accept-tos" value="1" required /> - <?php echo _t('gen.auth.accept_tos', _url('index', 'tos')); ?> + <?= _t('gen.auth.accept_tos', _url('index', 'tos')) ?> </label> </div> <?php } ?> @@ -42,11 +42,11 @@ 'php', true )); ?> - <input type="hidden" name="r" value="<?php echo $redirect_url; ?>" /> - <button type="submit" class="btn btn-important"><?php echo _t('gen.action.create'); ?></button> - <a class="btn" href="<?php echo _url('index', 'index'); ?>"><?php echo _t('gen.action.cancel'); ?></a> + <input type="hidden" name="r" value="<?= $redirect_url ?>" /> + <button type="submit" class="btn btn-important"><?= _t('gen.action.create') ?></button> + <a class="btn" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.cancel') ?></a> </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> |
