From d9c2779a6f41d3c99b8cc31599ea89afdf145775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Mon, 21 May 2012 14:58:16 +0000 Subject: [PATCH] =?UTF-8?q?Personensuche=20und=20Profil=20ber=C3=BCcksicht?= =?UTF-8?q?igt=20jetzt=20Studieng=C3=A4nge=20die=20keine=20Alias=20Adresse?= =?UTF-8?q?n=20bekommen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/private/profile/index.php | 2 +- cis/private/tools/suche.php | 7 ++++--- include/benutzer.class.php | 5 ++++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cis/private/profile/index.php b/cis/private/profile/index.php index 2f53add57..8ccd33b46 100644 --- a/cis/private/profile/index.php +++ b/cis/private/profile/index.php @@ -169,7 +169,7 @@ echo ' '.$p->t('profil/email').'
'.$p->t('profil/intern').': '.$user->uid.'@'.DOMAIN.'
'; -if($user->alias!='' && !in_array($stg,$noalias)) +if($user->alias!='' && (!isset($user->studiengang_kz) || !in_array($user->studiengang_kz,$noalias))) { echo $p->t('profil/alias').": $user->alias@".DOMAIN.""; } diff --git a/cis/private/tools/suche.php b/cis/private/tools/suche.php index 9c85a9869..ef38df0d8 100755 --- a/cis/private/tools/suche.php +++ b/cis/private/tools/suche.php @@ -25,6 +25,7 @@ require_once('../../../include/functions.inc.php'); require_once('../../../include/phrasen.class.php'); require_once('../../../include/content.class.php'); require_once('../../../include/benutzer.class.php'); +require_once('../../../include/globals.inc.php'); $uid = get_uid(); $db = new basis_db(); @@ -36,7 +37,7 @@ echo ' - + Globale Suche @@ -63,7 +64,7 @@ searchContent($searchItems); function searchPerson($searchItems) { - global $db, $p; + global $db, $p, $noalias; $bn = new benutzer(); $bn->search($searchItems); @@ -105,7 +106,7 @@ function searchPerson($searchItems) echo '',$row->titelpost,''; echo '',$row->studiengang,''; echo '',$row->telefonklappe,''; - if($row->alias!='') + if($row->alias!='' && !in_array($row->studiengang_kz, $noalias)) $mail = $row->alias.'@'.DOMAIN; else $mail = $row->uid.'@'.DOMAIN; diff --git a/include/benutzer.class.php b/include/benutzer.class.php index 527bafc13..061d34992 100644 --- a/include/benutzer.class.php +++ b/include/benutzer.class.php @@ -263,9 +263,11 @@ class benutzer extends person { $qry = "SELECT * FROM (SELECT distinct on (uid) vorname, nachname, uid, titelpre, titelpost,alias, - (SELECT UPPER(tbl_studiengang.typ || tbl_studiengang.kurzbz) + (SELECT UPPER(tbl_studiengang.typ || tbl_studiengang.kurzbz) FROM public.tbl_student JOIN public.tbl_studiengang USING(studiengang_kz) WHERE student_uid=tbl_benutzer.uid) as studiengang, + (SELECT studiengang_kz FROM public.tbl_student + WHERE student_uid=tbl_benutzer.uid) as studiengang_kz, (SELECT tbl_kontakt.kontakt || ' - ' ||telefonklappe FROM public.tbl_mitarbeiter LEFT JOIN public.tbl_kontakt USING(standort_id) @@ -302,6 +304,7 @@ class benutzer extends person $obj->titelpost = $row->titelpost; $obj->uid = $row->uid; $obj->studiengang = $row->studiengang; + $obj->studiengang_kz = $row->studiengang_kz; $obj->telefonklappe = $row->klappe; $obj->alias = $row->alias;