Move PConfig::get() to DI::pConfig()->get()

This commit is contained in:
nupplaPhil 2020-01-18 16:50:56 +01:00
parent 2a35176588
commit ea3a9052d8
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
42 changed files with 414 additions and 412 deletions

View file

@ -37,8 +37,8 @@ function showmore_addon_settings(&$a, &$s)
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.DI::baseUrl()->get().'/addon/showmore/showmore.css'.'" media="all"/>'."\r\n";
$enable_checked = (intval(PConfig::get(local_user(), 'showmore', 'disable')) ? '' : ' checked="checked"');
$chars = PConfig::get(local_user(), 'showmore', 'chars', 1100);
$enable_checked = (intval(DI::pConfig()->get(local_user(), 'showmore', 'disable')) ? '' : ' checked="checked"');
$chars = DI::pConfig()->get(local_user(), 'showmore', 'chars', 1100);
$s .= '<span id="settings_showmore_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_showmore_expanded\'); openClose(\'settings_showmore_inflated\');">';
$s .= '<h3>' . L10n::t('"Show more" Settings').'</h3>';
@ -119,11 +119,11 @@ function showmore_prepare_body(\Friendica\App $a, &$hook_data)
return;
}
if (PConfig::get(local_user(), 'showmore', 'disable')) {
if (DI::pConfig()->get(local_user(), 'showmore', 'disable')) {
return;
}
$chars = (int) PConfig::get(local_user(), 'showmore', 'chars', 1100);
$chars = (int) DI::pConfig()->get(local_user(), 'showmore', 'chars', 1100);
if (get_body_length($hook_data['html']) > $chars) {
$found = true;