diff --git a/cis/private/tools/suche.php b/cis/private/tools/suche.php
index 4e3dab4e7..406c8662f 100644
--- a/cis/private/tools/suche.php
+++ b/cis/private/tools/suche.php
@@ -196,17 +196,17 @@ function searchOE($searchItems)
//Suche nach Studiengaengen mit dem Suchbegriff und merge mit $searchItems
$stg_oe_array = array();
+
+ $oe = new organisationseinheit();
+ $oe->search($searchItems);
+
$stg = new studiengang();
$stg->search($searchItems);
foreach($stg->result as $row)
{
if($row->aktiv===true)
- $stg_oe_array[].= $row->oe_kurzbz;
+ $oe->result[] = new organisationseinheit($row->oe_kurzbz);
}
- $searchItems = array_merge_recursive($stg_oe_array,$searchItems);
-
- $oe = new organisationseinheit();
- $oe->search($searchItems);
if(count($oe->result)>0)
{
@@ -471,6 +471,7 @@ function searchContent($searchItems)
}
// Jede Sprache getrennt anzeigen aber zuerst die eingestellte Sprache
$anzeigesprache='';
+// var_dump($cms->result);
foreach($cms->result as $row)
{
if ($sprache == $row->sprache)
@@ -490,12 +491,33 @@ function searchContent($searchItems)
if (in_array($row->content_id, $content_id_arr))
continue;
- echo '
';
+ // Wenn der Eintrag vom Typ "redirect" ist, checken ob extern verlinkt wird oder nur ein Anker gesetzt ist (erstes Zeichen #)
+ // Externe Links werden so ausgegeben, interne Anker gar nicht
+ if ($row->template_kurzbz == 'redirect')
+ {
+ // URL aus content parsen
+ $dom = new DOMDocument();
+ $dom->loadXML($row->content);
+ $content = $dom->getElementsByTagName('url')->item(0)->nodeValue;
+
+ if (substr($content, 0, 1) == '#')
+ continue;
+ else
+ {
+ echo '';
+ }
+ }
+ else
+ {
+ echo '';
+ }
$content_id_arr[] .= $row->content_id;
}
}
@@ -522,12 +544,33 @@ function searchContent($searchItems)
if (in_array($row->content_id, $content_id_arr))
continue;
- echo '';
+ // Wenn der Eintrag vom Typ "redirect" ist, checken ob extern verlinkt wird oder nur ein Anker gesetzt ist (erstes Zeichen #)
+ // Externe Links werden so ausgegeben, interne Anker gar nicht
+ if ($row->template_kurzbz == 'redirect')
+ {
+ // URL aus content parsen
+ $dom = new DOMDocument();
+ $dom->loadXML($row->content);
+ $content = $dom->getElementsByTagName('url')->item(0)->nodeValue;
+
+ if (substr($content, 0, 1) == '#')
+ continue;
+ else
+ {
+ echo '';
+ }
+ }
+ else
+ {
+ echo '';
+ }
$content_id_arr[] .= $row->content_id;
}
}
diff --git a/include/content.class.php b/include/content.class.php
index 58008ec3d..f004bfb03 100644
--- a/include/content.class.php
+++ b/include/content.class.php
@@ -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;
}
diff --git a/include/organisationseinheit.class.php b/include/organisationseinheit.class.php
index 43322b1d6..f1ca364dd 100644
--- a/include/organisationseinheit.class.php
+++ b/include/organisationseinheit.class.php
@@ -575,7 +575,7 @@ class organisationseinheit extends basis_db
OR (LOWER(bezeichnung) LIKE LOWER(\'%'.$this->db_escape($value).'%\'))';
}
$qry.= ' ORDER BY organisationseinheittyp_kurzbz, bezeichnung;';
-
+
if($this->db_query($qry))
{
while($row = $this->db_fetch_object())
diff --git a/include/prestudent.class.php b/include/prestudent.class.php
index e58a029d7..7fee7be09 100644
--- a/include/prestudent.class.php
+++ b/include/prestudent.class.php
@@ -1105,6 +1105,7 @@ class prestudent extends person
$this->studienplan_bezeichnung = $row->studienplan_bezeichnung;
$this->rt_stufe = $row->rt_stufe;
$this->statusgrund_id = $row->statusgrund_id;
+ $this->anmerkung = $row->anmerkung;
return true;
}
else
diff --git a/skin/styles/tw.css b/skin/styles/tw.css
index 0821294f0..dea35d3aa 100644
--- a/skin/styles/tw.css
+++ b/skin/styles/tw.css
@@ -862,6 +862,10 @@ option.inactive
{
font-weight: bold;
}
+.suchergebnis
+{
+ padding-bottom: 15px;
+}
.suchicon
{
margin:0px;