aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-18 16:41:43 -0700
committerzotlabs <mike@macgirvin.com>2017-03-18 16:41:43 -0700
commit4afeefb5ce2119541a6d2a0a0b332c7a9a59a2b4 (patch)
treec481814a4031c480f99e480e00bbd7bb1c837f91 /Zotlabs/Widget
parentd9037589407162f51578856b084baaa5353a8a04 (diff)
downloadvolse-hubzilla-4afeefb5ce2119541a6d2a0a0b332c7a9a59a2b4.tar.gz
volse-hubzilla-4afeefb5ce2119541a6d2a0a0b332c7a9a59a2b4.tar.bz2
volse-hubzilla-4afeefb5ce2119541a6d2a0a0b332c7a9a59a2b4.zip
various input filter fixes
Diffstat (limited to 'Zotlabs/Widget')
-rw-r--r--Zotlabs/Widget/Wiki_pages.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/Zotlabs/Widget/Wiki_pages.php b/Zotlabs/Widget/Wiki_pages.php
index bad451475..f992b3f93 100644
--- a/Zotlabs/Widget/Wiki_pages.php
+++ b/Zotlabs/Widget/Wiki_pages.php
@@ -10,6 +10,12 @@ class Wiki_pages {
$channelname = ((array_key_exists('channel',$arr)) ? $arr['channel'] : '');
$c = channelx_by_nick($channelname);
+ if(! $c)
+ $c = \App::get_channel();
+
+ if(! $c)
+ return '';
+
$wikiname = '';
if(array_key_exists('refresh', $arr)) {
$not_refresh = (($arr['refresh']=== true) ? false : true);
@@ -36,6 +42,7 @@ class Wiki_pages {
}
}
+
$can_create = perm_is_allowed(\App::$profile['uid'],get_observer_hash(),'write_wiki');
$can_delete = ((local_channel() && (local_channel() == \App::$profile['uid'])) ? true : false);