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 ...@@ -417,7 +417,7 @@ class Form extends Part
if ( if (
$context $context
&& is_subclass_of($context, \SimpleORMap::class) && is_subclass_of($context, \SimpleORMap::class)
&& $context->isField($input->getName()) && ($context->isField($input->getName()) || $context->isRelation($input->getName()))
) { ) {
return function ($value) use ($context, $input) { return function ($value) use ($context, $input) {
$context[$input->getName()] = $value; $context[$input->getName()] = $value;
......
...@@ -1731,6 +1731,17 @@ class SimpleORMap implements ArrayAccess, Countable, IteratorAggregate ...@@ -1731,6 +1731,17 @@ class SimpleORMap implements ArrayAccess, Countable, IteratorAggregate
return isset($this->db_fields()[$field]); 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 * check if given column is additional
* @param string $field * @param string $field
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment