mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-11 22:42:14 +09:00
Fix unnecessary query when there are no polls
This commit is contained in:
parent
cd58305fc1
commit
3430e21be4
3 changed files with 16 additions and 3 deletions
|
|
@ -187,6 +187,15 @@ class documentModel extends document
|
|||
*/
|
||||
function getDocuments($document_srls, $is_admin = false, $load_extra_vars = true, $columnList = array())
|
||||
{
|
||||
if (!is_array($document_srls))
|
||||
{
|
||||
$document_srls = $document_srls ? explode(',', $document_srls) : array();
|
||||
}
|
||||
if (!count($document_srls))
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
$args = new stdClass();
|
||||
$args->document_srls = $document_srls;
|
||||
$args->list_count = is_array($document_srls) ? count($document_srls) : 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue