summaryrefslogtreecommitdiff
path: root/inc/template.php
diff options
context:
space:
mode:
authorKlap-in <klapinklapin@gmail.com>2013-08-01 23:06:36 +0200
committerKlap-in <klapinklapin@gmail.com>2013-08-01 23:06:36 +0200
commitde489e8bb4161522864aca1d308b9910387ae4bb (patch)
tree697a6ca1a6a3341598a6272dca6e5cf0ee4cd105 /inc/template.php
parentcc036f74ff14c387f24d72f5a52f2f158208846e (diff)
parent4fb6e51447e840624b59742bec61641d606f5006 (diff)
downloadrpg-de489e8bb4161522864aca1d308b9910387ae4bb.tar.gz
rpg-de489e8bb4161522864aca1d308b9910387ae4bb.tar.bz2
Merge remote-tracking branch 'origin/master' into fetchimagetokexternal
Diffstat (limited to 'inc/template.php')
-rw-r--r--inc/template.php28
1 files changed, 22 insertions, 6 deletions
diff --git a/inc/template.php b/inc/template.php
index a87650b84..66cbbe471 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -291,12 +291,10 @@ function tpl_metaheaders($alt = true) {
$head = array();
// prepare seed for js and css
- $tseed = 0;
+ $tseed = $updateVersion;
$depends = getConfigFiles('main');
- foreach($depends as $f) {
- $time = @filemtime($f);
- if($time > $tseed) $tseed = $time;
- }
+ foreach($depends as $f) $tseed .= @filemtime($f);
+ $tseed = md5($tseed);
// the usual stuff
$head['meta'][] = array('name'=> 'generator', 'content'=> 'DokuWiki');
@@ -766,7 +764,7 @@ function tpl_searchform($ajax = true, $autocomplete = true) {
// don't print the search form if search action has been disabled
if(!actionOK('search')) return false;
- print '<form action="'.wl().'" accept-charset="utf-8" class="search" id="dw__search" method="get"><div class="no">';
+ print '<form action="'.wl().'" accept-charset="utf-8" class="search" id="dw__search" method="get" role="search"><div class="no">';
print '<input type="hidden" name="do" value="search" />';
print '<input type="text" ';
if($ACT == 'search') print 'value="'.htmlspecialchars($QUERY).'" ';
@@ -1748,5 +1746,23 @@ function tpl_media() {
echo '</div>'.NL;
}
+/**
+ * Return useful layout classes
+ *
+ * @author Anika Henke <anika@selfthinker.org>
+ */
+function tpl_classes() {
+ global $ACT, $conf, $ID, $INFO;
+ $classes = array(
+ 'dokuwiki',
+ 'mode_'.$ACT,
+ 'tpl_'.$conf['template'],
+ $_SERVER['REMOTE_USER'] ? 'loggedIn' : '',
+ $INFO['exists'] ? '' : 'notFound',
+ ($ID == $conf['start']) ? 'home' : '',
+ );
+ return join(' ', $classes);
+}
+
//Setup VIM: ex: et ts=4 :