aboutsummaryrefslogtreecommitdiff
path: root/app/views/importExport
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/importExport
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/importExport')
-rw-r--r--app/views/importExport/index.phtml36
1 files changed, 18 insertions, 18 deletions
diff --git a/app/views/importExport/index.phtml b/app/views/importExport/index.phtml
index 139e715c5..e5a24dbc4 100644
--- a/app/views/importExport/index.phtml
+++ b/app/views/importExport/index.phtml
@@ -1,14 +1,14 @@
<?php $this->partial('aside_subscription'); ?>
<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('importExport', 'import'); ?>" enctype="multipart/form-data">
- <input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" />
- <legend><?php echo _t('sub.import_export.import'); ?></legend>
+ <form method="post" action="<?= _url('importExport', 'import') ?>" enctype="multipart/form-data">
+ <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
+ <legend><?= _t('sub.import_export.import') ?></legend>
<div class="form-group">
<label class="group-name" for="file">
- <?php echo extension_loaded('zip') ? _t('sub.import_export.file_to_import') : _t('sub.import_export.file_to_import_no_zip'); ?>
+ <?= extension_loaded('zip') ? _t('sub.import_export.file_to_import') : _t('sub.import_export.file_to_import_no_zip') ?>
</label>
<div class="group-controls">
<input type="file" name="file" id="file" />
@@ -17,30 +17,30 @@
<div class="form-group form-actions">
<div class="group-controls">
- <button type="submit" class="btn btn-important"><?php echo _t('gen.action.import'); ?></button>
+ <button type="submit" class="btn btn-important"><?= _t('gen.action.import') ?></button>
</div>
</div>
</form>
<?php if (count($this->feeds) > 0) { ?>
- <form method="post" action="<?php echo _url('importExport', 'export'); ?>">
- <input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" />
- <legend><?php echo _t('sub.import_export.export'); ?></legend>
+ <form method="post" action="<?= _url('importExport', 'export') ?>">
+ <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
+ <legend><?= _t('sub.import_export.export') ?></legend>
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="export_opml">
<input type="checkbox" name="export_opml" id="export_opml" value="1" checked="checked" />
- <?php echo _t('sub.import_export.export_opml'); ?>
+ <?= _t('sub.import_export.export_opml') ?>
</label>
<label class="checkbox" for="export_labelled">
- <input type="checkbox" name="export_labelled" id="export_labelled" value="1" <?php echo extension_loaded('zip') ? 'checked="checked"' : ''; ?> />
- <?php echo _t('sub.import_export.export_labelled'); ?>
+ <input type="checkbox" name="export_labelled" id="export_labelled" value="1" <?= extension_loaded('zip') ? 'checked="checked"' : '' ?> />
+ <?= _t('sub.import_export.export_labelled') ?>
</label>
<label class="checkbox" for="export_starred">
- <input type="checkbox" name="export_starred" id="export_starred" value="1" <?php echo extension_loaded('zip') ? 'checked="checked"' : ''; ?> />
- <?php echo _t('sub.import_export.export_starred'); ?>
+ <input type="checkbox" name="export_starred" id="export_starred" value="1" <?= extension_loaded('zip') ? 'checked="checked"' : '' ?> />
+ <?= _t('sub.import_export.export_starred') ?>
</label>
<?php
@@ -49,10 +49,10 @@
$select_args = ' size="' . min(10, count($this->feeds)) .'" multiple="multiple"';
}
?>
- <select name="export_feeds[]"<?php echo $select_args; ?> size="10">
- <?php echo extension_loaded('zip') ? '' : '<option></option>'; ?>
+ <select name="export_feeds[]"<?= $select_args ?> size="10">
+ <?= extension_loaded('zip') ? '' : '<option></option>' ?>
<?php foreach ($this->feeds as $feed) { ?>
- <option value="<?php echo $feed->id(); ?>"><?php echo $feed->name(); ?></option>
+ <option value="<?= $feed->id() ?>"><?= $feed->name() ?></option>
<?php } ?>
</select>
</div>
@@ -60,7 +60,7 @@
<div class="form-group form-actions">
<div class="group-controls">
- <button type="submit" class="btn btn-important"><?php echo _t('gen.action.export'); ?></button>
+ <button type="submit" class="btn btn-important"><?= _t('gen.action.export') ?></button>
</div>
</div>
</form>