mirror of
https://github.com/processwire/processwire.git
synced 2025-08-15 11:14:12 +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');
|
||||
$table = self::dbTableName;
|
||||
$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);
|
||||
|
||||
$sql = "INSERT INTO $table SET path=:path, pages_id=:pages_id, created=NOW()";
|
||||
|
Reference in New Issue
Block a user