mirror of
https://github.com/friendica/friendica
synced 2025-04-24 23:10:11 +00:00
Creating Friendica\App\Mode for encapsulating the App Mode
This commit is contained in:
parent
3c7d41c388
commit
065340dc32
9 changed files with 128 additions and 89 deletions
|
@ -30,7 +30,7 @@ class PConfig extends BaseObject
|
|||
public static function init($uid)
|
||||
{
|
||||
// Database isn't ready or populated yet
|
||||
if (!(self::getApp()->mode & App::MODE_DBCONFIGAVAILABLE)) {
|
||||
if (!App\Mode::has(App\Mode::DBCONFIGAVAILABLE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ class PConfig extends BaseObject
|
|||
public static function load($uid, $family)
|
||||
{
|
||||
// Database isn't ready or populated yet
|
||||
if (!(self::getApp()->mode & App::MODE_DBCONFIGAVAILABLE)) {
|
||||
if (!App\Mode::has(App\Mode::DBCONFIGAVAILABLE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ class PConfig extends BaseObject
|
|||
public static function get($uid, $family, $key, $default_value = null, $refresh = false)
|
||||
{
|
||||
// Database isn't ready or populated yet
|
||||
if (!(self::getApp()->mode & App::MODE_DBCONFIGAVAILABLE)) {
|
||||
if (!App\Mode::has(App\Mode::DBCONFIGAVAILABLE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ class PConfig extends BaseObject
|
|||
public static function set($uid, $family, $key, $value)
|
||||
{
|
||||
// Database isn't ready or populated yet
|
||||
if (!(self::getApp()->mode & App::MODE_DBCONFIGAVAILABLE)) {
|
||||
if (!App\Mode::has(App\Mode::DBCONFIGAVAILABLE)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ class PConfig extends BaseObject
|
|||
public static function delete($uid, $family, $key)
|
||||
{
|
||||
// Database isn't ready or populated yet
|
||||
if (!(self::getApp()->mode & App::MODE_DBCONFIGAVAILABLE)) {
|
||||
if (!App\Mode::has(App\Mode::DBCONFIGAVAILABLE)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue