aboutsummaryrefslogtreecommitdiffstats
path: root/include/widgets.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-06-04 15:12:04 -0400
committerAndrew Manning <tamanning@zoho.com>2016-06-04 15:12:04 -0400
commit344c293424716cc53eed2fea9eb3a7512e725516 (patch)
tree8fa8361f1b5a0286c9177c5ce61a069b85fe4d6e /include/widgets.php
parentb5d8443f59d96cece2357b6a791fe8ffe854dd95 (diff)
downloadvolse-hubzilla-344c293424716cc53eed2fea9eb3a7512e725516.tar.gz
volse-hubzilla-344c293424716cc53eed2fea9eb3a7512e725516.tar.bz2
volse-hubzilla-344c293424716cc53eed2fea9eb3a7512e725516.zip
Wiki and page filenames are abstracted from their displayed names. Special characters do not seem to break things.
Diffstat (limited to 'include/widgets.php')
-rw-r--r--include/widgets.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/widgets.php b/include/widgets.php
index b5c3b425a..9ea517a2d 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -897,13 +897,15 @@ 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'];
+ $w = $p['wiki'];
+ // Wiki item record is $w['wiki']
+ $wikiname = $w['urlName'];
if (!$wikiname) {
$wikiname = '';
}
}
}
+ logger('pages: ' . json_encode($pages));
return replace_macros(get_markup_template('wiki_page_list.tpl'), array(
'$hide' => $hide,
'$not_refresh' => $not_refresh,
@@ -916,9 +918,9 @@ function widget_wiki_pages($arr) {
function widget_wiki_page_history($arr) {
require_once("include/wiki.php");
- $pagename = ((array_key_exists('page', $arr)) ? $arr['page'] : '');
+ $pageUrlName = ((array_key_exists('pageUrlName', $arr)) ? $arr['pageUrlName'] : '');
$resource_id = ((array_key_exists('resource_id', $arr)) ? $arr['resource_id'] : '');
- $pageHistory = wiki_page_history(array('resource_id' => $resource_id, 'page' => $pagename));
+ $pageHistory = wiki_page_history(array('resource_id' => $resource_id, 'pageUrlName' => $pageUrlName));
return replace_macros(get_markup_template('wiki_page_history.tpl'), array(
'$pageHistory' => $pageHistory['history']