mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Terminliste und Export bei Studierenden, Mitarbeitern und Lehrveranstaltungen/Lehreinheiten
This commit is contained in:
@@ -342,5 +342,23 @@ class basis_db extends db
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Erstellt aus einem DB Array ein PHP Array
|
||||
* @param $var DB Result Array Spalte
|
||||
* @return php array
|
||||
*/
|
||||
public function db_parse_array($var)
|
||||
{
|
||||
if ($var == '')
|
||||
return;
|
||||
preg_match_all('/(?<=^\{|,)(([^,"{]*)|\s*"((?:[^"\\\\]|\\\\(?:.|[0-9]+|x[0-9a-f]+))*)"\s*)(,|(?<!^\{)(?=\}$))/i', $var, $matches, PREG_SET_ORDER);
|
||||
$values = [];
|
||||
foreach ($matches as $match)
|
||||
{
|
||||
$values[] = $match[3] != '' ? stripcslashes($match[3]) : (strtolower($match[2]) == 'null' ? null : $match[2]);
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user