merge from 1.7.3.5(r13153:r13167)

git-svn-id: http://xe-core.googlecode.com/svn/trunk@13168 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2013-09-29 23:32:39 +00:00
parent cc47d2b247
commit 2d3f149b5a
2042 changed files with 129266 additions and 126243 deletions

View file

@ -1,86 +1,92 @@
<?php
/**
* @class tagModel
* @author NHN (developers@xpressengine.com)
* @brief tag model class of the module
**/
/**
* @class tagModel
* @author NHN (developers@xpressengine.com)
* @brief tag model class of the module
*/
class tagModel extends tag
{
/**
* @brief Initialization
*/
function init()
{
}
class tagModel extends tag {
/**
* @brief Initialization
**/
function init() {
}
/**
* @brief Imported Tag List
* Many of the specified module in order to extract the number of tags
**/
function getTagList($obj) {
if($obj->mid) {
$oModuleModel = &getModel('module');
$obj->module_srl = $oModuleModel->getModuleSrlByMid($obj->mid);
unset($obj->mid);
}
// Module_srl passed the array may be a check whether the array
if(is_array($obj->module_srl)) $args->module_srl = implode(',', $obj->module_srl);
else $args->module_srl = $obj->module_srl;
$args->list_count = $obj->list_count;
$args->count = $obj->sort_index;
$output = executeQueryArray('tag.getTagList', $args);
if(!$output->toBool()) return $output;
return $output;
}
/**
* @brief document_srl the import tag
**/
function getDocumentSrlByTag($obj){
if(is_array($obj->module_srl)) $args->module_srl = implode(',', $obj->module_srl);
else $args->module_srl = $obj->module_srl;
$args->tag = $obj->tag;
$output = executeQueryArray('tag.getDocumentSrlByTag', $args);
if(!$output->toBool()) return $output;
return $output;
/**
* @brief Imported Tag List
* Many of the specified module in order to extract the number of tags
*/
function getTagList($obj)
{
if($obj->mid)
{
$oModuleModel = &getModel('module');
$obj->module_srl = $oModuleModel->getModuleSrlByMid($obj->mid);
unset($obj->mid);
}
// Module_srl passed the array may be a check whether the array
if(is_array($obj->module_srl)) $args->module_srl = implode(',', $obj->module_srl);
else $args->module_srl = $obj->module_srl;
$args->list_count = $obj->list_count;
$args->count = $obj->sort_index;
/**
* @brief document used in the import tag
**/
function getDocumentsTagList($obj){
if(is_array($obj->document_srl)) $args->document_srl = implode(',', $obj->document_srl);
else $args->document_srl = $obj->document_srl;
$output = executeQueryArray('tag.getTagList', $args);
if(!$output->toBool()) return $output;
$output = executeQueryArray('tag.getDocumentsTagList', $args);
if(!$output->toBool()) return $output;
return $output;
}
return $output;
/**
* @brief document_srl the import tag
*/
function getDocumentSrlByTag($obj)
{
if(is_array($obj->module_srl)) $args->module_srl = implode(',', $obj->module_srl);
else $args->module_srl = $obj->module_srl;
$args->tag = $obj->tag;
$output = executeQueryArray('tag.getDocumentSrlByTag', $args);
if(!$output->toBool()) return $output;
return $output;
}
/**
* @brief document used in the import tag
*/
function getDocumentsTagList($obj)
{
if(is_array($obj->document_srl)) $args->document_srl = implode(',', $obj->document_srl);
else $args->document_srl = $obj->document_srl;
$output = executeQueryArray('tag.getDocumentsTagList', $args);
if(!$output->toBool()) return $output;
return $output;
}
/**
* @brief Tag is used with a particular tag list
*/
function getTagWithUsedList($obj)
{
if(is_array($obj->module_srl)) $args->module_srl = implode(',', $obj->module_srl);
else $args->module_srl = $obj->module_srl;
$args->tag = $obj->tag;
$output = $this->getDocumentSrlByTag($args);
$document_srl = array();
if($output->data)
{
foreach($output->data as $k => $v) $document_srl[] = $v->document_srl;
}
/**
* @brief Tag is used with a particular tag list
**/
function getTagWithUsedList($obj){
if(is_array($obj->module_srl)) $args->module_srl = implode(',', $obj->module_srl);
else $args->module_srl = $obj->module_srl;
$args->tag = $obj->tag;
$output = $this->getDocumentSrlByTag($args);
$document_srl = array();
if($output->data){
foreach($output->data as $k => $v) $document_srl[] = $v->document_srl;
}
unset($args);
$args->document_srl = $document_srl;
$output = $this->getDocumentsTagList($args);
return $output;
}
}
?>
unset($args);
$args->document_srl = $document_srl;
$output = $this->getDocumentsTagList($args);
return $output;
}
}
/* End of file tag.model.php */
/* Location: ./modules/tag/tag.model.php */