mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-07 14:04:27 +02:00
Make it possible to pass the module paths directly to the module manager
This commit is contained in:
parent
ffc69c378c
commit
64e6886c9c
@ -487,11 +487,14 @@ class Manager
|
|||||||
/**
|
/**
|
||||||
* Detect installed modules from every path provided in modulePaths
|
* Detect installed modules from every path provided in modulePaths
|
||||||
*
|
*
|
||||||
|
* @param array $availableDirs Installed modules location
|
||||||
|
*
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function detectInstalledModules()
|
public function detectInstalledModules(array $availableDirs = null)
|
||||||
{
|
{
|
||||||
foreach ($this->modulePaths as $basedir) {
|
$modulePaths = $availableDirs !== null ? $availableDirs : $this->modulePaths;
|
||||||
|
foreach ($modulePaths as $basedir) {
|
||||||
$canonical = realpath($basedir);
|
$canonical = realpath($basedir);
|
||||||
if ($canonical === false) {
|
if ($canonical === false) {
|
||||||
Logger::warning('Module path "%s" does not exist', $basedir);
|
Logger::warning('Module path "%s" does not exist', $basedir);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user