make invalid meta tags valid

This commit is contained in:
Stefan 2016-07-04 08:15:17 +02:00
parent c20c0b4ff9
commit 5dd12ebe88
3 changed files with 7 additions and 0 deletions

View File

@ -49,6 +49,9 @@ $yaml["rcc"]["api"] = "off";
$langs = getDir('./lang');
$yaml["language"] = get("Choose a language (" . $langs . ")", $yaml["language"], "en");
// social media
$yaml["social"]["twitter"] = get("Your Twitter User ID:", "");
$config->writeConfig($yaml);
function get($question, $value, $default)

View File

@ -21,3 +21,5 @@ rcc:
rcc: 'on'
api: 'on'
language: en
social:
twitter: ''

View File

@ -30,6 +30,8 @@ use mmk2410\rbe\config\Config as Config;
$configParser = new Config('config.yaml', 'vendor/autoload.php');
$config = $configParser->getConfig();
$lang = $config["language"] . "_" . strtoupper($config["language"]);
$twitter = $config["twitter"];
require './lang/' . $config["language"] . ".php"; // Language file
require_once 'res/php/ArticleGenerator.php'; // The article generator