[Wheat-cvs] r1/server mod_render-test.cpp,1.45,1.46 mod_render.cpp,1.30,1.31
Status: Pre-Alpha
Brought to you by:
mark_lentczner
From: Kragen S. <kr...@us...> - 2005-06-07 22:33:58
|
Update of /cvsroot/wheat/r1/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6817/server Modified Files: mod_render-test.cpp mod_render.cpp Log Message: Thought I'd committed this yesterday, but apparently there was a network error. Now post-args is a table, not just a /library/base/object. Consequently it should now be safe to handle form posts with form field names like "absolute-path" and "member". Added comments on untested methods. Blog edit doesn't work, but I don't think that's a result of these changes. Index: mod_render.cpp =================================================================== RCS file: /cvsroot/wheat/r1/server/mod_render.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- mod_render.cpp 5 Feb 2005 07:22:42 -0000 1.30 +++ mod_render.cpp 7 Jun 2005 22:33:50 -0000 1.31 @@ -323,14 +323,22 @@ m.setUp(f, obj, request); Local postArgs(f); - postArgs = Object(); + postArgs = Object(Path("/library/base/table")); int nArgs = postVars.countVars(); for (int i = 0; i < nArgs; ++i) { - pt::string argName = postVars.getVar(i); - pt::string argValue = postVars.get(argName); + pt::string argNameAsString = postVars.getVar(i); + String argName(argNameAsString); + True trueValue; + String argValue(postVars.get(argNameAsString)); + pt::string assign = "assign"; + pt::string value = "value"; - postArgs.send("add-member", String(argName), String(argValue)); + postArgs.send("[]", + SendArgPos, &argName, + SendArgKey, &assign, &trueValue, + SendArgKey, &value, &argValue, + SendArgEnd); } Local result(f); Index: mod_render-test.cpp =================================================================== RCS file: /cvsroot/wheat/r1/server/mod_render-test.cpp,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- mod_render-test.cpp 8 Mar 2005 06:09:52 -0000 1.45 +++ mod_render-test.cpp 7 Jun 2005 22:33:49 -0000 1.46 @@ -251,11 +251,11 @@ Argument args(f, "post-args"); Local x(f); - x = args.send("x"); + x = args.send("[]", String("x")); self.send("thing").assign("x", x.copy()); Local y(f); - y = args.send("y"); + y = args.send("[]", String("y")); self.send("thing").assign("y", y.copy()); return Return(f, String("submitted!")); |