@ -800,7 +800,9 @@ final class NodaWikidataFetcher {
|
||||
$wikilink = $wikilinks[$lang];
|
||||
if (!empty($contents[$lang])) {
|
||||
|
||||
$descFromWiki = json_decode($contents[$lang], true)['parse']['text']['*'];
|
||||
$fromWikipedia = json_decode($contents[$lang], true)['parse'];
|
||||
$titleFromWikipedia = $fromWikipedia['title'];
|
||||
$descFromWiki = $fromWikipedia['text']['*'];
|
||||
|
||||
# Process data retrieved from wikipedia
|
||||
|
||||
@ -815,7 +817,7 @@ final class NodaWikidataFetcher {
|
||||
if ($tDescription !== '' && !empty($desc_cleaned = self::_cleanWikidataInput($tDescription))) {
|
||||
# $descs[$lang] = $tDescription;
|
||||
$output[$lang] = [
|
||||
'label' => self::_cleanWikidataInput((string)$data['labels'][$lang]['value']),
|
||||
'label' => $titleFromWikipedia,
|
||||
'description' => '"' . $desc_cleaned . '" - (' . $data['labels'][$lang]['language'] . '.wikipedia.org ' . date('d.m.Y') . ')',
|
||||
'link' => $wikilink,
|
||||
];
|
||||
|
Reference in New Issue
Block a user