[Vtigercrm-commits] [vtiger-commits] r11015 - /vtigercrm/branches/5.0.3/modules/Settings/Save.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu May 24 08:00:59 EDT 2007
Author: richie
Date: Thu May 24 06:00:41 2007
New Revision: 11015
Log:
fix for 3886. Fixes #3886 --allen
Modified:
vtigercrm/branches/5.0.3/modules/Settings/Save.php
Modified: vtigercrm/branches/5.0.3/modules/Settings/Save.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Settings/Save.php (original)
+++ vtigercrm/branches/5.0.3/modules/Settings/Save.php Thu May 24 06:00:41 2007
@@ -59,28 +59,30 @@
if($server_type == 'backup')
{
+ $action = 'BackupServerConfig&bkp_server_mode=edit&server='.$server.'&server_user='.$server_username.'&password='.$server_password;
if(!function_exists('ftp_connect')){
- echo $mod_strings['LBL_ENABLE_FTP'];
- exit();
- }
- $conn_id = @ftp_connect($server);
- $action = 'BackupServerConfig&bkp_server_mode=edit&server='.$server.'&server_user='.$server_username.'&password='.$server_password;
- if(!$conn_id)
- {
- $error_str = 'error=Unable to connect "'.$server.'"';
+ $error_str = 'error=FTP support is not enabled.';
$db_update = false;
}else
{
- if(!@ftp_login($conn_id, $server_username, $server_password))
+ $conn_id = @ftp_connect($server);
+ if(!$conn_id)
{
- $error_str = 'error=Couldn\'t connect to "'.$server.'" as user "'.$server_username.'"';
+ $error_str = 'error=Unable to connect "'.$server.'"';
$db_update = false;
+ }else
+ {
+ if(!@ftp_login($conn_id, $server_username, $server_password))
+ {
+ $error_str = 'error=Couldn\'t connect to "'.$server.'" as user "'.$server_username.'"';
+ $db_update = false;
+ }
+ else
+ {
+ $action = 'BackupServerConfig';
+ }
+ ftp_close($conn_id);
}
- else
- {
- $action = 'BackupServerConfig';
- }
- ftp_close($conn_id);
}
}
if($server_type == 'proxy' || $server_type == 'backup')
More information about the vtigercrm-commits
mailing list