Skip to content

Commit

Permalink
Fixed issue #14330: Renaming a template with children will break surv…
Browse files Browse the repository at this point in the history
…eys using the inherited template
  • Loading branch information
lemeur authored and Shnoulle committed Dec 12, 2018
1 parent 21118b3 commit db7b7fe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions application/models/Template.php
Expand Up @@ -624,6 +624,7 @@ public function renameTo($sNewName)
$this->deleteAssetVersion();
Survey::model()->updateAll(array('template' => $sNewName), "template = :oldname", array(':oldname'=>$this->name));
Template::model()->updateAll(array('name' => $sNewName, 'folder' => $sNewName), "name = :oldname", array(':oldname'=>$this->name));
Template::model()->updateAll(array('extends' => $sNewName), "extends = :oldname", array(':oldname'=>$this->name));
TemplateConfiguration::rename($this->name, $sNewName);
TemplateManifest::rename($this->name, $sNewName);
}
Expand Down

0 comments on commit db7b7fe

Please sign in to comment.