From e1694296e7b99b1442562b79d236d3397d37e7bd Mon Sep 17 00:00:00 2001 From: "marcelo.cuiza" Date: Wed, 8 Apr 2015 17:51:42 -0400 Subject: [PATCH] PM-2127 Admin>Settings>Logo En windows Server 2012 y WIndows 7 no permite cargar un logo Se valido el path en windows --- workflow/engine/controllers/adminProxy.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/workflow/engine/controllers/adminProxy.php b/workflow/engine/controllers/adminProxy.php index 3be771ff1..ba4d16731 100644 --- a/workflow/engine/controllers/adminProxy.php +++ b/workflow/engine/controllers/adminProxy.php @@ -1055,6 +1055,22 @@ class adminProxy extends HttpProxyController $aMessage1 = array(); $fileName = trim(str_replace(' ', '_', $namefile)); $fileName = self::changeNamelogo($fileName); + + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + $tmpFile = str_replace("\\\\","\\",$tmpFile,$count); + if(!$count) { + $tmpFileName = basename($tmpFile); + $winPath = explode("\\", $tmpFile); + $tmpFile = ""; + foreach($winPath as $k => $v){ + if($v != "") { + $tmpFile.= $v."\\"; + } + } + $tmpFile = substr($tmpFile,0,-1); + } + } + G::uploadFile($tmpFile, $dir, 'tmp' . $fileName); try { if (extension_loaded('exif')) {