Browse Source

Merge pull request #482 from MrPetovan/task/fix-php-notices

Fix PHP notice in langfilter
pull/483/head
Michael Vogel 5 years ago committed by GitHub
parent
commit
4894d3c2e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      langfilter/langfilter.php

4
langfilter/langfilter.php

@ -122,7 +122,7 @@ function langfilter_prepare_body(App $a, &$b)
// Never filter own messages
// TODO: find a better way to extract this
$logged_user_profile = $a->config['system']['url'] . '/profile/' . $a->user['nickname'];
$logged_user_profile = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
if ($logged_user_profile == $b['item']['author-link']) {
return;
}
@ -177,6 +177,6 @@ function langfilter_prepare_body(App $a, &$b)
if (!$spoken) {
$rnd = random_string(8);
$b['html'] = '<div id="langfilter-wrap-' . $rnd . '" class="fakelink" onclick=openClose(\'langfilter-' . $rnd . '\'); >' . sprintf(t('unspoken language %s - Click to open/close'), $lang) . '</div><div id="langfilter-' . $rnd . '" style="display: none; " >' . $b['html'] . '</div>';
$b['html'] = '<div id="langfilter-wrap-' . $rnd . '" class="fakelink" onclick=openClose(\'langfilter-' . $rnd . '\'); >' . t('unspoken language %s - Click to open/close', $lang) . '</div><div id="langfilter-' . $rnd . '" style="display: none; " >' . $b['html'] . '</div>';
}
}

Loading…
Cancel
Save