mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-06-03 05:08:08 -04:00
* 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
27 lines
1023 B
PHTML
27 lines
1023 B
PHTML
<div class="post content">
|
|
<a href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
|
|
|
|
<h1><?= _t('index.log') ?></h1>
|
|
<form method="post" action="<?= _url('index', 'logs') ?>"><p>
|
|
<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
|
|
<input type="hidden" name="clearLogs" />
|
|
<button type="submit" class="btn"><?= _t('index.log.clear') ?></button>
|
|
</p></form>
|
|
|
|
<?php $items = $this->logsPaginator->items(); ?>
|
|
|
|
<?php if (!empty($items)) { ?>
|
|
<div class="loglist">
|
|
<?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?>
|
|
|
|
<?php foreach ($items as $log) { ?>
|
|
<div class="log <?= $log->level() ?>"><span class="date"><?= @date('Y-m-d H:i:s', @strtotime($log->date())) ?></span><?= htmlspecialchars($log->info(), ENT_NOQUOTES, 'UTF-8') ?></div>
|
|
<?php } ?>
|
|
|
|
<?php $this->logsPaginator->render('logs_pagination.phtml','page'); ?>
|
|
</div>
|
|
<?php } else { ?>
|
|
<p class="alert alert-warn"><?= _t('index.log.empty') ?></p>
|
|
<?php } ?>
|
|
</div>
|