mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ffc040a6b | |||
| dba7fd2ff4 | |||
| 34009ee841 | |||
| b50e3bc075 |
@@ -130,6 +130,6 @@ class basis
|
||||
*/
|
||||
public function convert_html_chars($value)
|
||||
{
|
||||
return htmlspecialchars($value);
|
||||
return htmlspecialchars($value ?? '');
|
||||
}
|
||||
}
|
||||
|
||||
+13
-13
@@ -27,8 +27,8 @@ require_once(dirname(__FILE__).'/basis.class.php');
|
||||
|
||||
abstract class db extends basis
|
||||
{
|
||||
protected static $db_conn=null;
|
||||
protected $db_result=null;
|
||||
protected static $db_conn = null;
|
||||
protected $db_result = null;
|
||||
protected $debug=false;
|
||||
|
||||
function __construct()
|
||||
@@ -46,18 +46,18 @@ abstract class db extends basis
|
||||
|
||||
abstract function db_connect();
|
||||
abstract function db_query($sql);
|
||||
abstract function db_fetch_object($result=null, $i=null);
|
||||
abstract function db_fetch_array($result=null);
|
||||
abstract function db_fetch_row($result=null, $i=null);
|
||||
abstract function db_fetch_assoc($result=null, $i=null);
|
||||
abstract function db_result($result = null, $i, $item);
|
||||
abstract function db_num_rows($result=null);
|
||||
abstract function db_num_fields($result=null);
|
||||
abstract function db_field_name($result=null, $i);
|
||||
abstract function db_affected_rows($result=null);
|
||||
abstract function db_result_seek($result=null, $offset);
|
||||
abstract function db_fetch_object($result = null, $i = null);
|
||||
abstract function db_fetch_array($result = null);
|
||||
abstract function db_fetch_row($result = null, $i = null);
|
||||
abstract function db_fetch_assoc($result = null, $i = null);
|
||||
abstract function db_result($result = null, $i = null, $item = null);
|
||||
abstract function db_num_rows($result = null);
|
||||
abstract function db_num_fields($result = null);
|
||||
abstract function db_field_name($result = null, $i = null);
|
||||
abstract function db_affected_rows($result = null);
|
||||
abstract function db_result_seek($result = null, $offset = null);
|
||||
abstract function db_last_error();
|
||||
abstract function db_free_result($result=null);
|
||||
abstract function db_free_result($result = null);
|
||||
abstract function db_version();
|
||||
abstract function db_escape($var);
|
||||
abstract function db_null_value($var, $qoute=true);
|
||||
|
||||
@@ -356,7 +356,7 @@ class datum
|
||||
*/
|
||||
public function formatDatum($datum, $format='Y-m-d H:i:s', $strict=false)
|
||||
{
|
||||
if(trim($datum)=='')
|
||||
if (trim($datum ?? '') == '')
|
||||
return '';
|
||||
|
||||
$ts='';
|
||||
|
||||
@@ -34,6 +34,8 @@ class lehrform extends basis_db
|
||||
public $bezeichnung_kurz;
|
||||
public $bezeichnung_lang;
|
||||
|
||||
public $lehrform_kurzbz;
|
||||
|
||||
/**
|
||||
* Konstruktor - Laedt optional eine Lehrform
|
||||
* @param $lehrform_kurbz Lehrform die geladen werden soll (default=null)
|
||||
|
||||
@@ -661,27 +661,27 @@ class lehrveranstaltung extends basis_db
|
||||
public function validate()
|
||||
{
|
||||
//Laenge Pruefen
|
||||
if (mb_strlen($this->bezeichnung) > 128)
|
||||
if (mb_strlen($this->bezeichnung ?? '') > 128)
|
||||
{
|
||||
$this->errormsg = 'Bezeichnung darf nicht laenger als 128 Zeichen sein';
|
||||
return false;
|
||||
}
|
||||
if (mb_strlen($this->kurzbz) > 16)
|
||||
if (mb_strlen($this->kurzbz ?? '') > 16)
|
||||
{
|
||||
$this->errormsg = 'Kurzbez darf nicht laenger als 16 Zeichen sein';
|
||||
return false;
|
||||
}
|
||||
if (mb_strlen($this->anmerkung) > 64)
|
||||
if (mb_strlen($this->anmerkung ?? '') > 64)
|
||||
{
|
||||
$this->errormsg = 'Anmerkung darf nicht laenger als 64 Zeichen sein';
|
||||
return false;
|
||||
}
|
||||
if (mb_strlen($this->lehreverzeichnis) > 16)
|
||||
if (mb_strlen($this->lehreverzeichnis ?? '') > 16)
|
||||
{
|
||||
$this->errormsg = 'Lehreverzeichnis darf nicht laenger als 16 Zeichen sein';
|
||||
return false;
|
||||
}
|
||||
if (mb_strlen($this->lvnr) > 32)
|
||||
if (mb_strlen($this->lvnr ?? '') > 32)
|
||||
{
|
||||
$this->errormsg = 'LVNR darf nicht laenger als 32 Zeichen sein';
|
||||
return false;
|
||||
|
||||
@@ -40,6 +40,7 @@ class lvangebot extends basis_db
|
||||
protected $anmeldefenster_start; // timestamp
|
||||
protected $anmeldefenster_ende; // timestamp
|
||||
protected $updateamum; // timestamp
|
||||
protected $updatenamum;
|
||||
protected $updatevon; // varchar(32)
|
||||
protected $insertamum; // timestamp
|
||||
protected $insertvon; // varchar(32)
|
||||
|
||||
@@ -49,6 +49,8 @@ class organisationseinheit extends basis_db
|
||||
public $beschreibung;
|
||||
public $oetyp_bezeichnung;
|
||||
|
||||
public $kurzzeichen;
|
||||
public $freigabegrenze;
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
|
||||
+13
-13
@@ -44,7 +44,7 @@ class basis_db extends db
|
||||
|
||||
public function db_query($sql)
|
||||
{
|
||||
if ($this->db_result=pg_query(basis_db::$db_conn,$sql))
|
||||
if ($this->db_result = @pg_query(basis_db::$db_conn,$sql))
|
||||
return $this->db_result;
|
||||
else
|
||||
{
|
||||
@@ -53,7 +53,7 @@ class basis_db extends db
|
||||
}
|
||||
}
|
||||
|
||||
public function db_num_rows($result=null)
|
||||
public function db_num_rows($result = null)
|
||||
{
|
||||
if(is_null($result))
|
||||
return pg_num_rows($this->db_result);
|
||||
@@ -61,7 +61,7 @@ class basis_db extends db
|
||||
return pg_num_rows($result);
|
||||
}
|
||||
|
||||
public function db_fetch_object($result = null, $i=null)
|
||||
public function db_fetch_object($result = null, $i = null)
|
||||
{
|
||||
if(is_null($result))
|
||||
{
|
||||
@@ -79,7 +79,7 @@ class basis_db extends db
|
||||
}
|
||||
}
|
||||
|
||||
public function db_fetch_row($result = null, $i=null)
|
||||
public function db_fetch_row($result = null, $i = null)
|
||||
{
|
||||
if(is_null($result))
|
||||
{
|
||||
@@ -97,7 +97,7 @@ class basis_db extends db
|
||||
}
|
||||
}
|
||||
|
||||
public function db_fetch_assoc($result = null, $i=null)
|
||||
public function db_fetch_assoc($result = null, $i = null)
|
||||
{
|
||||
if(is_null($result))
|
||||
{
|
||||
@@ -115,7 +115,7 @@ class basis_db extends db
|
||||
}
|
||||
}
|
||||
|
||||
public function db_result($result = null, $i,$item)
|
||||
public function db_result($result = null, $i = null, $item = null)
|
||||
{
|
||||
if(is_null($result))
|
||||
{
|
||||
@@ -153,10 +153,10 @@ class basis_db extends db
|
||||
|
||||
public function db_last_error()
|
||||
{
|
||||
return pg_last_error();
|
||||
return pg_last_error(basis_db::$db_conn);
|
||||
}
|
||||
|
||||
public function db_affected_rows($result=null)
|
||||
public function db_affected_rows($result = null)
|
||||
{
|
||||
if(is_null($result))
|
||||
return pg_affected_rows($this->db_result);
|
||||
@@ -164,7 +164,7 @@ class basis_db extends db
|
||||
return pg_affected_rows($result);
|
||||
}
|
||||
|
||||
public function db_result_seek($result=null, $offset)
|
||||
public function db_result_seek($result = null, $offset = null)
|
||||
{
|
||||
if(is_null($result))
|
||||
return pg_result_seek($this->db_result, $offset);
|
||||
@@ -172,7 +172,7 @@ class basis_db extends db
|
||||
return pg_result_seek($result, $offset);
|
||||
}
|
||||
|
||||
public function db_fetch_array($result=null, $row=null, $result_type=PGSQL_NUM)
|
||||
public function db_fetch_array($result = null, $row = null, $result_type=PGSQL_NUM)
|
||||
{
|
||||
if(is_null($result))
|
||||
return pg_fetch_array($this->db_result, $row, $result_type);
|
||||
@@ -180,7 +180,7 @@ class basis_db extends db
|
||||
return pg_fetch_array($result, $row, $result_type);
|
||||
}
|
||||
|
||||
public function db_num_fields($result=null)
|
||||
public function db_num_fields($result = null)
|
||||
{
|
||||
if(is_null($result))
|
||||
return pg_num_fields($this->db_result);
|
||||
@@ -191,7 +191,7 @@ class basis_db extends db
|
||||
/**
|
||||
* Liefert den Feldnamen mit index i
|
||||
*/
|
||||
public function db_field_name($result=null, $i)
|
||||
public function db_field_name($result = null, $i = null)
|
||||
{
|
||||
if(is_null($result))
|
||||
return pg_field_name($this->db_result, $i);
|
||||
@@ -230,7 +230,7 @@ class basis_db extends db
|
||||
*/
|
||||
public function db_escape($var)
|
||||
{
|
||||
return pg_escape_string($var);
|
||||
return pg_escape_string(basis_db::$db_conn, $var);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -68,6 +68,11 @@ class studiengang extends basis_db
|
||||
public $beschreibung;
|
||||
public $studiengang_typ_arr = array(); // Array mit den Studiengangstypen
|
||||
|
||||
public $telefon;
|
||||
public $aktiv;
|
||||
public $beantragung;
|
||||
public $lgart_biscode;
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
* @param studiengang_kz Kennzahl des zu ladenden Studienganges
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
<td>Kurzbz*</td>
|
||||
<td><input type="text" name="kurzbz" '.($lv->lehrveranstaltung_id==''?'onchange="copyToLehreVz();"':'onchange="return copyToLehreVzAsk();"').' value="'.$lv->kurzbz.'" /></td>
|
||||
<td>Bezeichnung*</td>
|
||||
<td colspan=3><input type="text" name="bezeichnung" value="'.htmlentities($lv->bezeichnung, ENT_QUOTES, 'UTF-8').'" size="60" maxlength="128"></td>
|
||||
<td colspan=3><input type="text" name="bezeichnung" value="'.htmlentities($lv->bezeichnung ?? '', ENT_QUOTES, 'UTF-8').'" size="60" maxlength="128"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sprache</td>
|
||||
@@ -227,7 +227,7 @@
|
||||
}
|
||||
$htmlstr .= '</select></td>
|
||||
<td>Bezeichnung English</td>
|
||||
<td colspan=3><input type="text" name="bezeichnung_english" value="'.htmlentities($lv->bezeichnung_english, ENT_QUOTES, 'UTF-8').'" size="60" maxlength="256"></td>
|
||||
<td colspan=3><input type="text" name="bezeichnung_english" value="'.htmlentities($lv->bezeichnung_english ?? '', ENT_QUOTES, 'UTF-8').'" size="60" maxlength="256"></td>
|
||||
</tr><tr>
|
||||
<td>Studiengang</td>
|
||||
<td><select name="studiengang_kz">';
|
||||
|
||||
Reference in New Issue
Block a user