CIS-Suche optimiert

Redirects auf interne Seiten werden nicht im Suchergebnis angezeigt. Solche auf externe Seiten werden in einem neuen Fenster geöffnet.
OE-Suche optimiert
This commit is contained in:
Manfred Kindl
2018-04-03 11:11:08 +02:00
parent 0183cfd03e
commit 6f6929e55f
5 changed files with 69 additions and 20 deletions
+3 -2
View File
@@ -1279,7 +1279,7 @@ class content extends basis_db
public function search($searchItems, $limit=null)
{
$qry = "SELECT
distinct on(content_id,sprache,version) content_id, content::text, titel, sprache, version, 1 AS sort
distinct on(content_id,sprache,version) content_id, content::text, titel, sprache, version, template_kurzbz, 1 AS sort
FROM
campus.tbl_contentsprache
JOIN campus.tbl_content USING(content_id)
@@ -1298,7 +1298,7 @@ class content extends basis_db
";
}
$qry .= " UNION SELECT
distinct on(content_id,sprache,version) content_id, content::text, titel, sprache, version, 2 AS sort
distinct on(content_id,sprache,version) content_id, content::text, titel, sprache, version, template_kurzbz, 2 AS sort
FROM
campus.tbl_contentsprache
JOIN campus.tbl_content USING(content_id)
@@ -1333,6 +1333,7 @@ class content extends basis_db
$obj->titel = $row->titel;
$obj->sprache = $row->sprache;
$obj->version = $row->version;
$obj->template_kurzbz = $row->template_kurzbz;
$this->result[] = $obj;
}