Sfoglia il codice sorgente

! And a bit of clean-up before we prepare to do the real saving thing.

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer 10 anni fa
parent
commit
babb85c34b
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. 3 2
      Sources/Profile-Modify.php

+ 3 - 2
Sources/Profile-Modify.php

@@ -1846,6 +1846,8 @@ function alert_configuration($memID)
 {
 	global $txt, $scripturl, $user_profile, $user_info, $context, $modSettings, $smcFunc, $sourcedir, $settings;
 
+	$context['token_check'] = 'profile-nt' . $memID;
+
 	// What options are set?
 	$context['member'] += array(
 		'notify_announcements' => $user_profile[$memID]['notify_announcements'],
@@ -1978,13 +1980,12 @@ function alert_configuration($memID)
 		if (!$context['member']['is_owner'])
 			isAllowedTo('profile_extra_any');
 		checkSession('post');
-		validateToken(str_replace('%u', $memID, 'profile-nt%u'), 'post');
+		validateToken($context['token_check'], 'post');
 
 		makeNotificationChanges($memID);
 		$context['profile_updated'] = $txt['profile_updated_own'];
 	}
 
-	$context['token_check'] = str_replace('%u', $memID, 'profile-nt%u');
 	createToken($context['token_check'], 'post');
 }