feat: add wikipedia.php language cookie config

This commit is contained in:
Junior L. Botelho (JLB) 2023-02-21 09:03:24 -03:00
parent 4194f9ae57
commit 659c8116c9
No known key found for this signature in database
GPG Key ID: 6A25840754F2A524
1 changed files with 2 additions and 2 deletions

View File

@ -12,8 +12,8 @@
if (!array_key_exists("missing", $first_page))
{
$description = substr($first_page["extract"], 0, 250) . "...";
$wikipedia_language = $config->wikipedia_language;
$wikipedia_language = isset($_COOKIE["wikipedia_language"]) ? trim(htmlspecialchars($_COOKIE["wikipedia_language"])) : $config->wikipedia_language;
$source = check_for_privacy_frontend("https://$wikipedia_language.wikipedia.org/wiki/$query");
$response = array(