From 4d5ecbdc6e0901498f43ee30ab71af7614e56498 Mon Sep 17 00:00:00 2001 From: ovclas Date: Mon, 27 Aug 2012 01:18:58 +0000 Subject: [PATCH] issue 2219 add count method by extra vars in model git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3.2@11085 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/document/document.model.php | 17 +++++++++++ .../queries/getDocumentExtraVarsCount.xml | 29 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 modules/document/queries/getDocumentExtraVarsCount.xml 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 @@ + + + + +
+
+ + + + + + + + + + + + + + + + + +
+
+ + + +