PMC-557:[Zendesk - 7292] Output documents are generated with an incorrect file name when downloaded
Correction back Slash correction
This commit is contained in:
@@ -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
|
||||
*
|
||||
* @author Erik Amaru Ortiz <erik@colosa.com, aortiz.erik@gamil.com>
|
||||
* @param (string) string to convert
|
||||
* @param (string) character for replace
|
||||
* @param (array) additional characteres map
|
||||
*
|
||||
* @param string $string to convert
|
||||
* @param string $replacement character for replace
|
||||
* @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())
|
||||
{
|
||||
@@ -3209,8 +3210,6 @@ class G
|
||||
$replacement = '_';
|
||||
}
|
||||
|
||||
$quotedReplacement = preg_quote($replacement, '/');
|
||||
|
||||
$default = array('/à|á|å|â/' => 'a',
|
||||
'/è|é|ê|ẽ|ë/' => 'e',
|
||||
'/ì|í|î/' => 'i',
|
||||
@@ -3226,6 +3225,7 @@ class G
|
||||
'/Ö/' => 'Oe',
|
||||
'/ß/' => 'ss',
|
||||
'/[\.|\,|\+|\"|\:|\;|\-|\\|\/]/' => " ",
|
||||
'/\\\\/' => $replacement,
|
||||
'/\\s+/' => $replacement);
|
||||
|
||||
$map = array_merge($default, $map);
|
||||
|
||||
@@ -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'])) {
|
||||
$ext = $info['extension'];
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user