mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Fix #1674 Preserve extra_vars when updating document
This commit is contained in:
parent
85a337f0d3
commit
6780125174
1 changed files with 12 additions and 2 deletions
|
|
@ -489,7 +489,14 @@ class documentController extends document
|
|||
}
|
||||
|
||||
// Serialize the $extra_vars, check the extra_vars type, because duplicate serialized avoid
|
||||
if(!is_string($obj->extra_vars)) $obj->extra_vars = serialize($obj->extra_vars);
|
||||
if (!isset($obj->extra_vars))
|
||||
{
|
||||
$obj->extra_vars = new stdClass;
|
||||
}
|
||||
if (!is_string($obj->extra_vars))
|
||||
{
|
||||
$obj->extra_vars = serialize($obj->extra_vars);
|
||||
}
|
||||
|
||||
// Remove the columns for automatic saving
|
||||
unset($obj->_saved_doc_srl);
|
||||
|
|
@ -787,7 +794,10 @@ class documentController extends document
|
|||
}
|
||||
|
||||
// Serialize the $extra_vars
|
||||
if(!is_string($obj->extra_vars)) $obj->extra_vars = serialize($obj->extra_vars);
|
||||
if (isset($obj->extra_vars) && !is_string($obj->extra_vars))
|
||||
{
|
||||
$obj->extra_vars = serialize($obj->extra_vars);
|
||||
}
|
||||
|
||||
// Remove the columns for automatic saving
|
||||
unset($obj->_saved_doc_srl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue