Fix saving page as a new type

This commit is contained in:
Matias Griese 2014-09-25 23:31:59 +03:00
parent e4ff2ea39d
commit ac3b0ba3ec

View File

@ -1694,6 +1694,13 @@ class Page
Folder::copy($this->_original->path(), $this->path());
}
if ($this->name() != $this->_original->name()) {
$path = $this->path();
if (is_file($path . '/' . $this->_original->name())) {
rename($path . '/' . $this->_original->name(), $path . '/' . $this->name());
}
}
$this->_action = null;
$this->_original = null;
}