mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
#2129 모듈 업데이트 기록 및 확인 기능 추가
- moduleModel::needUpdate() - moduleController::insertUpdatedLog()
This commit is contained in:
parent
4eae6ac04e
commit
6679dbf181
5 changed files with 58 additions and 0 deletions
|
|
@ -603,6 +603,22 @@ class moduleController extends module
|
|||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 업데이트 기록 저장
|
||||
* @param string $update_id
|
||||
* @return Boolean
|
||||
*/
|
||||
public function insertUpdatedLog($update_id)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->update_id = $update_id;
|
||||
$output = executeQuery('module.insertModuleUpdateLog', $args);
|
||||
|
||||
if(!!$output->error) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Change the module's virtual site
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1567,6 +1567,26 @@ class moduleModel extends module
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 업데이트 적용 여부 확인
|
||||
* @param array|string $update_id
|
||||
* @return Boolean
|
||||
*/
|
||||
public function needUpdate($update_id)
|
||||
{
|
||||
if(!is_array($update_id)) $update_id = array($update_id);
|
||||
|
||||
$args = new stdClass();
|
||||
$args->update_id = implode(',', $update_id);
|
||||
$output = executeQueryArray('module.getModuleUpdateLog', $args);
|
||||
|
||||
if(!!$output->error) return false;
|
||||
if(!$output->data) $output->data = array();
|
||||
if(count($update_id) === count($output->data)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get a type and information of the module
|
||||
*/
|
||||
|
|
|
|||
11
modules/module/queries/getModuleUpdateLog.xml
Normal file
11
modules/module/queries/getModuleUpdateLog.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getModuleUpdateLog" action="select">
|
||||
<tables>
|
||||
<table name="module_update" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="in" column="update_id" var="update_id" />
|
||||
</conditions>
|
||||
</query>
|
||||
8
modules/module/queries/insertModuleUpdateLog.xml
Normal file
8
modules/module/queries/insertModuleUpdateLog.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="insertModuleUpdateLog" action="insert">
|
||||
<tables>
|
||||
<table name="module_update" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="update_id" var="update_id" notnull="notnull" />
|
||||
</columns>
|
||||
</query>
|
||||
3
modules/module/schemas/module_update.xml
Normal file
3
modules/module/schemas/module_update.xml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<table name="module_update">
|
||||
<column name="update_id" type="varchar" size="250" notnull="notnull" primary_key="primary_key" />
|
||||
</table>
|
||||
Loading…
Add table
Add a link
Reference in a new issue