Fix search alias page if page not found

This commit is contained in:
Laurent Destailleur 2019-02-05 15:15:41 +01:00
parent fbed22050d
commit b7f2a2b3f3

View File

@ -116,6 +116,10 @@ if ($pageid < 0) $pageid = 0;
if (($pageid > 0 || $pageref) && $action != 'addcontainer')
{
$res = $objectpage->fetch($pageid, ($object->id > 0 ? $object->id : null), $pageref);
if ($res == 0)
{
$res = $objectpage->fetch($pageid, ($object->id > 0 ? $object->id : null), null, $pageref);
}
// Check if pageid is inside the new website, if not we reset param pageid
if ($res >= 0 && $object->id > 0)