Browse Source

! Fatal error accessing stat page if stats are disabled [Bug 4742] + typo in Profile-Actions.php

emanuele 13 years ago
parent
commit
9284d80437
2 changed files with 4 additions and 1 deletions
  1. 1 1
      Sources/Profile-Actions.php
  2. 3 0
      Sources/Stats.php

+ 1 - 1
Sources/Profile-Actions.php

@@ -548,7 +548,7 @@ function deleteAccount2($profile_vars, $post_errors, $memID)
 		require_once($sourcedir . '/LogInOut.php');
 		LogOut(true);
 
-		redirectExit();
+		redirectexit();
 	}
 }
 

+ 3 - 0
Sources/Stats.php

@@ -29,6 +29,9 @@ function DisplayStats()
 	global $txt, $scripturl, $modSettings, $user_info, $context, $smcFunc;
 
 	isAllowedTo('view_stats');
+	// Page disabled - redirect them out
+	if (empty($modSettings['trackStats']))
+		fatal_lang_error('feature_disabled', true);
 
 	if (!empty($_REQUEST['expand']))
 	{