aboutsummaryrefslogtreecommitdiffstats
path: root/include/widgets.php
diff options
context:
space:
mode:
authorhubzilla <git@macgirvin.com>2016-08-01 09:13:43 +1000
committerGitHub <noreply@github.com>2016-08-01 09:13:43 +1000
commit74c68f09e5d7fa28d7345e18e813dc726309ea48 (patch)
treea6e4b55e1eb695242165256808e47bed51a9df78 /include/widgets.php
parentda9b6690e565452a9a9d69084a07ac48005d7e60 (diff)
parent99afd0a449cde502b32c30d5b6170c6b87b85edc (diff)
downloadvolse-hubzilla-74c68f09e5d7fa28d7345e18e813dc726309ea48.tar.gz
volse-hubzilla-74c68f09e5d7fa28d7345e18e813dc726309ea48.tar.bz2
volse-hubzilla-74c68f09e5d7fa28d7345e18e813dc726309ea48.zip
Merge pull request #469 from anaqreon/website-import
Website import tool
Diffstat (limited to 'include/widgets.php')
-rw-r--r--include/widgets.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/widgets.php b/include/widgets.php
index 3516e82da..5477dc1e4 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -779,6 +779,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();