diff --git a/workflow/engine/classes/class.pmScript.php b/workflow/engine/classes/class.pmScript.php index 15422ecf3..9fab948ea 100644 --- a/workflow/engine/classes/class.pmScript.php +++ b/workflow/engine/classes/class.pmScript.php @@ -151,38 +151,36 @@ class PMScript */ public function setScript ($sScript = '') { - $nrt = array("\n", "\r", "\t"); - $nrthtml = array("(n /)", "(r /)", "(t /)"); - - $script = $sScript; - $script = str_replace($nrt, $nrthtml, $script); - - while (preg_match("/^(.*)\/\*(.*)$/", $script, $arrayMatch)) { - $scriptAux = ""; - - if (preg_match("/^.*\*\/.*$/", $arrayMatch[2])) { - $arrayAux = explode("*/", $arrayMatch[2]); - unset($arrayAux[0]); - $scriptAux = implode("*/", $arrayAux); - } - - $script = $arrayMatch[1] . $scriptAux; + if (!defined("T_ML_COMMENT")) { + define("T_ML_COMMENT", T_COMMENT); + } else { + define("T_DOC_COMMENT", T_ML_COMMENT); } - while (preg_match("/^(.*)(?:\/\/|#)(.*)$/", $script, $arrayMatch)) { - $scriptAux = ""; + $script = ""), array("", "", ""), $result)); + $sScript = $result; $this->sScript = $sScript; }