mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Fix saving page as a new type
This commit is contained in:
parent
e4ff2ea39d
commit
ac3b0ba3ec
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user