From a338a97d5bb947f462483de8a9d87dd52fa3b2eb Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sun, 10 Jul 2016 06:58:20 -0400 Subject: First draft of website import tools --- include/widgets.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include/widgets.php') diff --git a/include/widgets.php b/include/widgets.php index a4a6fb55a..6bb53bdf9 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -770,6 +770,20 @@ function widget_design_tools($arr) { return design_tools(); } +function widget_website_import_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_import_tools(); +} function widget_findpeople($arr) { return findpeople_widget(); -- cgit v1.2.3