aboutsummaryrefslogtreecommitdiff
path: root/app/views/configure/system.phtml
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-10-23 11:18:20 +0200
committerGravatar GitHub <noreply@github.com> 2019-10-23 11:18:20 +0200
commit7a5236de3f13f08b8c51eb183c0dcf1c8c85beca (patch)
tree10a09f07458ed1279e62646188cb42e87fe0ed8f /app/views/configure/system.phtml
parentfdfd8ce9be182943e73d20ec3bff4d560c5b7503 (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/configure/system.phtml')
-rw-r--r--app/views/configure/system.phtml46
1 files changed, 23 insertions, 23 deletions
diff --git a/app/views/configure/system.phtml b/app/views/configure/system.phtml
index eb0e68dfc..1a718e20f 100644
--- a/app/views/configure/system.phtml
+++ b/app/views/configure/system.phtml
@@ -1,31 +1,31 @@
<?php $this->partial('aside_configure'); ?>
<div class="post">
- <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>
- <form method="post" action="<?php echo _url('configure', 'system'); ?>">
- <input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" />
- <legend><?php echo _t('admin.system'); ?></legend>
+ <form method="post" action="<?= _url('configure', 'system') ?>">
+ <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
+ <legend><?= _t('admin.system') ?></legend>
<div class="form-group">
- <label class="group-name" for="instance-name"><?php echo _t('admin.system.instance-name'); ?></label>
+ <label class="group-name" for="instance-name"><?= _t('admin.system.instance-name') ?></label>
<div class="group-controls">
- <input type="text" class="extend" id="instance-name" name="instance-name" value="<?php echo FreshRSS_Context::$system_conf->title; ?>" data-leave-validation="<?php echo FreshRSS_Context::$system_conf->title; ?>"/>
+ <input type="text" class="extend" id="instance-name" name="instance-name" value="<?= FreshRSS_Context::$system_conf->title ?>" data-leave-validation="<?= FreshRSS_Context::$system_conf->title ?>"/>
</div>
</div>
<div class="form-group">
- <label class="group-name" for="auto-update-url"><?php echo _t('admin.system.auto-update-url'); ?></label>
+ <label class="group-name" for="auto-update-url"><?= _t('admin.system.auto-update-url') ?></label>
<div class="group-controls">
- <input type="text" class="extend" id="auto-update-url" name="auto-update-url" value="<?php echo FreshRSS_Context::$system_conf->auto_update_url; ?>" data-leave-validation="<?php echo FreshRSS_Context::$system_conf->auto_update_url; ?>"/>
+ <input type="text" class="extend" id="auto-update-url" name="auto-update-url" value="<?= FreshRSS_Context::$system_conf->auto_update_url ?>" data-leave-validation="<?= FreshRSS_Context::$system_conf->auto_update_url ?>"/>
</div>
</div>
<div class="form-group">
- <label class="group-name" for="max-registrations"><?php echo _t('admin.system.registration.number'); ?></label>
+ <label class="group-name" for="max-registrations"><?= _t('admin.system.registration.number') ?></label>
<div class="group-controls">
- <input type="number" id="max-registrations" name="max-registrations" value="<?php echo FreshRSS_Context::$system_conf->limits['max_registrations']; ?>" min="0" data-leave-validation="<?php echo FreshRSS_Context::$system_conf->limits['max_registrations']; ?>"/>
- <?php echo _i('help'); ?> <?php echo _t('admin.system.registration.help'); ?>
+ <input type="number" id="max-registrations" name="max-registrations" value="<?= FreshRSS_Context::$system_conf->limits['max_registrations'] ?>" min="0" data-leave-validation="<?= FreshRSS_Context::$system_conf->limits['max_registrations'] ?>"/>
+ <?= _i('help') ?> <?= _t('admin.system.registration.help') ?>
</div>
</div>
@@ -47,41 +47,41 @@
name="force-email-validation"
id="force-email-validation"
value="1"
- <?php echo FreshRSS_Context::$system_conf->force_email_validation ? 'checked="checked"' : ''; ?>
- data-leave-validation="<?php echo FreshRSS_Context::$system_conf->force_email_validation; ?>"
+ <?= FreshRSS_Context::$system_conf->force_email_validation ? 'checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$system_conf->force_email_validation ?>"
/>
- <?php echo _t('admin.system.force_email_validation'); ?>
+ <?= _t('admin.system.force_email_validation') ?>
</label>
</div>
</div>
<?php } ?>
<div class="form-group">
- <label class="group-name" for="max-feeds"><?php echo _t('admin.system.max-feeds'); ?></label>
+ <label class="group-name" for="max-feeds"><?= _t('admin.system.max-feeds') ?></label>
<div class="group-controls">
- <input type="number" id="max-feeds" name="max-feeds" value="<?php echo FreshRSS_Context::$system_conf->limits['max_feeds']; ?>" min="1" data-leave-validation="<?php echo FreshRSS_Context::$system_conf->limits['max_feeds']; ?>"/>
+ <input type="number" id="max-feeds" name="max-feeds" value="<?= FreshRSS_Context::$system_conf->limits['max_feeds'] ?>" min="1" data-leave-validation="<?= FreshRSS_Context::$system_conf->limits['max_feeds'] ?>"/>
</div>
</div>
<div class="form-group">
- <label class="group-name" for="max-categories"><?php echo _t('admin.system.max-categories'); ?></label>
+ <label class="group-name" for="max-categories"><?= _t('admin.system.max-categories') ?></label>
<div class="group-controls">
- <input type="number" id="max-categories" name="max-categories" value="<?php echo FreshRSS_Context::$system_conf->limits['max_categories']; ?>" min="1" data-leave-validation="<?php echo FreshRSS_Context::$system_conf->limits['max_categories']; ?>"/>
+ <input type="number" id="max-categories" name="max-categories" value="<?= FreshRSS_Context::$system_conf->limits['max_categories'] ?>" min="1" data-leave-validation="<?= FreshRSS_Context::$system_conf->limits['max_categories'] ?>"/>
</div>
</div>
<div class="form-group">
- <label class="group-name" for="cookie-duration"><?php echo _t('admin.system.cookie-duration.number'); ?></label>
+ <label class="group-name" for="cookie-duration"><?= _t('admin.system.cookie-duration.number') ?></label>
<div class="group-controls">
- <input type="number" id="cookie-duration" name="cookie-duration" value="<?php echo FreshRSS_Context::$system_conf->limits['cookie_duration']; ?>" min="0" data-leave-validation="<?php echo FreshRSS_Context::$system_conf->limits['cookie_duration']; ?>"/>
- <?php echo _i('help'); ?> <?php echo _t('admin.system.cookie-duration.help'); ?>
+ <input type="number" id="cookie-duration" name="cookie-duration" value="<?= FreshRSS_Context::$system_conf->limits['cookie_duration'] ?>" min="0" data-leave-validation="<?= FreshRSS_Context::$system_conf->limits['cookie_duration'] ?>"/>
+ <?= _i('help') ?> <?= _t('admin.system.cookie-duration.help') ?>
</div>
</div>
<div class="form-group form-actions">
<div class="group-controls">
- <button type="submit" class="btn btn-important"><?php echo _t('gen.action.submit'); ?></button>
- <button type="reset" class="btn"><?php echo _t('gen.action.cancel'); ?></button>
+ <button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
+ <button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
</div>
</div>
</form>