OSDN Git Service

Added pkwk_common_headers()
authorhenoheno <henoheno>
Sat, 25 Dec 2004 00:14:52 +0000 (09:14 +0900)
committerhenoheno <henoheno>
Sat, 25 Dec 2004 00:14:52 +0000 (09:14 +0900)
lib/auth.php
lib/func.php

index a49274d..5d8c34e 100644 (file)
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: auth.php,v 1.4 2004/12/02 11:42:37 henoheno Exp $
+// $Id: auth.php,v 1.5 2004/12/25 00:11:27 henoheno Exp $
 //
 
 // ÊÔ½¸ÉÔ²Äǽ¤Ê¥Ú¡¼¥¸¤òÊÔ½¸¤·¤è¤¦¤È¤·¤¿¤È¤­
@@ -96,8 +96,8 @@ function basic_auth($page, $auth_flag, $exit_flag, $auth_pages, $title_cannot)
                || ! isset($_SERVER['PHP_AUTH_USER'], $auth_users)
                || $auth_users[$_SERVER['PHP_AUTH_USER']] != $_SERVER['PHP_AUTH_PW'])
        {
+               pkwk_common_headers();
                if ($auth_flag) {
-                       pkwk_headers_sent();
                        header('WWW-Authenticate: Basic realm="'.$_msg_auth.'"');
                        header('HTTP/1.0 401 Unauthorized');
                }
index bf6d4d3..2915605 100644 (file)
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: func.php,v 1.19 2004/12/16 13:09:48 henoheno Exp $
+// $Id: func.php,v 1.20 2004/12/25 00:14:52 henoheno Exp $
 //
 
 // Ê¸»úÎó¤¬InterWikiName¤«¤É¤¦¤«
@@ -370,16 +370,15 @@ function catrule()
 function die_message($msg)
 {
        $title = $page = 'Runtime error';
-
        $body = <<<EOD
 <h3>Runtime error</h3>
 <strong>Error message : $msg</strong>
 EOD;
 
+       pkwk_common_headers();
        if(defined('SKIN_FILE') && file_exists(SKIN_FILE) && is_readable(SKIN_FILE)) {
                catbody($title, $page, $body);
        } else {
-               pkwk_headers_sent();
                header('Content-Type: text/html; charset=euc-jp');
                print <<<EOD
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
@@ -394,7 +393,7 @@ EOD;
 </html>
 EOD;
        }
-       die();
+       exit;
 }
 
 // ¸½ºß»þ¹ï¤ò¥Þ¥¤¥¯¥íÉäǼèÆÀ