[phpwebapp-commits] CVS: web_app class.WebApp.php,1.12,1.12.2.1 const.Paths.php,1.4,1.4.2.1
Brought to you by:
dashohoxha
From: Dashamir H. <das...@us...> - 2004-10-04 09:09:43
|
Update of /cvsroot/phpwebapp/web_app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5614 Modified Files: Tag: phpwebapp-1_0 class.WebApp.php const.Paths.php Log Message: All the changes that are done after release 1.0 (but without the XML parser and XHML template requirement) are placed in the branch phpwebapp-1_0, so that old applications can get them, without having to modify their templates. Index: class.WebApp.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/class.WebApp.php,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -C2 -d -r1.12 -r1.12.2.1 *** class.WebApp.php 22 Aug 2003 15:54:43 -0000 1.12 --- class.WebApp.php 4 Oct 2004 09:09:31 -0000 1.12.2.1 *************** *** 41,48 **** /** * A free event has target 'none', doesn't have a target webobject, ! * so no webobject can handle it. Instead, it is handled by the ! * function on_eventName($event), that is in the file 'on.eventName.php', ! * which is placed in the same folder as the target page or the source ! * page of the event. */ function callFreeEvent() --- 41,47 ---- /** * A free event has target 'none', doesn't have a target webobject, ! * so no webobject can handle it. Instead, it is handled by the ! * file 'on.eventName.php', which is placed in the same folder as the ! * source page of the event. */ function callFreeEvent() *************** *** 50,78 **** global $event; $file_name = "on.".$event->name.".php"; - $fun_name = "on_".$event->name; - - //look for the event handler in the path of targetPage - $path = TPL_PATH.dirname($event->targetPage); $fname = $path."/".$file_name; if (file_exists($fname)) { include_once $fname; - $fun_name($event); - return; } ! ! //look for the event handler in the path of sourcePage ! $path = TPL_PATH.dirname($event->sourcePage); ! $fname = $path."/".$file_name; ! if (file_exists($fname)) { ! include_once $fname; ! $fun_name($event); ! return; } - - //no event handler found - print WebApp::error_msg("event handler '$file_name' not found."); } --- 49,65 ---- global $event; + //look for the event handler in the path of sourcePage + $path = TPL_PATH.dirname($event->sourcePage); $file_name = "on.".$event->name.".php"; $fname = $path."/".$file_name; if (file_exists($fname)) { include_once $fname; } ! else { ! $err_msg = "WebApp::callFreeEvent(): File '$fname' not found."; ! print WebApp::error_msg($err_msg); } } *************** *** 310,314 **** eval("global $var_names;"); } ! eval("\$webApp_value = $expr;"); return $webApp_value; } --- 297,309 ---- eval("global $var_names;"); } ! ! @eval("\$webApp_value = $expr;"); ! $errormsg = $php_errormsg; ! if ($errormsg<>'') ! { ! $err_msg = "Evaluating expression: '\$value = $expr;' $errormsg"; ! print WebApp::error_msg($err_msg); ! } ! return $webApp_value; } *************** *** 484,489 **** * @see execQuery(), openRS() */ ! function execDBCmd($cmd_id, $params =array()) { global $webPage, $tplVars; --- 479,485 ---- * @see execQuery(), openRS() */ ! function execDBCmd($cmd_id, $params =UNDEFINED, $conn =UNDEFINED) { + if ($params==UNDEFINED) $params = array(); global $webPage, $tplVars; *************** *** 496,500 **** return false; } ! $result = $rs->Open(); $tplVars->popScope(); --- 492,496 ---- return false; } ! $result = $rs->Open($conn); $tplVars->popScope(); *************** *** 508,513 **** * @see execDBCmd(), execQuery() */ ! function openRS($rs_id, $params =array()) { global $webPage, $tplVars; --- 504,510 ---- * @see execDBCmd(), execQuery() */ ! function openRS($rs_id, $params =UNDEFINED, $conn =UNDEFINED) { + if ($params==UNDEFINED) $params = array(); global $webPage, $tplVars; *************** *** 517,521 **** $tplVars->addVars($params); $rs = &$webPage->rs_collection[$rs_id]; ! $rs->Open(); $tplVars->popScope(); return $rs; --- 514,518 ---- $tplVars->addVars($params); $rs = &$webPage->rs_collection[$rs_id]; ! $rs->Open($conn); $tplVars->popScope(); return $rs; Index: const.Paths.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/const.Paths.php,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** const.Paths.php 25 Aug 2003 13:18:39 -0000 1.4 --- const.Paths.php 4 Oct 2004 09:09:32 -0000 1.4.2.1 *************** *** 40,44 **** define("TABLE_PATH", WEBOBJ_PATH."table/"); define("DBTABLE_PATH", WEBOBJ_PATH."dbTable/"); ! define("LEFTMENU_PATH", WEBOBJ_PATH."leftMenu/"); //WebBox paths --- 40,44 ---- define("TABLE_PATH", WEBOBJ_PATH."table/"); define("DBTABLE_PATH", WEBOBJ_PATH."dbTable/"); ! define("TABS_PATH", WEBOBJ_PATH."tabs/"); //WebBox paths |