r9771 - helma-ng/trunk/modules/helma

[email protected] Thu, 14 May 2009 21:05:17 +0200 (CEST)
Newsgroups gmane.comp.java.helma.cvs
Message-ID <20090514190517.D6CF63D0D6@mia>
Author: hannes
Date: 2009-05-14 21:05:17 +0200 (Thu, 14 May 2009)
New Revision: 9771

Modified:
   helma-ng/trunk/modules/helma/webapp.js
Log:
Minor cleanup

Details at http://dev.helma.org/trac/helma/changeset/9771

Modified: helma-ng/trunk/modules/helma/webapp.js
===================================================================
--- helma-ng/trunk/modules/helma/webapp.js	2009-05-14 19:05:16 UTC (rev 9770)
+++ helma-ng/trunk/modules/helma/webapp.js	2009-05-14 19:05:17 UTC (rev 9771)
@@ -80,13 +80,12 @@
     function resolveInConfig(config, path, prefix) {
         if (log.isDebugEnabled) log.debug('resolving path ' + path);
         if (config.urls instanceof Array) {
-            var urls = config.urls;
-            for (var i = 0; i < urls.length; i++) {
-                if (log.isDebugEnabled) log.debug("checking url line: " + urls[i]);
-                var match = getPattern(urls[i]).exec(path);
+            for each (var url in config.urls) {
+                if (log.isDebugEnabled) log.debug("checking url line: " + url);
+                var match = getPattern(url).exec(path);
                 if (log.isDebugEnabled) log.debug("got match: " + match);
                 if (match != null) {
-                    var module = getModule(urls[i], prefix);
+                    var module = getModule(url, prefix);
                     if (log.isDebugEnabled) log.debug("module: " + module);
                     // cut matching prefix from path
                     path = path.substring(match[0].length);