From: Matteo Nastasi (mop) Date: Sat, 27 Sep 2014 17:46:47 +0000 (+0200) Subject: Merge branch 'master' into brisk X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=b248fce17bc2598406a52da26d80537b8f87f324;hp=41b94cddd80575eed84a859ddd99a3a331aa446c;p=curl-de-sac.git Merge branch 'master' into brisk --- diff --git a/web/Obj/curl-de-sac.phh b/web/Obj/curl-de-sac.phh index c66c58b..38fcc8c 100644 --- a/web/Obj/curl-de-sac.phh +++ b/web/Obj/curl-de-sac.phh @@ -22,7 +22,8 @@ * */ -$G_curl_de_sac_version = "0.1"; +define('CURL_DE_SAC_VERS', '0.1'); +$G_curl_de_sac_vers = CURL_DE_SAC_VERS; class CDS_cmd { var $cmd_cls; @@ -218,9 +219,11 @@ class Curl_de_sac { $cmd_cls = $this->cmd_cls[$name]; - if (($inst = call_user_func_array(array($cmd_cls, "create"), $args)) == FALSE) + // custom create now can return synchronously returning true instead of a + // "command instance class" instance or false if any error occurs + $inst = call_user_func_array(array($cmd_cls, "create"), $args); + if (is_bool($inst)) break; - array_push($this->cmd, $inst); if ($this->dbg > 1) { printf("CDS_cmd_cls::process - execute push cmd\n"); } if (($this->dbg & 1) == 1) { print_r($this); } @@ -228,7 +231,7 @@ class Curl_de_sac { return TRUE; } while (FALSE); - return FALSE; + return $inst; } function process($curtime=0) diff --git a/webtest/cds_test01.php b/webtest/cds_test01.php index 8183449..c42a18c 100755 --- a/webtest/cds_test01.php +++ b/webtest/cds_test01.php @@ -4,7 +4,9 @@ define('WEB_URL', 'http://localhost/curl-de-sac'); define('DBG_LEVEL', 0); -require_once('../Obj/curl-de-sac.phh'); +$G_base = "./"; + +require_once($G_base . 'Obj/curl-de-sac.phh'); class short_cmd extends CDS_cmd { var $short_data;