#18677449 : make autoinstall use ftp functions provided by php if possible.

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7279 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2010-02-05 08:47:03 +00:00
parent 06da98e3ed
commit caad12e07c
2 changed files with 88 additions and 3 deletions

View file

@ -135,13 +135,17 @@
if($ftp_info->sftp && $ftp_info->sftp == 'Y')
{
$oModuleInstaller = new SFTPModuleInstaller($package);
$oModuleInstaller->setPassword($ftp_password);
}
else if(function_exists(ftp_connect))
{
$oModuleInstaller = new PHPFTPModuleInstaller($package);
}
else
{
$oModuleInstaller = new FTPModuleInstaller($package);
$oModuleInstaller->setPassword($ftp_password);
}
$oModuleInstaller->setPassword($ftp_password);
$output = $oModuleInstaller->install();
if(!$output->toBool()) return $output;
}