Merge pull request #1167 from tobiasd/20210909-nitter

nitter: typo in variable name
This commit is contained in:
Hypolite Petovan 2021-09-09 08:40:47 -04:00 committed by GitHub
commit dead293465
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,13 +65,13 @@ function nitter_render(&$a, &$o)
$nitter = DI::config()->get('nitter', 'server', 'https://nitter.net');
if (strstr($o['html'], 'https://mobile.twitter.com')) {
$o['html'] = str_replace('https://mobile.twitter.com', $nitter, $o['html']);
$replace = true;
$replaced = true;
}
if (strstr($o['html'], 'https://twitter.com')) {
$o['html'] = str_replace('https://twitter.com', $nitter, $o['html']);
$replace = true;
$replaced = true;
}
if ($replace) {
if ($replaced) {
$o['html'] .= '<hr><p>' . DI::l10n()->t('Links to Twitter in this posting were replaced by links to the Nitter instance at %s', $nitter) . '</p>';
}
}