working on SERVER-2121

This commit is contained in:
Eliot Horowitz
2010-11-19 08:33:02 -05:00
parent fe9ffe854f
commit 1bdc2ebc3c
2 changed files with 35 additions and 2 deletions

View File

@@ -391,8 +391,11 @@ namespace mongo {
if ( hasJSReturn( code ) )
return false;
if ( code.find( ";" ) != string::npos &&
code.find( ";" ) != code.rfind( ";" ) )
if ( code.find( ';' ) != string::npos &&
code.find( ';' ) != code.rfind( ';' ) )
return false;
if ( code.find( '\n') != string::npos )
return false;
if ( code.find( "for(" ) != string::npos ||
@@ -421,6 +424,8 @@ namespace mongo {
raw++;
}
//cout << "RAW\n---\n" << raw << "\n---" << endl;
stringstream fname;
fname << "cf_";
static int fnum = 1;