1
0
Fork 0

Remove deprecated App::is_mobile/is_tablet - replace with DI::mode()->isMobile()/isTablet()

This commit is contained in:
Philipp Holzer 2019-12-16 01:12:07 +01:00
commit 26af2feee2
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
8 changed files with 10 additions and 16 deletions

View file

@ -22,7 +22,7 @@ if (!isset($minimal)) {
$basepath = DI::baseUrl()->getUrlPath() ? "/" . DI::baseUrl()->getUrlPath() . "/" : "/";
$frio = "view/theme/frio";
$view_mode_class = ($a->is_mobile || $a->is_tablet) ? 'mobile-view' : 'desktop-view';
$view_mode_class = (DI::mode()->isMobile() || DI::mode()->isMobile()) ? 'mobile-view' : 'desktop-view';
$is_singleuser = Config::get('system', 'singleuser');
$is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
?>

View file

@ -35,7 +35,7 @@ function frio_init(App $a)
// if the device is a mobile device set js is_mobile
// variable so the js scripts can use this information
if ($a->is_mobile || $a->is_tablet) {
if (DI::mode()->isMobile() || DI::mode()->isMobile()) {
$a->page['htmlhead'] .= <<< EOT
<script type="text/javascript">
var is_mobile = 1;