Remove deprecated App::is_mobile/is_tablet - replace with DI::mode()->isMobile()/isTablet()
This commit is contained in:
@@ -66,10 +66,6 @@ class App
|
||||
public $timezone;
|
||||
public $interactive = true;
|
||||
public $identities;
|
||||
/** @deprecated 2019.09 - Use App\Mode->isMobile() instead */
|
||||
public $is_mobile;
|
||||
/** @deprecated 2019.09 - Use App\Mode->isTable() instead */
|
||||
public $is_tablet;
|
||||
public $theme_info = [];
|
||||
public $category;
|
||||
// Allow themes to control internal parameters
|
||||
@@ -183,9 +179,6 @@ class App
|
||||
$this->module = $module->getName();
|
||||
$this->page = $page;
|
||||
|
||||
$this->is_mobile = $mode->isMobile();
|
||||
$this->is_tablet = $mode->isTablet();
|
||||
|
||||
$this->load();
|
||||
}
|
||||
|
||||
|
||||
@@ -571,7 +571,7 @@ class Profile
|
||||
$a = \get_app();
|
||||
$o = '';
|
||||
|
||||
if (!local_user() || $a->is_mobile || $a->is_tablet) {
|
||||
if (!local_user() || DI::mode()->isMobile() || DI::mode()->isMobile()) {
|
||||
return $o;
|
||||
}
|
||||
|
||||
@@ -668,7 +668,7 @@ class Profile
|
||||
$a = \get_app();
|
||||
$o = '';
|
||||
|
||||
if (!local_user() || $a->is_mobile || $a->is_tablet) {
|
||||
if (!local_user() || DI::mode()->isMobile() || DI::mode()->isMobile()) {
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ class Profile extends BaseModule
|
||||
|
||||
// check if we serve a mobile device and get the user settings
|
||||
// accordingly
|
||||
if ($a->is_mobile) {
|
||||
if (DI::mode()->isMobile()) {
|
||||
$itemspage_network = PConfig::get(local_user(), 'system', 'itemspage_mobile_network', 10);
|
||||
} else {
|
||||
$itemspage_network = PConfig::get(local_user(), 'system', 'itemspage_network', 20);
|
||||
|
||||
Reference in New Issue
Block a user