Jelajahi Sumber

Merge branch 'master' of https://github.com/SimpleMachines/SMF2.1

emanuele 12 tahun lalu
induk
melakukan
c66107ee8d

+ 4 - 1
Sources/LogInOut.php

@@ -326,7 +326,7 @@ function Login2()
 		elseif (strlen($user_settings['passwd']) == 32)
 		{
 			// vBulletin 3 style hashing?  Let's welcome them with open arms \o/.
-			$other_passwords[] = md5(md5($_POST['passwrd']) . $user_settings['password_salt']);
+			$other_passwords[] = md5(md5($_POST['passwrd']) . stripslashes($user_settings['password_salt']));
 
 			// Hmm.. p'raps it's Invision 2 style?
 			$other_passwords[] = md5(md5($user_settings['password_salt']) . md5($_POST['passwrd']));
@@ -363,6 +363,9 @@ function Login2()
 			$other_passwords[] = sha1_smf(strtolower($user_settings['member_name']) . un_htmlspecialchars($_POST['passwrd']));
 		}
 
+		// Allows mods to easily extend the $other_passwords array
+		call_integration_hook('integrate_other_passwords', array($other_passwords));
+
 		// Whichever encryption it was using, let's make it use SMF's now ;).
 		if (in_array($user_settings['passwd'], $other_passwords))
 		{

+ 0 - 2
Sources/PersonalMessage.php

@@ -339,8 +339,6 @@ function messageIndexBar($area)
 	$menuOptions = array(
 		'current_area' => $area,
 		'disable_url_session_check' => true,
-		'toggle_url' => $current_page . ';togglebar',
-		'toggle_redirect_url' => $current_page,
 	);
 
 	// Actually create the menu!

+ 2 - 0
Sources/Subs-Editor.php

@@ -2164,6 +2164,8 @@ function AutoSuggestHandler($checkRegistered = null)
 		'versions' => 'SMFVersions',
 	);
 
+	call_integration_hook('integrate_autosuggest', array($searchTypes));
+
 	// If we're just checking the callback function is registered return true or false.
 	if ($checkRegistered != null)
 		return isset($searchTypes[$checkRegistered]) && function_exists('AutoSuggest_Search_' . $checkRegistered);

+ 0 - 31
Sources/Subs-Menu.php

@@ -26,34 +26,6 @@ function createMenu($menuData, $menuOptions = array())
 {
 	global $context, $settings, $options, $txt, $modSettings, $scripturl, $smcFunc, $user_info, $sourcedir, $options;
 
-	// First are we toggling use of the side bar generally?
-	if (isset($_GET['togglebar']) && !$user_info['is_guest'])
-	{
-		// Save the new dropdown menu state.
-		$smcFunc['db_insert']('replace',
-			'{db_prefix}themes',
-			array('id_member' => 'int', 'id_theme' => 'int', 'variable' => 'string-255', 'value' => 'string-65534'),
-			array(
-				array(
-					$user_info['id'],
-					$settings['theme_id'],
-					'use_sidebar_menu',
-					empty($options['use_sidebar_menu']) ? '1' : '0',
-				),
-			),
-			array('id_member', 'id_theme', 'variable')
-		);
-
-		// Clear the theme settings cache for this user.
-		$themes = explode(',', $modSettings['knownThemes']);
-		foreach ($themes as $theme)
-			cache_put_data('theme_settings-' . $theme . ':' . $user_info['id'], null, 60);
-
-		// Redirect as this seems to work best.
-		$redirect_url = isset($menuOptions['toggle_redirect_url']) ? $menuOptions['toggle_redirect_url'] : 'action=' . (isset($_GET['action']) ? $_GET['action'] : 'admin') . ';area=' . (isset($_GET['area']) ? $_GET['area'] : 'index') . ';sa=' . (isset($_GET['sa']) ? $_GET['sa'] : 'settings') . (isset($_GET['u']) ? ';u=' . $_GET['u'] : '') . ';' . $context['session_var'] . '=' . $context['session_id'];
-		redirectexit($redirect_url);
-	}
-
 	// Work out where we should get our images from.
 	$context['menu_image_path'] = file_exists($settings['theme_dir'] . '/images/admin/change_menu.png') ? $settings['images_url'] . '/admin' : $settings['default_images_url'] . '/admin';
 
@@ -235,9 +207,6 @@ function createMenu($menuData, $menuOptions = array())
 	// Should we use a custom base url, or use the default?
 	$menu_context['base_url'] = isset($menuOptions['base_url']) ? $menuOptions['base_url'] : $scripturl . '?action=' . $menu_context['current_action'];
 
-	// What about the toggle url?
-	$menu_context['toggle_url'] = isset($menuOptions['toggle_url']) ? $menuOptions['toggle_url'] : $menu_context['base_url'] . (!empty($menu_context['current_area']) ? ';area=' . $menu_context['current_area'] : '') . (!empty($menu_context['current_subsection']) ? ';sa=' . $menu_context['current_subsection'] : '') . $menu_context['extra_parameters'] . ';togglebar';
-
 	// If there are sections quickly goes through all the sections to check if the base menu has an url
 	if (!empty($menu_context['current_section']))
 	{

+ 2 - 19
Themes/default/GenericMenu.template.php

@@ -34,20 +34,8 @@ function template_generic_menu_sidebar_above()
 		echo '
 			<div class="adm_section">
 				<div class="cat_bar">
-					<h4 class="catbg">';
-
-		if ($firstSection && !empty($menu_context['can_toggle_drop_down']))
-		{
-			echo '
-							<a href="', $menu_context['toggle_url'], '">', $section['title'],'<img src="', $context['menu_image_path'], '/change_menu', $context['right_to_left'] ? '' : '2', '.png" alt="!" /></a>';
-		}
-		else
-		{
-			echo '
-						', $section['title'];
-		}
-
-		echo '
+					<h4 class="catbg">
+						', $section['title'], '
 					</h4>
 				</div>
 				<ul class="smalltext left_admmenu">';
@@ -118,11 +106,6 @@ function template_generic_menu_dropdown_above()
 	echo '
 <div id="admin_menu">';
 
-	// Allow the toggle to be absolutely positioned inside the div. Easy to keep it tidy that way. :)
-	if (!empty($menu_context['can_toggle_drop_down']))
-		echo '
-	<a href="', $menu_context['toggle_url'], '"><img id="menu_toggle" src="', $context['menu_image_path'], '/change_menu', $context['right_to_left'] ? '2' : '', '.png" alt="*" /></a>';
-
 	echo '
 	<ul class="dropmenu" id="dropdown_menu_', $context['cur_menu_id'], '">';