mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-17 19:20:56 +01:00
Merge pull request #788 from camilstaps/fix-391-directory-structure-is-ignored
Fix #391: directory structure is ignored
This commit is contained in:
@@ -157,7 +157,7 @@ class Client extends BaseClient
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function recurseDirectory($path, $topLevel = true)
|
private function recurseDirectory($path, $appendPath = '')
|
||||||
{
|
{
|
||||||
$dir = new \DirectoryIterator($path);
|
$dir = new \DirectoryIterator($path);
|
||||||
|
|
||||||
@@ -209,11 +209,7 @@ class Client extends BaseClient
|
|||||||
$description = null;
|
$description = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$topLevel) {
|
$repoName = $appendPath . $file->getFilename();
|
||||||
$repoName = $file->getPathInfo()->getFilename() . '/' . $file->getFilename();
|
|
||||||
} else {
|
|
||||||
$repoName = $file->getFilename();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_array($this->getProjects()) && !in_array($repoName, $this->getProjects())) {
|
if (is_array($this->getProjects()) && !in_array($repoName, $this->getProjects())) {
|
||||||
continue;
|
continue;
|
||||||
@@ -227,7 +223,7 @@ class Client extends BaseClient
|
|||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$repositories = array_merge($repositories, $this->recurseDirectory($file->getPathname(), false));
|
$repositories = array_merge($repositories, $this->recurseDirectory($file->getPathname(), $appendPath . $file->getFilename() . '/'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user