mirror of
https://github.com/getgrav/grav.git
synced 2026-02-22 22:51:13 +01:00
Fix saving page as a new type
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user