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

View File

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