mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +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
|
|
@ -176,9 +176,13 @@ class commentModel extends comment
|
|||
*/
|
||||
function getComments($comment_srl_list, $columnList = array())
|
||||
{
|
||||
if(is_array($comment_srl_list))
|
||||
if (!is_array($comment_srl_list))
|
||||
{
|
||||
$comment_srls = implode(',', $comment_srl_list);
|
||||
$comment_srl_list = $comment_srl_list ? explode(',', $comment_srl_list) : array();
|
||||
}
|
||||
if (!count($comment_srl_list))
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
// fetch from a database
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue