1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-15 11:14:12 +02:00

Apply the LanguageSupportPageNames duplicate checking feature without debug/advanced modes per processwire/processwire-issues#322

This commit is contained in:
Ryan Cramer
2018-05-10 06:25:30 -04:00
parent 7458d0504c
commit d7e0cccecb

View File

@@ -565,12 +565,9 @@ class LanguageSupportPageNames extends WireData implements Module, ConfigurableM
$key = "name$language";
if($value == $page->get($key)) continue;
// @todo make the following apply without debug+advanced mode after further testing on dev
if($this->wire('config')->debug && $this->wire('config')->advanced) {
$parentID = $page->parent_id;
if(!$parentID) $parentID = (int) $this->wire('input')->post('parent_id');
if(!$this->checkLanguagePageName($language, $page, $parentID, $value, $inputfield)) continue;
}
$parentID = $page->parent_id;
if(!$parentID) $parentID = (int) $this->wire('input')->post('parent_id');
if(!$this->checkLanguagePageName($language, $page, $parentID, $value, $inputfield)) continue;
if($page->id) {
$page->set($key, $value);