Merged in victorsl/processmaker/PM-1996 (pull request #1919)
PM-1996 "No genera el link al crear un web entry " SOLVED
This commit is contained in:
@@ -203,7 +203,7 @@ class webEntryProxy extends HttpProxyController
|
|||||||
file_put_contents( $fileName, $template->getOutputContent() );
|
file_put_contents( $fileName, $template->getOutputContent() );
|
||||||
//creating the third file, only if this wsClient.php file doesn't exists.
|
//creating the third file, only if this wsClient.php file doesn't exists.
|
||||||
$fileName = $pathProcess . 'wsClient.php';
|
$fileName = $pathProcess . 'wsClient.php';
|
||||||
$pluginTpl = PATH_CORE . 'test' . PATH_SEP . 'unit' . PATH_SEP . 'ws' . PATH_SEP . 'wsClient.php';
|
$pluginTpl = PATH_CORE . "templates" . PATH_SEP . "processes" . PATH_SEP . "wsClient.php";
|
||||||
|
|
||||||
if (file_exists( $fileName )) {
|
if (file_exists( $fileName )) {
|
||||||
if (filesize( $fileName ) != filesize( $pluginTpl )) {
|
if (filesize( $fileName ) != filesize( $pluginTpl )) {
|
||||||
|
|||||||
@@ -32,13 +32,9 @@ try {
|
|||||||
throw (new Exception( G::LoadTranslation('ID_TASK') . "'" . $TaskFields['TAS_TITLE'] . "'" . G::LoadTranslation('ID_NOT_HAVE_USERS')));
|
throw (new Exception( G::LoadTranslation('ID_TASK') . "'" . $TaskFields['TAS_TITLE'] . "'" . G::LoadTranslation('ID_NOT_HAVE_USERS')));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (G::is_https())
|
$http = (G::is_https())? "https://" : "http://";
|
||||||
$http = 'https://';
|
|
||||||
else
|
|
||||||
$http = 'http://';
|
|
||||||
|
|
||||||
$sContent = '';
|
$sContent = '';
|
||||||
|
|
||||||
$infoProcess = new Process();
|
$infoProcess = new Process();
|
||||||
$resultProcess = $infoProcess->load($sPRO_UID);
|
$resultProcess = $infoProcess->load($sPRO_UID);
|
||||||
|
|
||||||
@@ -76,7 +72,7 @@ try {
|
|||||||
$template->assign( 'wsUser', $sWS_USER );
|
$template->assign( 'wsUser', $sWS_USER );
|
||||||
$template->assign( 'wsPass', Bootstrap::hashPassword($sWS_PASS, '', true) );
|
$template->assign( 'wsPass', Bootstrap::hashPassword($sWS_PASS, '', true) );
|
||||||
$template->assign( 'wsRoundRobin', $sWS_ROUNDROBIN );
|
$template->assign( 'wsRoundRobin', $sWS_ROUNDROBIN );
|
||||||
|
|
||||||
G::auditLog('WebEntry','Generate web entry with web services ('.$dynTitle.'.php) in process "'.$resultProcess['PRO_TITLE'].'"');
|
G::auditLog('WebEntry','Generate web entry with web services ('.$dynTitle.'.php) in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||||
|
|
||||||
if ($sWE_USR == "2") {
|
if ($sWE_USR == "2") {
|
||||||
@@ -94,7 +90,7 @@ try {
|
|||||||
file_put_contents( $fileName, $template->getOutputContent() );
|
file_put_contents( $fileName, $template->getOutputContent() );
|
||||||
//creating the third file, only if this wsClient.php file doesn't exist.
|
//creating the third file, only if this wsClient.php file doesn't exist.
|
||||||
$fileName = $pathProcess . 'wsClient.php';
|
$fileName = $pathProcess . 'wsClient.php';
|
||||||
$pluginTpl = file_exists(PATH_CORE . 'test' . PATH_SEP . 'unit' . PATH_SEP . 'ws' . PATH_SEP . 'wsClient.php') ? PATH_CORE . 'test' . PATH_SEP . 'unit' . PATH_SEP . 'ws' . PATH_SEP . 'wsClient.php' : PATH_CORE . 'templates' . PATH_SEP . 'processes' . PATH_SEP . 'wsClient.php';
|
$pluginTpl = PATH_CORE . "templates" . PATH_SEP . "processes" . PATH_SEP . "wsClient.php";
|
||||||
if (file_exists( $fileName )) {
|
if (file_exists( $fileName )) {
|
||||||
if (filesize( $fileName ) != filesize( $pluginTpl )) {
|
if (filesize( $fileName ) != filesize( $pluginTpl )) {
|
||||||
@copy( $fileName, $pathProcess . 'wsClient.php.bck' );
|
@copy( $fileName, $pathProcess . 'wsClient.php.bck' );
|
||||||
@@ -123,7 +119,7 @@ try {
|
|||||||
$link = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/' . $sPRO_UID . '/' . $dynTitle . '.php';
|
$link = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/' . $sPRO_UID . '/' . $dynTitle . '.php';
|
||||||
print $link;
|
print $link;
|
||||||
//print "\n<a href='$link' target='_new' > $link </a>";
|
//print "\n<a href='$link' target='_new' > $link </a>";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$G_FORM = new Form( $sPRO_UID . '/' . $sDYNAFORM, PATH_DYNAFORM, SYS_LANG, false );
|
$G_FORM = new Form( $sPRO_UID . '/' . $sDYNAFORM, PATH_DYNAFORM, SYS_LANG, false );
|
||||||
$G_FORM->action = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/cases_StartExternal.php';
|
$G_FORM->action = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/cases_StartExternal.php';
|
||||||
|
|||||||
@@ -395,17 +395,16 @@ class WebEntry
|
|||||||
$fileContent .= "\$_SESSION[\"PROCESS\"] = \"" . $processUid . "\";\n";
|
$fileContent .= "\$_SESSION[\"PROCESS\"] = \"" . $processUid . "\";\n";
|
||||||
$fileContent .= "\$_SESSION[\"CURRENT_DYN_UID\"] = \"" . $dynaFormUid . "\";\n";
|
$fileContent .= "\$_SESSION[\"CURRENT_DYN_UID\"] = \"" . $dynaFormUid . "\";\n";
|
||||||
$fileContent .= "\$G_PUBLISH = new Publisher();\n";
|
$fileContent .= "\$G_PUBLISH = new Publisher();\n";
|
||||||
|
|
||||||
|
|
||||||
$fileContent .= "G::LoadClass('pmDynaform');\n";
|
$fileContent .= "G::LoadClass(\"pmDynaform\");\n";
|
||||||
$fileContent .= "\$a = new pmDynaform(array('CURRENT_DYNAFORM'=>'" . $arrayWebEntryData["DYN_UID"] . "'));\n";
|
$fileContent .= "\$a = new pmDynaform(array(\"CURRENT_DYNAFORM\" => \"" . $arrayWebEntryData["DYN_UID"] . "\"));\n";
|
||||||
$fileContent .= "if(\$a->isResponsive()){";
|
$fileContent .= "if (\$a->isResponsive()) {";
|
||||||
$fileContent .= "\$a->printWebEntry('".$fileName."Post.php');";
|
$fileContent .= " \$a->printWebEntry(\"" . $fileName . "Post.php\");";
|
||||||
$fileContent .= "}else {";
|
$fileContent .= "} else {";
|
||||||
$fileContent .= "\$G_PUBLISH->AddContent(\"dynaform\", \"xmlform\", \"" . $processUid . "/" . $dynaFormUid . "\", \"\", array(), \"" . $fileName . "Post.php\");\n";
|
$fileContent .= " \$G_PUBLISH->AddContent(\"dynaform\", \"xmlform\", \"" . $processUid . PATH_SEP . $dynaFormUid . "\", \"\", array(), \"" . $fileName . "Post.php\");\n";
|
||||||
$fileContent .= "G::RenderPage(\"publish\", \"blank\");";
|
$fileContent .= " G::RenderPage(\"publish\", \"blank\");";
|
||||||
$fileContent .= "}";
|
$fileContent .= "}";
|
||||||
|
|
||||||
file_put_contents($pathDataPublicProcess . PATH_SEP . $fileName . ".php", $fileContent);
|
file_put_contents($pathDataPublicProcess . PATH_SEP . $fileName . ".php", $fileContent);
|
||||||
|
|
||||||
//Creating the second file, the post file who receive the post form.
|
//Creating the second file, the post file who receive the post form.
|
||||||
@@ -442,7 +441,7 @@ class WebEntry
|
|||||||
|
|
||||||
//Creating the third file, only if this wsClient.php file doesn't exist.
|
//Creating the third file, only if this wsClient.php file doesn't exist.
|
||||||
$fileName = $pathDataPublicProcess . PATH_SEP . "wsClient.php";
|
$fileName = $pathDataPublicProcess . PATH_SEP . "wsClient.php";
|
||||||
$pluginTpl = PATH_TEST . "unit" . PATH_SEP . "ws" . PATH_SEP . "wsClient.php";
|
$pluginTpl = PATH_CORE . "templates" . PATH_SEP . "processes" . PATH_SEP . "wsClient.php";
|
||||||
|
|
||||||
if (file_exists($fileName)) {
|
if (file_exists($fileName)) {
|
||||||
if (filesize($fileName) != filesize($pluginTpl)) {
|
if (filesize($fileName) != filesize($pluginTpl)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user