Ver Fonte

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

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer há 11 anos atrás
pai
commit
23fe55feea
3 ficheiros alterados com 12 adições e 0 exclusões
  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">