summaryrefslogtreecommitdiff
path: root/inc/actions.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-11-30 12:30:40 +0100
committerAndreas Gohr <andi@splitbrain.org>2012-11-30 12:30:40 +0100
commitd14415e37072dbe16077efd700aee5bd33707b54 (patch)
tree062c3c190039ac9490f56598b0ee116de18c2480 /inc/actions.php
parent2ed38036a53a489d2fcadc46ce601f8c876fca31 (diff)
parent38479cbba628ee76a92ff5f3c974cfa8e6ce9e61 (diff)
downloadrpg-d14415e37072dbe16077efd700aee5bd33707b54.tar.gz
rpg-d14415e37072dbe16077efd700aee5bd33707b54.tar.bz2
Merge branch 'master' into subscription
* master: (175 commits) some coding style improvements added .idea project folder to gitignore use correct setUp method and parent calls. Correct German plugin manager translation (download != install) correct return in sendDigest() Fix case-insensitive match in ACL checking GeSHi update to 1.0.8.11 ignore empty header on mail sending remove empty BCC/CC mail headers Galician language update some welcome page changes Combine subsequent calls to strtr into a single transformation changed semicolon to colon in link to welcome page to make it less confusing fixed wrong sidebar showing in namespaces when sidebar is disabled Typo fix for TL;DR removed a bunch of outdated and irrelevant networking acronyms added another place to look for logo to make it more consistent (FS#2656) French language update Czech language update compat js findPosX/y more closely mimic historical function ... Conflicts: inc/auth.php inc/common.php inc/subscription.php lib/exe/indexer.php
Diffstat (limited to 'inc/actions.php')
-rw-r--r--inc/actions.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/inc/actions.php b/inc/actions.php
index 721492bd4..911edf936 100644
--- a/inc/actions.php
+++ b/inc/actions.php
@@ -64,7 +64,7 @@ function act_dispatch(){
//sitemap
if ($ACT == 'sitemap'){
- $ACT = act_sitemap($ACT);
+ act_sitemap($ACT);
}
//register
@@ -137,6 +137,7 @@ function act_dispatch(){
if (in_array($page, $pluginlist)) {
// attempt to load the plugin
if ($plugin =& plugin_load('admin',$page) !== null){
+ /** @var DokuWiki_Admin_Plugin $plugin */
if($plugin->forAdminOnly() && !$INFO['isadmin']){
// a manager tried to load a plugin that's for admins only
$INPUT->remove('page');
@@ -177,6 +178,11 @@ function act_dispatch(){
// in function tpl_content()
}
+/**
+ * Send the given headers using header()
+ *
+ * @param array $headers The headers that shall be sent
+ */
function act_sendheaders($headers) {
foreach ($headers as $hdr) header($hdr);
}
@@ -437,6 +443,11 @@ function act_redirect($id,$preact){
trigger_event('ACTION_SHOW_REDIRECT',$opts,'act_redirect_execute');
}
+/**
+ * Execute the redirect
+ *
+ * @param array $opts id and fragment for the redirect
+ */
function act_redirect_execute($opts){
$go = wl($opts['id'],'',true);
if(isset($opts['fragment'])) $go .= '#'.$opts['fragment'];
@@ -637,7 +648,7 @@ function act_sitemap($act) {
}
$sitemap = Sitemapper::getFilePath();
- if(strrchr($sitemap, '.') === '.gz'){
+ if (Sitemapper::sitemapIsCompressed()) {
$mime = 'application/x-gzip';
}else{
$mime = 'application/xml; charset=utf-8';