mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 08:49:56 +09:00
데이터이전 또는 기타 문제로 위키모듈에서 생산된 페이지가 아닌 경우 document alias를 일괄적으로 부여할 수 있는 기능을 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6629 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
02b25cec25
commit
d384d206e7
12 changed files with 44 additions and 2 deletions
|
|
@ -46,7 +46,6 @@
|
|||
function procWikiAdminDeleteWiki() {
|
||||
$module_srl = Context::get('module_srl');
|
||||
|
||||
// 원본을 구해온다
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->deleteModule($module_srl);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
@ -56,5 +55,26 @@
|
|||
$this->setMessage('success_deleted');
|
||||
}
|
||||
|
||||
function procWikiAdminArrangeList() {
|
||||
$oModuleModel = &getModel('module');
|
||||
$oDocumentController = &getController('document');
|
||||
|
||||
// 대상 위키 검증
|
||||
$module_srl = Context::get('module_srl');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
||||
if(!$module_info->module_srl || $module_info->module != 'wiki') return new Object(-1,'msg_invalid_request');
|
||||
|
||||
// 대상 위키의 entry값이 없는 글을 추출
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQueryArray('wiki.getDocumentWithoutAlias', $args);
|
||||
if(!$output->toBool() || !$output->data) return new Object();
|
||||
|
||||
foreach($output->data as $key => $val) {
|
||||
if($val->alias_srl) continue;
|
||||
$result = $oDocumentController->insertAlias($module_srl, $val->document_srl, $val->alias_title);
|
||||
if(!$result->toBool()) $oDocumentController->insertAlias($module_srl, $val->document_srl, $val->alias_title.'_'.$val->document_srl);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue