mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Fixed CHANGELOG.md loading in Admin Panel
This commit is contained in:
parent
25ab4e187c
commit
0c9219f885
@ -4,8 +4,9 @@
|
||||
|
||||
### Fixed
|
||||
* Some weird behaviour with installation of plugins
|
||||
* CHANGELOG.md loading in Admin Panel
|
||||
|
||||
## [0.8.0 - x.02.2020]
|
||||
## [0.8.0 - 19.02.2020]
|
||||
|
||||
### Added:
|
||||
* new Awesome Bootstrap Admin Panel by Lee (@Leesneaks)
|
||||
|
1994
system/libs/Parsedown.php
Normal file
1994
system/libs/Parsedown.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -10,17 +10,17 @@
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
$title = 'MyAAC Changelog';
|
||||
|
||||
if (!file_exists(BASE . 'CHANGELOG')) {
|
||||
echo 'File CHANGELOG doesn\'t exist.';
|
||||
if (!file_exists(BASE . 'CHANGELOG.md')) {
|
||||
echo 'File CHANGELOG.md doesn\'t exist.';
|
||||
return;
|
||||
}
|
||||
|
||||
$changelog = file_get_contents(BASE . 'CHANGELOG');
|
||||
$changelog = htmlspecialchars($changelog);
|
||||
require LIBS . 'Parsedown.php';
|
||||
|
||||
// replace URLs with <a href...> elements
|
||||
$changelog = preg_replace('/\s(\w+:\/\/)(\S+)/', ' <a href="\\1\\2" target="_blank">\\1\\2</a>', $changelog);
|
||||
$changelog = file_get_contents(BASE . 'CHANGELOG.md');
|
||||
|
||||
$changelog = nl2br($changelog);
|
||||
$Parsedown = new Parsedown();
|
||||
|
||||
$changelog = $Parsedown->text($changelog); # prints: <p>Hello <em>Parsedown</em>!</p>
|
||||
|
||||
echo '<div>' . $changelog . '</div>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user