Browse Source

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

Signed-off-by: emanuele <[email protected]>
emanuele 11 years ago
parent
commit
fdf41dd682
1 changed files with 6 additions and 5 deletions
  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']
+		);
 }
 
 /**