mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 12:02:24 +09:00
Skip extra var validation if manually inserted/updated
This commit is contained in:
parent
d0f0d7205d
commit
52c573fdba
1 changed files with 14 additions and 8 deletions
|
|
@ -842,6 +842,8 @@ class DocumentController extends Document
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (!$manual_inserted)
|
||||||
{
|
{
|
||||||
$ev_output = $extra_item->validate($value);
|
$ev_output = $extra_item->validate($value);
|
||||||
if ($ev_output && !$output->toBool())
|
if ($ev_output && !$output->toBool())
|
||||||
|
|
@ -849,6 +851,7 @@ class DocumentController extends Document
|
||||||
$oDB->rollback();
|
$oDB->rollback();
|
||||||
return $ev_output;
|
return $ev_output;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Handle extra vars that support file upload.
|
// Handle extra vars that support file upload.
|
||||||
if ($extra_item->type === 'file' && is_array($value))
|
if ($extra_item->type === 'file' && is_array($value))
|
||||||
|
|
@ -1224,12 +1227,15 @@ class DocumentController extends Document
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Check for required and strict values.
|
// Check for required and strict values.
|
||||||
|
if (!$manual_updated)
|
||||||
|
{
|
||||||
$ev_output = $extra_item->validate($value);
|
$ev_output = $extra_item->validate($value);
|
||||||
if ($ev_output && !$ev_output->toBool())
|
if ($ev_output && !$ev_output->toBool())
|
||||||
{
|
{
|
||||||
$oDB->rollback();
|
$oDB->rollback();
|
||||||
return $ev_output;
|
return $ev_output;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Handle extra vars that support file upload.
|
// Handle extra vars that support file upload.
|
||||||
if ($extra_item->type === 'file')
|
if ($extra_item->type === 'file')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue