mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Clean up TagModel::getTagList()
This commit is contained in:
parent
aa237f8dd0
commit
7056a44396
3 changed files with 10 additions and 17 deletions
|
|
@ -717,14 +717,14 @@ class BoardView extends Board
|
|||
$obj = new stdClass;
|
||||
if (empty($this->include_modules))
|
||||
{
|
||||
$obj->mid = $this->module_info->mid;
|
||||
$obj->module_srl = $this->module_info->module_srl;
|
||||
}
|
||||
else
|
||||
{
|
||||
$obj->module_srl = $this->include_modules;
|
||||
}
|
||||
$obj->list_count = 10000;
|
||||
$output = TagModel::getInstance()->getTagList($obj);
|
||||
$output = TagModel::getTagList($obj);
|
||||
|
||||
// automatically order
|
||||
if(count($output->data))
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@
|
|||
<condition operation="in" column="T.module_srl" var="module_srl" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="count" default="count" order="desc" />
|
||||
<index var="sort_index" default="count" order="order_type" order-default="desc" />
|
||||
<index var="count" order="desc" comment="For backward compatibility only" />
|
||||
<list_count var="list_count" default="20" />
|
||||
</navigation>
|
||||
<groups>
|
||||
|
|
|
|||
|
|
@ -83,28 +83,20 @@ class TagModel extends Tag
|
|||
* @brief Imported Tag List
|
||||
* Many of the specified module in order to extract the number of tags
|
||||
*/
|
||||
function getTagList($obj)
|
||||
public static function getTagList($obj)
|
||||
{
|
||||
if($obj->mid)
|
||||
if(!empty($obj->mid))
|
||||
{
|
||||
$oModuleModel = getModel('module');
|
||||
$obj->module_srl = $oModuleModel->getModuleSrlByMid($obj->mid);
|
||||
$obj->module_srl = ModuleModel::getModuleSrlByMid($obj->mid);
|
||||
unset($obj->mid);
|
||||
}
|
||||
|
||||
// Module_srl passed the array may be a check whether the array
|
||||
$args = new stdClass;
|
||||
if(is_array($obj->module_srl))
|
||||
{
|
||||
$args->module_srl = implode(',', $obj->module_srl);
|
||||
}
|
||||
else
|
||||
{
|
||||
$args->module_srl = $obj->module_srl;
|
||||
}
|
||||
|
||||
$args->module_srl = $obj->module_srl;
|
||||
$args->list_count = $obj->list_count ?? null;
|
||||
$args->count = $obj->sort_index ?? null;
|
||||
$args->sort_index = $obj->sort_index ?? null;
|
||||
$args->order_type = $obj->order_type ?? null;
|
||||
|
||||
$output = executeQueryArray('tag.getTagList', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue