mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-12 05:22:35 +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
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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