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

这个提交包含在:
Philipp Holzer 2020-01-18 15:59:01 +01:00
父节点 71181704d4
当前提交 6e2880c679
找不到此签名对应的密钥
GPG 密钥 ID: D8365C3D36B77D90
共有 2 个文件被更改,包括 2 次插入14 次删除

查看文件

@ -19,19 +19,6 @@ use Friendica\DI;
*/
class PConfig
{
/**
* @brief Loads all configuration values of a user's config family into a cached storage.
*
* @param int $uid The user_id
* @param string $cat The category of the configuration value
*
* @return void
*/
public static function load(int $uid, string $cat)
{
DI::pConfig()->load($uid, $cat);
}
/**
* @brief Get a particular user's config variable given the category name
* ($cat) and a key.

查看文件

@ -5,6 +5,7 @@
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\DI;
use Friendica\Util\Strings;
require_once 'view/theme/frio/php/PHPColors/Color.php';
@ -37,7 +38,7 @@ $login_bg_color = $login_bg_color ?: '#ededed';
// Get the UID of the profile owner.
$uid = $_REQUEST['puid'] ?? 0;
if ($uid) {
PConfig::load($uid, 'frio');
DI::pConfig()->load($uid, 'frio');
// Only override display settings that have actually been set
$scheme = PConfig::get($uid, 'frio', 'scheme', PConfig::get($uid, 'frio', 'schema')) ?: $scheme;