待辦事項 #10178

adminmenu.absolute dosen't work
啟用日期: 2007-03-28 11:22 最後更新: 2007-03-28 12:05

回報者:
負責人:
狀態:
關閉
元件:
(無)
里程碑:
(無)
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
修正
檔案:

細節

/modules/legacy/kernel/Legacy_Module.class.php L557

Legacy_ModuleAdapter::getAdminMenu()
にある対象 module からの相対ぱすを設定するところで

if (!(isset($menu['absolute']) && isset($menu
['absolute']) == true)) {
$menu['link'] = XOOPS_MODULE_URL . '/' . $this-
>mXoopsModule->get('dirname') . '/' . $menu['link'];
}

こんな判定をしてるけど2つ目の isset はいらなくないです
か?
このままだと isset() 1つでも同じ結果になるから
$adminmenu[...]['absolute'] = false;
と設定されていても相対ぱすに変換しないでそのまま出力さ
れちゃいます

Ticket History (3/4 Histories)

2007-03-28 11:37 Updated by: minahito
評語
Logged In: YES
user_id=8353

[EN]
TYPO:

/modules/legacy/kernel/Legacy_Module.class.php L557

- if (!(isset($menu['absolute']) && isset($menu
['absolute']) == true)) {
+ if (!(isset($menu['absolute']) && $menu
['absolute'] == true)) {
2007-03-28 11:49 Updated by: minahito
  • 負責人 Update from (無) to minahito
  • 處理結果 Update from to Accepted
2007-03-28 12:04 Updated by: minahito
  • Ticket Close date is changed to 2007-03-28 12:04
  • 處理結果 Update from Accepted to 修正
  • 狀態 Update from 開啟 to 關閉
評語
Logged In: YES
user_id=8353

Fix it as the following;

if (!isset($menu['absolute']) || (isset($menu['absolute'])
&& $menu['absolute'] == true)) {

Thanks!
2007-03-28 12:05 Updated by: minahito
  • Ticket Close date is changed to 2007-03-28 12:05
評語
Logged In: YES
user_id=8353

Oops!

if (!isset($menu['absolute']) || (isset($menu['absolute'])
&& $menu['absolute'] != true)) {

Attachment File List

No attachments

編輯

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » 登入