aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorgit-marijus <mario@mariovavti.com>2017-06-03 17:23:53 +0200
committergit-marijus <mario@mariovavti.com>2017-06-03 17:23:53 +0200
commit7562f77bdf7040d5cc63473a3c6ff7c499600f13 (patch)
tree5d427c64a09582af5f859d8629205130adf38bc8 /Zotlabs/Module
parentc4ed04fc827ec5a1039959e260702141083836c8 (diff)
downloadvolse-hubzilla-7562f77bdf7040d5cc63473a3c6ff7c499600f13.tar.gz
volse-hubzilla-7562f77bdf7040d5cc63473a3c6ff7c499600f13.tar.bz2
volse-hubzilla-7562f77bdf7040d5cc63473a3c6ff7c499600f13.zip
rewrite wiki pages widget - no need for ajax on pageload, show the pages to not authenticated people.
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Wiki.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php
index f3b34401d..2f1fa01b7 100644
--- a/Zotlabs/Module/Wiki.php
+++ b/Zotlabs/Module/Wiki.php
@@ -207,9 +207,10 @@ class Wiki extends \Zotlabs\Web\Controller {
$ignore_language = true;
continue;
}
- if($page_name)
+ if($page_name) {
$page_name .= '/';
- $page_name .= argv($x);
+ }
+ $page_name .= argv($x);
}
$pageUrlName = urldecode($page_name);
@@ -296,7 +297,8 @@ class Wiki extends \Zotlabs\Web\Controller {
'$showPageControls' => $showPageControls,
'$editOrSourceLabel' => (($showPageControls) ? t('Edit') : t('Source')),
'$tools_label' => 'Page Tools',
- '$channel' => $owner['channel_address'],
+ '$channel_address' => $owner['channel_address'],
+ '$channel_id' => $owner['channel_id'],
'$resource_id' => $resource_id,
'$page' => $pageUrlName,
'$mimeType' => $mimeType,
@@ -495,10 +497,12 @@ class Wiki extends \Zotlabs\Web\Controller {
$x = new \Zotlabs\Widget\Wiki_pages();
- $page_list_html = $x->widget(array(
- 'resource_id' => $resource_id,
- 'refresh' => true,
- 'channel' => argv(1)));
+ $page_list_html = $x->widget([
+ 'resource_id' => $resource_id,
+ 'channel_id' => $owner['channel_id'],
+ 'channel_address' => $owner['channel_address'],
+ 'refresh' => true
+ ]);
json_return_and_die(array('pages' => $page_list_html, 'message' => '', 'success' => true));
}