mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1288 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
bba149cf72
commit
8547547704
16 changed files with 115 additions and 26 deletions
|
|
@ -353,7 +353,7 @@
|
|||
**/
|
||||
function procBlogAdminInsertBlog() {
|
||||
// 일단 입력된 값들을 모두 받아서 db 입력항목과 그외 것으로 분리
|
||||
$args = Context::gets('module_srl','module_category_srl','blog_name','skin','browser_title','description','is_default','header_text','footer_text','admin_id');
|
||||
$args = Context::gets('module_srl','module_category_srl','blog_name','skin','browser_title','description','is_default','header_text','footer_text','admin_id','open_rss');
|
||||
$args->module = 'blog';
|
||||
$args->mid = $args->blog_name;
|
||||
unset($args->blog_name);
|
||||
|
|
|
|||
|
|
@ -103,8 +103,8 @@
|
|||
Context::set('module_info',$this->module_info);
|
||||
Context::set('layout_info',$this->module_info);
|
||||
|
||||
// rss url 만듬
|
||||
if($this->grant->list) Context::set('rss_url', getUrl('','mid',$this->mid,'act','dispBlogRss'));
|
||||
// rss url
|
||||
if($this->module_info->open_rss != 'N') Context::set('rss_url', getUrl('','mid',$this->mid,'act','dispBoardRss'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -19,6 +19,10 @@
|
|||
<th>{$lang->browser_title}</th>
|
||||
<td>{htmlspecialchars($module_info->browser_title)}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->open_rss}</th>
|
||||
<td>{$lang->open_rss_types[$module_info->open_rss]}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->list_count}</th>
|
||||
<td>{$module_info->list_count?$module_info->list_count:20}</td>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,16 @@
|
|||
<tr>
|
||||
<td>{$lang->about_mid}</td>
|
||||
</tr>
|
||||
<!--@if($module_info->is_default!='Y')-->
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->is_default}</th>
|
||||
<td><input type="checkbox" name="is_default" value="Y" <!--@if($module_info->is_default=='Y')-->checked="true"<!--@end-->/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->about_default}</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->category}</th>
|
||||
<td>
|
||||
|
|
@ -49,6 +59,19 @@
|
|||
<tr>
|
||||
<td>{$lang->about_browser_title}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->open_rss}</th>
|
||||
<td>
|
||||
<select name="open_rss">
|
||||
<!--@foreach($lang->open_rss_types as $key=>$val)-->
|
||||
<option value="{$key}" <!--@if($module_info->open_rss==$key)-->selected="true"<!--@end-->>{$val}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->about_open_rss}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->skin}</th>
|
||||
<td>
|
||||
|
|
@ -77,16 +100,6 @@
|
|||
<td>{$lang->about_page_count}</td>
|
||||
</tr>
|
||||
|
||||
<!--@if($module_info->is_default!='Y')-->
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->is_default}</th>
|
||||
<td><input type="checkbox" name="is_default" value="Y" <!--@if($module_info->is_default=='Y')-->checked="true"<!--@end-->/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->about_default}</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->description}</th>
|
||||
<td><textarea name="description">{htmlspecialchars($module_info->description)}</textarea></td>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
<param name="header_text" target="header_text" />
|
||||
<param name="footer_text" target="footer_text" />
|
||||
<param name="admin_id" target="admin_id" />
|
||||
<param name="open_rss" target="open_rss" />
|
||||
</parameter>
|
||||
<response callback_func="completeInsertBlog">
|
||||
<tag name="error" />
|
||||
|
|
|
|||
|
|
@ -383,7 +383,7 @@
|
|||
function procBoardAdminInsertBoard($args = null) {
|
||||
// 일단 입력된 값들을 모두 받아서 db 입력항목과 그외 것으로 분리
|
||||
if(!$args) {
|
||||
$args = Context::gets('module_srl','module_category_srl','board_name','layout_srl','skin','browser_title','description','is_default','header_text','footer_text','admin_id');
|
||||
$args = Context::gets('module_srl','module_category_srl','board_name','layout_srl','skin','browser_title','description','is_default','header_text','footer_text','admin_id','open_rss');
|
||||
}
|
||||
|
||||
$args->module = 'board';
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@
|
|||
$this->setTemplatePath($template_path);
|
||||
|
||||
// rss url
|
||||
if($this->grant->view) Context::set('rss_url', getUrl('','mid',$this->mid,'act','dispBoardRss'));
|
||||
if($this->module_info->open_rss != 'N') Context::set('rss_url', getUrl('','mid',$this->mid,'act','dispBoardRss'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -33,6 +33,10 @@
|
|||
<th>{$lang->use_category}</th>
|
||||
<td><!--@if($module_info->use_category=='Y')-->{$lang->use}<!--@else-->{$lang->notuse}<!--@end--></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->open_rss}</th>
|
||||
<td>{$lang->open_rss_types[$module_info->open_rss]}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->list_count}</th>
|
||||
<td>{$module_info->list_count?$module_info->list_count:20}</td>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,17 @@
|
|||
<tr>
|
||||
<td>{$lang->about_mid}</td>
|
||||
</tr>
|
||||
|
||||
<!--@if($module_info->is_default!='Y')-->
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->is_default}</th>
|
||||
<td><input type="checkbox" name="is_default" value="Y" <!--@if($module_info->is_default=='Y')-->checked="true"<!--@end-->/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->about_default}</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->category}</th>
|
||||
<td>
|
||||
|
|
@ -42,6 +53,7 @@
|
|||
<tr>
|
||||
<td>{$lang->about_category}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->browser_title}</th>
|
||||
<td><input type="text" name="browser_title" value="{htmlspecialchars($module_info->browser_title)}" /></td>
|
||||
|
|
@ -83,6 +95,19 @@
|
|||
<tr>
|
||||
<td>{$lang->about_use_category}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->open_rss}</th>
|
||||
<td>
|
||||
<select name="open_rss">
|
||||
<!--@foreach($lang->open_rss_types as $key=>$val)-->
|
||||
<option value="{$key}" <!--@if($module_info->open_rss==$key)-->selected="true"<!--@end-->>{$val}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->about_open_rss}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->list_count}</th>
|
||||
<td><input type="text" name="list_count" value="{$module_info->list_count?$module_info->list_count:20}" /></td>
|
||||
|
|
@ -98,16 +123,6 @@
|
|||
<td>{$lang->about_page_count}</td>
|
||||
</tr>
|
||||
|
||||
<!--@if($module_info->is_default!='Y')-->
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->is_default}</th>
|
||||
<td><input type="checkbox" name="is_default" value="Y" <!--@if($module_info->is_default=='Y')-->checked="true"<!--@end-->/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->about_default}</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->description}</th>
|
||||
<td><textarea name="description">{htmlspecialchars($module_info->description)}</textarea></td>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
<param name="header_text" target="header_text" />
|
||||
<param name="footer_text" target="footer_text" />
|
||||
<param name="admin_id" target="admin_id" />
|
||||
<param name="open_rss" target="open_rss" />
|
||||
</parameter>
|
||||
<response callback_func="completeInsertBoard">
|
||||
<tag name="error" />
|
||||
|
|
|
|||
|
|
@ -22,6 +22,12 @@
|
|||
$lang->skin_default_info = '스킨 기본정보';
|
||||
$lang->skin_maker = '스킨제작자';
|
||||
$lang->skin_maker_homepage = '제작자 홈페이지';
|
||||
$lang->open_rss = 'RSS 공개';
|
||||
$lang->open_rss_types = array(
|
||||
'Y' => '전문 공개 ',
|
||||
'H' => '요약 공개',
|
||||
'N' => '공개하지 않음',
|
||||
);
|
||||
|
||||
$lang->cmd_add_shortcut = "바로가기 추가";
|
||||
$lang->cmd_install = "설치";
|
||||
|
|
@ -33,6 +39,7 @@
|
|||
|
||||
$lang->msg_new_module = "모듈 생성";
|
||||
$lang->msg_update_module = "모듈 수정";
|
||||
$lang->msg_module_name_exists = "이미 존재하는 모듈이름입니다. 다른 이름을 입력해주세요.";
|
||||
$lang->msg_category_is_null = '등록된 분류가 없습니다';
|
||||
$lang->msg_grant_is_null = '등록된 권한 대상이 없습니다';
|
||||
$lang->msg_no_checked_document = '선택된 게시물이 없습니다';
|
||||
|
|
@ -53,4 +60,5 @@
|
|||
$lang->about_page_count = '목록 하단 페이지 이동 하는 링크의 수를 지정하실 수 있습니다. (기본 10개)';
|
||||
$lang->about_admin_id = '해당 모듈에 대해 최고 권한을 가지는 관리자를 지정할 수 있습니다.<br />,(콤마)로 다수 아이디 지정이 가능합니다. (관리자페이지 접근은 불가능)';
|
||||
$lang->about_grant = '특정 권한의 대상을 모두 해제하시면 로그인하지 않은 회원까지 권한을 가질 수 있습니다';
|
||||
$lang->about_open_rss = '현재 모듈에 대한 RSS 공개를 선택하실 수 있습니다. 글 보는 권한과 상관없이 옵션에 따라 RSS가 공개됩니다';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -73,6 +73,13 @@
|
|||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
// 이미 존재하는 모듈 이름인지 체크
|
||||
$output = executeQuery('module.isExistsModuleName', $args);
|
||||
if(!$output->toBool() || $output->data->count) {
|
||||
$oDB->rollback();
|
||||
return new Object(-1, 'msg_module_name_exists');
|
||||
}
|
||||
|
||||
// module model 객체 생성
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
|
|
@ -101,10 +108,31 @@
|
|||
* @brief 모듈의 정보를 수정
|
||||
**/
|
||||
function updateModule($args) {
|
||||
// begin transaction
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
// 이미 존재하는 모듈 이름인지 체크
|
||||
$output = executeQuery('module.isExistsModuleName', $args);
|
||||
if(!$output->toBool() || $output->data->count) {
|
||||
$oDB->rollback();
|
||||
return new Object(-1, 'msg_module_name_exists');
|
||||
}
|
||||
|
||||
$output = executeQuery('module.updateModule', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
if(!$output->toBool()) {
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
$output->add('module_srl',$args->module_srl);
|
||||
if(!$output->toBool()) {
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
$oDB->commit();
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
<column name="extra_vars" var="extra_vars" />
|
||||
<column name="skin_vars" var="skin_vars" />
|
||||
<column name="admin_id" var="admin_id" maxlength="80" />
|
||||
<column name="open_rss" var="open_rss" default="Y" notnull="notnull" />
|
||||
<column name="header_text" var="header_text" />
|
||||
<column name="footer_text" var="footer_text" />
|
||||
<column name="regdate" default="curdate()" />
|
||||
|
|
|
|||
12
modules/module/queries/isExistsModuleName.xml
Normal file
12
modules/module/queries/isExistsModuleName.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="isExistsModuleName" action="select">
|
||||
<tables>
|
||||
<table name="modules" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="mid" var="mid" notnull="notnull" />
|
||||
<condition operation="notequal" column="module_srl" var="module_srl" default="0" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -15,6 +15,7 @@
|
|||
<column name="menu_srl" var="menu_srl" filter="number" />
|
||||
<column name="extra_vars" var="extra_vars" />
|
||||
<column name="admin_id" var="admin_id" maxlength="80" />
|
||||
<column name="open_rss" var="open_rss" default="Y" notnull="notnull" />
|
||||
<column name="header_text" var="header_text" />
|
||||
<column name="footer_text" var="footer_text" />
|
||||
</columns>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
<column name="content" type="bigtext"/>
|
||||
<column name="grants" type="text" />
|
||||
<column name="admin_id" type="text" />
|
||||
<column name="open_rss" type="char" size="1" notnull="notnull" default="Y" />
|
||||
<column name="header_text" type="text" />
|
||||
<column name="footer_text" type="text" />
|
||||
<column name="regdate" type="date" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue