Browse Source

! And now language settings. (per #802)

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer 11 years ago
parent
commit
9836a48951
2 changed files with 12 additions and 0 deletions
  1. 2 0
      Sources/ManageLanguages.php
  2. 10 0
      Sources/ManageServer.php

+ 2 - 0
Sources/ManageLanguages.php

@@ -825,6 +825,8 @@ function ModifyLanguageSettings($return_config = false)
 		call_integration_hook('integrate_save_language_settings', array(&$config_vars));
 
 		saveSettings($config_vars);
+		if (!$settings_not_writable && !$settings_backup_fail)
+			$_SESSION['adm-save'] = true;
 		redirectexit('action=admin;area=languages;sa=settings');
 	}
 

+ 10 - 0
Sources/ManageServer.php

@@ -595,6 +595,16 @@ function prepareServerSettingsContext(&$config_vars)
 {
 	global $context, $modSettings, $smcFunc;
 
+	if (isset($_SESSION['adm-save']))
+	{
+		if ($_SESSION['adm-save'] === true)
+			$context['saved_successful'] = true;
+		else
+			$context['saved_failed'] = $_SESSION['adm-save'];
+
+		unset($_SESSION['adm-save']);
+	}
+
 	$context['config_vars'] = array();
 	foreach ($config_vars as $identifier => $config_var)
 	{