issue 740 check sftp enviroment, when called by autoinstaller

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9973 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2011-12-21 09:15:23 +00:00
parent 77b5d75c4d
commit 5cb282bb49

View file

@ -138,10 +138,11 @@
$ftp_password = $_SESSION['ftp_password'];
}
$isSftpSupported = function_exists(ssh2_sftp);
foreach($packages as $package_srl)
{
$package = $oModel->getPackage($package_srl);
if($ftp_info->sftp && $ftp_info->sftp == 'Y')
if($ftp_info->sftp && $ftp_info->sftp == 'Y' && $isSftpSupported)
{
$oModuleInstaller = new SFTPModuleInstaller($package);
}
@ -243,7 +244,8 @@
}
$ftp_info = Context::getFTPInfo();
if($ftp_info->sftp && $ftp_info->sftp == 'Y')
$isSftpSupported = function_exists(ssh2_sftp);
if($ftp_info->sftp && $ftp_info->sftp == 'Y' && $isSftpSupported)
{
$oModuleInstaller = new SFTPModuleInstaller($package);
}