mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
글 수정시 원문의 언어 값만 가져오는 다국어 지원 문제 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5853 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
af03f53741
commit
da182d7b8b
2 changed files with 20 additions and 15 deletions
|
|
@ -12,26 +12,27 @@
|
|||
|
||||
var $allow_trackback_status = null;
|
||||
|
||||
function documentItem($document_srl = 0) {
|
||||
function documentItem($document_srl = 0, $load_extra_vars = true) {
|
||||
$this->document_srl = $document_srl;
|
||||
$this->_loadFromDB();
|
||||
|
||||
$this->_loadFromDB($load_extra_vars);
|
||||
}
|
||||
|
||||
function setDocument($document_srl) {
|
||||
function setDocument($document_srl, $load_extra_vars = true) {
|
||||
$this->document_srl = $document_srl;
|
||||
$this->_loadFromDB();
|
||||
$this->_loadFromDB($load_extra_vars);
|
||||
}
|
||||
|
||||
function _loadFromDB() {
|
||||
function _loadFromDB($load_extra_vars=true) {
|
||||
if(!$this->document_srl) return;
|
||||
|
||||
$args->document_srl = $this->document_srl;
|
||||
$output = executeQuery('document.getDocument', $args);
|
||||
|
||||
$this->setAttribute($output->data);
|
||||
$this->setAttribute($output->data,$load_extra_vars);
|
||||
}
|
||||
|
||||
function setAttribute($attribute) {
|
||||
function setAttribute($attribute,$load_extra_vars=true) {
|
||||
if(!$attribute->document_srl) {
|
||||
$this->document_srl = null;
|
||||
return;
|
||||
|
|
@ -47,6 +48,10 @@
|
|||
for($i=0;$i<$tag_count;$i++) if(trim($tags[$i])) $tag_list[] = trim($tags[$i]);
|
||||
$this->add('tag_list', $tag_list);
|
||||
}
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$GLOBALS['XE_DOCUMENT_LIST'][$this->document_srl] = $this;
|
||||
if($load_extra_vars) $oDocumentModel->setToAllDocumentExtraVars();
|
||||
}
|
||||
|
||||
function isExists() {
|
||||
|
|
|
|||
|
|
@ -77,13 +77,13 @@
|
|||
if(!$document_srl) return new documentItem();
|
||||
|
||||
if(!isset($GLOBALS['XE_DOCUMENT_LIST'][$document_srl])) {
|
||||
$oDocument = new documentItem($document_srl);
|
||||
$oDocument = new documentItem($document_srl, true);
|
||||
$GLOBALS['XE_DOCUMENT_LIST'][$document_srl] = $oDocument;
|
||||
$this->setToAllDocumentExtraVars();
|
||||
} else $oDocument = $GLOBALS['XE_DOCUMENT_LIST'][$document_srl];
|
||||
if($is_admin) $oDocument->setGrant();
|
||||
}
|
||||
if($is_admin) $GLOBALS['XE_DOCUMENT_LIST'][$document_srl]->setGrant();
|
||||
|
||||
return $oDocument;
|
||||
return $GLOBALS['XE_DOCUMENT_LIST'][$document_srl];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -110,7 +110,7 @@
|
|||
if(!$attribute->document_srl) continue;
|
||||
$oDocument = null;
|
||||
$oDocument = new documentItem();
|
||||
$oDocument->setAttribute($attribute);
|
||||
$oDocument->setAttribute($attribute, false);
|
||||
if($is_admin) $oDocument->setGrant();
|
||||
|
||||
$result[$attribute->document_srl] = $oDocument;
|
||||
|
|
@ -347,7 +347,7 @@
|
|||
$document_srl = $attribute->document_srl;
|
||||
$oDocument = null;
|
||||
$oDocument = new documentItem();
|
||||
$oDocument->setAttribute($attribute);
|
||||
$oDocument->setAttribute($attribute, false);
|
||||
if($is_admin) $oDocument->setGrant();
|
||||
|
||||
$GLOBALS['XE_DOCUMENT_LIST'][$attribute->document_srl] = $oDocument;
|
||||
|
|
@ -384,7 +384,7 @@
|
|||
if(!$val->document_srl) continue;
|
||||
$oDocument = null;
|
||||
$oDocument = new documentItem();
|
||||
$oDocument->setAttribute($val);
|
||||
$oDocument->setAttribute($val, false);
|
||||
$GLOBALS['XE_DOCUMENT_LIST'][$val->document_srl] = $oDocument;
|
||||
$result->data[$val->document_srl] = $oDocument;
|
||||
}
|
||||
|
|
@ -414,7 +414,7 @@
|
|||
**/
|
||||
function getExtraVars($module_srl, $document_srl) {
|
||||
if(!isset($GLOBALS['XE_EXTRA_VARS'][$document_srl])) {
|
||||
$oDocument = $this->getDocument($document_srl);
|
||||
$oDocument = $this->getDocument($document_srl, false);
|
||||
$GLOBALS['XE_DOCUMENT_LIST'][$document_srl] = $oDocument;
|
||||
$this->setToAllDocumentExtraVars();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue