version 1.127, 2008/06/19 11:46:29
|
version 1.131, 2009/09/30 15:29:14
|
Line 423 class ZSQLExtendFolder(Folder,Persistent
|
Line 423 class ZSQLExtendFolder(Folder,Persistent
|
# set up logging to response as plain text |
# set up logging to response as plain text |
RESPONSE.setHeader("Content-Type","text/plain; charset=utf-8") |
RESPONSE.setHeader("Content-Type","text/plain; charset=utf-8") |
RESPONSE.write("Import FMPXML file...\n\n") |
RESPONSE.write("Import FMPXML file...\n\n") |
|
RESPONSE.flush() |
loghandler = logging.StreamHandler(RESPONSE) |
loghandler = logging.StreamHandler(RESPONSE) |
if debug: |
if debug: |
loghandler.setLevel(logging.DEBUG) |
loghandler.setLevel(logging.DEBUG) |
Line 1136 class ZSQLExtendFolder(Folder,Persistent
|
Line 1137 class ZSQLExtendFolder(Folder,Persistent
|
table=urllib.unquote(value) |
table=urllib.unquote(value) |
elif name=="-identify": |
elif name=="-identify": |
identify=urllib.unquote(value) |
identify=urllib.unquote(value) |
identify="lower("+identify.split("=")[0]+")="+sql_quote(identify.split("=")[1].lower()) |
# old code did identify with lower() which doesn't work for oids |
|
#identify="lower("+identify.split("=")[0]+")="+sql_quote(identify.split("=")[1].lower()) |
|
(k,v) = identify.split("=") |
|
identify="%s=%s"%(k,sql_quote(v)) |
elif name=="-format": |
elif name=="-format": |
format=urllib.unquote(value) |
format=urllib.unquote(value) |
#elif (not (name[0]=="-" or name[0]=="_")) and (not len(value)==0): |
#elif (not (name[0]=="-" or name[0]=="_")) and (not len(value)==0): |
Line 1502 class ZSQLExtendFolder(Folder,Persistent
|
Line 1506 class ZSQLExtendFolder(Folder,Persistent
|
|
|
elif op=="numerical": |
elif op=="numerical": |
term=analyseIntSearch(value) |
term=analyseIntSearch(value) |
tmp=(name+" "+term) |
tmp=(namealt+" "+term) # take namealt without LOWER |
elif op=="grep": |
elif op=="grep": |
tmp=(name+" ~* "+sql_quote(value)) |
tmp=(name+" ~* "+sql_quote(value)) |
elif op=="one": |
elif op=="one": |
Line 1552 class ZSQLExtendFolder(Folder,Persistent
|
Line 1556 class ZSQLExtendFolder(Folder,Persistent
|
|
|
elif op=="numerical": |
elif op=="numerical": |
term=analyseIntSearch(value) |
term=analyseIntSearch(value) |
tmp=(name+" "+term) |
tmp=(namealt+" "+term) # take namealt without LOWER |
elif op=="grep": |
elif op=="grep": |
tmp=(name+" ~* "+sql_quote(value)) |
tmp=(name+" ~* "+sql_quote(value)) |
elif op=="one": |
elif op=="one": |