BugTrack/2173
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
* 閲覧権限のないMenuBarが表示される. [#m5af2f08]
- ページ: [[BugTrack2]]
- 投稿者: [[しましま]]
- 優先順位: 重要
- 状態: 提案
- カテゴリー: 本体バグ
- 投稿日: 2006-04-22 (土) 01:26:12
- バージョン: 1.4.6
#contents
-----
** メッセージ [#ed9b5d63]
閲覧権限のないページを見ると,対象となるページの閲覧は制...
define('MENU_ENABLE_SUBMENU', TRUE);
とすることで,ディレクトリごとに MenuBar を変更して,ディ...
しかし,上記の問題があって,意図したことが実現できません.
menu.inc.phpプラグインを修正すれば対処できるのではと思い
--- menu.inc.php.orig 2006-04-20 22:23:58.000000000 +0900
+++ menu.inc.php 2006-04-22 00:35:19.000000000 +0900
@@ -47,6 +47,8 @@
if (! is_page($page)) {
return '';
+ } else if (!check_readable($page, false, false)) {
+ return '';
} else if ($vars['page'] == $page) {
return '<!-- #menu(): You already view ' . htmlspecia...
} else {
のように check_readable 関数を加えてみましたが,
Headers already sent at [サイトのルート]/lib/html.php li...
のエラーで止まってしまいました.
PHPも,PukiWikiの構造も知らないので,私の力量ではここでお...
** 修正内容 [#w9cb270c]
認証中失敗時にはページを表示しないように cmd を変更する....
** パッチ [#x205ea91]
lib/auth.php
--- auth.php.orig 2006-04-22 10:33:22.000000000 +0900
+++ auth.php 2006-04-22 12:51:40.000000000 +0900
@@ -168,7 +168,7 @@
// Basic authentication
function basic_auth($page, $auth_flag, $exit_flag, $auth...
{
- global $auth_method_type, $auth_users, $_msg_auth;
+ global $auth_method_type, $auth_users, $_msg_auth, $va...
// Checked by:
$target_str = '';
@@ -216,6 +216,7 @@
$body = $title = str_replace('$1',
htmlspecialchars(strip_bracket($page)), $title_canno...
$page = str_replace('$1', make_search($page), $title_...
+ $vars['cmd'] = 'auth_error';
catbody($title, $page, $body);
exit;
}
*[[関連>PukiWiki/1.4/ちょっと便利に/任意のページごとの閲...
#include(PukiWiki/1.4/ちょっと便利に/任意のページごとの閲...
--------
*コメント [#qf4d86bd]
- MenuBarってskinから呼んでいる関係上、リダイレクトできな...
lib/auth.php : 218行目付近
$page = str_replace('$1', make_search($page), $title_can...
+ global $vars;
+ $vars['cmd'] = 'error';
catbody($title, $page, $body);
exit;
-- skinで「arg_check("read")」がかかっている前提だとこれ...
--- teananさんの方針でうまくいきました.menuプラグインを...
--- menu.inc.php.orig 2006-04-22 13:34:27.000000000 +0900
+++ menu.inc.php 2006-04-22 13:29:32.000000000 +0900
@@ -16,6 +16,8 @@
global $vars, $menubar;
static $menu = NULL;
+ if (arg_check('auth_error')) return('');
+
$num = func_num_args();
if ($num > 0) {
// Try to change default 'MenuBar' page name (only)
--- teananさんが書いているのは、たとえば配布しているpukiw...
--- pukiwiki_orig.skin.php Fri Apr 21 00:25:32 2006
+++ pukiwiki.skin.php Sat Apr 22 22:03:51 2006
@@ -166,7 +166,7 @@
<?php echo $hr ?>
-<?php if (arg_check('read') && exist_plugin_convert('me...
+<?php if (exist_plugin_convert('menu')) { ?>
<table border="0" style="width:100%">
<tr>
<td class="menubar">
--- そのとおりです。フォローありがとうございます :) -- [[...
--- read 以外のlistやrecentのときにもmenuプラグインが呼ば...
defaultスキンでarg_check('read')をはずして実験してみまし...
どうもありがとうございました. -- [[しましま]] &new{2006-...
#comment
終了行:
* 閲覧権限のないMenuBarが表示される. [#m5af2f08]
- ページ: [[BugTrack2]]
- 投稿者: [[しましま]]
- 優先順位: 重要
- 状態: 提案
- カテゴリー: 本体バグ
- 投稿日: 2006-04-22 (土) 01:26:12
- バージョン: 1.4.6
#contents
-----
** メッセージ [#ed9b5d63]
閲覧権限のないページを見ると,対象となるページの閲覧は制...
define('MENU_ENABLE_SUBMENU', TRUE);
とすることで,ディレクトリごとに MenuBar を変更して,ディ...
しかし,上記の問題があって,意図したことが実現できません.
menu.inc.phpプラグインを修正すれば対処できるのではと思い
--- menu.inc.php.orig 2006-04-20 22:23:58.000000000 +0900
+++ menu.inc.php 2006-04-22 00:35:19.000000000 +0900
@@ -47,6 +47,8 @@
if (! is_page($page)) {
return '';
+ } else if (!check_readable($page, false, false)) {
+ return '';
} else if ($vars['page'] == $page) {
return '<!-- #menu(): You already view ' . htmlspecia...
} else {
のように check_readable 関数を加えてみましたが,
Headers already sent at [サイトのルート]/lib/html.php li...
のエラーで止まってしまいました.
PHPも,PukiWikiの構造も知らないので,私の力量ではここでお...
** 修正内容 [#w9cb270c]
認証中失敗時にはページを表示しないように cmd を変更する....
** パッチ [#x205ea91]
lib/auth.php
--- auth.php.orig 2006-04-22 10:33:22.000000000 +0900
+++ auth.php 2006-04-22 12:51:40.000000000 +0900
@@ -168,7 +168,7 @@
// Basic authentication
function basic_auth($page, $auth_flag, $exit_flag, $auth...
{
- global $auth_method_type, $auth_users, $_msg_auth;
+ global $auth_method_type, $auth_users, $_msg_auth, $va...
// Checked by:
$target_str = '';
@@ -216,6 +216,7 @@
$body = $title = str_replace('$1',
htmlspecialchars(strip_bracket($page)), $title_canno...
$page = str_replace('$1', make_search($page), $title_...
+ $vars['cmd'] = 'auth_error';
catbody($title, $page, $body);
exit;
}
*[[関連>PukiWiki/1.4/ちょっと便利に/任意のページごとの閲...
#include(PukiWiki/1.4/ちょっと便利に/任意のページごとの閲...
--------
*コメント [#qf4d86bd]
- MenuBarってskinから呼んでいる関係上、リダイレクトできな...
lib/auth.php : 218行目付近
$page = str_replace('$1', make_search($page), $title_can...
+ global $vars;
+ $vars['cmd'] = 'error';
catbody($title, $page, $body);
exit;
-- skinで「arg_check("read")」がかかっている前提だとこれ...
--- teananさんの方針でうまくいきました.menuプラグインを...
--- menu.inc.php.orig 2006-04-22 13:34:27.000000000 +0900
+++ menu.inc.php 2006-04-22 13:29:32.000000000 +0900
@@ -16,6 +16,8 @@
global $vars, $menubar;
static $menu = NULL;
+ if (arg_check('auth_error')) return('');
+
$num = func_num_args();
if ($num > 0) {
// Try to change default 'MenuBar' page name (only)
--- teananさんが書いているのは、たとえば配布しているpukiw...
--- pukiwiki_orig.skin.php Fri Apr 21 00:25:32 2006
+++ pukiwiki.skin.php Sat Apr 22 22:03:51 2006
@@ -166,7 +166,7 @@
<?php echo $hr ?>
-<?php if (arg_check('read') && exist_plugin_convert('me...
+<?php if (exist_plugin_convert('menu')) { ?>
<table border="0" style="width:100%">
<tr>
<td class="menubar">
--- そのとおりです。フォローありがとうございます :) -- [[...
--- read 以外のlistやrecentのときにもmenuプラグインが呼ば...
defaultスキンでarg_check('read')をはずして実験してみまし...
どうもありがとうございました. -- [[しましま]] &new{2006-...
#comment
ページ名: