aboutsummaryrefslogtreecommitdiffstats
path: root/include/widgets.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-05-21 21:55:09 -0400
committerAndrew Manning <tamanning@zoho.com>2016-05-21 21:55:09 -0400
commita36bef7979aecd72751d319f85b7037991979e35 (patch)
tree30b24ac811becd3e32cbeb260e11bea66ef4445d /include/widgets.php
parent049147a9d78b981482297c3daf48c67f31754259 (diff)
downloadvolse-hubzilla-a36bef7979aecd72751d319f85b7037991979e35.tar.gz
volse-hubzilla-a36bef7979aecd72751d319f85b7037991979e35.tar.bz2
volse-hubzilla-a36bef7979aecd72751d319f85b7037991979e35.zip
List of wikis populates with links according to observer permissions.
Diffstat (limited to 'include/widgets.php')
-rw-r--r--include/widgets.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/widgets.php b/include/widgets.php
index acbd9bcd3..cff58d225 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -860,13 +860,19 @@ function widget_chatroom_members() {
function widget_wiki_list($arr) {
require_once("include/wiki.php");
- $r = wiki_list(App::$profile['channel_hash']);
+ if(argc()>1) {
+ $nick = argv(1);
+ } else {
+ $channel = \App::get_channel();
+ $nick = $channel['channel_address'];
+ }
+ $wikis = wiki_list($nick, get_observer_hash());
- if($r) {
+ if($wikis) {
return replace_macros(get_markup_template('wikilist.tpl'), array(
'$header' => t('Wiki List'),
- '$read' => $r['read'],
- '$write' => $r['write']
+ '$channel' => $nick,
+ '$wikis' => $wikis['wikis']
));
}
}