mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
*_documents 테이블의 extra_vars필드를 활용하기 위한 수정
- extra_vars필드 값 설정 반영하도록 (글 추가/수정시) - queries/insertDocument.xml, queries/updateDocument.xml 에서 extra_vars필드 추가. - documentItem::getExtraVarsValue() 추가 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3126 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5ebbd79d36
commit
71554ee2d8
4 changed files with 23 additions and 9 deletions
|
|
@ -66,7 +66,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 문서의 권한 부여
|
||||
* @brief 문서의 권한 부여
|
||||
* 세션값으로 현 접속상태에서만 사용 가능
|
||||
**/
|
||||
function addGrant($document_srl) {
|
||||
|
|
@ -91,7 +91,10 @@
|
|||
if($obj->lock_comment!='Y') $obj->lock_comment = 'N';
|
||||
if($obj->allow_trackback!='Y') $obj->allow_trackback = 'N';
|
||||
if($obj->homepage && !eregi('^http:\/\/',$obj->homepage)) $obj->homepage = 'http://'.$obj->homepage;
|
||||
if($obj->notify_message != "Y") $obj->notify_message = "N";
|
||||
if($obj->notify_message != 'Y') $obj->notify_message = 'N';
|
||||
|
||||
// $extra_vars를 serialize
|
||||
$obj->extra_vars = serialize($obj->extra_vars);
|
||||
|
||||
// 자동저장용 필드 제거
|
||||
unset($obj->_saved_doc_srl);
|
||||
|
|
@ -180,7 +183,10 @@
|
|||
if($obj->lock_comment!='Y') $obj->lock_comment = 'N';
|
||||
if($obj->allow_trackback!='Y') $obj->allow_trackback = 'N';
|
||||
if($obj->homepage && !eregi('^http:\/\/',$obj->homepage)) $obj->homepage = 'http://'.$obj->homepage;
|
||||
if($obj->notify_message != "Y") $obj->notify_message = "N";
|
||||
if($obj->notify_message != 'Y') $obj->notify_message = 'N';
|
||||
|
||||
// $extra_vars를 serialize
|
||||
$obj->extra_vars = serialize($obj->extra_vars);
|
||||
|
||||
// 자동저장용 필드 제거
|
||||
unset($obj->_saved_doc_srl);
|
||||
|
|
@ -520,7 +526,7 @@
|
|||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* @brief 카테고리에 문서의 숫자를 변경
|
||||
**/
|
||||
function updateCategoryCount($module_srl, $category_srl, $document_count = 0) {
|
||||
|
|
@ -618,7 +624,7 @@
|
|||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* @brief 카테고리를 아래로 이동
|
||||
**/
|
||||
function moveCategoryDown($category_srl) {
|
||||
|
|
@ -698,7 +704,7 @@
|
|||
// 캐시 파일의 이름을 지정
|
||||
$xml_file = sprintf("./files/cache/document_category/%s.xml.php", $module_srl);
|
||||
|
||||
// DB에서 module_srl 에 해당하는 카테고리 목록을 listorder순으로 구해옴
|
||||
// DB에서 module_srl 에 해당하는 카테고리 목록을 listorder순으로 구해옴
|
||||
$oDocumentModel = &getModel('document');
|
||||
$list = $oDocumentModel->getCategoryList($module_srl);
|
||||
|
||||
|
|
@ -752,12 +758,12 @@
|
|||
// 자식 노드의 데이터 가져옴
|
||||
if($category_srl && $tree[$category_srl]) $child_buff = $this->getXmlTree($tree[$category_srl], $tree);
|
||||
|
||||
// 변수 정리
|
||||
// 변수 정리
|
||||
$title = str_replace(array('&','"','<','>'),array('&','"','<','>'),$node->title);
|
||||
$expand = $node->expand;
|
||||
$group_srls = $node->group_srls;
|
||||
|
||||
// node->group_srls값이 있으면
|
||||
// node->group_srls값이 있으면
|
||||
if($group_srls) $group_check_code = sprintf('($_SESSION["is_admin"]==true||(is_array($_SESSION["group_srls"])&&count(array_intersect($_SESSION["group_srls"], array(%s)))))',$group_srls);
|
||||
else $group_check_code = "true";
|
||||
|
||||
|
|
@ -770,7 +776,7 @@
|
|||
$expand,
|
||||
$node->document_count
|
||||
);
|
||||
|
||||
|
||||
if($child_buff) $buff .= sprintf('<node %s>%s</node>', $attribute, $child_buff);
|
||||
else $buff .= sprintf('<node %s />', $attribute);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -300,6 +300,12 @@
|
|||
return $val;
|
||||
}
|
||||
|
||||
function getExtraVarsValue($key) {
|
||||
$extra_vals = unserialize($this->get('extra_vars'));
|
||||
$val = $extra_vals->$key;
|
||||
return $val;
|
||||
}
|
||||
|
||||
function getCommentCount() {
|
||||
if(!$this->isGranted() && $this->isSecret()) return 0;
|
||||
return $this->get('comment_count');
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
<column name="email_address" var="email_address" filter="email" maxlength="250" />
|
||||
<column name="homepage" var="homepage" filter="homepage" maxlength="250" />
|
||||
<column name="tags" var="tags" />
|
||||
<column name="extra_vars" var="extra_vars" />
|
||||
<column name="regdate" var="regdate" default="curdate()" />
|
||||
<column name="last_update" var="last_update" default="curdate()" />
|
||||
<column name="ipaddress" var="ipaddress" default="ipaddress()" />
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
<column name="email_address" var="email_address" filter="email" maxlength="250" />
|
||||
<column name="homepage" var="homepage" filter="homepage" maxlength="250" />
|
||||
<column name="tags" var="tags" />
|
||||
<column name="extra_vars" var="extra_vars" />
|
||||
<column name="last_update" var="last_update" default="curdate()" />
|
||||
<column name="ipaddress" var="ipaddress" default="ipaddress()" />
|
||||
<column name="list_order" var="list_order" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue