mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +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;
|
$obj = new stdClass;
|
||||||
if (empty($this->include_modules))
|
if (empty($this->include_modules))
|
||||||
{
|
{
|
||||||
$obj->mid = $this->module_info->mid;
|
$obj->module_srl = $this->module_info->module_srl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$obj->module_srl = $this->include_modules;
|
$obj->module_srl = $this->include_modules;
|
||||||
}
|
}
|
||||||
$obj->list_count = 10000;
|
$obj->list_count = 10000;
|
||||||
$output = TagModel::getInstance()->getTagList($obj);
|
$output = TagModel::getTagList($obj);
|
||||||
|
|
||||||
// automatically order
|
// automatically order
|
||||||
if(count($output->data))
|
if(count($output->data))
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,8 @@
|
||||||
<condition operation="in" column="T.module_srl" var="module_srl" pipe="and" />
|
<condition operation="in" column="T.module_srl" var="module_srl" pipe="and" />
|
||||||
</conditions>
|
</conditions>
|
||||||
<navigation>
|
<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" />
|
<list_count var="list_count" default="20" />
|
||||||
</navigation>
|
</navigation>
|
||||||
<groups>
|
<groups>
|
||||||
|
|
|
||||||
|
|
@ -83,28 +83,20 @@ class TagModel extends Tag
|
||||||
* @brief Imported Tag List
|
* @brief Imported Tag List
|
||||||
* Many of the specified module in order to extract the number of tags
|
* 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 = ModuleModel::getModuleSrlByMid($obj->mid);
|
||||||
$obj->module_srl = $oModuleModel->getModuleSrlByMid($obj->mid);
|
|
||||||
unset($obj->mid);
|
unset($obj->mid);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module_srl passed the array may be a check whether the array
|
// Module_srl passed the array may be a check whether the array
|
||||||
$args = new stdClass;
|
$args = new stdClass;
|
||||||
if(is_array($obj->module_srl))
|
$args->module_srl = $obj->module_srl;
|
||||||
{
|
|
||||||
$args->module_srl = implode(',', $obj->module_srl);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$args->module_srl = $obj->module_srl;
|
|
||||||
}
|
|
||||||
|
|
||||||
$args->list_count = $obj->list_count ?? null;
|
$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);
|
$output = executeQueryArray('tag.getTagList', $args);
|
||||||
if(!$output->toBool()) return $output;
|
if(!$output->toBool()) return $output;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue