mirror of
https://github.com/klaussilveira/gitlist.git
synced 2026-04-11 06:57:56 +02:00
fixed issue #573 (only numbers in repo names), added repo name to zip/tar ball for better identification
This commit is contained in:
@@ -97,9 +97,8 @@ class TreeController implements ControllerProviderInterface
|
||||
* Generating name for downloading, lowercasing and removing all non
|
||||
* ascii and special characters
|
||||
*/
|
||||
$filename = strtolower($branch);
|
||||
$filename = preg_replace('#[^a-z0-9]#', '_', $filename);
|
||||
$filename = preg_replace('#_+#', '_', $filename);
|
||||
$filename = strtolower($repo.'_'.$branch);
|
||||
$filename = preg_replace('#[^a-z0-9]+#', '_', $filename);
|
||||
$filename = $filename . '.' . $format;
|
||||
|
||||
$response = new BinaryFileResponse($file);
|
||||
|
||||
@@ -42,7 +42,10 @@ class Client extends BaseClient
|
||||
throw new \RuntimeException('There are no GIT repositories in ' . $path);
|
||||
}
|
||||
|
||||
$allRepositories = array_merge($allRepositories, $repositories);
|
||||
/**
|
||||
* Use "+" to preserve keys, only a problem with numeric repos
|
||||
*/
|
||||
$allRepositories = $allRepositories + $repositories;
|
||||
}
|
||||
|
||||
$allRepositories = array_unique($allRepositories, SORT_REGULAR);
|
||||
|
||||
Reference in New Issue
Block a user