Browse Source

! News settings and packages options also needed to indicate saved settings (per #802)

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer 11 years ago
parent
commit
23fe55feea
3 changed files with 12 additions and 0 deletions
  1. 1 0
      Sources/ManageNews.php
  2. 7 0
      Sources/Packages.php
  3. 4 0
      Themes/default/Packages.template.php

+ 1 - 0
Sources/ManageNews.php

@@ -1074,6 +1074,7 @@ function ModifyNewsSettings($return_config = false)
 		call_integration_hook('integrate_save_news_settings');
 
 		saveDBSettings($config_vars);
+		$_SESSION['adm-save'] = true;
 		redirectexit('action=admin;area=news;sa=settings');
 	}
 

+ 7 - 0
Sources/Packages.php

@@ -1799,6 +1799,7 @@ function PackageOptions()
 			'package_make_backups' => !empty($_POST['package_make_backups']),
 			'package_make_full_backups' => !empty($_POST['package_make_full_backups'])
 		));
+		$_SESSION['adm-save'] = true;
 
 		redirectexit('action=admin;area=packages;sa=options');
 	}
@@ -1816,6 +1817,12 @@ function PackageOptions()
 	$context['package_ftp_username'] = isset($modSettings['package_username']) ? $modSettings['package_username'] : $default_username;
 	$context['package_make_backups'] = !empty($modSettings['package_make_backups']);
 	$context['package_make_full_backups'] = !empty($modSettings['package_make_full_backups']);
+
+	if (!empty($_SESSION['adm-save']))
+	{
+		$context['saved_successful'] = true;
+		unset ($_SESSION['adm-save']);
+	}
 }
 
 /**

+ 4 - 0
Themes/default/Packages.template.php

@@ -1040,6 +1040,10 @@ function template_install_options()
 {
 	global $context, $settings, $options, $txt, $scripturl;
 
+	if (!empty($context['saved_successful']))
+		echo '
+	<div class="infobox">', $txt['settings_saved'], '</div>';
+
 	echo '
 	<div id="admincenter">
 		<div class="cat_bar">