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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user