mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Fix #2217 call getDocumentList (after) trigger even if there are no results
This commit is contained in:
parent
4a2ea92f07
commit
c2311f88be
1 changed files with 15 additions and 12 deletions
|
|
@ -265,26 +265,29 @@ class DocumentModel extends Document
|
|||
$output = executeQueryArray($query_id, $args, $args->columnList);
|
||||
}
|
||||
|
||||
// Return if no result or an error occurs
|
||||
if(!$output->toBool() || !$result = $output->data)
|
||||
// Return if there was an error.
|
||||
if (!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
$output->data = array();
|
||||
foreach($result as $key => $attribute)
|
||||
// Create document objects and load extra vars.
|
||||
if ($output->data)
|
||||
{
|
||||
if(!isset($GLOBALS['XE_DOCUMENT_LIST'][$attribute->document_srl]))
|
||||
foreach ($output->data as $key => $attribute)
|
||||
{
|
||||
$oDocument = new documentItem();
|
||||
$oDocument->setAttribute($attribute, false);
|
||||
if (!isset($GLOBALS['XE_DOCUMENT_LIST'][$attribute->document_srl]))
|
||||
{
|
||||
$oDocument = new DocumentItem();
|
||||
$oDocument->setAttribute($attribute, false);
|
||||
}
|
||||
$output->data[$key] = $GLOBALS['XE_DOCUMENT_LIST'][$attribute->document_srl];
|
||||
}
|
||||
$output->data[$key] = $GLOBALS['XE_DOCUMENT_LIST'][$attribute->document_srl];
|
||||
}
|
||||
|
||||
if($load_extra_vars)
|
||||
{
|
||||
self::setToAllDocumentExtraVars();
|
||||
if ($load_extra_vars)
|
||||
{
|
||||
self::setToAllDocumentExtraVars();
|
||||
}
|
||||
}
|
||||
|
||||
// Call trigger (after)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue