You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ag...@apache.org on 2007/05/07 22:46:50 UTC

svn commit: r535986 - /roller/trunk/src/org/apache/roller/ui/authoring/struts2/MembersInvite.java

Author: agilliland
Date: Mon May  7 13:46:50 2007
New Revision: 535986

URL: http://svn.apache.org/viewvc?view=rev&rev=535986
Log:
fixing problem where action chaining was broken by struts2.  struts2 is complaining about the fact that we set an error message and then chained, so until there is a better option we are just going to set a message instead.


Modified:
    roller/trunk/src/org/apache/roller/ui/authoring/struts2/MembersInvite.java

Modified: roller/trunk/src/org/apache/roller/ui/authoring/struts2/MembersInvite.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/ui/authoring/struts2/MembersInvite.java?view=diff&rev=535986&r1=535985&r2=535986
==============================================================================
--- roller/trunk/src/org/apache/roller/ui/authoring/struts2/MembersInvite.java (original)
+++ roller/trunk/src/org/apache/roller/ui/authoring/struts2/MembersInvite.java Mon May  7 13:46:50 2007
@@ -63,7 +63,9 @@
         
         // if group blogging is disabled then you can't change permissions
         if (!RollerConfig.getBooleanProperty("groupblogging.enabled")) {
-            return "disabled";
+            // TODO: i18n
+            addError("invitations disabled");
+            return SUCCESS;
         }
         
         log.debug("Showing weblog inivitation form");
@@ -79,7 +81,9 @@
         
         // if group blogging is disabled then you can't change permissions
         if (!RollerConfig.getBooleanProperty("groupblogging.enabled")) {
-            return "disabled";
+            // TODO: i18n
+            addError("invitations disabled");
+            return SUCCESS;
         }
         
         log.debug("Attempting to process weblog invitation");
@@ -131,7 +135,10 @@
             try {
                 MailUtil.sendWeblogInvitation(getActionWeblog(), user);
             } catch (RollerException e) {
-                addError("error.untranslated", e.getMessage());
+                // TODO: this should be an error except that struts2 misbehaves
+                // when we chain this action to the next one thinking that an error
+                // means that validation broke during the chain
+                addMessage("error.untranslated", e.getMessage());
             }
             
             log.debug("Invitation successfully recorded");