rewrite wiki pages widget - no need for ajax on pageload, show the pages to not authenticated people.

This commit is contained in:
git-marijus
2017-06-03 17:23:53 +02:00
parent c4ed04fc82
commit 7562f77bdf
4 changed files with 56 additions and 52 deletions

View File

@@ -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));
}