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:
Julio Cesar Laura Avendaño
2015-04-14 12:30:55 -04:00
3 changed files with 16 additions and 21 deletions

View File

@@ -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 )) {

View File

@@ -32,11 +32,7 @@ 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();
@@ -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' );

View File

@@ -396,14 +396,13 @@ class WebEntry
$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 . PATH_SEP . $dynaFormUid . "\", \"\", array(), \"" . $fileName . "Post.php\");\n";
$fileContent .= "\$G_PUBLISH->AddContent(\"dynaform\", \"xmlform\", \"" . $processUid . "/" . $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);
@@ -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)) {