Skip to content
Snippets Groups Projects
Commit e996ab25 authored by Armand Bahi's avatar Armand Bahi
Browse files

Resolve "[Studio] suppressions des différents formulaires"

parent 710bebc1
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment