Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Omatech/Editora/Extractor/Extractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -648,13 +648,13 @@ public function findInstancesByUrl(string $url, $params = null, callable $callba
$inst_ids = $row['inst_id'];
}

$sql = "select CONCAT(parents, ',', inst_id) as ids
$sql = "select IF(parents IS NULL, inst_id, CONCAT(parents, ',', inst_id)) as ids
from omp_instances i
, omp_niceurl u
where 1=1
and i.id = u.inst_id
and u.language = '" . $this->lang . "'
and u.full_niceurl = '" . $url . "'
and (u.full_niceurl = '" . $url . "' OR u.niceurl = '" . $url . "')
";
$row = $this->fetchAssoc($sql);
if (isset($row['ids'])) {
Expand Down