We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a794097 + 33d7670 commit e8577a7Copy full SHA for e8577a7
code/model/DNEnvironment.php
@@ -974,8 +974,14 @@ protected function writeConfigFile() {
974
* Write the pipeline config file to filesystem
975
*/
976
protected function writePipelineFile() {
977
- if($this->config()->get('allow_web_editing') && $this->PipelineConfig) {
978
- file_put_contents($this->getPipelineFilename(), $this->PipelineConfig);
+ if(!$this->config()->get('allow_web_editing')) return;
+ $path = $this->getPipelineFilename();
979
+ if($this->PipelineConfig) {
980
+ // Update file
981
+ file_put_contents($path, $this->PipelineConfig);
982
+ } elseif($this->isChanged('PipelineConfig') && file_exists($path)) {
983
+ // Remove file if deleted
984
+ unlink($path);
985
}
986
987
0 commit comments