From c98b91f5149d53f522a19ec0f69b4d4727d34896 Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Wed, 17 Aug 2016 18:19:36 -0400 Subject: Stash changes for merge with dev --- include/widgets.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/widgets.php') diff --git a/include/widgets.php b/include/widgets.php index 68db74703..fc2a9830b 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -794,6 +794,21 @@ function widget_website_import_tools($arr) { return website_import_tools(); } +function widget_website_export_tools($arr) { + + // mod menu doesn't load a profile. For any modules which load a profile, check it. + // otherwise local_channel() is sufficient for permissions. + + if(App::$profile['profile_uid']) + if((App::$profile['profile_uid'] != local_channel()) && (! App::$is_sys)) + return ''; + + if(! local_channel()) + return ''; + + return website_export_tools(); +} + function widget_findpeople($arr) { return findpeople_widget(); } -- cgit v1.2.3