This commit is contained in:
Paula V. Quispe
2015-12-11 12:40:55 -04:00
parent 98e9397229
commit 84444cc00a
3 changed files with 16 additions and 8 deletions

View File

@@ -54,9 +54,11 @@ class Common
$files = glob("$path/$singlePattern", $flags);
$dirs = glob("$path/*", GLOB_MARK|GLOB_ONLYDIR|GLOB_NOSORT);
if(is_array($dirs)){
foreach ($dirs as $dir) {
$files = array_merge($files, self::rglob("$dir/$singlePattern", $flags));
}
}
if ($onlyFiles) {
$files = array_filter($files, function($v) { return is_dir($v) ? false : true;});

View File

@@ -4910,11 +4910,15 @@ class G
$list = glob( rtrim( $path, DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR . '*' );
$sw = true;
if(is_array($list)){
foreach ($list as $f) {
if (! G::is_writable_r( $f, $noWritableFiles )) {
$sw = false;
}
}
} else {
$sw = false;
}
return $sw;
} else {

View File

@@ -476,11 +476,13 @@ class Translation extends BaseTranslation
$this->addTranslationEnvironment( $params['LOCALE'], $params['HEADERS'], $params['COUNT'] );
//getting more language translations
$files = glob( $translationsPath . "*.po" );
if(is_array($files)){
foreach ($files as $file) {
$params = self::getInfoFromPOFile( $file );
$this->addTranslationEnvironment( $params['LOCALE'], $params['HEADERS'], $params['COUNT'] );
}
}
}
$envs = unserialize( file_get_contents( $filePath ) );
$environments = Array ();