Improved testability of BlogListGenerator

This commit is contained in:
Marcel Kapfer (mmk2410) 2016-12-29 21:59:55 +01:00
parent 89e756819d
commit 9ac51e0523
2 changed files with 3 additions and 3 deletions

View file

@ -195,7 +195,7 @@ if ($config["design"]["drawer"] == "on") {
if ($getblog == "") { // Run when on main blog
if ($navblog != "main.md") { // excluding main blog
// creating navigation item
BlogListGenerator::listBlog(
echo BlogListGenerator::listBlog(
"./blogs/",
$navblog,
$config["blog"]["title"]
@ -206,7 +206,7 @@ if ($config["design"]["drawer"] == "on") {
// -> this blog will be excluded
if ($getblog . ".md" != $navblog) {
// creating navigation item
BlogListGenerator::listBlog(
echo BlogListGenerator::listBlog(
"./blogs/",
$navblog,
$blogmaintitle

View file

@ -64,7 +64,7 @@ class BlogListGenerator
$itemurl = substr($blog, 6, strpos($blog, "\n") - 6);
$atag = "<a class='nav-item' href='$itemurl'>$itemname</a>";
}
echo $atag;
return $atag;
}
/**