diff --git a/cis/private/tools/suche.php b/cis/private/tools/suche.php
index f9452e114..517f3bde0 100644
--- a/cis/private/tools/suche.php
+++ b/cis/private/tools/suche.php
@@ -52,7 +52,7 @@ echo '
- ';
+ ';
include('../../../include/meta/jquery.php');
include('../../../include/meta/jquery-tablesorter.php');
@@ -158,7 +158,7 @@ function searchPerson($searchItems)
{
$bisverwendung = new bisverwendung();
$bisverwendung->getLastAktVerwendung($row->uid);
-
+
echo '
';
//echo '| ',$row->titelpre,' | ';
echo '',$row->anrede,' | ';
@@ -171,8 +171,47 @@ function searchPerson($searchItems)
echo '';
//echo '',$row->titelpost,' | ';
echo '',($row->studiengang!=''?$row->studiengang:'-'),' | ';
- echo '',($row->mitarbeiter_uid==NULL?'StudentIn':'MitarbeiterIn'),' | ';
- echo '',($row->telefonklappe!=''?$row->telefonklappe:'-'),' | ';
+ echo '',($row->mitarbeiter_uid==NULL?'StudentIn':'MitarbeiterIn'),' | ';
+ // Display phone number
+ echo '';
+ // * if user has telefonklappe, display it
+ if ($row->telefonklappe != '')
+ {
+ echo $row->telefonklappe;
+ }
+ // * if user has no telefonklappe, display business handy
+ else
+ {
+ $person = new Person();
+ $person->getPersonFromBenutzer($row->uid);
+ $person_id = $person->person_id;
+ $kontakt = new Kontakt();
+
+ if ($kontakt->load_persKontakttyp($person_id, 'firmenhandy'))
+ {
+ $is_zugestellt = false;
+ foreach ($kontakt->result as $kontakt)
+ {
+ // display business handy only if zustellung is true
+ if ($kontakt->zustellung)
+ {
+ echo $kontakt->kontakt. " ";
+ $is_zugestellt = true;
+ }
+ }
+ // if zustellung is false display '-'
+ if (!$is_zugestellt)
+ {
+ echo '-';
+ }
+ }
+ // * if neither telefonklappe nor business handy, display '-'
+ else
+ {
+ echo '-';
+ }
+ }
+ echo ' | ';
echo '',($row->raum!=''?$row->raum:'-'),' | ';
if($row->alias!='' && !in_array($row->studiengang_kz, $noalias))
$mail = $row->alias.'@'.DOMAIN;
@@ -271,9 +310,46 @@ function searchOE($searchItems)
echo ''.$bf->bezeichnung;
if($bisverwendung->beschausmasscode=='5')
echo ' (karenziert)';
- echo ' | ';
-
- echo '',($mitarbeiter->telefonklappe!=''?$kontakt->kontakt.'-'.$mitarbeiter->telefonklappe:'-'),' | ';
+ echo '';
+
+ // Display phone number
+ echo '';
+ // * if user has telefonklappe, display it
+ if ($mitarbeiter->telefonklappe != '')
+ {
+ echo $kontakt->kontakt. '-'. $mitarbeiter->telefonklappe;
+ }
+ // * if user has no telefonklappe, display business handy
+ else
+ {
+ $person_id = $person->person_id;
+
+ if ($kontakt->load_persKontakttyp($person_id, 'firmenhandy'))
+ {
+ $is_zugestellt = false;
+ foreach ($kontakt->result as $kontakt)
+ {
+ // display business handy only if zustellung is true
+ if ($kontakt->zustellung)
+ {
+ echo $kontakt->kontakt. " ";
+ $is_zugestellt = true;
+ }
+ }
+ // if zustellung is false display '-'
+ if (!$is_zugestellt)
+ {
+ echo '-';
+ }
+ }
+ // * if neither telefonklappe nor business handy, display '-'
+ else
+ {
+ echo '-';
+ }
+ }
+ echo ' | ';
+
echo '',($mitarbeiter->ort_kurzbz!=''?$mitarbeiter->ort_kurzbz:'-'),' | ';
//if($row->alias!='' && !in_array($row->studiengang_kz, $noalias)) ??? Was macht $noalias?
if($person->alias!='')