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

@ -200,13 +200,13 @@ function tumblr_jot_nets(App $a, array &$jotnets_fields)
return;
}
if (PConfig::get(local_user(),'tumblr','post')) {
if (DI::pConfig()->get(local_user(),'tumblr','post')) {
$jotnets_fields[] = [
'type' => 'checkbox',
'field' => [
'tumblr_enable',
L10n::t('Post to Tumblr'),
PConfig::get(local_user(),'tumblr','post_by_default')
DI::pConfig()->get(local_user(),'tumblr','post_by_default')
]
];
}
@ -224,11 +224,11 @@ function tumblr_settings(App $a, &$s)
/* Get the current state of our config variables */
$enabled = PConfig::get(local_user(), 'tumblr', 'post');
$enabled = DI::pConfig()->get(local_user(), 'tumblr', 'post');
$checked = (($enabled) ? ' checked="checked" ' : '');
$css = (($enabled) ? '' : '-disabled');
$def_enabled = PConfig::get(local_user(), 'tumblr', 'post_by_default');
$def_enabled = DI::pConfig()->get(local_user(), 'tumblr', 'post_by_default');
$def_checked = (($def_enabled) ? ' checked="checked" ' : '');
@ -258,13 +258,13 @@ function tumblr_settings(App $a, &$s)
$s .= '<input id="tumblr-bydefault" type="checkbox" name="tumblr_bydefault" value="1" ' . $def_checked . '/>';
$s .= '</div><div class="clear"></div>';
$oauth_token = PConfig::get(local_user(), "tumblr", "oauth_token");
$oauth_token_secret = PConfig::get(local_user(), "tumblr", "oauth_token_secret");
$oauth_token = DI::pConfig()->get(local_user(), "tumblr", "oauth_token");
$oauth_token_secret = DI::pConfig()->get(local_user(), "tumblr", "oauth_token_secret");
$s .= '<div id="tumblr-page-wrapper">';
if (($oauth_token != "") && ($oauth_token_secret != "")) {
$page = PConfig::get(local_user(), 'tumblr', 'page');
$page = DI::pConfig()->get(local_user(), 'tumblr', 'page');
$consumer_key = Config::get('tumblr', 'consumer_key');
$consumer_secret = Config::get('tumblr', 'consumer_secret');
@ -337,11 +337,11 @@ function tumblr_post_local(App $a, array &$b)
return;
}
$tmbl_post = intval(PConfig::get(local_user(), 'tumblr', 'post'));
$tmbl_post = intval(DI::pConfig()->get(local_user(), 'tumblr', 'post'));
$tmbl_enable = (($tmbl_post && !empty($_REQUEST['tumblr_enable'])) ? intval($_REQUEST['tumblr_enable']) : 0);
if ($b['api_source'] && intval(PConfig::get(local_user(), 'tumblr', 'post_by_default'))) {
if ($b['api_source'] && intval(DI::pConfig()->get(local_user(), 'tumblr', 'post_by_default'))) {
$tmbl_enable = 1;
}
@ -380,9 +380,9 @@ function tumblr_send(App $a, array &$b) {
return;
}
$oauth_token = PConfig::get($b['uid'], "tumblr", "oauth_token");
$oauth_token_secret = PConfig::get($b['uid'], "tumblr", "oauth_token_secret");
$page = PConfig::get($b['uid'], "tumblr", "page");
$oauth_token = DI::pConfig()->get($b['uid'], "tumblr", "oauth_token");
$oauth_token_secret = DI::pConfig()->get($b['uid'], "tumblr", "oauth_token_secret");
$page = DI::pConfig()->get($b['uid'], "tumblr", "page");
$tmbl_blog = 'blog/' . $page . '/post';
if ($oauth_token && $oauth_token_secret && $tmbl_blog) {