aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget
diff options
context:
space:
mode:
authormrjive <mrjive@mrjive.it>2018-04-19 09:51:58 +0200
committerGitHub <noreply@github.com>2018-04-19 09:51:58 +0200
commitc8ff773b9609f723217712f0faf451238d41327d (patch)
tree4127afeee7d8a3b710863d9ad022fed2b82a8ebc /Zotlabs/Widget
parent283e5d3a5c9557195a640de5f0acefc884e904bb (diff)
parent92b08f1f07a25976342dc885331ecb1531e256aa (diff)
downloadvolse-hubzilla-c8ff773b9609f723217712f0faf451238d41327d.tar.gz
volse-hubzilla-c8ff773b9609f723217712f0faf451238d41327d.tar.bz2
volse-hubzilla-c8ff773b9609f723217712f0faf451238d41327d.zip
Merge pull request #9 from redmatrix/dev
Dev
Diffstat (limited to 'Zotlabs/Widget')
-rw-r--r--Zotlabs/Widget/Design_tools.php13
-rw-r--r--Zotlabs/Widget/Pubtagcloud.php41
2 files changed, 44 insertions, 10 deletions
diff --git a/Zotlabs/Widget/Design_tools.php b/Zotlabs/Widget/Design_tools.php
index 8ab6a235d..a15c0c98d 100644
--- a/Zotlabs/Widget/Design_tools.php
+++ b/Zotlabs/Widget/Design_tools.php
@@ -6,16 +6,9 @@ class Design_tools {
function widget($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(perm_is_allowed(\App::$profile['profile_uid'],get_observer_hash(),'write_pages') || (\App::$is_sys && is_site_admin()))
+ return design_tools();
- if(\App::$profile['profile_uid'])
- if((\App::$profile['profile_uid'] != local_channel()) && (! \App::$is_sys))
- return '';
-
- if(! local_channel())
- return '';
-
- return design_tools();
+ return EMPTY_STR;
}
} \ No newline at end of file
diff --git a/Zotlabs/Widget/Pubtagcloud.php b/Zotlabs/Widget/Pubtagcloud.php
new file mode 100644
index 000000000..826e3e6ae
--- /dev/null
+++ b/Zotlabs/Widget/Pubtagcloud.php
@@ -0,0 +1,41 @@
+<?php
+
+namespace Zotlabs\Widget;
+
+class Pubtagcloud {
+
+ function widget($arr) {
+
+ $trending = ((array_key_exists('trending',$arr)) ? intval($arr['trending']) : 0);
+ if((observer_prohibited(true))) {
+ return EMPTY_STR;
+ }
+
+ if(! intval(get_config('system','open_pubstream',1))) {
+ if(! get_observer_hash()) {
+ return EMPTY_STR;
+ }
+ }
+
+ $site_firehose = ((intval(get_config('system','site_firehose',0))) ? true : false);
+ $net_firehose = ((get_config('system','disable_discover_tab',1)) ? false : true);
+
+ if(! ($site_firehose || $net_firehose)) {
+ return EMPTY_STR;
+ }
+
+ if($net_firehose) {
+ $site_firehose = false;
+ }
+
+ $safemode = get_xconfig(get_observer_hash(),'directory','safemode',1);
+
+
+
+ $limit = ((array_key_exists('limit', $arr)) ? intval($arr['limit']) : 75);
+
+ return pubtagblock($net_firehose,$site_firehose, $limit, $trending, $safemode);
+
+ return '';
+ }
+}