diff --git a/web_service/ws/BusinessObjects.class.inc b/web_service/ws/BusinessObjects.class.inc index 413f93e43ebbc728cbc4600f84d2cc8d85d05249..fa7ca58d1eaf4d159d82c3498a6c75caf20b1d79 100755 --- a/web_service/ws/BusinessObjects.class.inc +++ b/web_service/ws/BusinessObjects.class.inc @@ -697,10 +697,6 @@ class BusinessObjects extends Vmap { $sFileContents .= $aFileContents[$i] . ' '; } -// // Travail sur chacune des requĂȘtes du fichier -// $aFileContents = explode(';', $sFileContents); -// $aFileContents = $this->cleanDataModelFileArray($aFileContents); - return $sFileContents; } @@ -1318,7 +1314,7 @@ class BusinessObjects extends Vmap { fclose($pFile); } - if ($this->aValues["Js"] != "") { + if (isset($this->aValues["Js"])) { $pFileJS = fopen($sDirPath . '/forms/ressources/' . $sFormName . '.js', 'w+'); if (fwrite($pFileJS, $this->aValues["Js"]) == FALSE) { writeToErrorLog('ERROR: ' . $sFormName . '.js save failed'); @@ -1326,7 +1322,7 @@ class BusinessObjects extends Vmap { fclose($pFileJS); } - if ($this->aValues["Css"] != "") { + if (isset($this->aValues["Css"])) { $pFileCSS = fopen($sDirPath . '/forms/ressources/' . $sFormName . '.css', 'w+'); if (fwrite($pFileCSS, $this->aValues["Css"]) == FALSE) { writeToErrorLog('ERROR: ' . $sFormName . '.css save failed'); @@ -1370,6 +1366,26 @@ class BusinessObjects extends Vmap { @unlink($sDirPath . "/forms/default.json"); $aFields = explode("|", $this->aValues['field']); $this->generateBusinessObjectForm($sBusinessObjectId, $sFormName, $aFields, $this->aValues['label']); + break; + case "Published_Delete": + + if (file_exists($sDirPath . "/forms/published.json")) { + @unlink($sDirPath . "/forms/published.json"); + } + if (file_exists($sDirPath . "/forms/ressources/published.js")) { + @unlink($sDirPath . "/forms/ressources/published.js"); + } + if (file_exists($sDirPath . "/forms/ressources/published.css")) { + @unlink($sDirPath . "/forms/ressources/published.css"); + } + + break; + case "Delete_JS": + + if (file_exists($sDirPath . "/forms/ressources/" . $sFormName . ".js")) { + @unlink($sDirPath . "/forms/ressources/" . $sFormName . ".js"); + } + break; } }