diff --git a/CHANGELOG b/CHANGELOG index 386f5bf43..4ba9c3793 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -372,6 +372,7 @@ - secure password check can be turned off for admins - simple password strength algorithmn takes length of password into account, if length is greater than 8 +- parse changelog and readme of extension as markdown -------------------------------------------------------------------------------- Changes in version 5.1.44 diff --git a/views/bootstrap/class.ExtensionMgr.php b/views/bootstrap/class.ExtensionMgr.php index 1c0727a00..9f4ab3df6 100644 --- a/views/bootstrap/class.ExtensionMgr.php +++ b/views/bootstrap/class.ExtensionMgr.php @@ -45,6 +45,27 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style { echo ''; } + function css() { /* {{{ */ +?> +div.changelog h1 { + font-size: 18px; + font-weight: bold; + line-height: 16px; +} +div.readme h1 { + font-size: 24px; + font-weight: bold; + line-height: 24px; +} +div.readme h2 { + font-size: 18px; + font-weight: bold; + line-height: 24px; +} + @@ -195,7 +216,10 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style { $list = $extmgr->getExtensionListByName($extname); /* Just show the changelog of the latest version */ $re = array_shift($list); - echo '
'.$re['changelog']."
"; + $Parsedown = new Parsedown(); + $changelog = $Parsedown->text(htmlspecialchars($re['changelog'])); + echo '
'.$changelog.'
'; +// echo '
'.$re['changelog']."
"; } /* }}} */ function changelog() { /* {{{ */ @@ -209,7 +233,10 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style { if(isset($extconf[$extname])) { $extconf = $extconf[$extname]; if(!empty($extconf['changelog']) && file_exists($extdir."/".$extname."/".$extconf['changelog'])) { - echo '
'.file_get_contents($extdir."/".$extname."/".$extconf['changelog'])."
"; + $Parsedown = new Parsedown(); + $changelog = $Parsedown->text(file_get_contents($extdir."/".$extname."/".$extconf['changelog'])); + echo '
'.$changelog.'
'; +// echo '
'.file_get_contents($extdir."/".$extname."/".$extconf['changelog'])."
"; } } } /* }}} */ @@ -227,9 +254,9 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style { $extconf = $extconf[$extname]; $Parsedown = new Parsedown(); if(file_exists($extdir."/".$extname."/README.".$session->getLanguage().".md")) { - echo $Parsedown->text(file_get_contents($extdir."/".$extname."/README.".$session->getLanguage().".md")); + echo '
'.$Parsedown->text(file_get_contents($extdir."/".$extname."/README.".$session->getLanguage().".md")).'
'; } elseif(file_exists($extdir."/".$extname."/README.md")) { - echo $Parsedown->text(file_get_contents($extdir."/".$extname."/README.md")); + echo '
'.$Parsedown->text(file_get_contents($extdir."/".$extname."/README.md")).'
'; } } } /* }}} */