mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
Compiler : when generating model file add it to module (#296)
Before this fix, when creating a module for iTop that was creating PHP code (an iTop class for example, a snippet, ...) it was mandatory to add the model.php file in your module.php file ("datamodel" key). If you forgot this, then the compilation was completed OK but the result code wasn't included in iTop.
Now the compiler automatically adds the model.php file to the included files.
This commit is contained in:
@@ -328,6 +328,14 @@ class MFModule
|
||||
return $this->aFilesToInclude[$sCategory];
|
||||
}
|
||||
|
||||
public function AddFileToInclude($sCategory, $sFile)
|
||||
{
|
||||
if (in_array($sFile, $this->aFilesToInclude[$sCategory], true)) {
|
||||
return;
|
||||
}
|
||||
$this->aFilesToInclude[$sCategory][] = $sFile;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user