aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Wiki_page_history.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-15 21:26:28 -0700
committerzotlabs <mike@macgirvin.com>2017-03-15 21:26:28 -0700
commitf6b643e84ee1ce8b4e13f959e0d58804f4aabd3b (patch)
treec22cc6aee9776ef34940ab539c6fb7f7e80e45ec /Zotlabs/Widget/Wiki_page_history.php
parent16d750d1f6cf0d2866388269e02445630c4e3464 (diff)
downloadvolse-hubzilla-f6b643e84ee1ce8b4e13f959e0d58804f4aabd3b.tar.gz
volse-hubzilla-f6b643e84ee1ce8b4e13f959e0d58804f4aabd3b.tar.bz2
volse-hubzilla-f6b643e84ee1ce8b4e13f959e0d58804f4aabd3b.zip
widgets cont.
Diffstat (limited to 'Zotlabs/Widget/Wiki_page_history.php')
-rw-r--r--Zotlabs/Widget/Wiki_page_history.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/Zotlabs/Widget/Wiki_page_history.php b/Zotlabs/Widget/Wiki_page_history.php
new file mode 100644
index 000000000..dcec9a037
--- /dev/null
+++ b/Zotlabs/Widget/Wiki_page_history.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace Zotlabs\Widget;
+
+class Wiki_page_history {
+
+ function widget($arr) {
+
+ $pageUrlName = ((array_key_exists('pageUrlName', $arr)) ? $arr['pageUrlName'] : '');
+ $resource_id = ((array_key_exists('resource_id', $arr)) ? $arr['resource_id'] : '');
+
+ $pageHistory = \Zotlabs\Lib\NativeWikiPage::page_history([
+ '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')
+ ));
+
+ }
+}