]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/theme.php
Remove deprecated App::is_mobile/is_tablet - replace with DI::mode()->isMobile()...
[friendica.git] / view / theme / frio / theme.php
index 5995f54374171f4b2e701e31a8b96f182f22f621..5fe0152748ec59dd22b24c1d720a18a05838e0f4 100644 (file)
@@ -17,6 +17,7 @@ use Friendica\Core\Logger;
 use Friendica\Core\Renderer;
 use Friendica\Core\Session;
 use Friendica\Database\DBA;
+use Friendica\DI;
 use Friendica\Model;
 use Friendica\Module;
 use Friendica\Util\Strings;
@@ -34,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;
@@ -239,7 +240,7 @@ function frio_remote_nav($a, &$nav)
                // user info
                $r = q("SELECT `micro` FROM `contact` WHERE `uid` = %d AND `self`", intval($a->user['uid']));
 
-               $r[0]['photo'] = (DBA::isResult($r) ? $a->removeBaseURL($r[0]['micro']) : 'images/person-48.jpg');
+               $r[0]['photo'] = (DBA::isResult($r) ? DI::baseUrl()->remove($r[0]['micro']) : 'images/person-48.jpg');
                $r[0]['name'] = $a->user['username'];
        } elseif (!local_user() && remote_user()) {
                $r = q("SELECT `name`, `nick`, `micro` AS `photo` FROM `contact` WHERE `id` = %d", intval(remote_user()));