diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-05-28 12:33:07 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-05-28 12:33:07 -0400 |
commit | 7393dccde816bafca2e3efe534fae56339e2c536 (patch) | |
tree | 8024af20c55e600481a6d81642abbecadcd425e3 /Zotlabs/Module | |
parent | ae94e8a855d31125b96e158c0fb8c0d6f22631d6 (diff) | |
download | volse-hubzilla-7393dccde816bafca2e3efe534fae56339e2c536.tar.gz volse-hubzilla-7393dccde816bafca2e3efe534fae56339e2c536.tar.bz2 volse-hubzilla-7393dccde816bafca2e3efe534fae56339e2c536.zip |
Page content is loaded from the file on disk
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Wiki.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php index 54511fc91..76c07f2bc 100644 --- a/Zotlabs/Module/Wiki.php +++ b/Zotlabs/Module/Wiki.php @@ -63,12 +63,20 @@ class Wiki extends \Zotlabs\Web\Controller { } if(argc()<3) { $wikiheader = t('Wiki Sandbox'); + $content = '# Wiki Sandbox\nContent you **edit** and **preview** here *will not be saved*.'; $hide_editor = false; } elseif (argc()<4) { - $wikiheader = 'Empty wiki: ' . rawurldecode(argv(2)); // show wiki name + $wikiheader = rawurldecode(argv(2)); // show wiki name + $content = ''; $hide_editor = true; } elseif (argc()<5) { - $wikiheader = rawurldecode(argv(2)) . ': ' . rawurldecode(argv(3)); // show wiki name and page + $wikiheader = rawurldecode(argv(2)) . ': ' . rawurldecode(argv(3)); // show wiki name and page + $p = wiki_get_page_content(array('wiki_resource_id' => $resource_id, 'page' => argv(3))); + if(!$p['success']) { + logger('Error getting page content'); + $content = 'Error retrieving page content. Try again.'; + } + $content = $p['content']; $hide_editor = false; } @@ -80,7 +88,7 @@ class Wiki extends \Zotlabs\Web\Controller { '$lockstate' => $x['lockstate'], '$acl' => $x['acl'], '$bang' => $x['bang'], - '$content' => '# Start your wiki', + '$content' => $content, '$wikiName' => array('wikiName', t('Enter the name of your new wiki:'), '', ''), '$pageName' => array('pageName', t('Enter the name of the new page:'), '', '') )); |