mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
issue 73 Supporting easy install (autoinstall module) for each local(enlish, korean, etc)
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8580 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b5bcdda20e
commit
cb13f541e8
4 changed files with 15 additions and 10 deletions
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
$params["act"] = "getResourceapiUpdate";
|
||||
$body = XmlGenerater::generate($params);
|
||||
$buff = FileHandler::getRemoteResource($this->uri, $body, 3, "POST", "application/xml");
|
||||
$buff = FileHandler::getRemoteResource(_XE_DOWNLOAD_SERVER_, $body, 3, "POST", "application/xml");
|
||||
$xml = new XmlParser();
|
||||
$xmlDoc = $xml->parse($buff);
|
||||
$this->updateCategory($xmlDoc);
|
||||
|
|
@ -187,7 +187,7 @@
|
|||
|
||||
function updateCategory(&$xmlDoc)
|
||||
{
|
||||
executeQuery("autoinstall.deleteCategory", $args);
|
||||
executeQuery("autoinstall.deleteCategory");
|
||||
$oModel =& getModel('autoinstall');
|
||||
if(!is_array($xmlDoc->response->categorylist->item))
|
||||
{
|
||||
|
|
@ -199,7 +199,7 @@
|
|||
$args->category_srl = $item->category_srl->body;
|
||||
$args->parent_srl = $item->parent_srl->body;
|
||||
$args->title = $item->title->body;
|
||||
executeQuery("autoinstall.insertCategory", $args);
|
||||
$output = executeQuery("autoinstall.insertCategory", $args);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -224,7 +224,7 @@
|
|||
{
|
||||
$oModuleInstaller = new SFTPModuleInstaller($package);
|
||||
}
|
||||
else if(function_exists(ftp_connect))
|
||||
else if(function_exists('ftp_connect'))
|
||||
{
|
||||
$oModuleInstaller = new PHPFTPModuleInstaller($package);
|
||||
}
|
||||
|
|
@ -233,6 +233,8 @@
|
|||
$oModuleInstaller = new FTPModuleInstaller($package);
|
||||
}
|
||||
|
||||
$oModuleInstaller->setServerUrl(_XE_DOWNLOAD_SERVER_);
|
||||
|
||||
$oModuleInstaller->setPassword($ftp_password);
|
||||
$output = $oModuleInstaller->uninstall();
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@
|
|||
|
||||
function init() {
|
||||
$template_path = sprintf("%stpl/",$this->module_path);
|
||||
Context::set('original_site', $this->original_site);
|
||||
Context::set('uri', $this->uri);
|
||||
Context::set('original_site', _XE_LOCATION_SITE_);
|
||||
Context::set('uri', _XE_DOWNLOAD_SERVER_);
|
||||
$this->setTemplatePath($template_path);
|
||||
|
||||
$ftp_info = Context::getFTPInfo();
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
function getXmlDoc(&$params)
|
||||
{
|
||||
$body = XmlGenerater::generate($params);
|
||||
$buff = FileHandler::getRemoteResource($this->uri, $body, 3, "POST", "application/xml");
|
||||
$buff = FileHandler::getRemoteResource(_XE_DOWNLOAD_SERVER_, $body, 3, "POST", "application/xml");
|
||||
if(!$buff) return;
|
||||
$xml = new XmlParser();
|
||||
$xmlDoc = $xml->parse($buff);
|
||||
|
|
@ -31,8 +31,6 @@
|
|||
}
|
||||
|
||||
class autoinstall extends ModuleObject {
|
||||
var $uri = "http://download.xpressengine.com/";
|
||||
var $original_site = "http://www.xpressengine.com/";
|
||||
var $tmp_dir = './files/cache/autoinstall/';
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class ModuleInstaller {
|
||||
var $package = null;
|
||||
var $base_url = 'http://download.xpressengine.com/';
|
||||
var $base_url;
|
||||
var $temp_dir = './files/cache/autoinstall/';
|
||||
var $target_path;
|
||||
var $download_file;
|
||||
|
|
@ -10,6 +10,11 @@
|
|||
var $download_path;
|
||||
var $ftp_password;
|
||||
|
||||
function setServerUrl($url)
|
||||
{
|
||||
$this->base_url = $url;
|
||||
}
|
||||
|
||||
function uninstall()
|
||||
{
|
||||
$oModel =& getModel('autoinstall');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue