Merge branch 'develop' into pr/member-phone-number

This commit is contained in:
Kijin Sung 2017-12-01 02:04:09 +09:00
commit 8f64e7c6b9
200 changed files with 2025 additions and 1785 deletions

View file

@ -20,7 +20,7 @@ class installAdminController extends install
function procInstallAdminInstall()
{
$module_name = Context::get('module_name');
if(!$module_name) return new object(-1, 'invalid_request');
if(!$module_name) return $this->setError('invalid_request');
$oInstallController = getController('install');
$oInstallController->installModule($module_name, './modules/'.$module_name);
@ -35,18 +35,21 @@ class installAdminController extends install
{
@set_time_limit(0);
$module_name = Context::get('module_name');
if(!$module_name) return new object(-1, 'invalid_request');
if(!$module_name) return $this->setError('invalid_request');
$oModule = getModule($module_name, 'class');
if(!$oModule)
{
$output = new Object(-1, 'invalid_request');
$output = return $this->setError('invalid_request');
}
Rhymix\Framework\Session::close();
$output = $oModule->moduleUpdate();
Rhymix\Framework\Session::start();
return $output;
if($output instanceof BaseObject && !$output->toBool())
{
return $output;
}
}
function procInstallAdminRemoveFTPInfo()

View file

@ -12,7 +12,7 @@ class install extends ModuleObject
*/
function moduleInstall()
{
return new Object();
}
/**
@ -28,7 +28,7 @@ class install extends ModuleObject
*/
function moduleUpdate()
{
return new Object();
}
/**

View file

@ -76,7 +76,7 @@ class installController extends install
{
if ($oDB->isTableExists($table_name))
{
return new Object(-1, 'msg_table_already_exists');
return $this->setError('msg_table_already_exists');
}
}
@ -99,7 +99,7 @@ class installController extends install
// Check if it is already installed
if (Context::isInstalled())
{
return new Object(-1, 'msg_already_installed');
return $this->setError('msg_already_installed');
}
// Get install parameters.
@ -227,7 +227,7 @@ class installController extends install
catch(Exception $e)
{
$oDB->rollback();
return new Object(-1, $e->getMessage());
return $this->setError($e->getMessage());
}
// Execute the install script.
@ -264,7 +264,7 @@ class installController extends install
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : RX_BASEURL;
$this->setRedirectUrl($returnUrl);
return new Object();
return new BaseObject();
}
/**
@ -411,7 +411,7 @@ class installController extends install
else
{
FileHandler::removeFile($this->flagLicenseAgreement);
return new Object(-1, 'msg_must_accept_license_agreement');
return $this->setError('msg_must_accept_license_agreement');
}
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON')))
@ -505,7 +505,7 @@ class installController extends install
}
}
return new Object();
return new BaseObject();
}
/**
@ -534,7 +534,7 @@ class installController extends install
unset($oModule);
$oModule = getClass($module);
if(method_exists($oModule, 'moduleInstall')) $oModule->moduleInstall();
return new Object();
return new BaseObject();
}
/**

View file

@ -15,13 +15,13 @@ class installModel extends install
$connection = ssh2_connect($ftp_info->ftp_host, $ftp_info->ftp_port);
if(!ssh2_auth_password($connection, $ftp_info->ftp_user, $ftp_info->ftp_password))
{
return new Object(-1,'msg_ftp_invalid_auth_info');
return $this->setError('msg_ftp_invalid_auth_info');
}
$sftp = ssh2_sftp($connection);
$curpwd = "ssh2.sftp://$sftp".$this->pwd;
$dh = @opendir($curpwd);
if(!$dh) return new Object(-1, 'msg_ftp_invalid_path');
if(!$dh) return $this->setError('msg_ftp_invalid_path');
$list = array();
while(($file = readdir($dh)) !== false)
@ -37,7 +37,7 @@ class installModel extends install
{
if(!($ftp_info = Context::getRequestVars()) || !$ftp_info->ftp_user || !$ftp_info->ftp_password)
{
return new Object(-1, 'msg_ftp_invalid_auth_info');
return $this->setError('msg_ftp_invalid_auth_info');
}
$this->pwd = $ftp_info->ftp_root_path;
if(!$ftp_info->ftp_host)
@ -54,11 +54,11 @@ class installModel extends install
if(function_exists('ftp_connect'))
{
$connection = ftp_connect($ftp_info->ftp_host, $ftp_info->ftp_port);
if(!$connection) return new Object(-1, sprintf(lang('msg_ftp_not_connected'), 'host'));
if(!$connection) return $this->setError(sprintf(lang('msg_ftp_not_connected'), 'host'));
if(! @ftp_login($connection, $ftp_info->ftp_user, $ftp_info->ftp_password))
{
ftp_close($connection);
return new Object(-1,'msg_ftp_invalid_auth_info');
return $this->setError('msg_ftp_invalid_auth_info');
}
if($ftp_info->ftp_pasv != "N")
@ -82,7 +82,7 @@ class installModel extends install
else
{
$oFtp->ftp_quit();
return new Object(-1,'msg_ftp_invalid_auth_info');
return $this->setError('msg_ftp_invalid_auth_info');
}
}
}

View file

@ -58,7 +58,6 @@ class installView extends install
else
{
$this->setRedirectUrl(RX_BASEURL);
return new Object();
}
}
}

View file

@ -148,7 +148,7 @@ function __makeMenu(&$list, $parent_srl)
}
$output = $oMenuAdminController->procMenuAdminInsertItem();
if($output instanceof Object && !$output->toBool())
if($output instanceof BaseObject && !$output->toBool())
{
return $output;
}