Move PConfig::get() to DI::pConfig()->get()
This commit is contained in:
parent
6e2880c679
commit
9e9429b56d
61 changed files with 190 additions and 179 deletions
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue