[Vtigercrm-commits] [vtiger-commits] r10893 - in /vtigercrm/branches/5.0.3/modules/Settings: BackupServerConfig.php Save.php language/en_us.lang.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Sun May 13 11:23:00 EDT 2007


Author: richie
Date: Sun May 13 09:22:54 2007
New Revision: 10893

Log:
* Fixed the issue in backup server configuration, Fixed #3830

Modified:
    vtigercrm/branches/5.0.3/modules/Settings/BackupServerConfig.php
    vtigercrm/branches/5.0.3/modules/Settings/Save.php
    vtigercrm/branches/5.0.3/modules/Settings/language/en_us.lang.php

Modified: vtigercrm/branches/5.0.3/modules/Settings/BackupServerConfig.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Settings/BackupServerConfig.php (original)
+++ vtigercrm/branches/5.0.3/modules/Settings/BackupServerConfig.php Sun May 13 09:22:54 2007
@@ -42,12 +42,17 @@
 	$smarty->assign("BKP_SERVER_MODE",$_REQUEST['bkp_server_mode']);
 else
 	$smarty->assign("BKP_SERVER_MODE",'view');
-
-if (isset($server))
+if(isset($_REQUEST['server']))
+	$smarty->assign("FTPSERVER",$_REQUEST['server']);
+else if (isset($server))
 	$smarty->assign("FTPSERVER",$server);
-if (isset($server_username))
+if (isset($_REQUEST['server_user']))
+	$smarty->assign("FTPUSER",$_REQUEST['server_user']);
+else if (isset($server_username))
 	$smarty->assign("FTPUSER",$server_username);
-if (isset($server_password))
+if (isset($_REQUEST['password']))
+	$smarty->assign("FTPPASSWORD",$_REQUEST['password']);
+else if (isset($server_password))
 	$smarty->assign("FTPPASSWORD",$server_password);
 
 

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 Sun May 13 09:22:54 2007
@@ -59,11 +59,15 @@
 
 if($server_type == 'backup')
 {
+	if(!function_exists('ftp_connect')){
+		echo $mod_strings['LBL_ENABLE_FTP'];
+		exit();
+	}
 	$conn_id = @ftp_connect($server);
-	$action = 'BackupServerConfig&bkp_server_mode=edit';
+	$action = 'BackupServerConfig&bkp_server_mode=edit&server='.$server.'&server_user='.$server_username.'&password='.$server_password;
 	if(!$conn_id)
 	{
-		$error_str = 'error=Unable connect to "'.$server.'"';
+		$error_str = 'error=Unable to connect "'.$server.'"';
 		$db_update = false;
 	}else
 	{

Modified: vtigercrm/branches/5.0.3/modules/Settings/language/en_us.lang.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Settings/language/en_us.lang.php (original)
+++ vtigercrm/branches/5.0.3/modules/Settings/language/en_us.lang.php Sun May 13 09:22:54 2007
@@ -917,6 +917,7 @@
 'LBL_INVOICE_NUMBER_PREVIEW'=>'Preview',
 'LBL_INVOICE_NUMBER_BUTTON'=>'Update Invoice Number',
 'LBL_PROXY_AUTHENTICATION_REQUIRED'=>'Proxy Authentication Required',
+'LBL_ENABLE_FTP' => 'You must have FTP support enabled in php',
 
 //Added for Role Labels
 'LBL_ADD_ROLE'=>'Add Role',





More information about the vtigercrm-commits mailing list