Merge branch 'master' of https://github.com/FH-Complete/FHC-Core
@@ -49,6 +49,8 @@ class akte extends basis_db
|
||||
public $titel_intern;
|
||||
public $anmerkung_intern;
|
||||
public $nachgereicht_am;
|
||||
public $ausstellungsnation;
|
||||
public $formal_geprueft_amum;
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
@@ -102,6 +104,8 @@ class akte extends basis_db
|
||||
$this->titel_intern = $row->titel_intern;
|
||||
$this->anmerkung_intern = $row->anmerkung_intern;
|
||||
$this->nachgereicht_am = $row->nachgereicht_am;
|
||||
$this->ausstellungsnation = $row->ausstellungsnation;
|
||||
$this->formal_geprueft_amum = $row->formal_geprueft_amum;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -185,7 +189,7 @@ class akte extends basis_db
|
||||
//Neuen Datensatz anlegen
|
||||
$qry = "BEGIN;INSERT INTO public.tbl_akte (person_id, dokument_kurzbz, inhalt, mimetype, erstelltam, gedruckt, titel,
|
||||
bezeichnung, updateamum, updatevon, insertamum, insertvon, uid, dms_id, nachgereicht, anmerkung,
|
||||
titel_intern, anmerkung_intern, nachgereicht_am) VALUES (".
|
||||
titel_intern, anmerkung_intern, nachgereicht_am, ausstellungsnation, formal_geprueft_amum) VALUES (".
|
||||
$this->db_add_param($this->person_id, FHC_INTEGER).', '.
|
||||
$this->db_add_param($this->dokument_kurzbz).', '.
|
||||
$this->db_add_param($this->inhalt).', '.
|
||||
@@ -204,7 +208,9 @@ class akte extends basis_db
|
||||
$this->db_add_param($this->anmerkung).','.
|
||||
$this->db_add_param($this->titel_intern).','.
|
||||
$this->db_add_param($this->anmerkung_intern).','.
|
||||
$this->db_add_param($this->nachgereicht_am).');';
|
||||
$this->db_add_param($this->nachgereicht_am).','.
|
||||
$this->db_add_param($this->ausstellungsnation).','.
|
||||
$this->db_add_param($this->formal_geprueft_amum).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -226,7 +232,9 @@ class akte extends basis_db
|
||||
" anmerkung=".$this->db_add_param($this->anmerkung).",".
|
||||
" titel_intern=".$this->db_add_param($this->titel_intern).",".
|
||||
" anmerkung_intern=".$this->db_add_param($this->anmerkung_intern).",".
|
||||
" nachgereicht_am=".$this->db_add_param($this->nachgereicht_am).
|
||||
" nachgereicht_am=".$this->db_add_param($this->nachgereicht_am).",".
|
||||
" ausstellungsnation=".$this->db_add_param($this->ausstellungsnation).",".
|
||||
" formal_geprueft_amum=".$this->db_add_param($this->formal_geprueft_amum).
|
||||
" WHERE akte_id=".$this->db_add_param($this->akte_id, FHC_INTEGER);
|
||||
}
|
||||
|
||||
@@ -283,7 +291,7 @@ class akte extends basis_db
|
||||
akte_id, person_id, dokument_kurzbz, mimetype, erstelltam, gedruckt, titel_intern, anmerkung_intern,
|
||||
titel, bezeichnung, updateamum, insertamum, updatevon, insertvon, uid, dms_id, anmerkung, nachgereicht,
|
||||
CASE WHEN inhalt is not null THEN true ELSE false END as inhalt_vorhanden,
|
||||
nachgereicht_am
|
||||
nachgereicht_am, ausstellungsnation, formal_geprueft_amum
|
||||
FROM public.tbl_akte WHERE person_id=".$this->db_add_param($person_id, FHC_INTEGER);
|
||||
if($dokument_kurzbz!=null)
|
||||
$qry.=" AND dokument_kurzbz=".$this->db_add_param($dokument_kurzbz);
|
||||
@@ -324,6 +332,8 @@ class akte extends basis_db
|
||||
$akten->titel_intern = $row->titel_intern;
|
||||
$akten->anmerkung_intern = $row->anmerkung_intern;
|
||||
$akten->nachgereicht_am = $row->nachgereicht_am;
|
||||
$akten->ausstellungsnation = $row->ausstellungsnation;
|
||||
$akten->formal_geprueft_amum = $row->formal_geprueft_amum;
|
||||
|
||||
$this->result[] = $akten;
|
||||
}
|
||||
@@ -348,7 +358,8 @@ class akte extends basis_db
|
||||
$qry = "SELECT
|
||||
akte_id, person_id, dokument_kurzbz, mimetype, erstelltam, gedruckt,
|
||||
titel, bezeichnung, updateamum, insertamum, updatevon, insertvon, uid,
|
||||
dms_id,nachgereicht,anmerkung,titel_intern,anmerkung_intern, nachgereicht_am
|
||||
dms_id,nachgereicht,anmerkung,titel_intern,anmerkung_intern, nachgereicht_am,
|
||||
ausstellungsnation, formal_geprueft_amum
|
||||
FROM public.tbl_akte WHERE person_id=".$this->db_add_param($person_id, FHC_INTEGER);
|
||||
|
||||
$qry.=" AND dokument_kurzbz IN ('Lebenslf','Motivat','LearnAgr')";
|
||||
@@ -380,6 +391,8 @@ class akte extends basis_db
|
||||
$akten->titel_intern = $row->titel_intern;
|
||||
$akten->anmerkung_intern = $row->anmerkung_intern;
|
||||
$akten->nachgereicht_am = $row->nachgereicht_am;
|
||||
$akten->ausstellungsnation = $row->ausstellungsnation;
|
||||
$akten->formal_geprueft_amum = $row->formal_geprueft_amum;
|
||||
|
||||
$this->result[] = $akten;
|
||||
}
|
||||
@@ -403,7 +416,8 @@ class akte extends basis_db
|
||||
$qry = "SELECT
|
||||
akte_id, person_id, dokument_kurzbz, mimetype, erstelltam, gedruckt,
|
||||
titel, bezeichnung, updateamum, insertamum, updatevon, insertvon, uid,
|
||||
dms_id,nachgereicht,anmerkung,titel_intern,anmerkung_intern, nachgereicht_am
|
||||
dms_id,nachgereicht,anmerkung,titel_intern,anmerkung_intern, nachgereicht_am,
|
||||
ausstellungsnation, formal_geprueft_amum
|
||||
FROM public.tbl_akte WHERE dms_id=".$this->db_add_param($dms_id, FHC_INTEGER)."
|
||||
ORDER BY erstelltam";
|
||||
|
||||
@@ -433,6 +447,8 @@ class akte extends basis_db
|
||||
$akten->titel_intern = $row->titel_intern;
|
||||
$akten->anmerkung_intern = $row->anmerkung_intern;
|
||||
$akten->nachgereicht_am = $row->nachgereicht_am;
|
||||
$akten->ausstellungsnation = $row->ausstellungsnation;
|
||||
$akten->formal_geprueft_amum = $row->formal_geprueft_amum;
|
||||
|
||||
$this->result[] = $akten;
|
||||
}
|
||||
|
||||
@@ -1268,39 +1268,57 @@ class content extends basis_db
|
||||
}
|
||||
|
||||
/**
|
||||
* Durchsucht den Content. Limit optional.
|
||||
* Durchsucht den CIS-Content nach Uebereinstimmung mit den Suchbegriffen.
|
||||
* Erst werden Uebereinstimmungen mit dem Titel geliefert (aus den templates contentmittitel, contentohnetitel und redirect)
|
||||
* und danach solche mit dem Content selbst (aus den templates contentmittitel und contentohnetitel).
|
||||
* Limit optional.
|
||||
*
|
||||
* @param array $searchItems
|
||||
* @param $limit (optional)
|
||||
* @param array $searchItems Array mit Suchbegriffen
|
||||
* @param integer $limit (optional) Anzahl an Datensaetzen, die zurueckgegeben werden sollen
|
||||
*/
|
||||
public function search($searchItems, $limit=null)
|
||||
{
|
||||
$qry = "SELECT
|
||||
distinct on(content_id,sprache,version) *
|
||||
distinct on(content_id,sprache,version) content_id, content::text, titel, sprache, version, 1 AS sort
|
||||
FROM
|
||||
campus.tbl_contentsprache
|
||||
JOIN campus.tbl_content USING(content_id)
|
||||
WHERE
|
||||
sichtbar=true
|
||||
AND aktiv=true
|
||||
AND version = (SELECT campus.get_highest_content_version (content_id))
|
||||
AND template_kurzbz IN('contentmittitel','contentohnetitel','redirect')";
|
||||
foreach($searchItems as $value)
|
||||
$qry.=" AND
|
||||
{
|
||||
$qry .= " AND
|
||||
(
|
||||
lower(titel::text) like lower('%".$this->db_escape($value)."%')
|
||||
OR lower(titel::text) like lower('%".$this->db_escape(htmlentities($value,ENT_NOQUOTES,'UTF-8'))."%')
|
||||
)
|
||||
";
|
||||
}
|
||||
$qry .= " UNION SELECT
|
||||
distinct on(content_id,sprache,version) content_id, content::text, titel, sprache, version, 2 AS sort
|
||||
FROM
|
||||
campus.tbl_contentsprache
|
||||
JOIN campus.tbl_content USING(content_id)
|
||||
WHERE
|
||||
sichtbar=true
|
||||
AND aktiv=true
|
||||
AND version = (SELECT campus.get_highest_content_version (content_id))";
|
||||
foreach($searchItems as $value)
|
||||
{
|
||||
$qry .= " AND
|
||||
(template_kurzbz IN('contentmittitel','contentohnetitel')
|
||||
AND
|
||||
(
|
||||
lower(content::text) like lower('%".$this->db_escape($value)."%')
|
||||
OR lower(content::text) like lower('%".$this->db_escape(htmlentities($value,ENT_NOQUOTES,'UTF-8'))."%')
|
||||
)
|
||||
OR template_kurzbz IN('redirect')
|
||||
AND
|
||||
(
|
||||
lower(titel::text) like lower('%".$this->db_escape($value)."%')
|
||||
OR lower(titel::text) like lower('%".$this->db_escape(htmlentities($value,ENT_NOQUOTES,'UTF-8'))."%')
|
||||
lower(content::text) like lower('%".$this->db_escape($value)."%')
|
||||
OR lower(content::text) like lower('%".$this->db_escape(htmlentities($value,ENT_NOQUOTES,'UTF-8'))."%')
|
||||
)
|
||||
)
|
||||
";
|
||||
$qry.=" ORDER BY sprache,content_id DESC";
|
||||
}
|
||||
$qry .= " ORDER BY sort,sprache,content_id DESC";
|
||||
|
||||
if(!is_null($limit) && is_numeric($limit))
|
||||
$qry.=" LIMIT ".$limit;
|
||||
|
||||
@@ -364,6 +364,11 @@ class cronjob extends basis_db
|
||||
public function execute()
|
||||
{
|
||||
$return = true;
|
||||
if($this->running)
|
||||
{
|
||||
$this->errormsg = 'Job kann nicht ausgefuehrt werden, da er bereits laeuft';
|
||||
return false;
|
||||
}
|
||||
if($this->standalone && $this->isJobRunning())
|
||||
{
|
||||
$this->errormsg = 'Job kann nicht ausgefuehrt werden, da noch ein anderer Job laeuft';
|
||||
|
||||
@@ -240,26 +240,31 @@ class datum
|
||||
/**
|
||||
* Subtrahiert 2 Zeiten ($zeit1-$zeit2) Stunde:Minute
|
||||
* Es liefert keine Uhrzeit zurueck sondern Stunden und Minuten
|
||||
* zB 12:10 + 23:15 = 35:25
|
||||
* zB 23:15 - 12:10 = 11:05
|
||||
*
|
||||
* @param $zeit1
|
||||
* @param $zeit2
|
||||
* @return subtraktion der beiden zeiten im Format Stunden:Minuten
|
||||
* @return subtraktion der beiden zeiten im Format Stunden:Minuten, null wenn zeit 1 kleiner als zeit2 ist
|
||||
*/
|
||||
public function subZeit($zeit1, $zeit2)
|
||||
{
|
||||
list($h1, $m1) = explode(':', $zeit1);
|
||||
list($h2, $m2) = explode(':', $zeit2);
|
||||
|
||||
if($h1<$h2)
|
||||
return null;
|
||||
else if($h1 == $h2 && $m1<$m2)
|
||||
return null;
|
||||
|
||||
$m1 -=$m2;
|
||||
//echo $h1.','.$m1.','.$h2.','.$m2;
|
||||
if($m1>=60)
|
||||
if($m1<0)
|
||||
{
|
||||
$uebertrag = (int)($m1/60);
|
||||
$h1+= $uebertrag;
|
||||
$m1 = $m1 + 60;
|
||||
$h1 = (int)$h1-1;
|
||||
}
|
||||
$m1=$m1%60;
|
||||
$h1+=-$h2;
|
||||
$h1-=$h2;
|
||||
if($m1<10)
|
||||
$m1='0'.$m1;
|
||||
if($h1<10)
|
||||
@@ -381,5 +386,15 @@ class datum
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* konvertiert Zeit in format stunden:minuten in Stunden als Dezimalahl
|
||||
* @param $timestring in Form stunden:minuten
|
||||
* @return int Stundenzahl als Dezimalzahl
|
||||
*/
|
||||
public function convertTimeStringToHours($timestring)
|
||||
{
|
||||
return intval(substr($timestring, 0, 2)) + intval(substr($timestring, 3, 2)) / 60;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -35,6 +35,7 @@ class dokument extends basis_db
|
||||
public $nachreichbar;
|
||||
public $bezeichnung_mehrsprachig;
|
||||
public $dokumentbeschreibung_mehrsprachig;
|
||||
public $ausstellungsdetails = false;
|
||||
|
||||
public $prestudent_id;
|
||||
public $mitarbeiter_uid;
|
||||
@@ -232,18 +233,20 @@ class dokument extends basis_db
|
||||
$idx = sprache::$index_arr[$key];
|
||||
$qry.=" dokumentbeschreibung_mehrsprachig[$idx],";
|
||||
}
|
||||
$qry.='bezeichnung) VALUES('.
|
||||
$qry.='bezeichnung, ausstellungsdetails) VALUES('.
|
||||
$this->db_add_param($this->dokument_kurzbz).',';
|
||||
foreach($this->bezeichnung_mehrsprachig as $key=>$value)
|
||||
$qry.=$this->db_add_param($value).',';
|
||||
foreach($this->dokumentbeschreibung_mehrsprachig as $key=>$value)
|
||||
$qry.=$this->db_add_param($value).',';
|
||||
$qry.= $this->db_add_param($this->bezeichnung).');';
|
||||
$qry.= $this->db_add_param($this->bezeichnung).',';
|
||||
$qry.= $this->db_add_param($this->ausstellungsdetails, FHC_BOOLEAN).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry = 'UPDATE public.tbl_dokument SET '.
|
||||
'bezeichnung = '.$this->db_add_param($this->bezeichnung).',';
|
||||
'bezeichnung = '.$this->db_add_param($this->bezeichnung).', '.
|
||||
'ausstellungsdetails = '.$this->db_add_param($this->ausstellungsdetails, FHC_BOOLEAN).',';
|
||||
foreach($this->bezeichnung_mehrsprachig as $key=>$value)
|
||||
{
|
||||
$idx = sprache::$index_arr[$key];
|
||||
@@ -406,6 +409,7 @@ class dokument extends basis_db
|
||||
$dok->pflicht = $this->db_parse_bool($row->pflicht);
|
||||
$dok->nachreichbar = $this->db_parse_bool($row->nachreichbar);
|
||||
$dok->onlinebewerbung = $this->db_parse_bool($row->onlinebewerbung);
|
||||
$dok->ausstellungsdetails = $this->db_parse_bool($row->ausstellungsdetails);
|
||||
$this->result[] = $dok;
|
||||
}
|
||||
return true;
|
||||
@@ -444,6 +448,7 @@ class dokument extends basis_db
|
||||
$dok->pflicht = $this->db_parse_bool($row->pflicht);
|
||||
$dok->nachreichbar = $this->db_parse_bool($row->nachreichbar);
|
||||
$dok->onlinebewerbung = $this->db_parse_bool($row->onlinebewerbung);
|
||||
$dok->ausstellungsdetails = $this->db_parse_bool($row->ausstellungsdetails);
|
||||
|
||||
$this->result[] = $dok;
|
||||
}
|
||||
@@ -466,7 +471,7 @@ class dokument extends basis_db
|
||||
$sprache = new sprache();
|
||||
$bezeichnung_mehrsprachig = $sprache->getSprachQuery('bezeichnung_mehrsprachig');
|
||||
$dokumentbeschreibung_mehrsprachig = $sprache->getSprachQuery('dokumentbeschreibung_mehrsprachig');
|
||||
$qry = "SELECT dokument_kurzbz, bezeichnung, $bezeichnung_mehrsprachig, $dokumentbeschreibung_mehrsprachig FROM public.tbl_dokument ";
|
||||
$qry = "SELECT dokument_kurzbz, bezeichnung, ausstellungsdetails, $bezeichnung_mehrsprachig, $dokumentbeschreibung_mehrsprachig FROM public.tbl_dokument ";
|
||||
|
||||
if($not_in!='')
|
||||
{
|
||||
@@ -484,6 +489,7 @@ class dokument extends basis_db
|
||||
$dok->bezeichnung = $row->bezeichnung;
|
||||
$dok->bezeichnung_mehrsprachig = $sprache->parseSprachResult('bezeichnung_mehrsprachig', $row);
|
||||
$dok->dokumentbeschreibung_mehrsprachig = $sprache->parseSprachResult('dokumentbeschreibung_mehrsprachig', $row);
|
||||
$dok->ausstellungsdetails = $this->db_parse_bool($row->ausstellungsdetails);
|
||||
|
||||
$this->result[] = $dok;
|
||||
}
|
||||
@@ -641,6 +647,7 @@ class dokument extends basis_db
|
||||
$this->bezeichnung = $row->bezeichnung;
|
||||
$this->bezeichnung_mehrsprachig = $sprache->parseSprachResult('bezeichnung_mehrsprachig', $row);
|
||||
$this->dokumentbeschreibung_mehrsprachig = $sprache->parseSprachResult('dokumentbeschreibung_mehrsprachig', $row);
|
||||
$this->ausstellungsdetails = $this->db_parse_bool($row->ausstellungsdetails);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -654,8 +661,8 @@ class dokument extends basis_db
|
||||
/**
|
||||
* Liefert alle Dokumente die eine Person abzugeben hat.
|
||||
* Ist notwendig, um bei einer Bewerbung mit mehreren Studiengängen zu wissen, was der Student im Gesamten abzugeben hat
|
||||
* @param $person_id
|
||||
* @param onlinebewerbung
|
||||
* @param integer $person_id
|
||||
* @param boolean $onlinebewerbung Default false. Wenn true, werden nur Dokumente zurueckgegeben, bei denen das Attribut "Onlinebewerbung" true ist
|
||||
*/
|
||||
public function getAllDokumenteForPerson($person_id, $onlinebewerbung= false)
|
||||
{
|
||||
@@ -663,7 +670,7 @@ class dokument extends basis_db
|
||||
$bezeichnung_mehrsprachig = $sprache->getSprachQuery('bezeichnung_mehrsprachig');
|
||||
$dokumentbeschreibung_mehrsprachig = $sprache->getSprachQuery('dokumentbeschreibung_mehrsprachig');
|
||||
$beschreibung_mehrsprachig = $sprache->getSprachQuery('beschreibung_mehrsprachig');
|
||||
$qry = "SELECT distinct on (dokument_kurzbz) dokument_kurzbz, bezeichnung, pflicht, nachreichbar,
|
||||
$qry = "SELECT distinct on (dokument_kurzbz) dokument_kurzbz, bezeichnung, pflicht, nachreichbar, ausstellungsdetails,
|
||||
$bezeichnung_mehrsprachig, $dokumentbeschreibung_mehrsprachig, $beschreibung_mehrsprachig
|
||||
FROM public.tbl_dokumentstudiengang
|
||||
JOIN public.tbl_prestudent using (studiengang_kz)
|
||||
@@ -688,6 +695,7 @@ class dokument extends basis_db
|
||||
$dok->bezeichnung_mehrsprachig = $sprache->parseSprachResult('bezeichnung_mehrsprachig', $row);
|
||||
$dok->dokumentbeschreibung_mehrsprachig = $sprache->parseSprachResult('dokumentbeschreibung_mehrsprachig', $row);
|
||||
$dok->beschreibung_mehrsprachig = $sprache->parseSprachResult('beschreibung_mehrsprachig', $row);
|
||||
$dok->ausstellungsdetails = $this->db_parse_bool($row->ausstellungsdetails);
|
||||
|
||||
$this->result[] = $dok;
|
||||
}
|
||||
@@ -714,7 +722,7 @@ class dokument extends basis_db
|
||||
$dokumentbeschreibung_mehrsprachig = $sprache->getSprachQuery('dokumentbeschreibung_mehrsprachig');
|
||||
$beschreibung_mehrsprachig = $sprache->getSprachQuery('beschreibung_mehrsprachig');
|
||||
|
||||
$qry = " SELECT DISTINCT dokument_kurzbz, studiengang_kz,
|
||||
$qry = " SELECT DISTINCT dokument_kurzbz, studiengang_kz, ausstellungsdetails,
|
||||
$dokumentbeschreibung_mehrsprachig, $beschreibung_mehrsprachig
|
||||
FROM public.tbl_dokumentstudiengang
|
||||
JOIN public.tbl_dokument using (dokument_kurzbz)
|
||||
@@ -732,6 +740,7 @@ class dokument extends basis_db
|
||||
$dok->studiengang_kz = $row->studiengang_kz;
|
||||
$dok->dokumentbeschreibung_mehrsprachig = $sprache->parseSprachResult('dokumentbeschreibung_mehrsprachig', $row);
|
||||
$dok->beschreibung_mehrsprachig = $sprache->parseSprachResult('beschreibung_mehrsprachig', $row);
|
||||
$dok->ausstellungsdetails = $this->db_parse_bool($row->ausstellungsdetails);
|
||||
|
||||
$this->result[] = $dok;
|
||||
}
|
||||
@@ -801,4 +810,43 @@ class dokument extends basis_db
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert die Studiengänge bei denen das übergebene Dokument benötigt wird
|
||||
* @param string $dokument_kurzbz Kurzbz des Dokuments
|
||||
* @param integer $person_id Optional. Die Dokumente werden zusätzlich auf die Studiengänge eingeschränkt für die sich eine Person beworben hat.
|
||||
* @return object Objekt mit den Studiengängen oder false.
|
||||
*/
|
||||
public function getStudiengaengeDokument($dokument_kurzbz, $person_id = null)
|
||||
{
|
||||
$qry = " SELECT DISTINCT studiengang_kz,typ||kurzbz AS kuerzel, bezeichnung, english FROM public.tbl_dokumentstudiengang
|
||||
JOIN public.tbl_prestudent USING (studiengang_kz)
|
||||
JOIN public.tbl_prestudentstatus USING (prestudent_id)
|
||||
JOIN public.tbl_studiengang USING (studiengang_kz)
|
||||
WHERE dokument_kurzbz = ".$this->db_add_param($dokument_kurzbz)."
|
||||
AND person_id =".$this->db_add_param($person_id, FHC_INTEGER)."
|
||||
AND tbl_prestudentstatus.status_kurzbz = 'Interessent'
|
||||
|
||||
ORDER BY kuerzel";
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$stg_obj = new basis_db();
|
||||
$stg_obj->kuerzel = $row->kuerzel;
|
||||
$stg_obj->bezeichnung = $row->bezeichnung;
|
||||
$stg_obj->studiengang_kz = $row->studiengang_kz;
|
||||
|
||||
$this->result[] = $stg_obj;
|
||||
}
|
||||
return $stg_obj;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg="Fehler bei der Abfrage aufgetreten";
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,13 @@ class dokument_export
|
||||
|
||||
exec('unoconv --version',$ret_arr);
|
||||
if(isset($ret_arr[0]))
|
||||
$this->unoconv_version = explode(' ',$ret_arr[0])[1];
|
||||
{
|
||||
$hlp = explode(' ',$ret_arr[0]);
|
||||
if(isset($hlp[1]))
|
||||
$this->unoconv_version = $hlp[1];
|
||||
else
|
||||
die('Could not get Unoconv Version');
|
||||
}
|
||||
else
|
||||
die('Unoconv not found');
|
||||
|
||||
@@ -411,7 +417,11 @@ class dokument_export
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Remove UTF8 Control Characters (breaking XML)
|
||||
$value = preg_replace('/[\x00-\x1F\x7F]/u', '', $value);
|
||||
$_xml_data->addChild("$key",htmlspecialchars("$value"));
|
||||
}
|
||||
}
|
||||
return $_xml_data->asXML();
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
require_once(dirname(__FILE__).'/authentication.class.php');
|
||||
require_once(dirname(__FILE__).'/betriebsmittelperson.class.php');
|
||||
require_once(dirname(__FILE__).'/personlog.class.php');
|
||||
|
||||
// Auth: Benutzer des Webportals
|
||||
/**
|
||||
@@ -320,7 +321,10 @@ function loadVariables($user)
|
||||
if (!isset($emailadressentrennzeichen))
|
||||
{
|
||||
global $emailadressentrennzeichen;
|
||||
$emailadressentrennzeichen=',';
|
||||
if(defined('DEFAULT_EMAILADRESSENTRENNZEICHEN'))
|
||||
$emailadressentrennzeichen = DEFAULT_EMAILADRESSENTRENNZEICHEN;
|
||||
else
|
||||
$emailadressentrennzeichen=',';
|
||||
}
|
||||
|
||||
if(!isset($alle_unr_mitladen))
|
||||
@@ -1043,4 +1047,54 @@ function generateSpecialCharacterString($inputString, $punctuationMark = false)
|
||||
|
||||
return $inputString;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cuts the string to the given limit minus the stringlength of the placeholderSign and adds the placeholderSign at the end of the string
|
||||
* If $keepFilextension is true, the string is checked for a PATHINFO_EXTENSION and the extension is added to the returned string.
|
||||
* The returned stringlength includes the fileextension.
|
||||
* @param string $string The input string to be cutted
|
||||
* @param integer $limit The length of the returned string (including the placeholderSigns)
|
||||
* @param string $placeholderSign Optional. Default null. The string to be added at the end of the cutted string.
|
||||
* @param bool $keepFilextension. Default false. When set to true the
|
||||
* @return string The cutted string with the placeholderSign at the end and the optional fileextension
|
||||
*/
|
||||
function cutString($string, $limit, $placeholderSign = '', $keepFileextension = false)
|
||||
{
|
||||
$offset = strlen($placeholderSign);
|
||||
$extension = '';
|
||||
if ($keepFileextension)
|
||||
{
|
||||
$extension = '.'.pathinfo($string, PATHINFO_EXTENSION);
|
||||
$offset = $offset + mb_strlen($extension);
|
||||
}
|
||||
if(($limit - $offset) < 0)
|
||||
{
|
||||
return '<span class="error">$placeholderSign must not be shorter than $limit</span>';
|
||||
}
|
||||
|
||||
if(strlen($string) > ($limit - $offset))
|
||||
{
|
||||
return mb_substr($string, 0, ($limit - $offset)).$placeholderSign.$extension;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $string;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Erstellt einen Log Eintrag zu einer Person
|
||||
* @param $person_id ID der Person.
|
||||
* @param $logtype_kurzbz Typ des Logeintrages
|
||||
* @param $logdata Array mit den zusaetzlichen Logdaten zu diesem Typ.
|
||||
* @param $taetigkeit_kurzbz Kurzbz der Verarbeitungstaetigkeit.
|
||||
* @param $app Applikation von der dieser Logeintrag stammt. (optional)
|
||||
* @param $oe_kurzbz Kurzbz der Organisationseinheit. (optional)
|
||||
* @param $user User der die Aktion durchgefuehrt hat. (optional)
|
||||
*/
|
||||
function PersonLog($person_id, $logtype_kurzbz, $logdata, $taetigkeit_kurzbz, $app = 'core', $oe_kurzbz = null, $user = null)
|
||||
{
|
||||
$personlog = new personlog();
|
||||
$personlog->log($person_id, $logtype_kurzbz, $logdata, $taetigkeit_kurzbz, $app, $oe_kurzbz, $user);
|
||||
}
|
||||
?>
|
||||
|
||||
|
Before Width: | Height: | Size: 628 B After Width: | Height: | Size: 628 B |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 786 B After Width: | Height: | Size: 786 B |
|
Before Width: | Height: | Size: 615 B After Width: | Height: | Size: 615 B |
|
Before Width: | Height: | Size: 603 B After Width: | Height: | Size: 603 B |
|
Before Width: | Height: | Size: 309 B After Width: | Height: | Size: 309 B |
|
Before Width: | Height: | Size: 731 B After Width: | Height: | Size: 731 B |
|
Before Width: | Height: | Size: 631 B After Width: | Height: | Size: 631 B |
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 331 B |
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 132 B After Width: | Height: | Size: 132 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |