Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

fix for cf9.0 #9

Open
wants to merge 2 commits into from

1 participant

@anthonywebb

I made the fix as per your request. Not sure if there are others but I will fix them and send over if I find them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 14, 2011
  1. change in for loop to remove requirement for CF9.01

    Anthony Webb authored
Commits on Jan 17, 2011
  1. @anthonywebb
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 10 deletions.
  1. +2 −3 core/MongoConfig.cfc
  2. +7 −7 core/MongoUtil.cfc
View
5 core/MongoConfig.cfc
@@ -24,9 +24,8 @@
variables.conf = { dbname = dbName, servers = mongoFactory.getObject('java.util.ArrayList').init(), auth={username="",password=""} };
- var item = "";
- for(item in arguments.hosts){
- addServer( item.serverName, item.serverPort );
+ for(i=1; i <= ArrayLen(arguments.hosts); i++){
+ addServer( arguments.hosts[i].serverName, arguments.hosts[i].serverPort );
}
//main entry point for environment-aware configuration; subclasses should do their work in here
View
14 core/MongoUtil.cfc
@@ -79,17 +79,17 @@
*/
function createOrderedDBObject( keyValues ){
var dbo = newDBObject();
- var kv = "";
if( isSimpleValue(keyValues) ){
keyValues = listToArray(keyValues);
}
- for(kv in keyValues){
- if( isSimpleValue( kv ) ){
- var key = listFirst(kv, "=");
- var value = find("=",kv) ? listRest(kv, "=") : 1;
+
+ for(i=1; i <= ArrayLen(keyValues); i++){
+ if( isSimpleValue( keyValues[i] ) ){
+ var key = listFirst(keyValues[i], "=");
+ var value = find("=",keyValues[i]) ? listRest(keyValues[i], "=") : 1;
} else {
- var key = structKeyList(kv);
- var value = kv[key];
+ var key = structKeyList(keyValues[i]);
+ var value = keyValues[i][key];
}
dbo.append( key, value );
Something went wrong with that request. Please try again.