forked from ZwiiCMS-Team/ZwiiCMS
Supprimer recursiveDirectoryIterator de config.php
This commit is contained in:
parent
0c23b2024c
commit
591f74543a
@ -992,6 +992,8 @@ class common {
|
|||||||
// Préparation des clés de légendes pour la v10
|
// Préparation des clés de légendes pour la v10
|
||||||
// Construire une liste plate de parents et d'enfants
|
// Construire une liste plate de parents et d'enfants
|
||||||
|
|
||||||
|
$pageList = array();
|
||||||
|
|
||||||
foreach ($this->getHierarchy(null,null,null) as $parentKey=>$parentValue) {
|
foreach ($this->getHierarchy(null,null,null) as $parentKey=>$parentValue) {
|
||||||
$pageList [] = $parentKey;
|
$pageList [] = $parentKey;
|
||||||
foreach ($parentValue as $childKey) {
|
foreach ($parentValue as $childKey) {
|
||||||
|
@ -495,26 +495,4 @@ class config extends common {
|
|||||||
'view' => 'manage'
|
'view' => 'manage'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function recursiveDirectoryIterator ($directory = null, $files = array()) {
|
|
||||||
$iterator = new \DirectoryIterator ( $directory );
|
|
||||||
|
|
||||||
foreach ( $iterator as $info ) {
|
|
||||||
if ($info->isFile ()) {
|
|
||||||
$files [$info->__toString ()] = $info;
|
|
||||||
} elseif (!$info->isDot ()) {
|
|
||||||
$list = array($info->__toString () => $this->recursiveDirectoryIterator(
|
|
||||||
$directory.DIRECTORY_SEPARATOR.$info->__toString ()
|
|
||||||
));
|
|
||||||
if(!empty($files))
|
|
||||||
$files = array_merge_recursive($files, $filest);
|
|
||||||
else {
|
|
||||||
$files = $list;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $files;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user