summaryrefslogtreecommitdiff
path: root/inc/template.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/template.php')
-rw-r--r--inc/template.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/inc/template.php b/inc/template.php
index ca1c8d9d5..8f41ce65b 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -33,11 +33,13 @@ function template($file) {
* This replaces the deprecated DOKU_TPLINC constant
*
* @author Andreas Gohr <andi@splitbrain.org>
+ * @param string $tpl The template to use, default to current one
* @return string
*/
-function tpl_incdir() {
+function tpl_incdir($tpl='') {
global $conf;
- return DOKU_INC.'lib/tpl/'.$conf['template'].'/';
+ if(!$tpl) $tpl = $conf['template'];
+ return DOKU_INC.'lib/tpl/'.$tpl.'/';
}
/**
@@ -46,10 +48,12 @@ function tpl_incdir() {
* This replaces the deprecated DOKU_TPL constant
*
* @author Andreas Gohr <andi@splitbrain.org>
+ * @param string $tpl The template to use, default to current one
* @return string
*/
-function tpl_basedir() {
+function tpl_basedir($tpl='') {
global $conf;
+ if(!$tpl) $tpl = $conf['template'];
return DOKU_BASE.'lib/tpl/'.$conf['template'].'/';
}
@@ -1229,7 +1233,7 @@ function tpl_localeFN($id) {
* @param bool $fromajax - set true when calling this function via ajax
* @author Andreas Gohr <andi@splitbrain.org>
*/
-function tpl_mediaContent($fromajax = false) {
+function tpl_mediaContent($fromajax = false, $sort='natural') {
global $IMG;
global $AUTH;
global $INUSE;
@@ -1259,7 +1263,7 @@ function tpl_mediaContent($fromajax = false) {
if($do == 'filesinuse') {
media_filesinuse($INUSE, $IMG);
} elseif($do == 'filelist') {
- media_filelist($NS, $AUTH, $JUMPTO);
+ media_filelist($NS, $AUTH, $JUMPTO,false,$sort);
} elseif($do == 'searchlist') {
media_searchlist($INPUT->str('q'), $NS, $AUTH);
} else {