Añadi correcciones para translations para plugins.. y arreglo en la clase G
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user