mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 18:18:46 +02:00
Setup : only scan necessary dirs for extensions
We were browsing the whole hierarchy but only the root module dir was needed This could be slow (especially when developing with a .git dir)
This commit is contained in:
@@ -244,11 +244,13 @@ class iTopExtensionsMap
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read (recursively) a directory to find if it contains extensions (or modules)
|
* Read (recursively) a directory to find if it contains extensions (or modules)
|
||||||
|
*
|
||||||
* @param string $sSearchDir The directory to scan
|
* @param string $sSearchDir The directory to scan
|
||||||
* @param string $sSource The 'source' value for the extensions found in this directory
|
* @param string $sSource The 'source' value for the extensions found in this directory
|
||||||
* @param string|null $sParentExtensionId Not null if the directory is under a declared extension
|
* @param string|null $sParentExtensionId Not null if the directory is under a declared extension
|
||||||
* @return boolean
|
*
|
||||||
|
* @return boolean false if we cannot open dir
|
||||||
*/
|
*/
|
||||||
protected function ReadDir($sSearchDir, $sSource, $sParentExtensionId = null)
|
protected function ReadDir($sSearchDir, $sSource, $sParentExtensionId = null)
|
||||||
{
|
{
|
||||||
@@ -260,6 +262,8 @@ class iTopExtensionsMap
|
|||||||
{
|
{
|
||||||
// We're not recursing, let's add the directory to the list of scanned dirs
|
// We're not recursing, let's add the directory to the list of scanned dirs
|
||||||
$this->aScannedDirs[] = $sSearchDir;
|
$this->aScannedDirs[] = $sSearchDir;
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
$sExtensionId = null;
|
$sExtensionId = null;
|
||||||
$aSubDirectories = array();
|
$aSubDirectories = array();
|
||||||
|
|||||||
Reference in New Issue
Block a user