Browse code

Allow same article layout aliases if pid differs

Benjamin Roth authored on27/06/2017 15:17:34
Showing1 changed files
... ...
@@ -294,8 +294,8 @@ class tl_article_layouts extends \Backend
294 294
 		}
295 295
 
296 296
 
297
-		$objAlias = $this->Database->prepare("SELECT id FROM tl_article_layouts WHERE id=? OR alias=?")
298
-			->execute($dc->id, $varValue);
297
+		$objAlias = $this->Database->prepare("SELECT id FROM tl_article_layouts WHERE pid = ? AND (id=? OR alias=?)")
298
+			->execute($dc->activeRecord->pid,$dc->id, $varValue);
299 299
 
300 300
 		// Check whether the page alias exists
301 301
 		if ($objAlias->numRows > 1)