mirror of
https://github.com/processwire/processwire.git
synced 2025-08-17 12:10:45 +02:00
Fix issue processwire/processwire-issues#1144
This commit is contained in:
@@ -164,7 +164,11 @@ class PagePathHistory extends WireData implements Module, ConfigurableModule {
|
|||||||
$database = $this->wire('database');
|
$database = $this->wire('database');
|
||||||
$table = self::dbTableName;
|
$table = self::dbTableName;
|
||||||
$path = $this->wire('sanitizer')->pagePathName('/' . trim($path, '/'), Sanitizer::toAscii);
|
$path = $this->wire('sanitizer')->pagePathName('/' . trim($path, '/'), Sanitizer::toAscii);
|
||||||
if($this->wire('pages')->count("path=$path")) return false;
|
|
||||||
|
$selector = "path=$path";
|
||||||
|
if($this->wire('modules')->isInstalled('PagePaths')) $selector .= ", id!=$page->id";
|
||||||
|
if($this->wire('pages')->count($selector)) return false;
|
||||||
|
|
||||||
$language = $this->getLanguage($language);
|
$language = $this->getLanguage($language);
|
||||||
|
|
||||||
$sql = "INSERT INTO $table SET path=:path, pages_id=:pages_id, created=NOW()";
|
$sql = "INSERT INTO $table SET path=:path, pages_id=:pages_id, created=NOW()";
|
||||||
|
Reference in New Issue
Block a user