[Vtigercrm-commits] [vtiger-commits] r10814 - in /vtigercrm/branches/5.0.3: include/Ajax/ include/utils/ modules/Portal/ modules/Reports/ modules/Rss/ modules/Settings/ modules/Webmails/
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Apr 30 04:13:59 EDT 2007
Author: saraj
Date: Mon Apr 30 02:13:46 2007
New Revision: 10814
Log:
check added to find the existance of iconv function
Modified:
vtigercrm/branches/5.0.3/include/Ajax/TagCloud.php
vtigercrm/branches/5.0.3/include/utils/SearchUtils.php
vtigercrm/branches/5.0.3/modules/Portal/Save.php
vtigercrm/branches/5.0.3/modules/Reports/CheckReport.php
vtigercrm/branches/5.0.3/modules/Reports/SaveReportFolder.php
vtigercrm/branches/5.0.3/modules/Rss/Rss.php
vtigercrm/branches/5.0.3/modules/Settings/SaveNotification.php
vtigercrm/branches/5.0.3/modules/Webmails/Webmails.php
Modified: vtigercrm/branches/5.0.3/include/Ajax/TagCloud.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/Ajax/TagCloud.php (original)
+++ vtigercrm/branches/5.0.3/include/Ajax/TagCloud.php Mon Apr 30 02:13:46 2007
@@ -19,8 +19,8 @@
{
require_once('include/freetag/freetag.class.php');
- $tagfields=$_REQUEST['tagfields'];
- $tagfields =str_replace(array("'",'"'),'',iconv("UTF-8",$default_charset,$_REQUEST['tagfields']));
+ $tagfields=function_exists(iconv) ? @iconv("UTF-8",$default_charset,$_REQUEST['tagfields']) : $_REQUEST['tagfields'];
+ $tagfields =str_replace(array("'",'"'),'',$tagfields);
if($tagfields != "")
{
$freetag = new freetag();
Modified: vtigercrm/branches/5.0.3/include/utils/SearchUtils.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/utils/SearchUtils.php (original)
+++ vtigercrm/branches/5.0.3/include/utils/SearchUtils.php Mon Apr 30 02:13:46 2007
@@ -161,7 +161,7 @@
$search_string = $_REQUEST['search_text'];
- $stringConvert = iconv("UTF-8",$default_charset,$search_string);
+ $stringConvert = function_exists(iconv) ? @iconv("UTF-8",$default_charset,$search_string) : $search_string;
$search_string=addslashes(ltrim(rtrim($stringConvert)));
@@ -607,7 +607,7 @@
$tab_col = str_replace('\'','',stripslashes($_REQUEST[$table_colname]));
$srch_cond = str_replace('\'','',stripslashes($_REQUEST[$search_condition]));
$srch_val = $_REQUEST[$search_value];
- $srch_val = iconv("UTF-8",$default_charset,$srch_val);
+ $srch_val = function_exists(iconv) ? @iconv("UTF-8",$default_charset,$srch_val) : $srch_val;
list($tab_name,$column_name) = split("[.]",$tab_col);
$url_string .="&Fields".$i."=".$tab_col."&Condition".$i."=".$srch_cond."&Srch_value".$i."=".$srch_val;
$uitype=getUItype($currentModule,$column_name);
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 Mon Apr 30 02:13:46 2007
@@ -12,8 +12,10 @@
require_once('modules/Portal/Portal.php');
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']));
+$conv_pname = function_exists(iconv) ? @iconv("UTF-8",$default_charset, $_REQUEST['portalname']) : $_REQUEST['portalname'];
+$conv_purl = function_exists(iconv) ? @iconv("UTF-8",$default_charset, $_REQUEST['portalurl']) : $_REQUEST['portalurl'];
+$portlname =str_replace(array("'",'"'),'',$conv_pname);
+$portlurl =str_replace(array("'",'"'),'',$conv_purl);
if($portlname != '' && $portlurl != '')
{
Modified: vtigercrm/branches/5.0.3/modules/Reports/CheckReport.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Reports/CheckReport.php (original)
+++ vtigercrm/branches/5.0.3/modules/Reports/CheckReport.php Mon Apr 30 02:13:46 2007
@@ -25,8 +25,8 @@
}
else if($_REQUEST['check']== 'folderCheck')
{
- $folderName = $_REQUEST['folderName'];
- $folderName =str_replace(array("'",'"'),'',iconv("UTF-8",$default_charset,$folderName));
+ $folderName = function_exists(iconv) ? @iconv("UTF-8",$default_charset, $_REQUEST['folderName']) : $_REQUEST['folderName'];
+ $folderName =str_replace(array("'",'"'),'',$folderName);
if($folderName == "" || !$folderName)
{
echo "999";
Modified: vtigercrm/branches/5.0.3/modules/Reports/SaveReportFolder.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Reports/SaveReportFolder.php (original)
+++ vtigercrm/branches/5.0.3/modules/Reports/SaveReportFolder.php Mon Apr 30 02:13:46 2007
@@ -20,7 +20,7 @@
$rfid = $_REQUEST['record'];
$mode = $_REQUEST['savemode'];
$foldername = addslashes($_REQUEST["foldername"]);
-$foldername = iconv("UTF-8",$default_charset,$foldername);
+$foldername = function_exists(iconv) ? @iconv("UTF-8",$default_charset, $foldername) : $foldername;
$folderdesc = addslashes($_REQUEST["folderdesc"]);
$foldername = str_replace('*amp*','&',$foldername);
$folderdesc = str_replace('*amp*','&',$folderdesc);
Modified: vtigercrm/branches/5.0.3/modules/Rss/Rss.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Rss/Rss.php (original)
+++ vtigercrm/branches/5.0.3/modules/Rss/Rss.php Mon Apr 30 02:13:46 2007
@@ -75,7 +75,7 @@
$i = 0;
foreach($this->rss_object as $key=>$item)
{
- $stringConvert = iconv("UTF-8",$default_charset,$item[title]);
+ $stringConvert = function_exists(iconv) ? @iconv("UTF-8",$default_charset,$item[title]) : $item[title];
$rss_title= addslashes(ltrim(rtrim($stringConvert)));
$i = $i + 1;
Modified: vtigercrm/branches/5.0.3/modules/Settings/SaveNotification.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Settings/SaveNotification.php (original)
+++ vtigercrm/branches/5.0.3/modules/Settings/SaveNotification.php Mon Apr 30 02:13:46 2007
@@ -12,8 +12,10 @@
require_once('include/database/PearDatabase.php');
global $default_charset;
global $adb;
-$notifysubject =str_replace(array("'",'"'),'',iconv("UTF-8",$default_charset,$_REQUEST['notifysubject']));
-$notifybody =str_replace(array("'",'"'),'',iconv("UTF-8",$default_charset,$_REQUEST['notifybody']));
+$conv_sub = function_exists(iconv) ? @iconv("UTF-8",$default_charset, $_REQUEST['notifysubject']) : $_REQUEST['notifysubject'];
+$conv_body = function_exists(iconv) ? @iconv("UTF-8",$default_charset, $_REQUEST['notifybody']) : $_REQUEST['notifybody'];
+$notifysubject =str_replace(array("'",'"'),'',$conv_sub);
+$notifybody =str_replace(array("'",'"'),'',$conv_body);
if($notifysubject != '' && $notifybody != '')
{
Modified: vtigercrm/branches/5.0.3/modules/Webmails/Webmails.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Webmails/Webmails.php (original)
+++ vtigercrm/branches/5.0.3/modules/Webmails/Webmails.php Mon Apr 30 02:13:46 2007
@@ -632,7 +632,7 @@
if ($element_charset == 'x-unknown')
$element_charset = 'ISO-8859-1';
- $element_converted = @iconv( $element_charset, $output_charset, $source[$j]->text);
+ $element_converted = function_exists(iconv) ? @iconv( $element_charset, $output_charset, $source[$j]->text): $source[$j]->text ;
$result[$j]->text = $element_converted;
$result[$j]->charset = $output_charset;
}
@@ -770,7 +770,7 @@
$body_charset = $_REQUEST['user_charset'];
}
$this->charsets = $body_charset;
- $body_converted = @iconv( $body_charset, $GLOBALS['charset'], $body);
+ $body_converted = function_exists(iconv) ? @iconv( $body_charset, $GLOBALS['charset'], $body) : $body;
$body = ($body_converted===FALSE) ? $body : $body_converted;
$tmpvar['charset'] = ($body_converted===FALSE) ? $body_charset : $GLOBALS['charset'];
}
More information about the vtigercrm-commits
mailing list