[icinga-checkins] icinga.org: icinga-web/jmosshammer/principal: * Fixed change Language and validation bug

git at icinga.org git at icinga.org
Thu Apr 29 12:18:35 CEST 2010


Module: icinga-web
Branch: jmosshammer/principal
Commit: a1c46cd0d25b7bcd8ff22e6d8f53b1b8a19a4bfc
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=a1c46cd0d25b7bcd8ff22e6d8f53b1b8a19a4bfc

Author: jmosshammer <jannis.mosshammer at netways.de>
Date:   Thu Apr 29 10:23:31 2010 +0200

* Fixed change Language and validation bug

---

 .../actions/User/PreferencesAction.class.php       |    2 ++
 app/modules/AppKit/validate/User/Preferences.xml   |    6 +++---
 lib/appkit/AppKit.class.php                        |    2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/app/modules/AppKit/actions/User/PreferencesAction.class.php b/app/modules/AppKit/actions/User/PreferencesAction.class.php
index feba995..e89016e 100755
--- a/app/modules/AppKit/actions/User/PreferencesAction.class.php
+++ b/app/modules/AppKit/actions/User/PreferencesAction.class.php
@@ -38,7 +38,9 @@ class AppKit_User_PreferencesAction extends ICINGAAppKitBaseAction
 
 		$key = $rd->getParameter("upref_key", false);
 		$batch = $rd->getParameter('params',false);
+			
 		if($key) {
+		
 			$val = $rd->getParameter("upref_val");
 			$isLong = $rd->getParameter("isLong",false);
 			if($val && !$rd->getParameter("remove",false)) {
diff --git a/app/modules/AppKit/validate/User/Preferences.xml b/app/modules/AppKit/validate/User/Preferences.xml
index 38abfbd..c860d67 100755
--- a/app/modules/AppKit/validate/User/Preferences.xml
+++ b/app/modules/AppKit/validate/User/Preferences.xml
@@ -10,13 +10,13 @@
 			<validator name="upref_key" class="string" required="false">
 				<argument>upref_key</argument>
 			</validator>
-			<validator name="upref_val" class="string" depends="upref_key">
+			<validator name="upref_val" class="string" required="false">
 				<argument>upref_val</argument>
 			</validator>
-			<validator name="isLong" class="string" depends="upref_key">
+			<validator name="isLong" class="string" required="false">
 				<argument>isLong</argument>
 			</validator>
-			<validator name="remove" class="string">
+			<validator name="remove" class="string" required="false">
 				<argument>remove</argument>
 			</validator>			
 			<validator name="params" class="string" required="false">
diff --git a/lib/appkit/AppKit.class.php b/lib/appkit/AppKit.class.php
index d1cd804..ee0565a 100644
--- a/lib/appkit/AppKit.class.php
+++ b/lib/appkit/AppKit.class.php
@@ -296,7 +296,7 @@ class AppKit {
 	private static function setLanguageDomain() {
 		try {
 			$context = AgaviContext::getInstance(AgaviConfig::get('core.default_context'));
-			$appKitUser = $context->getUser()->getNsmUser();
+			$user = $context->getUser()->getNsmUser();
 			if(!$user)
 				return true;
 			$translationMgr = $context->getTranslationManager();		





More information about the icinga-checkins mailing list