1
0
Fork 0

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

This commit is contained in:
Philipp Holzer 2020-01-18 16:50:57 +01:00
commit 9e9429b56d
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
61 changed files with 190 additions and 179 deletions

View file

@ -8,7 +8,7 @@ use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
use Friendica\Core\System;
use Friendica\DI;
function theme_content(App $a)
{
@ -16,7 +16,7 @@ function theme_content(App $a)
return;
}
$colorset = PConfig::get(local_user(), 'duepuntozero', 'colorset');
$colorset = DI::pConfig()->get(local_user(), 'duepuntozero', 'colorset');
$user = true;
return clean_form($a, $colorset, $user);
@ -62,7 +62,7 @@ function clean_form(App $a, &$colorset, $user)
];
if ($user) {
$color = PConfig::get(local_user(), 'duepuntozero', 'colorset');
$color = DI::pConfig()->get(local_user(), 'duepuntozero', 'colorset');
} else {
$color = Config::get('duepuntozero', 'colorset');
}

View file

@ -4,6 +4,7 @@
*/
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\DI;
use Friendica\Model\Profile;
if (file_exists("$THEMEPATH/style.css")) {
@ -13,7 +14,7 @@ if (file_exists("$THEMEPATH/style.css")) {
$uid = $_REQUEST['puid'] ?? 0;
$s_colorset = Config::get('duepuntozero', 'colorset');
$colorset = PConfig::get($uid, 'duepuntozero', 'colorset');
$colorset = DI::pConfig()->get($uid, 'duepuntozero', 'colorset');
if (empty($colorset)) {
$colorset = $s_colorset;

View file

@ -10,7 +10,7 @@ function duepuntozero_init(App $a) {
Renderer::setActiveTemplateEngine('smarty3');
$colorset = PConfig::get( local_user(), 'duepuntozero','colorset');
$colorset = DI::pConfig()->get( local_user(), 'duepuntozero','colorset');
if (!$colorset)
$colorset = Config::get('duepuntozero', 'colorset'); // user setting have priority, then node settings
if ($colorset) {