From 5060f3c0aa7e2443cafe7a2dcb9a243a098a1656 Mon Sep 17 00:00:00 2001 From: nupplaPhil Date: Mon, 16 Dec 2019 01:12:07 +0100 Subject: [PATCH] Remove deprecated App::is_mobile/is_tablet - replace with DI::mode()->isMobile()/isTablet() --- rendertime/rendertime.php | 2 +- smileybutton/smileybutton.php | 2 +- xmpp/xmpp.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rendertime/rendertime.php b/rendertime/rendertime.php index 2ed7ee40..31025dce 100644 --- a/rendertime/rendertime.php +++ b/rendertime/rendertime.php @@ -38,7 +38,7 @@ function rendertime_page_end(Friendica\App $a, &$o) $ignored_modules = ["fbrowser"]; $ignored = in_array($a->module, $ignored_modules); - if (is_site_admin() && (($_GET['mode'] ?? '') != 'minimal') && !$a->is_mobile && !$a->is_tablet && !$ignored) { + if (is_site_admin() && (($_GET['mode'] ?? '') != 'minimal') && !DI::mode()->isMobile() && !DI::mode()->isMobile() && !$ignored) { $o = $o . '
' . L10n::t("Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: %s, Total: %s", round($profiler->get('database') - $profiler->get('database_write'), 3), diff --git a/smileybutton/smileybutton.php b/smileybutton/smileybutton.php index bdd7d951..9711ecf2 100644 --- a/smileybutton/smileybutton.php +++ b/smileybutton/smileybutton.php @@ -33,7 +33,7 @@ function show_button(Friendica\App $a, &$b) { return; // Disable for mobile because most mobiles have a smiley key for ther own - if ($a->is_mobile || $a->is_tablet) + if (DI::mode()->isMobile() || DI::mode()->isMobile()) return; /** diff --git a/xmpp/xmpp.php b/xmpp/xmpp.php index dcbf3945..31edfdca 100644 --- a/xmpp/xmpp.php +++ b/xmpp/xmpp.php @@ -143,7 +143,7 @@ function xmpp_converse(App $a) return; } - if ($a->is_mobile || $a->is_tablet) { + if (DI::mode()->isMobile() || DI::mode()->isMobile()) { return; } -- 2.39.5