--- parser3/src/classes/op.C 2001/05/11 17:45:10 1.18 +++ parser3/src/classes/op.C 2001/05/23 07:37:01 1.26 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: op.C,v 1.18 2001/05/11 17:45:10 parser Exp $ + $Id: op.C,v 1.26 2001/05/23 07:37:01 parser Exp $ */ #include "classes.h" @@ -52,9 +52,9 @@ static void _if(Request& r, const String 0/*no name*/, false/*don't intercept string*/).as_bool(); if(condition) - r.write_pass_lang(r.process(params->get(1))); + r.write_pass_lang(r.process(params->get_junction(1, "'then' parameter must be code"))); else if(params->size()==3) - r.write_pass_lang(r.process(params->get(2))); + r.write_pass_lang(r.process(params->get_junction(2, "'else' parameter must be code"))); } static void _untaint(Request& r, const String& method_name, MethodParams *params) { @@ -266,11 +266,12 @@ static void _connect(Request& r, const S Value& url=params->get_no_junction(0, "url must not be code"); Value& body_code=params->get_junction(1, "body must be code"); - Table *protocol2library=static_cast(r.classes_conf.get(OP->name())); + Table *protocol2driver_and_client= + static_cast
(r.classes_conf.get(OP->name())); // connect SQL_Connection& connection=SQL_driver_manager->get_connection( - url.as_string(), protocol2library); + url.as_string(), protocol2driver_and_client); Exception rethrow_me; // remember/set current connection @@ -330,7 +331,7 @@ MOP::MOP(Pool& apool) : Methoded(apool), add_native_method("process", Method::CT_ANY, _process, 1, 1); // ^rem{code} - add_native_method("rem", Method::CT_ANY, _rem, 1, 1); + add_native_method("rem", Method::CT_ANY, _rem, 1, 1000); // ^while(condition){code} add_native_method("while", Method::CT_ANY, _while, 2, 2);