瀏覽代碼

Undefined index in Admin logs - Thanks Road Rash Jr. for the report

Signed-off-by: emanuele <[email protected]>
emanuele 11 年之前
父節點
當前提交
fdf41dd682
共有 1 個文件被更改,包括 6 次插入5 次删除
  1. 6 5
      Sources/Modlog.php

+ 6 - 5
Sources/Modlog.php

@@ -295,11 +295,12 @@ function ViewModlog()
 	$context['sub_template'] = 'show_list';
 	$context['default_list'] = 'moderation_log_list';
 
-	$context[$context['moderation_menu_name']]['tab_data'] = array(
-		'title' => $txt['modlog_' . ($context['log_type'] == 3 ? 'admin' : 'moderation') . '_log'],
-		'help' => $context['log_type'] == 3 ? 'adminlog' : 'modlog',
-		'description' => $txt['modlog_' . ($context['log_type'] == 3 ? 'admin' : 'moderation') . '_log_desc']
-	);
+	if (isset($context['moderation_menu_name']))
+		$context[$context['moderation_menu_name']]['tab_data'] = array(
+			'title' => $txt['modlog_' . ($context['log_type'] == 3 ? 'admin' : 'moderation') . '_log'],
+			'help' => $context['log_type'] == 3 ? 'adminlog' : 'modlog',
+			'description' => $txt['modlog_' . ($context['log_type'] == 3 ? 'admin' : 'moderation') . '_log_desc']
+		);
 }
 
 /**