aboutsummaryrefslogtreecommitdiffstats
path: root/include/widgets.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-01-25 12:21:52 -0800
committerzotlabs <mike@macgirvin.com>2017-01-25 12:21:52 -0800
commit45dbd31d286838254cd1ae60e4ebb39c112526be (patch)
treeba4bd74b443e45da3e21a3daccfa246c247fd34e /include/widgets.php
parent45a9eca792b349984ca11ab9a65e87e65625a718 (diff)
downloadvolse-hubzilla-45dbd31d286838254cd1ae60e4ebb39c112526be.tar.gz
volse-hubzilla-45dbd31d286838254cd1ae60e4ebb39c112526be.tar.bz2
volse-hubzilla-45dbd31d286838254cd1ae60e4ebb39c112526be.zip
only allow wiki owner to delete pages
Diffstat (limited to 'include/widgets.php')
-rw-r--r--include/widgets.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/widgets.php b/include/widgets.php
index 799310908..98ea4e6a1 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -945,6 +945,8 @@ function widget_wiki_pages($arr) {
}
$can_create = perm_is_allowed(\App::$profile['uid'],get_observer_hash(),'write_pages');
+ $can_delete = ((local_channel() && (local_channel() == \App::$profile['uid'])) ? true : false);
+
return replace_macros(get_markup_template('wiki_page_list.tpl'), array(
'$hide' => $hide,
'$resource_id' => $arr['resource_id'],
@@ -954,6 +956,7 @@ function widget_wiki_pages($arr) {
'$wikiname' => $wikiname,
'$pages' => $pages,
'$canadd' => $can_create,
+ '$candel' => $can_delete,
'$addnew' => t('Add new page'),
'$pageName' => array('pageName', t('Page name')),
));