[Vtigercrm-commits] [vtiger-commits] r10738 - in /vtigercrm/branches/5.0.3/modules/Portal: Portal.js Save.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu Apr 19 12:05:05 EDT 2007
Author: richie
Date: Thu Apr 19 10:04:58 2007
New Revision: 10738
Log:
* Fixed the issues with umlaut characters, Fixed #3386
Modified:
vtigercrm/branches/5.0.3/modules/Portal/Portal.js
vtigercrm/branches/5.0.3/modules/Portal/Save.php
Modified: vtigercrm/branches/5.0.3/modules/Portal/Portal.js
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Portal/Portal.js (original)
+++ vtigercrm/branches/5.0.3/modules/Portal/Portal.js Thu Apr 19 10:04:58 2007
@@ -79,8 +79,14 @@
method: 'post',
postBody:'action=PortalAjax&mode=ajax&file=Save&module=Portal&portalname='+portalname+'&portalurl='+portalurl+'&record='+id,
onComplete: function(response) {
- $("status").style.display="none";
- $('portalcont').innerHTML = response.responseText;
+ if(response.responseText.indexOf(":#:FAILURE") > -1)
+ {
+ alert(alert_arr.VALID_DATA)
+ }else
+ {
+ $('portalcont').innerHTML = response.responseText;
+ }
+ $("status").style.display="none";
}
}
);
Modified: vtigercrm/branches/5.0.3/modules/Portal/Save.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Portal/Save.php (original)
+++ vtigercrm/branches/5.0.3/modules/Portal/Save.php Thu Apr 19 10:04:58 2007
@@ -11,12 +11,23 @@
require_once('modules/Portal/Portal.php');
-if(isset($_REQUEST['record']) && $_REQUEST['record'] !='')
+global $default_charset;
+$portlname =str_replace(array("'",'"'),'',iconv("UTF-8",$default_charset,$_REQUEST['portalname']));
+$portlurl =str_replace(array("'",'"'),'',iconv("UTF-8",$default_charset,$_REQUEST['portalurl']));
+
+if($portlname != '' && $portlurl != '')
{
- $result=UpdatePortal($_REQUEST['portalname'],"http://".str_replace("#$#$#","&",$_REQUEST['portalurl']),$_REQUEST['record']);
+ if(isset($_REQUEST['record']) && $_REQUEST['record'] !='')
+ {
+ $result=UpdatePortal($portlname,"http://".str_replace("#$#$#","&",$portlurl),$_REQUEST['record']);
+ }
+ else
+ {
+ $result=SavePortal($portlname,"http://".str_replace("#$#$#","&",$portlurl));
+ }
+ header("Location: index.php?action=PortalAjax&module=Portal&file=ListView&mode=ajax&datamode=manage");
}else
{
- $result=SavePortal($_REQUEST['portalname'],"http://".str_replace("#$#$#","&",$_REQUEST['portalurl']));
+ echo ":#:FAILURE";
}
-header("Location: index.php?action=PortalAjax&module=Portal&file=ListView&mode=ajax&datamode=manage");
?>
More information about the vtigercrm-commits
mailing list