Browse Source

And take care of updated versions too

Signed-off-by: Suki <[email protected]>
Suki 11 years ago
parent
commit
1a2cf5e735
2 changed files with 5 additions and 2 deletions
  1. 4 1
      Sources/Subs-Themes.php
  2. 1 1
      Themes/default/Themes.template.php

+ 4 - 1
Sources/Subs-Themes.php

@@ -261,7 +261,10 @@ function theme_install($to_install = array())
 					);
 
 					// Done with the update, tell the user about it.
-					return $to_update['id_theme'];
+					$context['to_install']['updated'] = true;
+					$context['to_install']['id'] = $to_update['id_theme'];
+
+					return $context['to_install'];
 					break; // Just for reference.
 			}
 	}

+ 1 - 1
Themes/default/Themes.template.php

@@ -766,7 +766,7 @@ function template_installed()
 	else
 		echo '
 				<p>
-					<a href="', $scripturl, '?action=admin;area=theme;sa=list;th=', $context['installed_theme']['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $context['installed_theme']['name'], '</a> ', $txt['theme_'. (isset($_GET['updated']) ? 'updated' : 'installed') .'_message'], '
+					<a href="', $scripturl, '?action=admin;area=theme;sa=list;th=', $context['installed_theme']['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $context['installed_theme']['name'], '</a> ', $txt['theme_'. (isset($context['installed_theme']['updated']) ? 'updated' : 'installed') .'_message'], '
 				</p>
 				<p>
 					<a href="', $scripturl, '?action=admin;area=theme;sa=admin;', $context['session_var'], '=', $context['session_id'], '">', $txt['back'], '</a>