Admin>Settings>Logo  En windows Server 2012 y WIndows 7 no permite cargar un logo

Se valido el path en windows
This commit is contained in:
marcelo.cuiza
2015-04-08 17:51:42 -04:00
parent 63567186ba
commit e1694296e7

View File

@@ -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')) {