From 4064e2d30906d01e696c5de106fd9ff356980a93 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Sat, 20 Nov 2010 13:13:21 +0100 Subject: Handle do=check before ACL checking --- inc/actions.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'inc/actions.php') diff --git a/inc/actions.php b/inc/actions.php index 9db7d5f24..7a6d2eb85 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -50,6 +50,12 @@ function act_dispatch(){ } } + //display some infos + if($ACT == 'check'){ + check(); + $ACT = 'show'; + } + //check permissions $ACT = act_permcheck($ACT); @@ -120,12 +126,6 @@ function act_dispatch(){ if(substr($ACT,0,7) == 'export_') $ACT = act_export($ACT); - //display some infos - if($ACT == 'check'){ - check(); - $ACT = 'show'; - } - //handle admin tasks if($ACT == 'admin'){ // retrieve admin plugin name from $_REQUEST['page'] -- cgit v1.2.3 From 85dcda20ffd82becbe69a7ca5d99e4b6fd99c9ea Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Sat, 20 Nov 2010 13:17:00 +0100 Subject: Send 403 header for permission denied screens when send404 is enabled --- inc/actions.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'inc/actions.php') diff --git a/inc/actions.php b/inc/actions.php index 7a6d2eb85..fb2ae452f 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -20,6 +20,7 @@ function act_dispatch(){ global $ID; global $QUERY; global $lang; + global $conf; $preact = $ACT; @@ -143,6 +144,10 @@ function act_dispatch(){ $ACT = act_permcheck($ACT); } // end event ACTION_ACT_PREPROCESS default action $evt->advise_after(); + // Make sure plugs can handle 'denied' + if($conf['send404'] && $ACT == 'denied') { + header('HTTP/1.0 403 Forbidden'); + } unset($evt); // when action 'show', the intial not 'show' and POST, do a redirect -- cgit v1.2.3 From e3776c06c37cc197709dac60892604dfea894ac2 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 29 Nov 2010 01:34:36 +0100 Subject: Remove enc=utf-8 in VIM modeline as it is not allowed in VIM 7.3 As of VIM 7.3 it is no longer possible to specify the encoding in the modeline. This gives an error message whenever such a file is opened, thus this commit removes the enc setting from the modeline. --- inc/actions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/actions.php') diff --git a/inc/actions.php b/inc/actions.php index fb2ae452f..d98382a3b 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -743,4 +743,4 @@ function subscription_handle_post(&$params) { $params = compact('target', 'style', 'data', 'action'); } -//Setup VIM: ex: et ts=2 enc=utf-8 : +//Setup VIM: ex: et ts=2 : -- cgit v1.2.3 From 03f008cd4edafbcb75d5f3b99bd3271caabed988 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 12 Dec 2010 19:48:29 +0100 Subject: Copy changes from ajax_lock to act_draftsave --- inc/actions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inc/actions.php') diff --git a/inc/actions.php b/inc/actions.php index d98382a3b..a4461d1ab 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -292,9 +292,10 @@ function act_draftsave($act){ global $conf; if($conf['usedraft'] && $_POST['wikitext']){ $draft = array('id' => $ID, - 'prefix' => $_POST['prefix'], + 'prefix' => substr($_POST['prefix'], 0, -1), 'text' => $_POST['wikitext'], 'suffix' => $_POST['suffix'], + 'date' => (int) $_POST['date'], 'date' => $_POST['date'], 'client' => $INFO['client'], ); -- cgit v1.2.3 From ec5906e60bfe61520ec062e6a89096988c218690 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 13 Dec 2010 15:52:57 +0100 Subject: Delete superfluous assignment created by the last commit --- inc/actions.php | 1 - 1 file changed, 1 deletion(-) (limited to 'inc/actions.php') diff --git a/inc/actions.php b/inc/actions.php index a4461d1ab..0297f6e56 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -296,7 +296,6 @@ function act_draftsave($act){ 'text' => $_POST['wikitext'], 'suffix' => $_POST['suffix'], 'date' => (int) $_POST['date'], - 'date' => $_POST['date'], 'client' => $INFO['client'], ); $cname = getCacheName($draft['client'].$ID,'.draft'); -- cgit v1.2.3 From 4c36bf829933f31b2adfa813cd61b9b895e31469 Mon Sep 17 00:00:00 2001 From: Guillaume Turri Date: Mon, 3 Jan 2011 14:46:03 +0100 Subject: Change sitemap filename to sitemap.xml(.gz). Closes FS#2127 --- inc/actions.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc/actions.php') diff --git a/inc/actions.php b/inc/actions.php index 0297f6e56..016af4aea 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -626,6 +626,7 @@ function act_sitemap($act) { if (is_readable($sitemap)) { // Send headers header('Content-Type: '.$mime); + header('Content-Disposition: attachment; filename='.basename($sitemap)); http_conditionalRequest(filemtime($sitemap)); -- cgit v1.2.3