mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
for textyle
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6392 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ef4c2d4166
commit
7032dc073e
5 changed files with 139 additions and 2 deletions
|
|
@ -292,6 +292,9 @@
|
|||
$obj->homepage = $source_obj->get('homepage');
|
||||
}
|
||||
|
||||
|
||||
if(!$obj->content) $obj->content = $source_obj->get('content');
|
||||
|
||||
// 내용에서 XE만의 태그를 삭제
|
||||
$obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content);
|
||||
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@
|
|||
**/
|
||||
function getDocumentList($obj, $except_notice = false) {
|
||||
// 정렬 대상과 순서 체크
|
||||
if(!in_array($obj->sort_index, array('list_order','regdate','last_update','update_order','readed_count','voted_count','comment_count','trackback_count','uploaded_count','title'))) $obj->sort_index = 'list_order';
|
||||
if(!in_array($obj->sort_index, array('list_order','regdate','last_update','update_order','readed_count','voted_count','comment_count','trackback_count','uploaded_count','title','category_srl'))) $obj->sort_index = 'list_order';
|
||||
if(!in_array($obj->order_type, array('desc','asc'))) $obj->order_type = 'asc';
|
||||
|
||||
// module_srl 대신 mid가 넘어왔을 경우는 직접 module_srl을 구해줌
|
||||
|
|
@ -831,8 +831,8 @@
|
|||
$category_xml_file = $this->getCategoryXmlFile($module_srl);
|
||||
|
||||
Context::set('category_xml_file', $category_xml_file);
|
||||
Context::addJsFile('./common/js/tree_menu.js');
|
||||
|
||||
Context::loadJavascriptPlugin('ui.tree');
|
||||
// grant 정보를 추출
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($this->module_path.'tpl', 'category_list');
|
||||
|
|
@ -910,6 +910,15 @@
|
|||
else return $output->data->document_srl;
|
||||
}
|
||||
|
||||
function getAlias($document_srl){
|
||||
if(!$document_srl) return null;
|
||||
$args->document_srl = $document_srl;
|
||||
$output = executeQueryArray('document.getAliases', $args);
|
||||
|
||||
if(!$output->data) return null;
|
||||
else return $output->data[0]->alias_title;
|
||||
}
|
||||
|
||||
function getHistories($document_srl, $list_count, $page)
|
||||
{
|
||||
$args->list_count = $list_count;
|
||||
|
|
@ -925,5 +934,84 @@
|
|||
$output = executeQuery('document.getHistory', $args);
|
||||
return $output->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief module_srl값을 가지는 문서의 목록을 가져옴
|
||||
**/
|
||||
function getTrashList($obj) {
|
||||
|
||||
// 변수 체크
|
||||
$args->category_srl = $obj->category_srl?$obj->category_srl:null;
|
||||
$args->sort_index = $obj->sort_index;
|
||||
$args->order_type = $obj->order_type?$obj->order_type:'desc';
|
||||
$args->page = $obj->page?$obj->page:1;
|
||||
$args->list_count = $obj->list_count?$obj->list_count:20;
|
||||
$args->page_count = $obj->page_count?$obj->page_count:10;
|
||||
|
||||
|
||||
// 검색 옵션 정리
|
||||
$search_target = $obj->search_target;
|
||||
$search_keyword = $obj->search_keyword;
|
||||
if($search_target && $search_keyword) {
|
||||
switch($search_target) {
|
||||
case 'title' :
|
||||
case 'content' :
|
||||
if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
|
||||
$args->{"s_".$search_target} = $search_keyword;
|
||||
$use_division = true;
|
||||
break;
|
||||
case 'title_content' :
|
||||
if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
|
||||
$args->s_title = $search_keyword;
|
||||
$args->s_content = $search_keyword;
|
||||
break;
|
||||
case 'user_id' :
|
||||
if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
|
||||
$args->s_user_id = $search_keyword;
|
||||
$args->sort_index = 'documents.'.$args->sort_index;
|
||||
break;
|
||||
case 'user_name' :
|
||||
case 'nick_name' :
|
||||
case 'email_address' :
|
||||
case 'homepage' :
|
||||
if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
|
||||
$args->{"s_".$search_target} = $search_keyword;
|
||||
break;
|
||||
case 'is_notice' :
|
||||
case 'is_secret' :
|
||||
if($search_keyword=='N') $args->{"s_".$search_target} = 'N';
|
||||
elseif($search_keyword=='Y') $args->{"s_".$search_target} = 'Y';
|
||||
else $args->{"s_".$search_target} = '';
|
||||
break;
|
||||
case 'member_srl' :
|
||||
case 'readed_count' :
|
||||
case 'voted_count' :
|
||||
case 'comment_count' :
|
||||
case 'trackback_count' :
|
||||
case 'uploaded_count' :
|
||||
$args->{"s_".$search_target} = (int)$search_keyword;
|
||||
break;
|
||||
case 'regdate' :
|
||||
case 'last_update' :
|
||||
case 'ipaddress' :
|
||||
case 'tag' :
|
||||
$args->{"s_".$search_target} = $search_keyword;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$output = executeQueryArray('document.getTrashList', $args);
|
||||
if($output->data){
|
||||
foreach($output->data as $key => &$attribute) {
|
||||
$oDocument = null;
|
||||
$oDocument = new documentItem();
|
||||
$oDocument->setAttribute($attribute, false);
|
||||
$attribute = $oDocument;
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
12
modules/document/queries/getDocumentTags.xml
Normal file
12
modules/document/queries/getDocumentTags.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="getDocumentTags" action="select">
|
||||
<tables>
|
||||
<table name="documents" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="document_srl" />
|
||||
<column name="tags" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="in" column="document_srl" var="document_srls" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -19,6 +19,29 @@
|
|||
<condition operation="equal" column="document_trash.document_srl" default="documents.document_srl" notnull="notnull" />
|
||||
<condition operation="in" column="document_trash.module_srl" var="module_srl" filter="number" pipe="and" />
|
||||
<condition operation="equal" column="document_trash.member_srl" var="member_srl" filter="number" pipe="and" />
|
||||
|
||||
<group pipe="and">
|
||||
<condition operation="like" column="documents.title" var="s_title" />
|
||||
<condition operation="like" column="documents.content" var="s_content" pipe="or" />
|
||||
<condition operation="like" column="documents.user_name" var="s_user_name" pipe="or" />
|
||||
<condition operation="like" column="documents.user_id" var="s_user_id" pipe="or" />
|
||||
<condition operation="like" column="documents.nick_name" var="s_nick_name" pipe="or" />
|
||||
<condition operation="like" column="documents.email_address" var="s_email_addres" pipe="or" />
|
||||
<condition operation="like" column="documents.homepage" var="s_homepage" pipe="or" />
|
||||
<condition operation="like" column="documents.tags" var="s_tags" pipe="or" />
|
||||
<condition operation="equal" column="documents.is_secret" var="s_is_secret" pipe="or" />
|
||||
<condition operation="equal" column="documents.member_srl" var="s_member_srl" pipe="or" />
|
||||
<condition operation="more" column="documents.readed_count" var="s_readed_count" pipe="or" />
|
||||
<condition operation="more" column="documents.voted_count" var="s_voted_count" pipe="or" />
|
||||
<condition operation="more" column="documents.comment_count" var="s_comment_count" pipe="or" />
|
||||
<condition operation="more" column="documents.trackback_count" var="s_trackback_count" pipe="or" />
|
||||
<condition operation="more" column="documents.uploaded_count" var="s_uploaded_count" pipe="or" />
|
||||
<condition operation="like_prefix" column="documents.regdate" var="s_regdate" pipe="or" />
|
||||
<condition operation="like_prefix" column="documents.last_update" var="s_last_update" pipe="or" />
|
||||
<condition operation="like_prefix" column="documents.ipaddress" var="s_ipaddress" pipe="or" />
|
||||
</group>
|
||||
|
||||
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="documents.list_order" order="order_type" />
|
||||
|
|
|
|||
11
modules/document/queries/updateDocumentTags.xml
Normal file
11
modules/document/queries/updateDocumentTags.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="updateDocumentTags" action="update">
|
||||
<tables>
|
||||
<table name="documents" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="tags" var="tags" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
Loading…
Add table
Add a link
Reference in a new issue