git-svn-id: http://xe-core.googlecode.com/svn/trunk@482 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-03-16 04:18:44 +00:00
parent ea86e795ff
commit 8c7fcfe176
4 changed files with 30 additions and 7 deletions

View file

@ -23,10 +23,12 @@
* DBMS에 맞게 replace 해주어야 한다
**/
var $column_type = array(
'bignumber' => 'bigint',
'number' => 'int',
'varchar' => 'varchar',
'char' => 'char',
'text' => 'text',
'bigtext' => 'longtext',
'date' => 'varchar(14)',
);

View file

@ -105,10 +105,8 @@
// 글이 찾아졌으면 댓글 권한과 허용 여부를 체크하여 댓글 에디터 세팅
} elseif($this->grant->write_comment && $document->allow_comment == 'Y' && $document->lock_comment != 'Y') {
// 에디터 모듈의 dispEditor를 호출하여 세팅
$oEditorView = &getView('editor');
$comment_editor = $oEditorView->getEditor($comment_srl);
Context::set('comment_editor', $comment_editor);
// 댓글
$this->setCommentEditor();
}
Context::set('document', $document);
@ -191,7 +189,7 @@
// 에디터 모듈의 dispEditor를 호출하여 세팅
$oEditorView = &getView('editor');
$editor = $oEditorView->getEditor($document_srl);
$editor = $oEditorView->getEditor($document_srl, $this->grant->fileupload);
Context::set('editor', $editor);
$this->setTemplateFile('write_form');
@ -257,6 +255,9 @@
Context::set('comment_srl',NULL);
Context::set('source_comment',$source_comment);
// 댓글 에디터 세팅
$this->setCommentEditor();
$this->setTemplateFile('comment_form');
}
@ -292,6 +293,9 @@
Context::set('comment_srl',$comment_srl);
Context::set('comment', $comment);
// 댓글 에디터 세팅
$this->setCommentEditor($comment_srl);
$this->setTemplateFile('comment_form');
}
@ -447,6 +451,23 @@
$this->setTemplateFile($oRssView->getTemplateFile());
}
/**
* @brief 댓글의 editor 세팅
* 댓글의 경우 수정하는 경우가 아니라면 고유값이 없음.\n
* 따라서 고유값이 없을 경우 고유값을 가져와서 지정해 주어야
**/
function setCommentEditor($comment_srl=0) {
if(!$comment_srl) {
$oDB = &DB::getNextSequence();
$comment_srl = $oDB->getNextSequence();
}
// 에디터 모듈의 dispEditor를 호출하여 세팅
$oEditorView = &getView('editor');
$comment_editor = $oEditorView->getEditor($comment, $this->grant->fileupload);
Context::set('comment_editor', $comment_editor);
}
/**
* @brief 게시판 관리 목록 보여줌
**/

View file

@ -5,7 +5,7 @@
<column name="is_notice" type="char" size="1" default="N" notnull="notnull" index="idx_is_notice" />
<column name="is_secret" type="char" size="1" default="N" notnull="notnull" index="idx_is_secret" />
<column name="title" type="varchar" size="250" />
<column name="content" type="text" notnull="notnull" />
<column name="content" type="bigtext" notnull="notnull" />
<column name="readed_count" type="number" size="11" default="0" notnull="notnull" index="idx_readed_count" />
<column name="voted_count" type="number" size="11" default="0" notnull="notnull" index="idx_voted_count" />
<column name="comment_count" type="number" size="11" default="0" notnull="notnull" index="idx_comment_count" />

View file

@ -1,3 +1,3 @@
<table name="sequence">
<column name="seq" type="number" size="1" notnull="notnull" primary_key="primary_key" auto_increment="auto_increment" />
<column name="seq" type="bignumber" notnull="notnull" primary_key="primary_key" auto_increment="auto_increment" />
</table>