issue 848 when copy document, extra vars, multi lang shoud be copied too

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10308 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2012-03-05 01:42:11 +00:00
parent 2d755a9620
commit 51c9c66f12
2 changed files with 47 additions and 4 deletions

View file

@ -19,6 +19,18 @@
return $_SESSION['own_document'][$document_srl];
}
function getDocumentExtraVarsFromDB($documentSrls)
{
if(!is_array($documentSrls) || count($documentSrls) == 0)
{
return new Object(-1, 'msg_invalid_request');
}
$args->document_srl = $documentSrls;
$output = executeQueryArray('document.getDocumentExtraVars', $args);
return $output;
}
/**
* @brief extra variables for each article will not be processed bulk select and apply the macro city
**/
@ -36,8 +48,8 @@
// If the document number, return detected
if(!count($document_srls)) return;
// Expand variables mijijeongdoen article about a current visitor to the extension of the language code, the search variable
$obj->document_srl = implode(',',$document_srls);
$output = executeQueryArray('document.getDocumentExtraVars', $obj);
//$obj->document_srl = implode(',',$document_srls);
$output = $this->getDocumentExtraVarsFromDB($document_srls);
if($output->toBool() && $output->data) {
foreach($output->data as $key => $val) {
if(!isset($val->value)) continue;