aboutsummaryrefslogtreecommitdiffstats
path: root/include/widgets.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-05-28 07:42:18 -0400
committerAndrew Manning <tamanning@zoho.com>2016-05-28 07:42:18 -0400
commitae94e8a855d31125b96e158c0fb8c0d6f22631d6 (patch)
tree0bb82a3d3c885356dae690fc991b17a758fc96e6 /include/widgets.php
parentf884fa66782544cd6fc44a81b978a905d4755cea (diff)
downloadvolse-hubzilla-ae94e8a855d31125b96e158c0fb8c0d6f22631d6.tar.gz
volse-hubzilla-ae94e8a855d31125b96e158c0fb8c0d6f22631d6.tar.bz2
volse-hubzilla-ae94e8a855d31125b96e158c0fb8c0d6f22631d6.zip
Wiki page list links work. File content is not yet loaded into the editor. Removed some logger calls.
Diffstat (limited to 'include/widgets.php')
-rw-r--r--include/widgets.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/widgets.php b/include/widgets.php
index 0d734d6cf..539d227aa 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -877,7 +877,13 @@ function widget_wiki_list($arr) {
function widget_wiki_pages($arr) {
require_once("include/wiki.php");
-
+ $channelname = ((array_key_exists('channel',$arr)) ? $arr['channel'] : '');
+ $wikiname = '';
+ if (array_key_exists('refresh', $arr)) {
+ $not_refresh = (($arr['refresh']=== true) ? false : true);
+ } else {
+ $not_refresh = true;
+ }
$pages = array();
if (!array_key_exists('resource_id', $arr)) {
$hide = true;
@@ -885,11 +891,19 @@ function widget_wiki_pages($arr) {
$p = wiki_page_list($arr['resource_id']);
if ($p['pages']) {
$pages = $p['pages'];
+ $w = wiki_get_wiki($arr['resource_id']);
+ $wikiname = $w['wiki']['title'];
+ if (!$wikiname) {
+ $wikiname = '';
+ }
}
}
return replace_macros(get_markup_template('wiki_page_list.tpl'), array(
'$hide' => $hide,
+ '$not_refresh' => $not_refresh,
'$header' => t('Wiki Pages'),
+ '$channel' => $channelname,
+ '$wikiname' => $wikiname,
'$pages' => $pages
));
}