From 1353c291e9d6fbe4cdbe8e4911f99d51e1da9198 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 26 Sep 2018 16:32:06 +0200 Subject: add check for local_channel() --- Zotlabs/Module/Oauth.php | 7 +++++++ Zotlabs/Module/Oauth2.php | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/Zotlabs/Module/Oauth.php b/Zotlabs/Module/Oauth.php index d087ecec4..5aae71ae7 100644 --- a/Zotlabs/Module/Oauth.php +++ b/Zotlabs/Module/Oauth.php @@ -11,6 +11,10 @@ class Oauth extends Controller { function post() { + if(! local_channel()) + return; + + if(! Apps::system_app_installed(local_channel(), 'OAuth Apps Manager')) return; @@ -86,6 +90,9 @@ class Oauth extends Controller { function get() { + if(! local_channel()) + return; + if(! Apps::system_app_installed(local_channel(), 'OAuth Apps Manager')) { //Do not display any associated widgets at this point App::$pdl = ''; diff --git a/Zotlabs/Module/Oauth2.php b/Zotlabs/Module/Oauth2.php index 4c34b499f..c27d7534b 100644 --- a/Zotlabs/Module/Oauth2.php +++ b/Zotlabs/Module/Oauth2.php @@ -11,6 +11,9 @@ class Oauth2 extends Controller { function post() { + if(! local_channel()) + return; + if(! Apps::system_app_installed(local_channel(), 'OAuth2 Apps Manager')) return; @@ -93,6 +96,9 @@ class Oauth2 extends Controller { function get() { + if(! local_channel()) + return; + if(! Apps::system_app_installed(local_channel(), 'OAuth2 Apps Manager')) { //Do not display any associated widgets at this point App::$pdl = ''; -- cgit v1.2.3