diff options
author | zotlabs <mike@macgirvin.com> | 2017-01-17 23:39:28 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-01-17 23:39:28 -0800 |
commit | 7f944515dedd5c7a7d36fe5ed3b6bd884eb9be40 (patch) | |
tree | 86bf4b5ded23337a1b508fadd55cbf395384ce85 /include/widgets.php | |
parent | b6595a44d1f6db38c104abaa3c24f42223316ec5 (diff) | |
download | volse-hubzilla-7f944515dedd5c7a7d36fe5ed3b6bd884eb9be40.tar.gz volse-hubzilla-7f944515dedd5c7a7d36fe5ed3b6bd884eb9be40.tar.bz2 volse-hubzilla-7f944515dedd5c7a7d36fe5ed3b6bd884eb9be40.zip |
more work on native wiki - revert now works; still remaining: diff, delete-page, rename-page and export wiki.
Diffstat (limited to 'include/widgets.php')
-rw-r--r-- | include/widgets.php | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/widgets.php b/include/widgets.php index 94d638d77..ecbefff76 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -954,6 +954,7 @@ function widget_wiki_pages($arr) { return replace_macros(get_markup_template('wiki_page_list.tpl'), array( '$hide' => $hide, + '$resource_id' => $arr['resource_id'], '$not_refresh' => $not_refresh, '$header' => t('Wiki Pages'), '$channel' => $channelname, @@ -969,12 +970,23 @@ function widget_wiki_page_history($arr) { require_once("include/wiki.php"); $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, 'pageUrlName' => $pageUrlName)); + if(defined('NATIVE_WIKI')) { + $pageHistory = Zotlabs\Lib\NativeWikiPage::page_history(array('channel_id' => App::$profile_uid, 'observer_hash' => get_observer_hash(), 'resource_id' => $resource_id, 'pageUrlName' => $pageUrlName)); + return replace_macros(get_markup_template('nwiki_page_history.tpl'), array( + '$pageHistory' => $pageHistory['history'], + '$permsWrite' => $arr['permsWrite'], + '$name_lbl' => t('Name'), + '$msg_label' => t('Message','wiki_history') + )); + } + else { + $pageHistory = wiki_page_history(array('resource_id' => $resource_id, 'pageUrlName' => $pageUrlName)); - return replace_macros(get_markup_template('wiki_page_history.tpl'), array( + return replace_macros(get_markup_template('wiki_page_history.tpl'), array( '$pageHistory' => $pageHistory['history'], '$permsWrite' => $arr['permsWrite'] - )); + )); + } } function widget_bookmarkedchats($arr) { |