From 35b8c1f26d3769dadf1541438a178fc432e1e7db Mon Sep 17 00:00:00 2001 From: Manfred Kindl Date: Tue, 27 Feb 2018 14:17:36 +0100 Subject: [PATCH] =?UTF-8?q?CIS-Suche=20verlinkt=20Rauminformationen=20bei?= =?UTF-8?q?=20R=C3=A4umen=20mit=20Content=5FID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/private/tools/suche.php | 22 ++++++++++++++++++---- include/ort.class.php | 2 +- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/cis/private/tools/suche.php b/cis/private/tools/suche.php index b262ea01c..29d10b38b 100644 --- a/cis/private/tools/suche.php +++ b/cis/private/tools/suche.php @@ -330,10 +330,11 @@ function searchOrt($search) - + - - '; + + + '; if ($raumres) echo ''; else @@ -348,6 +349,7 @@ function searchOrt($search) echo ''; echo ''; echo ''; + echo ''; if ($raumres) echo ''; else @@ -455,6 +457,7 @@ function searchContent($searchItems) global $db,$p,$sprache,$uid; $cms = new content(); $cms->search($searchItems, 21); + $content_id_arr = array(); if(count($cms->result) > 0) { @@ -480,18 +483,24 @@ function searchContent($searchItems) $berechtigt = $berechtigt->berechtigt($row->content_id, $uid); if ($berechtigt) { + // Jede Content_ID nur einmal ausgeben + if (in_array($row->content_id, $content_id_arr)) + continue; + echo '
  • '; echo '',$db->convert_html_chars($row->titel),'
    '; $preview = findAndMark($row->content, $searchItems); echo $preview; echo '

  • '; + $content_id_arr[] .= $row->content_id; } } } echo ''; $anzeigesprache=''; - foreach($cms->result as $row) + $content_id_arr = array(); + foreach ($cms->result as $row) { if ($sprache != $row->sprache) { @@ -506,12 +515,17 @@ function searchContent($searchItems) $berechtigt = $berechtigt->berechtigt($row->content_id, $uid); if ($berechtigt) { + // Jede Content_ID nur einmal ausgeben + if (in_array($row->content_id, $content_id_arr)) + continue; + echo '
  • '; echo '',$db->convert_html_chars($row->titel),'
    '; $preview = findAndMark($row->content, $searchItems); echo $preview; echo '

  • '; + $content_id_arr[] .= $row->content_id; } } } diff --git a/include/ort.class.php b/include/ort.class.php index 18dd7d847..648d34a93 100644 --- a/include/ort.class.php +++ b/include/ort.class.php @@ -518,7 +518,7 @@ class ort extends basis_db $ort_obj->stockwerk = $row->stockwerk; $ort_obj->standort_id = $row->standort_id; $ort_obj->telefonklappe = $row->telefonklappe; - //$ort_obj->content_id = $row->content_id; + $ort_obj->content_id = $row->content_id; $ort_obj->m2 = $row->m2; $ort_obj->gebteil = $row->gebteil; $ort_obj->oe_kurzbz = $row->oe_kurzbz;
    ',$p->t('global/ort'),'',$p->t('lvplan/raum'),' ',$p->t('global/bezeichnung'),'',$p->t('tools/maxPersonen'),'',$p->t('tools/telefonklappe'),'',$p->t('lvplan/anzahlPersonen'),'',$p->t('tools/telefonklappe'),'',$p->t('lvplan/rauminformationenAnzeigen'),'',$p->t('tools/reservieren'),'',$row->bezeichnung,'',$row->max_person,'',$row->telefonklappe,''.($row->content_id != '' ?''.$p->t('lvplan/rauminformationenAnzeigen').'':'-').''.$p->t('tools/reservieren').'