lenya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r687779 - /lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/groups/group-admin.js
Date Thu, 21 Aug 2008 15:13:24 GMT
Author: jann
Date: Thu Aug 21 08:13:23 2008
New Revision: 687779

URL: http://svn.apache.org/viewvc?rev=687779&view=rev
Log:
Handling empty rule in ChangeProfile function too

Modified:
    lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/groups/group-admin.js

Modified: lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/groups/group-admin.js
URL: http://svn.apache.org/viewvc/lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/groups/group-admin.js?rev=687779&r1=687778&r2=687779&view=diff
==============================================================================
--- lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/groups/group-admin.js
(original)
+++ lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/groups/group-admin.js
Thu Aug 21 08:13:23 2008
@@ -56,7 +56,8 @@
             
             valid = true;
             if (cocoon.request.getParameter("submit")) {
-                rule = cocoon.request.getParameter("rule").trim();
+                rule = cocoon.request.getParameter("rule");
+                if (rule != null) rule.trim();
                 if (rule == "") {
                     rule = null;
                 }
@@ -71,8 +72,12 @@
                     }
                 }
                 if (valid) {
-                    var ruleObj = new Packages.org.apache.lenya.ac.attr.impl.AttributeRuleImpl(rule,
attributeSet, evaluator);
-                    group.setRule(ruleObj);
+                    if (rule != null) {
+                       var ruleObj = new Packages.org.apache.lenya.ac.attr.impl.AttributeRuleImpl(rule,
attributeSet, evaluator);
+                       group.setRule(ruleObj);
+                    } else {
+                       group.setRule(null);
+                    }
                     name = cocoon.request.getParameter("name");
                     description = cocoon.request.getParameter("description");
                     group.setName(name);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org


Mime
View raw message