mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 23:03:25 +09:00
#18427049 : add autoinstall module
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6915 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
82d01adc2d
commit
d5c98490ad
44 changed files with 1317 additions and 0 deletions
64
modules/autoinstall/autoinstall.class.php
Normal file
64
modules/autoinstall/autoinstall.class.php
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
<?php
|
||||
/**
|
||||
* @class autoinstall
|
||||
* @author sol (sol@ngleader.com)
|
||||
* @brief autoinstall 모듈의 high class
|
||||
**/
|
||||
|
||||
class XmlGenerater {
|
||||
function generate(&$params)
|
||||
{
|
||||
$xmlDoc = '<?xml version="1.0" encoding="utf-8" ?><methodCall><params>';
|
||||
if(!is_array($params)) return null;
|
||||
$params["module"] = "resourceapi";
|
||||
foreach($params as $key => $val)
|
||||
{
|
||||
$xmlDoc .= sprintf("<%s><![CDATA[%s]]></%s>", $key, $val, $key);
|
||||
}
|
||||
$xmlDoc .= "</params></methodCall>";
|
||||
return $xmlDoc;
|
||||
}
|
||||
|
||||
function getXmlDoc(&$params)
|
||||
{
|
||||
$body = XmlGenerater::generate($params);
|
||||
$buff = FileHandler::getRemoteResource($this->uri, $body, 3, "POST", "application/xml");
|
||||
if(!$buff) return;
|
||||
$xml = new XmlParser();
|
||||
$xmlDoc = $xml->parse($buff);
|
||||
return $xmlDoc;
|
||||
}
|
||||
}
|
||||
|
||||
class autoinstall extends ModuleObject {
|
||||
var $uri = "http://resource.xpressengine.com/";
|
||||
var $original_site = "http://www.xpressengine.com/";
|
||||
var $tmp_dir = './files/cache/autoinstall/';
|
||||
|
||||
/**
|
||||
* @brief 설치시 추가 작업이 필요할시 구현
|
||||
**/
|
||||
function moduleInstall() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 설치가 이상이 없는지 체크하는 method
|
||||
**/
|
||||
function checkUpdate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 업데이트 실행
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 캐시 파일 재생성
|
||||
**/
|
||||
function recompileCache() {
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue