Bug 32556 - [Patch] problems with user-admin.js and cocoon2.1.6
Summary: [Patch] problems with user-admin.js and cocoon2.1.6
Status: RESOLVED FIXED
Alias: None
Product: Lenya
Classification: Unclassified
Component: Site Management (show other bugs)
Version: Trunk
Hardware: Other AIX
: P1 normal
Target Milestone: 1.2.1
Assignee: Lenya Developers
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2004-12-07 06:25 UTC by Doug Chestnut
Modified: 2007-07-16 03:05 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Chestnut 2004-12-07 06:25:00 UTC
Just some more variables that need to be defined using var keyword
Think that I have got them all in this file now, sorry.
/src/webapp/lenya/content/admin/users/user-admin.js

Index: user-admin.js
===================================================================
--- user-admin.js       (revision 109934)
+++ user-admin.js       (working copy)
@@ -124,7 +124,7 @@
                        if (cocoon.request.get("submit")) {         
                            oldPassword = cocoon.request.get("old-password");
                            newPassword = cocoon.request.get("new-password");
-                password = new Packages.java.lang.String(newPassword);
+                            var password = new
Packages.java.lang.String(newPassword);
                            confirmPassword =
cocoon.request.get("confirm-password");
                            
                            if (checkPassword && !user.authenticate(oldPassword)) {
@@ -209,7 +209,7 @@
                                user.removeFromAllGroups();
 
                var testGroups = groupManager.getGroups();
-        for (i = 0; i < testGroups.length; i++) {
+        for ( var i = 0; i < testGroups.length; i++) {
             if (testGroups[i].contains(user)) throw new
Packages.java.lang.Exception(group + ":" + user);
         }
 
@@ -245,9 +245,9 @@
 
 function validate(userManager, ldap, userId, email, password, confirmPassword,
ldapId, configDir) {
     
-       messages = new Packages.java.util.ArrayList();
+       var messages = new Packages.java.util.ArrayList();
        
-    userid = new Packages.java.lang.String(email);
+    var userid = new Packages.java.lang.String(email);
     email = new Packages.java.lang.String(email);
     
     var existingUser = userManager.getUser(userId);
Comment 1 Andreas Kuckartz 2004-12-07 08:54:07 UTC
Added dev@lenya.apache.org to CC-list.
Comment 2 Gregor J. Rothfuss 2004-12-09 04:00:21 UTC
thanks, a patch that achieves the same thing was already applied. can you
confirm and close out?