aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHubzilla <hubzilla@hz.macgirvin.com>2017-01-18 18:18:37 -0800
committerHubzilla <hubzilla@hz.macgirvin.com>2017-01-18 18:18:37 -0800
commitd4e58e94f6777f0a7ab5733d889f29bdb9366b14 (patch)
treefd199554fac5c1afad8e1257534fed9fddb6526d /include
parent6e504b7bc992bebabedfc22f4e9b80dd29761800 (diff)
downloadvolse-hubzilla-d4e58e94f6777f0a7ab5733d889f29bdb9366b14.tar.gz
volse-hubzilla-d4e58e94f6777f0a7ab5733d889f29bdb9366b14.tar.bz2
volse-hubzilla-d4e58e94f6777f0a7ab5733d889f29bdb9366b14.zip
native wiki updates
Diffstat (limited to 'include')
-rw-r--r--include/widgets.php39
1 files changed, 12 insertions, 27 deletions
diff --git a/include/widgets.php b/include/widgets.php
index ecbefff76..799310908 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -901,13 +901,10 @@ function widget_chatroom_members() {
}
function widget_wiki_list($arr) {
- require_once("include/wiki.php");
+
$channel = channelx_by_n(App::$profile_uid);
- if(defined('NATIVE_WIKI'))
- $wikis = Zotlabs\Lib\NativeWiki::listwikis($channel,get_observer_hash());
- else
- $wikis = wiki_list($channel, get_observer_hash());
+ $wikis = Zotlabs\Lib\NativeWiki::listwikis($channel,get_observer_hash());
if($wikis) {
return replace_macros(get_markup_template('wikilist_widget.tpl'), array(
@@ -921,7 +918,6 @@ function widget_wiki_list($arr) {
function widget_wiki_pages($arr) {
- require_once("include/wiki.php");
$channelname = ((array_key_exists('channel',$arr)) ? $arr['channel'] : '');
$c = channelx_by_nick($channelname);
@@ -935,10 +931,7 @@ function widget_wiki_pages($arr) {
if (! array_key_exists('resource_id', $arr)) {
$hide = true;
} else {
- if(defined('NATIVE_WIKI'))
- $p = Zotlabs\Lib\NativeWikiPage::page_list($c['channel_id'],get_observer_hash(),$arr['resource_id']);
- else
- $p = wiki_page_list($arr['resource_id']);
+ $p = Zotlabs\Lib\NativeWikiPage::page_list($c['channel_id'],get_observer_hash(),$arr['resource_id']);
if($p['pages']) {
$pages = $p['pages'];
@@ -967,26 +960,18 @@ function widget_wiki_pages($arr) {
}
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'] : '');
- 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(
- '$pageHistory' => $pageHistory['history'],
- '$permsWrite' => $arr['permsWrite']
- ));
- }
+ $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')
+ ));
+
}
function widget_bookmarkedchats($arr) {