diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php index b56294227..1bd148d44 100644 --- a/gulliver/system/class.g.php +++ b/gulliver/system/class.g.php @@ -1360,7 +1360,7 @@ class G return $e; } - /** + /** * formatNumber * * @author David Callizaya @@ -1376,7 +1376,7 @@ class G return $snum; } - /** + /** * Returns a date formatted according to the given format string * @author David Callizaya * @param string $format The format of the outputted date string @@ -1634,7 +1634,7 @@ class G return $campo; } - /** + /** * Escapes special characters in a string for use in a SQL statement * @param string $sqlString The string to be escaped * @param string $DBEngine Target DBMS @@ -1678,7 +1678,7 @@ class G } } - /** + /** * Returns a sql string with @@parameters replaced with its values defined * in array $result using the next notation: * NOTATION: @@ -1856,7 +1856,7 @@ class G return $sContent; } - /** + /** * Load strings from a XMLFile. * @author David Callizaya * @parameter $languageFile An xml language file. @@ -1895,7 +1895,7 @@ class G } } - /** + /** * Funcion auxiliar Temporal: * Registra en la base de datos los labels xml usados en el sistema * @author David Callizaya @@ -2767,7 +2767,7 @@ class G $image = $inputFn($path); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $resWidth, $resHeight, $width, $height); $outputFn($image_p, $saveTo); - + if (!is_null($saveTo)) { $filter = new InputFilter(); $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 * * @author Erik Amaru Ortiz - * @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); @@ -5824,7 +5824,7 @@ class G include(PATH_METHODS . "login/version-pmos.php"); } //Removed default version from code. - + /** * The constants defined comes from the file: * processmaker/workflow/engine/classes/class.plugin.php, the loading of this @@ -5897,7 +5897,7 @@ class G /** * Fix string corrupted related to PMC-336. * To do, this method should be removed. Related to PMC-336. - * + * * @param string $string * @return string */ diff --git a/workflow/engine/methods/cases/cases_ShowOutputDocument.php b/workflow/engine/methods/cases/cases_ShowOutputDocument.php index a275d143f..0d3dec2dd 100644 --- a/workflow/engine/methods/cases/cases_ShowOutputDocument.php +++ b/workflow/engine/methods/cases/cases_ShowOutputDocument.php @@ -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 {