mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
데이터 이전 모듈에서 분류와 글의 개수를 바꾸어주는 코드 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3985 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
a93ecc8f9e
commit
fa0d5a885f
2 changed files with 7 additions and 2 deletions
|
|
@ -397,6 +397,7 @@
|
|||
$this->oXmlParser = new XmlParser();
|
||||
|
||||
// 타겟 모듈의 카테고리 정보 구함
|
||||
$oDocumentController = &getController('document');
|
||||
$oDocumentModel = &getModel('document');
|
||||
$category_list = $category_titles = array();
|
||||
$category_list = $oDocumentModel->getCategoryList($module_srl);
|
||||
|
|
@ -413,7 +414,6 @@
|
|||
$categories = $xmlDoc->items->category;
|
||||
if($categories) {
|
||||
if(!is_array($categories)) $categories = array($categories);
|
||||
$oDocumentController = &getController('document');
|
||||
$match_sequence = array();
|
||||
foreach($categories as $k => $v) {
|
||||
$category = trim(base64_decode($v->body));
|
||||
|
|
@ -563,6 +563,9 @@
|
|||
|
||||
fclose($f);
|
||||
|
||||
// 카테고리별 개수 동기화
|
||||
if(count($category_list)) foreach($category_list as $key => $val) $oDocumentController->updateCategoryCount($module_srl, $val->category_srl);
|
||||
|
||||
return $idx-1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
$this->oXmlParser = new XmlParser();
|
||||
|
||||
// 타겟 모듈의 카테고리 정보 구함
|
||||
$oDocumentController = &getController('document');
|
||||
$oDocumentModel = &getModel('document');
|
||||
$category_list = $category_titles = array();
|
||||
$category_list = $oDocumentModel->getCategoryList($module_srl);
|
||||
|
|
@ -38,7 +39,6 @@
|
|||
$categories = array();
|
||||
$idx = 0;
|
||||
$this->arrangeCategory($xmlDoc->items, $categories, $idx, 0);
|
||||
$oDocumentController = &getController('document');
|
||||
|
||||
$match_sequence = array();
|
||||
foreach($categories as $k => $v) {
|
||||
|
|
@ -244,6 +244,8 @@
|
|||
|
||||
fclose($f);
|
||||
|
||||
if(count($category_list)) foreach($category_list as $key => $val) $oDocumentController->updateCategoryCount($module_srl, $val->category_srl);
|
||||
|
||||
return $idx-1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue