PMC-557:[Zendesk - 7292] Output documents are generated with an incorrect file name when downloaded
Correction back Slash correction
This commit is contained in:
@@ -1360,7 +1360,7 @@ class G
|
|||||||
return $e;
|
return $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* formatNumber
|
* formatNumber
|
||||||
*
|
*
|
||||||
* @author David Callizaya <calidavidx21@yahoo.com.ar>
|
* @author David Callizaya <calidavidx21@yahoo.com.ar>
|
||||||
@@ -1376,7 +1376,7 @@ class G
|
|||||||
return $snum;
|
return $snum;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a date formatted according to the given format string
|
* Returns a date formatted according to the given format string
|
||||||
* @author David Callizaya <calidavidx21@hotmail.com>
|
* @author David Callizaya <calidavidx21@hotmail.com>
|
||||||
* @param string $format The format of the outputted date string
|
* @param string $format The format of the outputted date string
|
||||||
@@ -1634,7 +1634,7 @@ class G
|
|||||||
return $campo;
|
return $campo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Escapes special characters in a string for use in a SQL statement
|
* Escapes special characters in a string for use in a SQL statement
|
||||||
* @param string $sqlString The string to be escaped
|
* @param string $sqlString The string to be escaped
|
||||||
* @param string $DBEngine Target DBMS
|
* @param string $DBEngine Target DBMS
|
||||||
@@ -1678,7 +1678,7 @@ class G
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a sql string with @@parameters replaced with its values defined
|
* Returns a sql string with @@parameters replaced with its values defined
|
||||||
* in array $result using the next notation:
|
* in array $result using the next notation:
|
||||||
* NOTATION:
|
* NOTATION:
|
||||||
@@ -1856,7 +1856,7 @@ class G
|
|||||||
return $sContent;
|
return $sContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load strings from a XMLFile.
|
* Load strings from a XMLFile.
|
||||||
* @author David Callizaya <davidsantos@colosa.com>
|
* @author David Callizaya <davidsantos@colosa.com>
|
||||||
* @parameter $languageFile An xml language file.
|
* @parameter $languageFile An xml language file.
|
||||||
@@ -1895,7 +1895,7 @@ class G
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Funcion auxiliar Temporal:
|
* Funcion auxiliar Temporal:
|
||||||
* Registra en la base de datos los labels xml usados en el sistema
|
* Registra en la base de datos los labels xml usados en el sistema
|
||||||
* @author David Callizaya <calidavidx21@hotmail.com>
|
* @author David Callizaya <calidavidx21@hotmail.com>
|
||||||
@@ -2767,7 +2767,7 @@ class G
|
|||||||
$image = $inputFn($path);
|
$image = $inputFn($path);
|
||||||
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $resWidth, $resHeight, $width, $height);
|
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $resWidth, $resHeight, $width, $height);
|
||||||
$outputFn($image_p, $saveTo);
|
$outputFn($image_p, $saveTo);
|
||||||
|
|
||||||
if (!is_null($saveTo)) {
|
if (!is_null($saveTo)) {
|
||||||
$filter = new InputFilter();
|
$filter = new InputFilter();
|
||||||
$saveTo = $filter->validateInput($saveTo, "path");
|
$saveTo = $filter->validateInput($saveTo, "path");
|
||||||
@@ -3197,10 +3197,11 @@ class G
|
|||||||
* Inflects a string with accented characters and other characteres not suitable for file names, by defaul replace with undescore
|
* Inflects a string with accented characters and other characteres not suitable for file names, by defaul replace with undescore
|
||||||
*
|
*
|
||||||
* @author Erik Amaru Ortiz <erik@colosa.com, aortiz.erik@gamil.com>
|
* @author Erik Amaru Ortiz <erik@colosa.com, aortiz.erik@gamil.com>
|
||||||
* @param (string) string to convert
|
* @param string $string to convert
|
||||||
* @param (string) character for replace
|
* @param string $replacement character for replace
|
||||||
* @param (array) additional characteres map
|
* @param array $map additional characteres map
|
||||||
*
|
* @return string|string[]|null
|
||||||
|
* @see PMXPublisher::truncateName, Processes::saveSerializedProcess, XmlExporter::truncateName
|
||||||
*/
|
*/
|
||||||
public static function inflect($string, $replacement = '_', $map = array())
|
public static function inflect($string, $replacement = '_', $map = array())
|
||||||
{
|
{
|
||||||
@@ -3209,8 +3210,6 @@ class G
|
|||||||
$replacement = '_';
|
$replacement = '_';
|
||||||
}
|
}
|
||||||
|
|
||||||
$quotedReplacement = preg_quote($replacement, '/');
|
|
||||||
|
|
||||||
$default = array('/à|á|å|â/' => 'a',
|
$default = array('/à|á|å|â/' => 'a',
|
||||||
'/è|é|ê|ẽ|ë/' => 'e',
|
'/è|é|ê|ẽ|ë/' => 'e',
|
||||||
'/ì|í|î/' => 'i',
|
'/ì|í|î/' => 'i',
|
||||||
@@ -3226,6 +3225,7 @@ class G
|
|||||||
'/Ö/' => 'Oe',
|
'/Ö/' => 'Oe',
|
||||||
'/ß/' => 'ss',
|
'/ß/' => 'ss',
|
||||||
'/[\.|\,|\+|\"|\:|\;|\-|\\|\/]/' => " ",
|
'/[\.|\,|\+|\"|\:|\;|\-|\\|\/]/' => " ",
|
||||||
|
'/\\\\/' => $replacement,
|
||||||
'/\\s+/' => $replacement);
|
'/\\s+/' => $replacement);
|
||||||
|
|
||||||
$map = array_merge($default, $map);
|
$map = array_merge($default, $map);
|
||||||
@@ -5824,7 +5824,7 @@ class G
|
|||||||
include(PATH_METHODS . "login/version-pmos.php");
|
include(PATH_METHODS . "login/version-pmos.php");
|
||||||
}
|
}
|
||||||
//Removed default version from code.
|
//Removed default version from code.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The constants defined comes from the file:
|
* The constants defined comes from the file:
|
||||||
* processmaker/workflow/engine/classes/class.plugin.php, the loading of this
|
* processmaker/workflow/engine/classes/class.plugin.php, the loading of this
|
||||||
@@ -5897,7 +5897,7 @@ class G
|
|||||||
/**
|
/**
|
||||||
* Fix string corrupted related to PMC-336.
|
* Fix string corrupted related to PMC-336.
|
||||||
* To do, this method should be removed. Related to PMC-336.
|
* To do, this method should be removed. Related to PMC-336.
|
||||||
*
|
*
|
||||||
* @param string $string
|
* @param string $string
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ if (defined('DISABLE_DOWNLOAD_DOCUMENTS_SESSION_VALIDATION') && DISABLE_DOWNLOAD
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$info = pathinfo($oAppDocument->getAppDocFilename());
|
$info = pathinfo(G::inflect($oAppDocument->getAppDocFilename()));
|
||||||
if (!isset($_GET['ext'])) {
|
if (!isset($_GET['ext'])) {
|
||||||
$ext = $info['extension'];
|
$ext = $info['extension'];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user