Skip to content
Snippets Groups Projects
Commit fa0f8936 authored by Rasmus Fuhse's avatar Rasmus Fuhse Committed by Elmar Ludwig
Browse files

Resolve "System-Ankündigung: Weitere Bereiche auffindbar, werden aber nicht gespeichert"

Closes #2945

Merge request studip/studip!1994
parent 20082fa9
No related branches found
No related tags found
No related merge requests found
......@@ -417,7 +417,7 @@ class Form extends Part
if (
$context
&& is_subclass_of($context, \SimpleORMap::class)
&& $context->isField($input->getName())
&& ($context->isField($input->getName()) || $context->isRelation($input->getName()))
) {
return function ($value) use ($context, $input) {
$context[$input->getName()] = $value;
......
......@@ -1731,6 +1731,17 @@ class SimpleORMap implements ArrayAccess, Countable, IteratorAggregate
return isset($this->db_fields()[$field]);
}
/**
* check if given relation exists in this class
* @param string $field
* @return boolean
*/
function isRelation($field)
{
$field = strtolower($field);
return array_key_exists($field, $this->relations);
}
/**
* check if given column is additional
* @param string $field
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment