[dokuwiki] Re: Dokuwiki http headers...

  • From: TNHarris <telliamed@xxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Mon, 25 Oct 2010 19:46:05 -0400

On 10/25/2010 10:00 AM, Robin Getz wrote:

So, how is this?

diff --git a/inc/actions.php b/inc/actions.php
index 0a6e6d8..02c0da9 100644
--- a/inc/actions.php
+++ b/inc/actions.php
@@ -53,6 +54,10 @@ function act_dispatch(){
          //check permissions
          $ACT = act_permcheck($ACT);

+        if($conf['send404']&&  $ACT == 'denied') {
+            header('HTTP/1.0 403 Forbidden');
+        }
+
          //register
          if($ACT == 'register'&&  $_POST['save']&&  register()){
              $ACT = 'login';

May I suggest reacting after the ACTION_ACT_PREPROCESS handler is done. That gives plugins a chance to do something else with the 'denied' action.

--
- tom
telliamed@xxxxxxxxxxxxx
--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: