mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-21 15:03:41 +00:00
Merge pull request 'Fix PHP warning and use quotes' (#1454) from toddy/friendica-addons:develop into develop
Reviewed-on: https://git.friendi.ca/friendica/friendica-addons/pulls/1454
This commit is contained in:
commit
4dedd24320
1 changed files with 4 additions and 1 deletions
|
@ -71,7 +71,7 @@ function url_replace_addon_admin(string &$o)
|
|||
$twelvefeet_sites,
|
||||
DI::l10n()->t('Specify the URLs with protocol, one per line.'),
|
||||
null,
|
||||
'rows=6'
|
||||
'rows="6"'
|
||||
],
|
||||
'$submit' => DI::l10n()->t('Save settings'),
|
||||
]);
|
||||
|
@ -113,6 +113,9 @@ function url_replace_render(array &$b)
|
|||
}
|
||||
|
||||
$twelvefeet_sites = DI::config()->get('url_replace', 'twelvefeet_sites');
|
||||
if (empty($twelvefeet_sites)) {
|
||||
$twelvefeet_sites = [];
|
||||
}
|
||||
foreach ($twelvefeet_sites as $twelvefeet_site) {
|
||||
if (strpos($b['html'], $twelvefeet_site) !== false) {
|
||||
$b['html'] = str_replace($twelvefeet_site, 'https://12ft.io/'.$twelvefeet_site, $b['html']);
|
||||
|
|
Loading…
Reference in a new issue