Browse Source

fix page info conditions

main
ghost 1 year ago
parent
commit
39ba77fce5
  1. 24
      public/explore.php

24
public/explore.php

@ -222,14 +222,22 @@ $placeholder = Filter::plural($totalPages, [sprintf(_('Over %s page or enter the
</a> </a>
</div> </div>
<div> <div>
<p><?php echo $hostPage->mime ? _('MIME') : false ?></p> <?php if (!empty($hostPage->mime)) { ?>
<p><?php echo $hostPage->mime ?></p> <p><?php echo _('MIME') ?></p>
<p><?php echo $hostPage->size ? _('Size') : false ?></p> <p><?php echo $hostPage->mime ?></p>
<p><?php echo $hostPage->size ?></p> <?php } ?>
<p><?php echo $hostPage->timeAdded ? _('Time added') : false ?></p> <?php if (!empty($hostPage->size)) { ?>
<p><?php echo date('c', $hostPage->timeAdded) ?></p> <p><?php echo _('Size') ?></p>
<p><?php echo $hostPage->timeUpdated ? _('Time updated') : false ?></p> <p><?php echo $hostPage->size ?></p>
<p><?php echo date('c', $hostPage->timeUpdated) ?></p> <?php } ?>
<?php if (!empty($hostPage->timeAdded)) { ?>
<p><?php echo _('Time added') ?></p>
<p><?php echo date('c', $hostPage->timeAdded) ?></p>
<?php } ?>
<?php if (!empty($hostPage->timeUpdated)) { ?>
<p><?php echo _('Time updated') ?></p>
<p><?php echo date('c', $hostPage->timeUpdated) ?></p>
<?php } ?>
<?php $totalHostPageSnaps = $db->getTotalHostPageSnaps($hp); ?> <?php $totalHostPageSnaps = $db->getTotalHostPageSnaps($hp); ?>
<p> <p>
<?php echo $totalHostPageSnaps ? Filter::plural($totalHostPageSnaps, [sprintf(_('%s snap'), $totalHostPageSnaps), <?php echo $totalHostPageSnaps ? Filter::plural($totalHostPageSnaps, [sprintf(_('%s snap'), $totalHostPageSnaps),

Loading…
Cancel
Save