Added getDocumentSrlByTitle query in document module.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10035 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ucorina 2012-01-19 13:18:45 +00:00
parent d561328cdf
commit ce8d3e6e7d
2 changed files with 24 additions and 0 deletions

View file

@ -901,6 +901,16 @@
else return $output->data->document_srl;
}
function getDocumentSrlByTitle($module_srl, $title)
{
if(!$module_srl || !$title) return null;
$args->module_srl = $module_srl;
$args->title = $title;
$output = executeQuery('document.getDocumentSrlByTitle', $args);
if(!$output->data) return null;
else return $output->data->document_srl;
}
function getAlias($document_srl){
if(!$document_srl) return null;
$args->document_srl = $document_srl;

View file

@ -0,0 +1,14 @@
<query id="getDocumentSrlByAlias" action="select">
<tables>
<table name="documents" />
<table name="modules" />
</tables>
<columns>
<column name="document_srl" />
</columns>
<conditions>
<condition operation="equal" column="title" var="title" notnull="notnull" />
<condition operation="equal" column="modules.module_srl" var="module_srl" notnull="notnull" pipe="and" />
<condition operation="equal" column="modules.module_srl" var="documents.module_srl" filter="number" notnull="notnull" pipe="and" />
</conditions>
</query>