Better code style

This commit is contained in:
Marcel Kapfer (mmk2410) 2016-08-03 17:19:59 +02:00
parent 1aa4b42c0c
commit c1a7ede3bc

View file

@ -193,7 +193,9 @@ if ($config["design"]["drawer"] == "on") {
if ($navblog != "main.md") { // excluding main blog
// creating navigation item
BlogListGenerator::listBlog(
"./blogs/", $navblog, $config["blog"]["title"]
"./blogs/",
$navblog,
$config["blog"]["title"]
);
}
} else {
@ -202,7 +204,9 @@ if ($config["design"]["drawer"] == "on") {
if ($getblog . ".md" != $navblog) {
// creating navigation item
BlogListGenerator::listBlog(
"./blogs/", $navblog, $blogmaintitle
"./blogs/",
$navblog,
$blogmaintitle
);
}
}
@ -318,7 +322,11 @@ if ($config["design"]["drawer"] == "on") {
if (strlen($article) >= 3 && substr($article, -3) == ".md") {
// generate the article
ArticleGenerator::newArticle(
$articlesdir, $article, $getblog, $config["design"]["excerpt"], $BLOGLANG["Read More"]
$articlesdir,
$article,
$getblog,
$config["design"]["excerpt"],
$BLOGLANG["Read More"]
);
}
}
@ -336,12 +344,20 @@ if ($config["design"]["drawer"] == "on") {
if ($config["design"]["pagination"]) {
if ($posts_amount < $pag_max && $posts_amount >= $pag_min) {
ArticleGenerator::newArticle(
$articlesdir, $article, $getblog, $config["design"]["excerpt"], $BLOGLANG["Read More"]
$articlesdir,
$article,
$getblog,
$config["design"]["excerpt"],
$BLOGLANG["Read More"]
);
}
} else {
ArticleGenerator::newArticle(
$articlesdir, $article, $getblog, $config["design"]["excerpt"], $BLOGLANG["Read More"]
$articlesdir,
$article,
$getblog,
$config["design"]["excerpt"],
$BLOGLANG["Read More"]
);
}
}
@ -353,8 +369,11 @@ if ($config["design"]["drawer"] == "on") {
} elseif (isset($getarticle)) { // ARTICLE VIEW
// generate the requested article
ArticleGenerator::newArticle(
$articlesdir, $getarticle . ".md", $getblog,
'off', ''
$articlesdir,
$getarticle . ".md",
$getblog,
'off',
$BLOGLANG["Read More"]
);
include './res/php/Disqus.php'; // include disques
} else { // SOMETHING STRANGE: THIS SHOULDN'T HAPPEN