aboutsummaryrefslogtreecommitdiffstats
path: root/include/widgets.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-05-30 20:59:54 -0400
committerAndrew Manning <tamanning@zoho.com>2016-05-30 20:59:54 -0400
commit8d284bab474c7e669ae9a639bdb22f7b28b95cc3 (patch)
treec08d8569705cea43445cf8c65f8d8ca57beeff5f /include/widgets.php
parent82ec40dd80c131dbf0335406fb1a6e4b5b127a18 (diff)
downloadvolse-hubzilla-8d284bab474c7e669ae9a639bdb22f7b28b95cc3.tar.gz
volse-hubzilla-8d284bab474c7e669ae9a639bdb22f7b28b95cc3.tar.bz2
volse-hubzilla-8d284bab474c7e669ae9a639bdb22f7b28b95cc3.zip
Created page history widget to dynamically fetch and display the git commit history for wiki pages.
Diffstat (limited to 'include/widgets.php')
-rw-r--r--include/widgets.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/widgets.php b/include/widgets.php
index b19c36bc6..536af8818 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -914,6 +914,17 @@ function widget_wiki_pages($arr) {
));
}
+function widget_wiki_page_history($arr) {
+ require_once("include/wiki.php");
+ $pagename = ((array_key_exists('page', $arr)) ? $arr['page'] : '');
+ $resource_id = ((array_key_exists('resource_id', $arr)) ? $arr['resource_id'] : '');
+ $pageHistory = wiki_page_history(array('resource_id' => $resource_id, 'page' => $pagename));
+
+ return replace_macros(get_markup_template('wiki_page_history.tpl'), array(
+ '$pageHistory' => $pageHistory['history']
+ ));
+}
+
function widget_bookmarkedchats($arr) {
if(! feature_enabled(App::$profile['profile_uid'],'ajaxchat'))