Añadi correcciones para translations para plugins.. y arreglo en la clase G

This commit is contained in:
Brayan Osmar Pereyra Suxo
2013-06-06 16:12:05 -04:00
parent b140da984c
commit 1d6eda27eb
3 changed files with 9 additions and 7 deletions

View File

@@ -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);

View File

@@ -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 );
}

View File

@@ -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;
}
}