1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-13 18:24:57 +02:00

Fix issue #78 with PagePathHistory where a cloned child of a renamed parent page could redirect to wrong item when accessed at old URL

This commit is contained in:
Ryan Cramer
2016-11-14 06:38:11 -05:00
parent e0af12d7ab
commit 4b800adb5a

View File

@@ -196,6 +196,7 @@ class PagePathHistory extends WireData implements Module {
/** @var Page $page */
$page = $event->arguments[0];
if($page->template == 'admin') return;
if($this->wire('pages')->cloning) return;
$age = time() - $page->created;
if($age < self::minimumAge) return;
$languages = $this->getLanguages();