mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-20 03:39:56 +09:00
merge from 1.7.3.5(r13153:r13167)
git-svn-id: http://xe-core.googlecode.com/svn/trunk@13168 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
cc47d2b247
commit
2d3f149b5a
2042 changed files with 129266 additions and 126243 deletions
|
|
@ -3,7 +3,7 @@
|
|||
<title xml:lang="ko">휴지통</title>
|
||||
<title xml:lang="en">trash</title>
|
||||
<title xml:lang="zh-TW">回收桶</title>
|
||||
<description xml:lang="ko">문서, 댓글 등을 완전히 삭제하지 않고 복구 가능한 상태로 만들어 관리하는 모듈입니다.</description>
|
||||
<description xml:lang="ko">문서, 댓글 등을 완전히 삭제하지 않고 복구 가능한 상태로 만들어 관리합니다.</description>
|
||||
<version>0.1</version>
|
||||
<date>2011-05-12</date>
|
||||
<category>content</category>
|
||||
|
|
|
|||
|
|
@ -6,12 +6,6 @@
|
|||
<value xml:lang="jp"><![CDATA[ゴミ箱]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[回收桶]]></value>
|
||||
</item>
|
||||
<item name="cmd_restore">
|
||||
<value xml:lang="ko"><![CDATA[복원]]></value>
|
||||
<value xml:lang="en"><![CDATA[Restore]]></value>
|
||||
<value xml:lang="jp"><![CDATA[復元]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[復原]]></value>
|
||||
</item>
|
||||
<item name="cmd_restore_all">
|
||||
<value xml:lang="ko"><![CDATA[모두 복원]]></value>
|
||||
<value xml:lang="en"><![CDATA[Restore All]]></value>
|
||||
|
|
@ -79,9 +73,13 @@
|
|||
<value xml:lang="zh-TW"><![CDATA[復原失敗]]></value>
|
||||
</item>
|
||||
<item name="origin_module_type">
|
||||
<value xml:lang="ko"><![CDATA[원본 타입]]></value>
|
||||
<value xml:lang="en"><![CDATA[Source Type]]></value>
|
||||
<value xml:lang="jp"><![CDATA[原本タイプ]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[原始類型]]></value>
|
||||
<value xml:lang="ko"><![CDATA[타입]]></value>
|
||||
<value xml:lang="en"><![CDATA[Type]]></value>
|
||||
<value xml:lang="jp"><![CDATA[タイプ]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[類型]]></value>
|
||||
</item>
|
||||
<item name="remove_all_trash_item">
|
||||
<value xml:lang="ko"><![CDATA[휴지통을 완전히 비웁니다. 실행 후에는 복원이 불가능합니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Remove all trash items. After execute could not be recovered.]]></value>
|
||||
</item>
|
||||
</lang>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class TrashVO
|
|||
function getTitle()
|
||||
{
|
||||
if(empty($this->title)) return $lang->untitle;
|
||||
return $this->title;
|
||||
return htmlspecialchars($this->title);
|
||||
}
|
||||
function setTitle($title)
|
||||
{
|
||||
|
|
@ -49,7 +49,7 @@ class TrashVO
|
|||
}
|
||||
function getDescription()
|
||||
{
|
||||
return $this->description;
|
||||
return htmlspecialchars($this->description);
|
||||
}
|
||||
function setDescription($description)
|
||||
{
|
||||
|
|
@ -81,7 +81,7 @@ class TrashVO
|
|||
}
|
||||
function getNickName()
|
||||
{
|
||||
return $this->nickName;
|
||||
return htmlspecialchars($this->nickName);
|
||||
}
|
||||
function setNickName($nickName)
|
||||
{
|
||||
|
|
|
|||
16
modules/trash/queries/getTrashAllList.xml
Normal file
16
modules/trash/queries/getTrashAllList.xml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<query id="getTrashList" action="select">
|
||||
<tables>
|
||||
<table name="trash" alias="T" />
|
||||
<table name="member" alias="M" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="T.*" />
|
||||
<column name="M.user_id" />
|
||||
<column name="M.nick_name" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="T.remover_srl" default="M.member_srl" notnull="notnull" />
|
||||
<condition operation="in" column="trash_srl" var="trashSrl" filter="number" pipe="and" />
|
||||
<condition operation="in" column="origin_module" var="originModule" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -70,11 +70,10 @@ function completeGetTrashList(ret_obj, response_tags)
|
|||
else title = objTrash.title;
|
||||
|
||||
htmlListBuffer += '<tr>' +
|
||||
'<td class="title">'+ title +'</td>' +
|
||||
'<td class="title">'+ title +'<input type="hidden" name="cart[]" value="'+objTrash.trashSrl+'" /></td>' +
|
||||
'<td class="nowr">'+ objTrash.nickName +'</td>' +
|
||||
'<td class="nowr">'+ objTrash.ipaddress +'</td>' +
|
||||
'</tr>' +
|
||||
'<input type="hidden" name="cart[]" value="'+objTrash.trashSrl+'" />';
|
||||
'</tr>';
|
||||
}
|
||||
jQuery('#selectedTrashCount').html(trash_list.length);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,118 +3,158 @@ var confirm_restore_msg = '{$lang->confirm_restore}';
|
|||
var no_text_comment = '{$lang->no_text_comment}';
|
||||
</script>
|
||||
<load target="js/trash_admin.js" usecdn="true" />
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<div class="x_page-header">
|
||||
<h1>{$lang->trash} <a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_content_trash" target="_blank">{$lang->help}</a></h1>
|
||||
</div>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/trash/tpl/trash_list/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="emptyTrash" action="./" method="post" class="form">
|
||||
<input type="hidden" name="module" value="trash" />
|
||||
<input type="hidden" name="act" value="procTrashAdminEmptyTrash" />
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
<input type="hidden" name="is_all" value="true" />
|
||||
<h1 class="h1">{$lang->trash}</h1>
|
||||
<div class="table even">
|
||||
<table width="100%" border="1" cellspacing="0" id="trashListTable">
|
||||
<caption>
|
||||
{$lang->trash}({number_format($total_count)})
|
||||
<span class="side"><span class="btn"><a href="#listManager" class="modalAnchor" onclick="getTrashList();">{$lang->document_manager}</a></span>
|
||||
<span class="btn"><button type="submit" name="is_all" value="true">{$lang->empty_trash_all}</button></span></span>
|
||||
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="title">{$lang->document}({$lang->origin_module_type})</th>
|
||||
<th scope="col" class="nowr">{$lang->trash_nick_name}</th>
|
||||
<th scope="col" class="nowr">{$lang->trash_date}</th>
|
||||
<th scope="col" class="nowr">{$lang->ipaddress}</th>
|
||||
<th scope="col" class="title">{$lang->trash_description}</th>
|
||||
<th scope="col"><input type="checkbox" title="Check All" data-name="cart" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th scope="col" class="title">{$lang->document}({$lang->origin_module_type})</th>
|
||||
<th scope="col" class="nowr">{$lang->trash_nick_name}</th>
|
||||
<th scope="col" class="nowr">{$lang->trash_date}</th>
|
||||
<th scope="col" class="nowr">{$lang->ipaddress}</th>
|
||||
<th scope="col" class="title">{$lang->trash_description}</th>
|
||||
<th scope="col"><input type="checkbox" title="Check All" data-name="cart" /></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<!--@foreach($trash_list as $no => $oTrashVO)-->
|
||||
<tr>
|
||||
<td class="title"><!--@if(!trim($oTrashVO->getTitle()) && $oTrashVO->getOriginModule() == 'comment')--><strong>{$lang->no_text_comment}</strong><!--@else-->{$oTrashVO->getTitle()}<!--@end--> (<!--@if($oTrashVO->getOriginModule() == 'document')-->{$lang->document}<!--@else-->{$lang->comment}<!--@end-->)</td>
|
||||
<td class="nowr"><span class="member_{$oTrashVO->getRemoverSrl()}">{htmlspecialchars($oTrashVO->getNickName())}</span></td>
|
||||
<td class="nowr">{zdate($oTrashVO->getRegdate(), "Y-m-d H:i:s")}</td>
|
||||
<td class="nowr">{$oTrashVO->getIpaddress()}</td>
|
||||
<td class="title">{$oTrashVO->getDescription()}</td>
|
||||
<td><input type="checkbox" name="cart" value="{$oTrashVO->getTrashSrl()}" /></td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><a href="#listManager" class="modalAnchor" onclick="getTrashList();">{$lang->document_manager}</a></span>
|
||||
<span class="btn"><button type="submit" name="is_all" value="true">{$lang->empty_trash_all}</button></span>
|
||||
</div>
|
||||
</form>
|
||||
<div class="modal" id="listManager">
|
||||
<form ruleset="emptyTrash" id="fo_list" action="./" method="post" class="fg form">
|
||||
<input type="hidden" name="module" value="trash" />
|
||||
<input type="hidden" name="act" value="procTrashAdminEmptyTrash" />
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
<input type="hidden" name="is_all" value="false" />
|
||||
<input type="hidden" name="origin_module" value="{$origin_module}" />
|
||||
<h2 class="h2">{$lang->document_manager}</h2>
|
||||
<div class="table even">
|
||||
<table width="100%" border="1" cellspacing="0" id="trashManageListTable">
|
||||
<caption>{$lang->selected_document} <strong id="selectedTrashCount">0</strong></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="title">{$lang->document}</th>
|
||||
<th scope="col" class="nowr">{$lang->trash_nick_name}</th>
|
||||
<th scope="col" class="nowr">{$lang->ipaddress}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<form ruleset="emptyTrash" action="./" method="post">
|
||||
<input type="hidden" name="module" value="trash" />
|
||||
<input type="hidden" name="act" value="procTrashAdminEmptyTrash" />
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
<input type="hidden" name="is_all" value="true" />
|
||||
<p>
|
||||
<button type="submit" class="x_btn x_btn-warning x_btn-primary" name="is_all" value="true">{$lang->empty_trash_all}</button>
|
||||
{$lang->remove_all_trash_item}
|
||||
</p>
|
||||
<table id="trashListTable" class="x_table x_table-striped x_table-hover">
|
||||
<caption>
|
||||
<strong>{$lang->all}({number_format($total_count)})</strong>
|
||||
<div class="x_pull-right x_btn-group">
|
||||
<a href="#fo_list" class="x_btn modalAnchor" data-name="is_all" data-value="false">{$lang->delete}</a>
|
||||
<a href="#fo_list" class="x_btn modalAnchor" data-name="act" data-value="procTrashAdminRestore">{$lang->restore}</a>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><button type="submit" name="is_all" value="false">{$lang->cmd_delete}</button></span>
|
||||
<span class="btn"><button type="submit" name="act" value="procTrashAdminRestore">{$lang->cmd_restore}</button></span>
|
||||
</div>
|
||||
</form>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="title">{$lang->document}</th>
|
||||
<th scope="col" class="nowr">{$lang->origin_module_type}</th>
|
||||
<th scope="col" class="nowr">{$lang->trash_nick_name}</th>
|
||||
<th scope="col" class="nowr">{$lang->trash_date}</th>
|
||||
<th scope="col" class="nowr">{$lang->ipaddress}</th>
|
||||
<th scope="col" class="title">{$lang->trash_description}</th>
|
||||
<th scope="col"><input type="checkbox" title="Check All" data-name="cart" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr loop="$trash_list => $no, $oTrashVO">
|
||||
<td class="title">
|
||||
<strong cond="!trim($oTrashVO->getTitle()) && $oTrashVO->getOriginModule() == 'comment'">{$lang->no_text_comment}</strong>
|
||||
<block cond="trim($oTrashVO->getTitle())">{$oTrashVO->getTitle()}</block>
|
||||
</td>
|
||||
<td class="nowr"><!--@if($oTrashVO->getOriginModule() == 'document')-->{$lang->document}<!--@else-->{$lang->comment}<!--@end--></td>
|
||||
<td class="nowr"><a href="#popup_menu_area" class="member_{$oTrashVO->getRemoverSrl()}">{$oTrashVO->getNickName()}</a></td>
|
||||
<td class="nowr">{zdate($oTrashVO->getRegdate(), "Y-m-d H:i:s")}</td>
|
||||
<td class="nowr">{$oTrashVO->getIpaddress()}</td>
|
||||
<td class="title">{$oTrashVO->getDescription()}</td>
|
||||
<td><input type="checkbox" name="cart" value="{$oTrashVO->getTrashSrl()}" /></td>
|
||||
</tr>
|
||||
<tr cond="!$trash_list">
|
||||
<td>{$lang->no_documents}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="x_pull-right x_btn-group">
|
||||
<a href="#fo_list" class="x_btn modalAnchor" data-name="is_all" data-value="false">{$lang->delete}</a>
|
||||
<a href="#fo_list" class="x_btn modalAnchor" data-name="act" data-value="procTrashAdminRestore">{$lang->restore}</a>
|
||||
</div>
|
||||
<div class="search">
|
||||
<form action="" class="pagination">
|
||||
</form>
|
||||
|
||||
<form action="" class="x_pagination">
|
||||
<input type="hidden" name="error_return_url" value="" />
|
||||
<input type="hidden" name="module" value="{$module}" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input cond="$search_keyword" type="hidden" name="search_keyword" value="{$search_keyword}" />
|
||||
<input cond="$search_target" type="hidden" name="search_target" value="{$search_target}" />
|
||||
<input cond="$search_keyword" type="hidden" name="search_keyword" value="{$search_keyword}" />
|
||||
<input cond="$search_target" type="hidden" name="search_target" value="{$search_target}" />
|
||||
<ul>
|
||||
<li class="x_disabled"|cond="!$page || $page == 1"><a href="{getUrl('page', '')}">« {$lang->first_page}</a></li>
|
||||
<block cond="$page_navigation->first_page != 1 && $page_navigation->first_page + $page_navigation->page_count > $page_navigation->last_page - 1 && $page_navigation->page_count != $page_navigation->total_page">
|
||||
{@$isGoTo = true}
|
||||
<li>
|
||||
<a href="#goTo" data-toggle title="{$lang->cmd_go_to_page}">…</a>
|
||||
<span cond="$isGoTo" id="goTo" class="x_input-append">
|
||||
<input type="number" min="1" max="{$page_navigation->last_page}" required name="page" title="{$lang->cmd_go_to_page}" />
|
||||
<button type="submit" class="x_add-on">Go</button>
|
||||
</span>
|
||||
</li>
|
||||
</block>
|
||||
|
||||
<a href="{getUrl('page', '')}" class="direction">« FIRST</a>
|
||||
<block cond="$page_navigation->first_page + $page_navigation->page_count > $page_navigation->last_page && $page_navigation->page_count != $page_navigation->total_page">
|
||||
{@$isGoTo = true}
|
||||
<a href="{getUrl('page', '')}">1</a>
|
||||
<a href="#goTo" class="tgAnchor" title="{$lang->cmd_go_to_page}">...</a>
|
||||
</block>
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
{@$last_page = $page_no}
|
||||
<strong cond="$page_no == $page">{$page_no}</strong>
|
||||
<a cond="$page_no != $page" href="{getUrl('page', $page_no)}">{$page_no}</a>
|
||||
<!--@end-->
|
||||
<block cond="$last_page != $page_navigation->last_page">
|
||||
<li class="x_active"|cond="$page_no == $page"><a href="{getUrl('page', $page_no)}">{$page_no}</a></li>
|
||||
<!--@end-->
|
||||
|
||||
<block cond="$last_page != $page_navigation->last_page && $last_page + 1 != $page_navigation->last_page">
|
||||
{@$isGoTo = true}
|
||||
<a href="#goTo" class="tgAnchor" title="{$lang->cmd_go_to_page}">...</a>
|
||||
<a href="{getUrl('page', $page_navigation->last_page)}">{$page_navigation->last_page}</a>
|
||||
</block>
|
||||
<a href="{getUrl('page', $page_navigation->last_page)}" class="direction">LAST »</a>
|
||||
<span cond="$isGoTo" id="goTo" class="tgContent">
|
||||
<input name="page" title="{$lang->cmd_go_to_page}" />
|
||||
<button type="submit">Go</button>
|
||||
</span>
|
||||
</form>
|
||||
</div>
|
||||
<li>
|
||||
<a href="#goTo" data-toggle title="{$lang->cmd_go_to_page}">…</a>
|
||||
<span cond="$isGoTo" id="goTo" class="x_input-append">
|
||||
<input type="number" min="1" max="{$page_navigation->last_page}" required name="page" title="{$lang->cmd_go_to_page}" />
|
||||
<button type="submit" class="x_add-on">Go</button>
|
||||
</span>
|
||||
</li>
|
||||
</block>
|
||||
<li class="x_disabled"|cond="$page == $page_navigation->last_page"><a href="{getUrl('page', $page_navigation->last_page)}" title="{$page_navigation->last_page}">{$lang->last_page} »</a></li>
|
||||
</ul>
|
||||
</form>
|
||||
|
||||
<form ruleset="emptyTrash" id="fo_list" action="./" method="post" class="x_modal">
|
||||
<input type="hidden" name="module" value="trash" />
|
||||
<input type="hidden" name="act" value="procTrashAdminEmptyTrash" />
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
<input type="hidden" name="is_all" value="false" />
|
||||
<input type="hidden" name="origin_module" value="{$origin_module}" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/trash/tpl/trash_list/1" />
|
||||
<div class="x_modal-header">
|
||||
<h1>{$lang->document_manager}: <span class="_sub"></span></h1>
|
||||
</div>
|
||||
<div class="x_modal-body">
|
||||
<table id="trashManageListTable" class="x_table x_table-striped x_table-hover">
|
||||
<caption>
|
||||
<strong>{$lang->selected_document} <span id="selectedTrashCount"></span></strong>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="title">{$lang->document}</th>
|
||||
<th scope="col" class="nowr">{$lang->trash_nick_name}</th>
|
||||
<th scope="col" class="nowr">{$lang->ipaddress}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="x_modal-footer">
|
||||
<button type="submit" class="x_btn x_btn-inverse x_pull-right" name="is_all|act" value="false|procTrashAdminRestore">{$lang->confirm}</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
jQuery(function($){
|
||||
// Modal anchor activation
|
||||
var $docTable = $('#trashListTable');
|
||||
$docTable.find(':checkbox').change(function(){
|
||||
var $modalAnchor = $('a[data-value]');
|
||||
if($docTable.find('tbody :checked').length == 0){
|
||||
$modalAnchor.removeAttr('href').addClass('x_disabled');
|
||||
} else {
|
||||
$modalAnchor.attr('href','#fo_list').removeClass('x_disabled');
|
||||
}
|
||||
}).change();
|
||||
// Modal anchor button action
|
||||
$('a[data-value]').bind('before-open.mw', function(){
|
||||
if($docTable.find('tbody :checked').length == 0){
|
||||
$('body').css('overflow','auto');
|
||||
alert('{$lang->msg_not_selected_document}');
|
||||
return false;
|
||||
} else {
|
||||
var $this = $(this);
|
||||
var thisName = $this.attr('data-name');
|
||||
var thisValue = $this.attr('data-value');
|
||||
var thisText = $this.text();
|
||||
getTrashList();
|
||||
$('#fo_list').find('.x_modal-header ._sub').text(thisText).end().find('[type="submit"]').val(thisValue).attr('name',thisName).text(thisText);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -46,8 +46,13 @@ class trashAdminController extends trash
|
|||
$isAll = Context::get('is_all');
|
||||
$originModule = Context::get('origin_module');
|
||||
$tmpTrashSrls = Context::get('cart');
|
||||
if(is_array($tmpTrashSrls)) $trashSrls = $tmpTrashSrls;
|
||||
else $trashSrls = explode('|@|', $tmpTrashSrls);
|
||||
|
||||
$trashSrls = array();
|
||||
if($isAll != 'true')
|
||||
{
|
||||
if(is_array($tmpTrashSrls)) $trashSrls = $tmpTrashSrls;
|
||||
else $trashSrls = explode('|@|', $tmpTrashSrls);
|
||||
}
|
||||
|
||||
//module relation data delete...
|
||||
$output = $this->_relationDataDelete($isAll, $trashSrls);
|
||||
|
|
@ -69,18 +74,38 @@ class trashAdminController extends trash
|
|||
*/
|
||||
function _relationDataDelete($isAll, &$trashSrls)
|
||||
{
|
||||
if($isAll == 'true') $trashSrls = array();
|
||||
$oTrashModel = &getModel('trash');
|
||||
if(count($trashSrls) > 0) $args->trashSrl = $trashSrls;
|
||||
$output = $oTrashModel->getTrashList($args);
|
||||
if(!$output->toBool()) return new Object(-1, $output->message);
|
||||
if($isAll == 'true')
|
||||
{
|
||||
$args = array();
|
||||
$output = $oTrashModel->getTrashAllList($args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return new Object(-1, $output->message);
|
||||
}
|
||||
|
||||
if(is_array($output->data))
|
||||
{
|
||||
foreach($output->data AS $key=>$value)
|
||||
{
|
||||
array_push($trashSrls, $value->getTrashSrl());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$args->trashSrl = $trashSrls;
|
||||
$output = $oTrashModel->getTrashList($args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return new Object(-1, $output->message);
|
||||
}
|
||||
}
|
||||
|
||||
if(is_array($output->data))
|
||||
{
|
||||
foreach($output->data AS $key=>$oTrashVO)
|
||||
{
|
||||
if($isAll == 'true') array_push($trashSrls, $oTrashVO->getTrashSrl());
|
||||
|
||||
//class file check
|
||||
$classPath = ModuleHandler::getModulePath($oTrashVO->getOriginModule());
|
||||
if(!is_dir(FileHandler::getRealPath($classPath))) return new Object(-1, 'not exist restore module directory');
|
||||
|
|
@ -92,8 +117,8 @@ class trashAdminController extends trash
|
|||
$oAdminController = &getAdminController($oTrashVO->getOriginModule());
|
||||
if(!method_exists($oAdminController, 'emptyTrash')) return new Object(-1, 'not exist restore method in module class file');
|
||||
|
||||
$output = $oAdminController->emptyTrash($oTrashVO->getSerializedObject());
|
||||
if(!$output->toBool()) return new Object(-1, $output->message);
|
||||
$output2 = $oAdminController->emptyTrash($oTrashVO->getSerializedObject());
|
||||
if(!$output2->toBool()) return new Object(-1, $output2->message);
|
||||
}
|
||||
}
|
||||
return new Object(0, $lang->success_deleted);
|
||||
|
|
@ -134,7 +159,8 @@ class trashAdminController extends trash
|
|||
$originObject = unserialize($output->data->getSerializedObject());
|
||||
$output = $oAdminController->restoreTrash($originObject);
|
||||
|
||||
if(!$output->toBool()) {
|
||||
if(!$output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return new Object(-1, $output->message);
|
||||
}
|
||||
|
|
@ -164,8 +190,10 @@ class trashAdminController extends trash
|
|||
$trashSrls = Context::get('trash_srls');
|
||||
if($trashSrls) $trashSrlList = explode(',', $trashSrls);
|
||||
|
||||
if(count($trashSrlList) > 0) {
|
||||
if(count($trashSrlList) > 0)
|
||||
{
|
||||
$oTrashModel = &getModel('trash');
|
||||
$args = new stdClass();
|
||||
$args->trashSrl = $trashSrlList;
|
||||
$output = $oTrashModel->getTrashList($args);
|
||||
$trashList = $output->data;
|
||||
|
|
@ -177,6 +205,8 @@ class trashAdminController extends trash
|
|||
$this->setMessage($lang->no_documents);
|
||||
}
|
||||
|
||||
$oSecurity = new Security($trashList);
|
||||
$oSecurity->encodeHTML('..');
|
||||
$this->add('trash_list', $trashList);
|
||||
}
|
||||
|
||||
|
|
@ -188,6 +218,7 @@ class trashAdminController extends trash
|
|||
function _emptyTrash($trashSrls)
|
||||
{
|
||||
if(!is_array($trashSrls)) return false;
|
||||
$args = new stdClass();
|
||||
$args->trashSrls = $trashSrls;
|
||||
$output = executeQuery('trash.deleteTrash', $args);
|
||||
if(!$output->toBool()) return false;
|
||||
|
|
@ -195,6 +226,5 @@ class trashAdminController extends trash
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/* End of file trash.controller.php */
|
||||
/* Location: ./modules/trash/trash.controller.php */
|
||||
/* End of file trash.admin.controller.php */
|
||||
/* Location: ./modules/trash/trash.admin.controller.php */
|
||||
|
|
|
|||
|
|
@ -7,12 +7,14 @@
|
|||
* @package /modules/trash
|
||||
* @version 0.1
|
||||
*/
|
||||
class trashAdminView extends trash {
|
||||
class trashAdminView extends trash
|
||||
{
|
||||
/**
|
||||
* Initialization
|
||||
* @return void
|
||||
*/
|
||||
function init() {
|
||||
function init()
|
||||
{
|
||||
// 템플릿 경로 지정 (board의 경우 tpl에 관리자용 템플릿 모아놓음)
|
||||
$template_path = sprintf("%stpl/",$this->module_path);
|
||||
$this->setTemplatePath($template_path);
|
||||
|
|
@ -22,7 +24,9 @@ class trashAdminView extends trash {
|
|||
* Trash list
|
||||
* @return void
|
||||
*/
|
||||
function dispTrashAdminList() {
|
||||
function dispTrashAdminList()
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->page = Context::get('page'); // /< Page
|
||||
$args->list_count = 30; // /< the number of posts to display on a single page
|
||||
$args->page_count = 5; // /< the number of pages that appear in the page navigation
|
||||
|
|
@ -42,9 +46,11 @@ class trashAdminView extends trash {
|
|||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
debugPrint($output->data);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('trash_list');
|
||||
}
|
||||
}
|
||||
?>
|
||||
/* End of file trash.admin.view.php */
|
||||
/* Location: ./modules/trash/trash.admin.view.php */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
<?php
|
||||
require_once(_XE_PATH_.'modules/trash/model/TrashVO.php');
|
||||
|
||||
/**
|
||||
* trash class
|
||||
* trash the module's high class
|
||||
|
|
@ -7,15 +9,14 @@
|
|||
* @package /modules/trash
|
||||
* @version 0.1
|
||||
*/
|
||||
|
||||
require_once(_XE_PATH_.'modules/trash/model/TrashVO.php');
|
||||
|
||||
class trash extends ModuleObject {
|
||||
class trash extends ModuleObject
|
||||
{
|
||||
/**
|
||||
* Implement if additional tasks are necessary when installing
|
||||
* @return Object
|
||||
*/
|
||||
function moduleInstall() {
|
||||
function moduleInstall()
|
||||
{
|
||||
return new Object();
|
||||
}
|
||||
|
||||
|
|
@ -23,7 +24,8 @@ class trash extends ModuleObject {
|
|||
* A method to check if successfully installed
|
||||
* @return bool
|
||||
*/
|
||||
function checkUpdate() {
|
||||
function checkUpdate()
|
||||
{
|
||||
//$oDB = &DB::getInstance();
|
||||
//$oModuleModel = &getModel('module');
|
||||
|
||||
|
|
@ -34,12 +36,13 @@ class trash extends ModuleObject {
|
|||
* Execute update
|
||||
* @return Object
|
||||
*/
|
||||
function moduleUpdate() {
|
||||
function moduleUpdate()
|
||||
{
|
||||
//$oDB = &DB::getInstance();
|
||||
//$oModuleModel = &getModel('module');
|
||||
|
||||
return new Object(0,'success_updated');
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
/* End of file trash.class.php */
|
||||
/* Location: ./modules/trash/trash.class.php */
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ class trashModel extends trash
|
|||
$oTrashVO = new TrashVO();
|
||||
if(!$trashSrl) return $oTrashVO;
|
||||
|
||||
$args = new stdClass();
|
||||
$args->trashSrl = $trashSrl;
|
||||
$output = executeQuery('trash.getTrash', $args, $columnList);
|
||||
|
||||
|
|
@ -51,6 +52,28 @@ class trashModel extends trash
|
|||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get TrashVO all list
|
||||
* @param object $args
|
||||
* @param array $columnList
|
||||
* @return object
|
||||
*/
|
||||
function getTrashAllList($args, $columnList = array())
|
||||
{
|
||||
$output = executeQueryArray('trash.getTrashAllList', $args, $columnList);
|
||||
|
||||
if(is_array($output->data))
|
||||
{
|
||||
foreach($output->data AS $key=>$value)
|
||||
{
|
||||
$oTrashVO = new TrashVO();
|
||||
$this->_setTrashObject($oTrashVO, $value);
|
||||
$output->data[$key] = $oTrashVO;
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set trash object from std object
|
||||
* @param TrashVO $oTrashVO
|
||||
|
|
@ -71,4 +94,5 @@ class trashModel extends trash
|
|||
$oTrashVO->setRegdate($stdObject->regdate);
|
||||
}
|
||||
}
|
||||
|
||||
/* End of file trash.model.php */
|
||||
/* Location: ./modules/trash/trash.model.php */
|
||||
|
|
|
|||
|
|
@ -7,12 +7,15 @@
|
|||
* @package /modules/trash
|
||||
* @version 0.1
|
||||
*/
|
||||
class trashView extends trash {
|
||||
class trashView extends trash
|
||||
{
|
||||
/**
|
||||
* Initialization
|
||||
* @return void
|
||||
*/
|
||||
function init() {
|
||||
function init()
|
||||
{
|
||||
}
|
||||
}
|
||||
?>
|
||||
/* End of file trash.view.php */
|
||||
/* Location: ./modules/trash/trash.view.php */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue