[Vtigercrm-commits] [vtiger-commits] r10663 - in /vtigercrm/branches/5.0.3: Smarty/templates/Settings/ProxyServer.tpl modules/Settings/ProxyServerConfig.php modules/Settings/Save.php modules/Settings/language/en_us.lang.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu Apr 12 11:22:36 EDT 2007
Author: saraj
Date: Thu Apr 12 09:22:27 2007
New Revision: 10663
Log:
Proxy Settings Values are not retained - fixed. Fixes #3582
Modified:
vtigercrm/branches/5.0.3/Smarty/templates/Settings/ProxyServer.tpl
vtigercrm/branches/5.0.3/modules/Settings/ProxyServerConfig.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/Smarty/templates/Settings/ProxyServer.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/Settings/ProxyServer.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/Settings/ProxyServer.tpl Thu Apr 12 09:22:27 2007
@@ -63,20 +63,20 @@
<tr>
<td width="20%" nowrap class="small cellLabel"><font color="red">*</font><strong>{$MOD.LBL_SERVER_ADDRESS} </strong></td>
<td width="80%" class="small cellText">
- <input type="text" class="detailedViewTextBox small" value="{$PROXYSERVER}" name="server"></strong>
+ <input type="text" class="detailedViewTextBox small" value="{$PROXYSERVER}{$smarty.request.server}" name="server"></strong>
</td>
</tr>
<tr>
<td width="20%" nowrap class="small cellLabel"><font color="red">*</font><strong>{$MOD.LBL_PROXY_PORT} </strong></td>
<td width="80%" class="small cellText">
- <input type="text" class="detailedViewTextBox small" value="{$PROXYPORT}" name="port"></strong>
+ <input type="text" class="detailedViewTextBox small" value="{$PROXYPORT}{$smarty.request.port}" name="port"></strong>
</td>
</tr>
<tr valign="top">
<td nowrap class="small cellLabel"><font color="red">*</font><strong>{$MOD.LBL_USERNAME}</strong></td>
<td class="small cellText">
- <input type="text" class="detailedViewTextBox small" value="{$PROXYUSER}" name="server_username">
+ <input type="text" class="detailedViewTextBox small" value="{$PROXYUSER}{$smarty.request.server_username}" name="server_username">
</td>
</tr>
<tr>
Modified: vtigercrm/branches/5.0.3/modules/Settings/ProxyServerConfig.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Settings/ProxyServerConfig.php (original)
+++ vtigercrm/branches/5.0.3/modules/Settings/ProxyServerConfig.php Thu Apr 12 09:22:27 2007
@@ -21,7 +21,7 @@
$smarty = new vtigerCRM_Smarty;
if($_REQUEST['error'] != '')
{
- $smarty->assign("ERROR_MSG",'<b><font color="red">'.$_REQUEST["error"].'</font></b>');
+ $smarty->assign("ERROR_MSG",'<b><font color="red">'.$mod_strings[$_REQUEST["error"]].'</font></b>');
}
$sql="select * from vtiger_systems where server_type = 'proxy'";
$result = $adb->query($sql);
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 Apr 12 09:22:27 2007
@@ -10,6 +10,8 @@
********************************************************************************/
require_once("include/database/PearDatabase.php");
+global $mod_strings;
+
$server=$_REQUEST['server'];
$port=$_REQUEST['port'];
$server_username=$_REQUEST['server_username'];
@@ -45,7 +47,7 @@
if(substr_count($proxy_cont, "Cache Access Denied") > 0)
{
- $error_str = 'error=Proxy Authentication Required';
+ $error_str = 'error=LBL_PROXY_AUTHENTICATION_REQUIRED';
$db_update = false;
}
else
@@ -115,5 +117,14 @@
if($mail_status != 1)
$action = 'EmailConfig&emailconfig_mode=edit';
}
-header("Location: index.php?module=Settings&parenttab=Settings&action=$action&$error_str");
+//While configuring Proxy settings, the submitted values will be retained when exception is thrown - dina
+if($server_type == 'proxy' && $error_str == 'error=LBL_PROXY_AUTHENTICATION_REQUIRED')
+{
+ header("Location: index.php?module=Settings&parenttab=Settings&action=$action&server=$server&port=$port&server_username=$server_username&$error_str");
+}
+else
+{
+ header("Location: index.php?module=Settings&parenttab=Settings&action=$action&$error_str");
+}
+
?>
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 Thu Apr 12 09:22:27 2007
@@ -915,6 +915,7 @@
'LBL_CUSTOMINVOICE_NUMBER'=>'Custom Invoice Number',
'LBL_INVOICE_NUMBER_PREVIEW'=>'Preview',
'LBL_INVOICE_NUMBER_BUTTON'=>'Update Invoice Number',
+'LBL_PROXY_AUTHENTICATION_REQUIRED'=>'Proxy Authentication Required',
);
?>
More information about the vtigercrm-commits
mailing list