[Bedework-commit] bwwebapps r85 - trunk/webcommon/src/org/bedework/webcommon/event

svnadmin at bedework.org svnadmin at bedework.org
Fri Apr 6 13:38:09 EDT 2012


Author: douglm
Date: 2012-04-06 13:38:09 -0400 (Fri, 06 Apr 2012)
New Revision: 85

Modified:
   trunk/webcommon/src/org/bedework/webcommon/event/UpdateEventAction.java
Log:
Another fix to remove bogus x-props on update

Modified: trunk/webcommon/src/org/bedework/webcommon/event/UpdateEventAction.java
===================================================================
--- trunk/webcommon/src/org/bedework/webcommon/event/UpdateEventAction.java	2012-04-06 17:38:07 UTC (rev 84)
+++ trunk/webcommon/src/org/bedework/webcommon/event/UpdateEventAction.java	2012-04-06 17:38:09 UTC (rev 85)
@@ -797,9 +797,12 @@
     return rdChanged || exdChanged;
   }
 
-  private static final String alwaysRemove =
+  private static final String alwaysRemove1 =
       "BEGIN:VEVENT\r\nUID:123456\r\nDTSTART;TYPE=DATE:20080212T000000\r\n";
 
+  private static final String alwaysRemove2 =
+      "BEGIN:VEVENT\nUID:123456\nDTSTART;TYPE=DATE:20080212T000000\n";
+
   /* return forwardNoAction for no change
    * forward success for change otherwise error.
    */
@@ -838,12 +841,13 @@
 
       for (BwXproperty xp:  evxprops) {
         if (xp.getSkipJsp()) {
-          if (!xp.getName().equals(BwXproperty.bedeworkIcal)) {
+          if (!xp.getName().equals(BwXproperty.bedeworkIcal) ||
+              (xp.getValue() == null)) {
             continue;
           }
 
-          if ((xp.getValue() == null) ||
-              !xp.getValue().startsWith(alwaysRemove)) {
+          if (!xp.getValue().startsWith(alwaysRemove1) &&
+              !xp.getValue().startsWith(alwaysRemove2)) {
             continue;
           }
         }
@@ -884,7 +888,8 @@
       if (xp.getSkipJsp()) {
         if (xp.getName().equals(BwXproperty.bedeworkIcal)) {
           if ((xp.getValue() != null) &&
-              xp.getValue().startsWith(alwaysRemove)) {
+              (xp.getValue().startsWith(alwaysRemove1) ||
+               xp.getValue().startsWith(alwaysRemove2))) {
             continue; // Bogus x-prop - remove it
           }
         }



More information about the Bedework-commit mailing list