mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
#18445087 : make easy install install db and do update, too
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6966 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
fd82efce3f
commit
ddcbf01c84
1 changed files with 26 additions and 0 deletions
|
|
@ -40,11 +40,37 @@
|
|||
FileHandler::writeFile($this->download_file, $buff);
|
||||
}
|
||||
|
||||
function installModule()
|
||||
{
|
||||
$path_array = explode("/", $this->package->path);
|
||||
$target_name = array_pop($path_array);
|
||||
$type = substr(array_pop($path_array), 0, -1);
|
||||
if($type == "module")
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$oInstallController = &getController('install');
|
||||
$module_path = ModuleHandler::getModulePath($target_name);
|
||||
if($oModuleModel->checkNeedInstall($target_name))
|
||||
{
|
||||
$oInstallController->installModule($target_name, $module_path);
|
||||
}
|
||||
if($oModuleModel->checkNeedUpdate($target_name))
|
||||
{
|
||||
$oModule = &getModule($target_name, 'class');
|
||||
if(method_exists($oModule, 'moduleUpdate'))
|
||||
{
|
||||
$oModule->moduleUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function install()
|
||||
{
|
||||
$this->_download();
|
||||
$file_list = $this->_unPack();
|
||||
$this->_copyDir($file_list);
|
||||
$this->installModule();
|
||||
|
||||
FileHandler::removeDir($this->temp_dir);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue