Arreglado problemas con los acentos al cargar/descargar información en un fichero ZIP.

git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_SGD/trunk@5 eb19766c-00d9-a042-a3a0-45cb8ec72764
This commit is contained in:
David Arranz 2010-09-10 17:22:23 +00:00
parent bce2a10d83
commit 63235f31e0
3 changed files with 10 additions and 10 deletions

View File

@ -208,13 +208,13 @@ class ZipFolder {
return PEAR::raiseError(_kt("No folders or documents found to compress")); return PEAR::raiseError(_kt("No folders or documents found to compress"));
} }
$sZipFile = sprintf("%s/%s.".$this->extension, $this->sTmpPath, $this->sZipFileName); /*$sZipFile = sprintf("%s/%s.".$this->extension, $this->sTmpPath, $this->sZipFileName);
$sZipFile = str_replace('<', '', str_replace('</', '', str_replace('>', '', $sZipFile))); $sZipFile = str_replace('<', '', str_replace('</', '', str_replace('>', '', $sZipFile)));
$archive = new KTPclZip($sZipFile); $archive = new KTPclZip($sZipFile);
$archive->createZipFile($this->sTmpPath.'/Root Folder'); $archive->createZipFile($this->sTmpPath.'/Root Folder');*/
/*
$config = KTConfig::getSingleton(); $config = KTConfig::getSingleton();
$useBinary = true; //$config->get('export/useBinary', false); $useBinary = true; //$config->get('export/useBinary', false);
@ -267,7 +267,7 @@ class ZipFolder {
File_Archive::toArchive($this->sZipFileName.'.'.$this->extension, File_Archive::toFiles($this->sTmpPath), $this->extension) File_Archive::toArchive($this->sZipFileName.'.'.$this->extension, File_Archive::toFiles($this->sTmpPath), $this->extension)
); );
} }
*/
// Save the zip file and path into session // Save the zip file and path into session
$_SESSION['zipcompression'] = KTUtil::arrayGet($_SESSION, 'zipcompression', array()); $_SESSION['zipcompression'] = KTUtil::arrayGet($_SESSION, 'zipcompression', array());
@ -354,9 +354,9 @@ class ZipFolder {
} }
function _convertEncoding($sMystring, $bEncode) { function _convertEncoding($sMystring, $bEncode) {
if (strcasecmp($this->sOutputEncoding, "UTF-8") === 0) { /*if (strcasecmp($this->sOutputEncoding, "UTF-8") === 0) {
return $sMystring; return $sMystring;
} }*/
if ($bEncode) { if ($bEncode) {
return iconv("UTF-8", $this->sOutputEncoding, $sMystring); return iconv("UTF-8", $this->sOutputEncoding, $sMystring);
} else { } else {

View File

@ -199,4 +199,4 @@ class KTBulkImportManager {
} }
} }
?> ?>

View File

@ -137,10 +137,10 @@ class KTZipImportStorage extends KTFSImportStorage {
// todo: replace file archive for tar, etc // todo: replace file archive for tar, etc
if($this->sExtension == 'zip'){ if($this->sExtension == 'zip'){
$archive = new KTPclZip($this->sZipPath); /*$archive = new KTPclZip($this->sZipPath);
$archive->extractZipFile($sTmpPath); $archive->extractZipFile($sTmpPath);*/
/* ** Original zip functionality using the unzip binary ** * /* ** Original zip functionality using the unzip binary ** */
$sUnzipCommand = KTUtil::findCommand("import/unzip", "unzip"); $sUnzipCommand = KTUtil::findCommand("import/unzip", "unzip");
if (empty($sUnzipCommand)) { if (empty($sUnzipCommand)) {
return PEAR::raiseError(_kt("unzip command not found on system")); return PEAR::raiseError(_kt("unzip command not found on system"));