summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bratch <l_bratch@yahoo.co.uk>2014-07-25 12:39:00 +0100
committerLuke Bratch <l_bratch@yahoo.co.uk>2014-07-25 12:39:00 +0100
commit39c71a7c9506818482fcaacc6f10aafb0171439f (patch)
tree8aca3815286f7a925bb3d7c7c35e803a5ab3852d
parentd99a3276955482087be4b192287c2641eb6415d2 (diff)
Add support for only showing the most recent X files
-rw-r--r--index.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/index.php b/index.php
index e563ee8..942df76 100644
--- a/index.php
+++ b/index.php
@@ -136,6 +136,11 @@ while ($this_array = each($new_array)){
$value = $this_array['value'];
$key = $this_array['key'];
+ // Only show last X entries if requested
+ if (isset($_GET['last']) && ($listsize > $_GET['last'] - 1)) {
+ break;
+ }
+
// Drop if on index ignore list
if (in_array($value, $indexignore)) {
continue;