diff --git a/modules/document/document.model.php b/modules/document/document.model.php index b2271aa6c..1d3bdff9b 100644 --- a/modules/document/document.model.php +++ b/modules/document/document.model.php @@ -532,6 +532,23 @@ return $output->data; } + + function getDocumentExtraVarsCount($module_srl, $search_obj = NULL) + { + // Additional search options + $args->module_srl = $module_srl; + + $args->category_srl = $search_obj->category_srl; + $args->var_idx = $search_obj->s_var_idx; + $args->var_eid = $search_obj->s_var_eid; + $args->var_value = $search_obj->s_var_value; + + $output = executeQuery('document.getDocumentExtraVarsCount', $args); + // Return total number of + $total_count = $output->data->count; + return (int)$total_count; + } + /** * Import page of the document, module_srl Without throughout .. * @param documentItem $oDocument diff --git a/modules/document/queries/getDocumentExtraVarsCount.xml b/modules/document/queries/getDocumentExtraVarsCount.xml new file mode 100644 index 000000000..1faf3f9ab --- /dev/null +++ b/modules/document/queries/getDocumentExtraVarsCount.xml @@ -0,0 +1,29 @@ + + + + +
+
+ + + + + + + + + + + + + + + + + +
+
+ + + +