BUG 6893 Al subir en logos imagenes que tienen acentos genera un noticei
this issue was fixed, it is not allowed to put this symbol
This commit is contained in:
@@ -37,12 +37,30 @@ try {//ini_set('display_errors','1');
|
|||||||
die;
|
die;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
function changeNamelogo($snameLogo){
|
||||||
|
$snameLogo = ereg_replace("[áàâãª]","a",$snameLogo);
|
||||||
|
$snameLogo = ereg_replace("[ÁÀÂÃ]","A",$snameLogo);
|
||||||
|
$snameLogo = ereg_replace("[ÍÌÎ]","I",$snameLogo);
|
||||||
|
$snameLogo = ereg_replace("[íìî]","i",$snameLogo);
|
||||||
|
$snameLogo = ereg_replace("[éèê]","e",$snameLogo);
|
||||||
|
$snameLogo = ereg_replace("[ÉÈÊ]","E",$snameLogo);
|
||||||
|
$snameLogo = ereg_replace("[óòôõº]","o",$snameLogo);
|
||||||
|
$snameLogo = ereg_replace("[ÓÒÔÕ]","O",$snameLogo);
|
||||||
|
$snameLogo = ereg_replace("[úùû]","u",$snameLogo);
|
||||||
|
$snameLogo = ereg_replace("[ÚÙÛ]","U",$snameLogo);
|
||||||
|
$snameLogo = str_replace("ç","c",$snameLogo);
|
||||||
|
$snameLogo = str_replace("Ç","C",$snameLogo);
|
||||||
|
$snameLogo = str_replace("[ñ]","n",$snameLogo);
|
||||||
|
$snameLogo = str_replace("[Ñ]","N",$snameLogo);
|
||||||
|
return ($snameLogo);
|
||||||
|
}
|
||||||
|
|
||||||
$sfunction =$_GET['function'];
|
$sfunction =$_GET['function'];
|
||||||
switch($sfunction){
|
switch($sfunction){
|
||||||
case 'replacementLogo':
|
case 'replacementLogo':
|
||||||
$snameLogo=urldecode($_GET['NAMELOGO']);
|
$snameLogo=urldecode($_GET['NAMELOGO']);
|
||||||
|
$snameLogo=trim($snameLogo);
|
||||||
|
$snameLogo=changeNamelogo($snameLogo);
|
||||||
G::loadClass('configuration');
|
G::loadClass('configuration');
|
||||||
$oConf = new Configurations;
|
$oConf = new Configurations;
|
||||||
$aConf = Array(
|
$aConf = Array(
|
||||||
|
|||||||
@@ -90,7 +90,23 @@ try {
|
|||||||
closedir($handle);
|
closedir($handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function changeNamelogo($snameLogo){
|
||||||
|
$snameLogo = ereg_replace("[áàâãª]","a",$snameLogo);
|
||||||
|
$snameLogo = ereg_replace("[ÁÀÂÃ]","A",$snameLogo);
|
||||||
|
$snameLogo = ereg_replace("[ÍÌÎ]","I",$snameLogo);
|
||||||
|
$snameLogo = ereg_replace("[íìî]","i",$snameLogo);
|
||||||
|
$snameLogo = ereg_replace("[éèê]","e",$snameLogo);
|
||||||
|
$snameLogo = ereg_replace("[ÉÈÊ]","E",$snameLogo);
|
||||||
|
$snameLogo = ereg_replace("[óòôõº]","o",$snameLogo);
|
||||||
|
$snameLogo = ereg_replace("[ÓÒÔÕ]","O",$snameLogo);
|
||||||
|
$snameLogo = ereg_replace("[úùû]","u",$snameLogo);
|
||||||
|
$snameLogo = ereg_replace("[ÚÙÛ]","U",$snameLogo);
|
||||||
|
$snameLogo = str_replace("ç","c",$snameLogo);
|
||||||
|
$snameLogo = str_replace("Ç","C",$snameLogo);
|
||||||
|
$snameLogo = str_replace("[ñ]","n",$snameLogo);
|
||||||
|
$snameLogo = str_replace("[Ñ]","N",$snameLogo);
|
||||||
|
return ($snameLogo);
|
||||||
|
}
|
||||||
// if we have at least one image we show the restore image
|
// if we have at least one image we show the restore image
|
||||||
/*if($i>0) {
|
/*if($i>0) {
|
||||||
$template->gotoBlock( "_ROOT" );
|
$template->gotoBlock( "_ROOT" );
|
||||||
@@ -111,6 +127,7 @@ try {
|
|||||||
$tpnfile = $formf['tmp_name']['LOGO_FILENAME'];
|
$tpnfile = $formf['tmp_name']['LOGO_FILENAME'];
|
||||||
$aMessage1 = array();
|
$aMessage1 = array();
|
||||||
$fileName = trim(str_replace(' ','_', $namefile));
|
$fileName = trim(str_replace(' ','_', $namefile));
|
||||||
|
$fileName = changeNamelogo($fileName);
|
||||||
G::uploadFile( $tpnfile, $dir . '/', 'tmp'.$fileName );
|
G::uploadFile( $tpnfile, $dir . '/', 'tmp'.$fileName );
|
||||||
$error = false;
|
$error = false;
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user