NEW functionality add section changeLog to Doc in MB
This commit is contained in:
parent
9ca23dee12
commit
f2b72ec15a
1 changed files with 21 additions and 0 deletions
|
|
@ -818,6 +818,27 @@ if ($dirins && $action == 'initdoc' && !empty($module)) {
|
|||
writeApiUrlsInDoc($apiFile, $destfile);
|
||||
}
|
||||
|
||||
// add ChangeLog in Doc
|
||||
if (file_exists($dirins.'/'.strtolower($module).'/ChangeLog.md')) {
|
||||
$changeLog = $dirins.'/'.strtolower($module).'/ChangeLog.md';
|
||||
$string = file_get_contents($changeLog);
|
||||
|
||||
$replace = explode("\n", $string);
|
||||
$strreplace = array();
|
||||
foreach ($replace as $line) {
|
||||
if ($line === '') {
|
||||
continue;
|
||||
}
|
||||
if (strpos($line, '##') !== false) {
|
||||
$strreplace[$line] = str_replace('##', '', $line);
|
||||
} else {
|
||||
$strreplace[$line] = $line;
|
||||
}
|
||||
}
|
||||
$stringLog = implode("\n", $strreplace);
|
||||
dolREplaceInFile($destfile, array('//include::ChangeLog.md[]' => '','__CHANGELOG__' => $stringLog));
|
||||
}
|
||||
|
||||
// Delete old documentation files
|
||||
$FILENAMEDOC = $modulelowercase.'.html';
|
||||
$FILENAMEDOCPDF = $modulelowercase.'.pdf';
|
||||
|
|
|
|||
Loading…
Reference in a new issue