summaryrefslogtreecommitdiff
path: root/lib/exe/ajax.php
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2013-08-03 17:17:58 +0200
committerChristopher Smith <chris@jalakai.co.uk>2013-08-03 17:17:58 +0200
commit00e3e3940de140e6fe6ce3c558c71a47f676b456 (patch)
treeae7c7e43867a15810354212ff5b97d6df2f85790 /lib/exe/ajax.php
parent89274c0d2b04d8f0524cc37fa18bdd4cc592294a (diff)
downloadrpg-00e3e3940de140e6fe6ce3c558c71a47f676b456.tar.gz
rpg-00e3e3940de140e6fe6ce3c558c71a47f676b456.tar.bz2
fix the default ordering of media files to be "natural".
also allow the order to be specified in more places.
Diffstat (limited to 'lib/exe/ajax.php')
-rw-r--r--lib/exe/ajax.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php
index 9769503a7..6e2011cd9 100644
--- a/lib/exe/ajax.php
+++ b/lib/exe/ajax.php
@@ -219,10 +219,11 @@ function ajax_medialist(){
global $INPUT;
$NS = cleanID($INPUT->post->str('ns'));
+ $sort = $INPUT->post->bool('recent') ? 'date' : 'natural';
if ($INPUT->post->str('do') == 'media') {
tpl_mediaFileList();
} else {
- tpl_mediaContent(true);
+ tpl_mediaContent(true, $sort);
}
}