diff --git a/modules/install/install.controller.php b/modules/install/install.controller.php
index 3e680fd02..43a637514 100644
--- a/modules/install/install.controller.php
+++ b/modules/install/install.controller.php
@@ -145,6 +145,7 @@
'./files/cache/js_filter_compiled',
'./files/cache/template_compiled',
'./files/cache/module_info',
+ './files/cache/layout',
'./files/attach',
'./files/attach/images',
'./files/attach/binaries',
diff --git a/modules/layout/lang/ko.lang.php b/modules/layout/lang/ko.lang.php
index 68d980bb0..ea8804358 100644
--- a/modules/layout/lang/ko.lang.php
+++ b/modules/layout/lang/ko.lang.php
@@ -5,6 +5,7 @@
* @brief 레이아웃(layout) 모듈의 기본 언어팩
**/
+ $lang->layout = '레이아웃';
$lang->layout_name = '레이아웃 이름';
$lang->menu_count = '메뉴의 수';
$lang->menu_management = '메뉴 관리';
diff --git a/modules/layout/layout.controller.php b/modules/layout/layout.controller.php
index f4749e4ac..1c971b6d6 100644
--- a/modules/layout/layout.controller.php
+++ b/modules/layout/layout.controller.php
@@ -23,7 +23,8 @@
$args->layout = Context::get('layout');
$args->title = Context::get('title');
- $oDB->executeQuery("layout.insertLayout", $args);
+ $output = $oDB->executeQuery("layout.insertLayout", $args);
+ if(!$output->toBool()) return $output;
$this->add('layout_srl', $args->layout_srl);
}
diff --git a/modules/layout/layout.model.php b/modules/layout/layout.model.php
index 3a457906f..291538dde 100644
--- a/modules/layout/layout.model.php
+++ b/modules/layout/layout.model.php
@@ -25,6 +25,18 @@
return array($output->data);
}
+ /**
+ * @brief DB 에 생성된 한개의 레이아웃 정보를 구함
+ **/
+ function getLayout($layout_srl) {
+ $oDB = &DB::getInstance();
+ $args->layout_srl = $layout_srl;
+ $output = $oDB->executeQuery('layout.getLayout', $args);
+ if(!$output->data) return;
+
+ return $output->data;
+ }
+
/**
* @brief 레이아웃의 경로를 구함
**/
@@ -71,7 +83,7 @@
/**
* @brief 모듈의 conf/info.xml 을 읽어서 정보를 구함
**/
- function getLayoutInfoXml($layout) {
+ function getLayoutInfoXml($layout, $layout_srl = 0) {
// 요청된 모듈의 경로를 구한다. 없으면 return
$layout_path = $this->getLayoutPath($layout);
if(!$layout_path) return;
@@ -121,6 +133,11 @@
$obj->id = $item->attrs->id;
$obj->name = $item->name->body;
$obj->maxdepth = $item->maxdepth->body;
+ $obj->xml_file = sprintf("./files/cache/layout/%s_%s.xml", $layout_srl, $obj->id);
+ if($layout_srl && !file_exists($obj->xml_file)) {
+ $buff = "
| {$lang->no} | -{$lang->layout_name} | +{$lang->layout} | +{$lang->title} | {$lang->regdate} | {$lang->cmd_delete} | |
|---|---|---|---|---|---|---|
| {$no} | -{$val->layout_name} | +{$no+1} | +{$val->layout} | +{$val->title} | {zdate($val->regdate,"Y-m-d")} | {$lang->cmd_delete} |
| + | ||||||
| {$lang->layout_name} | -{$info->title} ver {$info->version} ({$layout}) | +{$layout_info->title} ver {$layout_info->version} ({$layout}) | ||||
| {$lang->author} | -{$info->author->name} | +{$layout_info->author->name} | ||||
| {$lang->description} | -{nl2br($info->author->description)} | +{nl2br($layout_info->author->description)} | ||||
| @@ -41,7 +41,7 @@ | {$lang->menu_management} | {nl2br($lang->about_menu_management)} | ||||
|
{$val->name} @@ -65,7 +65,7 @@ | ||||||