mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-22 00:53:41 +00:00
Remove now unnecessary variable
This commit is contained in:
parent
0bcf2d7c89
commit
453772e393
1 changed files with 1 additions and 4 deletions
|
@ -115,7 +115,6 @@ function url_replace_addon_admin(string &$o)
|
||||||
*/
|
*/
|
||||||
function url_replace_render(array &$b)
|
function url_replace_render(array &$b)
|
||||||
{
|
{
|
||||||
$replaced = false;
|
|
||||||
$replacements = [];
|
$replacements = [];
|
||||||
|
|
||||||
$nitter_server = DI::config()->get('url_replace', 'nitter_server');
|
$nitter_server = DI::config()->get('url_replace', 'nitter_server');
|
||||||
|
@ -162,7 +161,6 @@ function url_replace_render(array &$b)
|
||||||
foreach ($replacements as $server => $replacement) {
|
foreach ($replacements as $server => $replacement) {
|
||||||
if (strpos($b['html'], $server) !== false) {
|
if (strpos($b['html'], $server) !== false) {
|
||||||
$b['html'] = str_replace($server, $replacement, $b['html']);
|
$b['html'] = str_replace($server, $replacement, $b['html']);
|
||||||
$replaced = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,11 +168,10 @@ function url_replace_render(array &$b)
|
||||||
foreach ($twelvefeet_sites as $twelvefeet_site) {
|
foreach ($twelvefeet_sites as $twelvefeet_site) {
|
||||||
if (strpos($b['html'], $twelvefeet_site) !== false) {
|
if (strpos($b['html'], $twelvefeet_site) !== false) {
|
||||||
$b['html'] = str_replace($twelvefeet_site, 'https://12ft.io/' . $twelvefeet_site, $b['html']);
|
$b['html'] = str_replace($twelvefeet_site, 'https://12ft.io/' . $twelvefeet_site, $b['html']);
|
||||||
$replaced = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($replaced) {
|
if (count($replacements) > 0) {
|
||||||
$b['html'] .= '<hr><p><small>' . DI::l10n()->t('(URL replace addon enabled for X, YouTube, Instagram and some news sites.)') . '</small></p>';
|
$b['html'] .= '<hr><p><small>' . DI::l10n()->t('(URL replace addon enabled for X, YouTube, Instagram and some news sites.)') . '</small></p>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue