From 1d6eda27eb5998cf3b75afdefae506ed49a4356b Mon Sep 17 00:00:00 2001 From: Brayan Osmar Pereyra Suxo Date: Thu, 6 Jun 2013 16:12:05 -0400 Subject: [PATCH] =?UTF-8?q?A=C3=B1adi=20correcciones=20para=20translations?= =?UTF-8?q?=20para=20plugins..=20y=20arreglo=20en=20la=20clase=20G?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gulliver/system/class.bootstrap.php | 3 +-- gulliver/system/class.g.php | 2 +- gulliver/system/class.headPublisher.php | 11 +++++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/gulliver/system/class.bootstrap.php b/gulliver/system/class.bootstrap.php index 6be6e1332..ca9cbcac5 100644 --- a/gulliver/system/class.bootstrap.php +++ b/gulliver/system/class.bootstrap.php @@ -579,8 +579,7 @@ class Bootstrap //trick to generate the translation.language.js file , merging two files if (strtolower($typefile) == 'js' && $typearray[0] == 'translation') { Bootstrap::sendHeaders($filename, 'text/javascript', $download, $downloadFileName); - - if ($typearray[1] != "enterprise") { + if ($typearray[1] != "enterprise" && $typearray[1] != "pmCaseArchive") { $arrayAux = array($typearray[0], $typearray[1], $typearray[count($typearray) - 1]); $filename = str_replace(implode(".", $typearray), implode(".", $arrayAux), $filename); diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php index faa98bef5..15404e913 100755 --- a/gulliver/system/class.g.php +++ b/gulliver/system/class.g.php @@ -370,7 +370,7 @@ class G $files = glob( $dir . '*', GLOB_MARK ); foreach ($files as $file ) { if (substr( $file, -1 ) == '/' ) { - $this->delTree( $file ); + self::delTree( $file ); } else { unlink( $file ); } diff --git a/gulliver/system/class.headPublisher.php b/gulliver/system/class.headPublisher.php index ff8b985b4..7a224a9e4 100644 --- a/gulliver/system/class.headPublisher.php +++ b/gulliver/system/class.headPublisher.php @@ -473,12 +473,15 @@ class headPublisher if (!is_file($sPath . $filename . ".js")) { $aux = explode(PATH_SEP, $filename); //check if G_PLUGIN_CLASS is defined, because publisher can be called without an environment - if (count($aux) == 2 && defined('G_PLUGIN_CLASS')) { + if (count($aux) > 2 && defined('G_PLUGIN_CLASS')) { + $keyPlugin = count($aux)-2; + $oPluginRegistry = & PMPluginRegistry::getSingleton(); - if ($oPluginRegistry->isRegisteredFolder($aux[0])) { - array_push($this->extJsLibrary, 'translation.' . trim($aux[0]) . '.' . SYS_LANG); - $sPath = PATH_PLUGINS; + if (!($oPluginRegistry->isRegisteredFolder($aux[$keyPlugin]))) { + $keyPlugin --; } + array_push($this->extJsLibrary, 'translation.' . trim($aux[$keyPlugin]) . '.' . SYS_LANG); + $sPath = PATH_PLUGINS; } }