#18726233 : add passive option for ftp use, (default is to use passive mode)

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7314 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2010-02-24 06:29:14 +00:00
parent d5ff1c4ceb
commit 1fc0517ba2
3 changed files with 11 additions and 1 deletions

View file

@ -144,6 +144,10 @@
<th scope="col"><div><label for="textfield24">{$lang->ftp_port} (default: 21) </label></div></th>
<td><input id="textfield24" type="text" name="ftp_port" value="{$ftp_info->ftp_port}" class="inputTypeText" /></td>
</tr>
<tr>
<th scope="col"><div><label for="checkboxpasv">FTP Passive mode</label></div></th>
<td><input type="checkbox" id="checkboxpasv" name="ftp_pasv" value="Y" <!--@if($ftp_info->ftp_pasv!="N")-->checked="checked"<!--@end--> /></td>
</tr>
<!--@if($sftp_support)-->
<tr>
<th scope="col"><div><label for="checkbox25">{$lang->sftp}</label></div></th>

View file

@ -179,6 +179,10 @@
return new Object(-1,'msg_ftp_invalid_auth_info');
}
$_SESSION['ftp_password'] = $this->ftp_password;
if($ftp_info->ftp_pasv != "N")
{
ftp_pasv($connection, true);
}
$target_dir = $ftp_info->ftp_root_path.$this->target_path;

View file

@ -126,7 +126,9 @@
$ftp_info = Context::getFTPInfo();
$ftp_info->ftp_user = Context::get('ftp_user');
$ftp_info->ftp_port = Context::get('ftp_port');
$ftp_info->ftp_host = Context::Get('ftp_host');
$ftp_info->ftp_host = Context::get('ftp_host');
$ftp_info->ftp_pasv = Context::get('ftp_pasv');
if(!$ftp_info->ftp_pasv) $ftp_info->ftp_pasv = "N";
$ftp_info->sftp = Context::get('sftp');
$ftp_info->ftp_root_path = Context::get('ftp_root_path');
if(ini_get('safe_mode')) {