Browse Source

Put the tabs as they used to be.

Signed-off-by: Suki <[email protected]>
Suki 11 years ago
parent
commit
4054a0ddd9
3 changed files with 23 additions and 19 deletions
  1. 1 1
      Sources/Admin.php
  2. 9 4
      Sources/Themes.php
  3. 13 14
      Themes/default/Themes.template.php

+ 1 - 1
Sources/Admin.php

@@ -144,8 +144,8 @@ function AdminMain()
 					'custom_url' => $scripturl . '?action=admin;area=theme',
 					'icon' => 'themes.png',
 					'subsections' => array(
-						'list' => array($txt['themeadmin_list_title']),
 						'admin' => array($txt['themeadmin_admin_title']),
+						'list' => array($txt['themeadmin_list_title']),
 						'reset' => array($txt['themeadmin_reset_title']),
 						'edit' => array($txt['themeadmin_edit_title']),
 					),

+ 9 - 4
Sources/Themes.php

@@ -79,12 +79,12 @@ function ThemesMain()
 			'help' => 'themes',
 			'description' => $txt['themeadmin_description'],
 			'tabs' => array(
-				'list' => array(
-					'description' => $txt['themeadmin_list_desc'],
-				),
 				'admin' => array(
 					'description' => $txt['themeadmin_admin_desc'],
 				),
+				'list' => array(
+					'description' => $txt['themeadmin_list_desc'],
+				),
 				'reset' => array(
 					'description' => $txt['themeadmin_reset_desc'],
 				),
@@ -99,7 +99,7 @@ function ThemesMain()
 	if (isset($_GET['sa']) && !empty($subActions[$_GET['sa']]))
 		$subActions[$_GET['sa']]();
 	else
-		$subActions['list']();
+		$subActions['admin']();
 }
 
 /**
@@ -142,6 +142,7 @@ function ThemeAdmin()
 	createToken('admin-t-copy');
 	createToken('admin-t-dir');
 
+	// Are handling any settings?
 	if (isset($_POST['save']))
 	{
 		checkSession();
@@ -1254,6 +1255,10 @@ function ThemeInstall()
 	{
 		$action = $smcFunc['htmlspecialchars'](trim($_GET['do']));
 
+		// Got any info from the specific form?
+		if (!isset($_POST['save_'. $action]))
+			fatal_lang_error('theme_install_no_action', false);
+
 		validateToken('admin-t-'. $action);
 
 		// Hopefully the themes directory is writable, or we might have a problem.

+ 13 - 14
Themes/default/Themes.template.php

@@ -18,7 +18,19 @@ function template_main()
 	echo '
 	<div id="admincenter">';
 
+	// Theme install info.
 	echo '
+		<div class="cat_bar">
+		<h3 class="catbg">
+			<a href="', $scripturl, '?action=helpadmin;help=themes" onclick="return reqOverlayDiv(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics_hd.png" class="icon" alt="', $txt['help'], '" /></a>
+			', $txt['themeadmin_title'], '
+		</h3>
+		</div>
+		<div class="information">
+			', $txt['themeadmin_explain'], '
+		</div>';
+
+	echo '<br />
 		<form action="', $scripturl, '?action=admin;area=theme;sa=admin" method="post" accept-charset="', $context['character_set'], '">
 			<div class="cat_bar">
 				<h3 class="catbg">',
@@ -91,20 +103,7 @@ function template_main()
 					<input type="hidden" value="0" name="options[theme_allow]" />
 				</div>
 			</div>
-		</form>
-		<br />';
-
-	// Theme install info.
-	echo '
-		<div class="cat_bar">
-		<h3 class="catbg">
-			<a href="', $scripturl, '?action=helpadmin;help=themes" onclick="return reqOverlayDiv(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics_hd.png" class="icon" alt="', $txt['help'], '" /></a>
-			', $txt['themeadmin_title'], '
-		</h3>
-		</div>
-		<div class="information">
-			', $txt['themeadmin_explain'], '
-		</div>';
+		</form>';
 
 	// Link to simplemachines.org for latest themes and info!
 	echo '