Make Dieter Dummy lecturer seemingly disappear

- deactivate profile page (error message is shown)
- removed from CIS search results
- no profile link in lvplan
This commit is contained in:
alex
2019-10-08 18:07:09 +02:00
parent c98438c93d
commit 39dec7bb97
8 changed files with 772 additions and 751 deletions
+13 -2
View File
@@ -35,6 +35,7 @@ require_once('../../../include/ort.class.php');
require_once('../../../include/functions.inc.php');
require_once('../../../include/datum.class.php');
require_once('../../../include/phrasen.class.php');
require_once('../../../include/mitarbeiter.class.php');
$sprache = getSprache();
$p = new phrasen($sprache);
@@ -231,11 +232,21 @@ if ($num_rows_stpl>0)
$titel = trim($row->titel);
$gesamtanzahl = ($anzahl_grp!=0?$anzahl_grp:$anzahl_lvb);
$ort->load($ortkurzbz);
// no profile link for fake Mitarbeiter like Dummylektor, Personalnr must be > 0
$profileLink = true;
$mitarbeiter = new mitarbeiter();
if ($mitarbeiter->load($row->uid))
{
if (isset($mitarbeiter->personalnummer) && is_numeric($mitarbeiter->personalnummer) && (int)$mitarbeiter->personalnummer < 0)
$profileLink = false;
}
echo '
<tr class="liste'.($i%2).'">
<td>'.$db->convert_html_chars($unr).'</td>
<td><A class="Item" href="../profile/index.php?uid='.$row->uid.'" target="_self" onClick="window.resizeTo(1200,880)">'.$db->convert_html_chars($titelpre.' '.$pers_vorname.' '.$pers_nachname.' '.$titelpost).'</A></td>
<td>'.($profileLink ? '<A class="Item" href="../profile/index.php?uid='.$row->uid.'" target="_self" onClick="window.resizeTo(1200,880)">' : '').$db->convert_html_chars($titelpre.' '.$pers_vorname.' '.$pers_nachname.' '.$titelpost).($profileLink ? '</A>' : '').'</td>
<td title="'.$db->convert_html_chars($ort->bezeichnung).'">'.(!empty($ortkurzbz)?($ort->content_id!=''?'<a href="../../../cms/content.php?content_id='.$ort->content_id.'" target="_self" onClick="window.resizeTo(1200,880)">'.$db->convert_html_chars($ortkurzbz).'</a>':$db->convert_html_chars($ortkurzbz)):$db->convert_html_chars($ortkurzbz)).'</td>
<td>'.$db->convert_html_chars($lehrfachkurzbz).'</td>
<td>'.$db->convert_html_chars($bezeichnung).'</td>
+3
View File
@@ -127,6 +127,9 @@ if (!$user->load($uid))
if ($type == 'mitarbeiter')
{
if (isset($user->personalnummer) && is_numeric($user->personalnummer) && (int)$user->personalnummer < 0)
die($p->t('profil/keinGueltigesProfil'));
$vorwahl = '';
$kontakt = new kontakt();
$kontakt->loadFirmaKontakttyp($user->standort_id,'telefon');
+2 -1
View File
@@ -113,7 +113,8 @@ function searchPerson($searchItems)
{
global $db, $p, $noalias, $uid;
$bn = new benutzer();
$bn->search($searchItems, 21);
//search only active and Mitarbeiter with positive Personalnr
$bn->search($searchItems, 21, true, true);
if(count($bn->result)>0)
{