dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #23468
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11425: Fixed funny logic
------------------------------------------------------------
revno: 11425
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-07-17 22:56:02 +0200
message:
Fixed funny logic
modified:
dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/xml/UtilTest.java
dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/settings/action/SaveSettingsFormAction.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/xml/UtilTest.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/xml/UtilTest.java 2013-07-15 20:02:44 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/xml/UtilTest.java 2013-07-17 20:56:02 +0000
@@ -28,7 +28,7 @@
*/
import java.text.ParseException;
-import junit.framework.Assert;
+import org.junit.Assert;
import org.junit.Test;
/**
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/settings/action/SaveSettingsFormAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/settings/action/SaveSettingsFormAction.java 2012-02-16 14:00:33 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/settings/action/SaveSettingsFormAction.java 2013-07-17 20:56:02 +0000
@@ -29,10 +29,9 @@
import java.util.Locale;
-import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.Validate;
-import org.apache.commons.validator.EmailValidator;
import org.hisp.dhis.i18n.locale.LocaleManager;
+import org.hisp.dhis.system.util.ValidationUtils;
import org.hisp.dhis.user.CurrentUserService;
import org.hisp.dhis.user.User;
import org.hisp.dhis.user.UserService;
@@ -147,14 +146,7 @@
user.setSurname( surname );
user.setPhoneNumber( phoneNumber );
- if ( StringUtils.isNotBlank( email ) )
- {
- if ( EmailValidator.getInstance().isValid( email ) )
- {
- user.setEmail( email );
- }
- }
- else
+ if ( ValidationUtils.emailIsValid( email ) )
{
user.setEmail( email );
}
@@ -162,7 +154,7 @@
userService.updateUser( user );
// ---------------------------------------------------------------------
- // Update locale settings (ui)
+ // Update UI locale settings
// ---------------------------------------------------------------------
localeManagerInterface.setCurrentLocale( getRespectiveLocale( currentLocale ) );