From 142d2b60a847c3a868dff2ff52ee0524f8d120f1 Mon Sep 17 00:00:00 2001
From: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
Date: Sat, 19 Mar 2016 18:41:22 +0000
Subject: [PATCH] Add extra info to the dev help page.

---
 Changelog.md          |  1 +
 build/index.php       | 12 ++++++++----
 module_index.json     |  6 +++---
 modules/page-help.php | 12 ++++++++----
 4 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/Changelog.md b/Changelog.md
index 6361c94..9e131d8 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -21,6 +21,7 @@
  - Removed Slimdown add from the parsedown parser and replaced it with a custom extension of parsedown extra.
  - Moved printable button to bottom bar and changed display text to "Printable version".
  - Improved the "There isn't a page called..." message you sometimes see when searching.
+ - Corrected a minor issue on the help page.
 
 ## Fixed
  - Removed debug statement from the redirect page module.
diff --git a/build/index.php b/build/index.php
index d3510e0..eee411a 100644
--- a/build/index.php
+++ b/build/index.php
@@ -3087,9 +3087,9 @@ register_module([
 
 register_module([
 	"name" => "Help page",
-	"version" => "0.7.1",
+	"version" => "0.8.1",
 	"author" => "Starbeamrainbowlabs",
-	"description" => "Adds the help action. You really want this one.",
+	"description" => "Adds a rather useful help page. Access through the 'help' action. This module also exposes help content added to Pepperminty Wiki's inbuilt invisible help section system.",
 	"id" => "page-help",
 	"code" => function() {
 		global $settings;
@@ -3102,7 +3102,7 @@ register_module([
 		 * ██   ██ ███████ ███████ ██      
 		 */
 		add_action("help", function() {
-			global $settings, $version, $help_sections;
+			global $settings, $version, $help_sections, $actions;
 			
 			// Sort the help sections by key
 			ksort($help_sections, SORT_NATURAL);
@@ -3112,13 +3112,17 @@ register_module([
 				$title = "Developers Help - $settings->sitename";
 				$content = "<p>$settings->sitename runs on Pepperminty Wiki, an entire wiki packed into a single file. This page contains some information that developers may find useful.</p>
 				<p>A full guide to developing a Pepperminty Wiki module can be found <a href='//github.com/sbrl/Pepperminty-Wiki/blob/master/Module_API_Docs.md#module-api-documentation'>on GitHub</a>.</p>
+				<h3>Registered Help Sections</h3>
 				<p>The following help sections are currently registered:</p>
 				<table><tr><th>Index</th><th>Title</th><th>Length</th></tr>\n";
 				foreach($help_sections as $index => $section)
 				{
 					$content .= "\t\t\t<tr><td>$index</td><td>" . $section["title"] . "</td><td>" . human_filesize(strlen($section["content"])) . "</td></tr>\n";
 				}
-				$content .= "\t\t</table>";
+				$content .= "\t\t</table>\n";
+				$content .= "<h3>Registered Actions</h3>
+				<p>The following actions are currently registered:</p>\n";
+				$content .= "<p>" . implode(", ", array_keys(get_object_vars($actions))) . "</p>";
 			}
 			else
 			{
diff --git a/module_index.json b/module_index.json
index e82767e..96707d4 100644
--- a/module_index.json
+++ b/module_index.json
@@ -118,11 +118,11 @@
     },
     {
         "name": "Help page",
-        "version": "0.7.1",
+        "version": "0.8.1",
         "author": "Starbeamrainbowlabs",
-        "description": "Adds the help action. You really want this one.",
+        "description": "Adds a rather useful help page. Access through the 'help' action. This module also exposes help content added to Pepperminty Wiki's inbuilt invisible help section system.",
         "id": "page-help",
-        "lastupdate": 1458412065,
+        "lastupdate": 1458412848,
         "optional": false
     },
     {
diff --git a/modules/page-help.php b/modules/page-help.php
index 3680c4d..fe74ed2 100644
--- a/modules/page-help.php
+++ b/modules/page-help.php
@@ -1,9 +1,9 @@
 <?php
 register_module([
 	"name" => "Help page",
-	"version" => "0.7.1",
+	"version" => "0.8.1",
 	"author" => "Starbeamrainbowlabs",
-	"description" => "Adds the help action. You really want this one.",
+	"description" => "Adds a rather useful help page. Access through the 'help' action. This module also exposes help content added to Pepperminty Wiki's inbuilt invisible help section system.",
 	"id" => "page-help",
 	"code" => function() {
 		global $settings;
@@ -16,7 +16,7 @@ register_module([
 		 * ██   ██ ███████ ███████ ██      
 		 */
 		add_action("help", function() {
-			global $settings, $version, $help_sections;
+			global $settings, $version, $help_sections, $actions;
 			
 			// Sort the help sections by key
 			ksort($help_sections, SORT_NATURAL);
@@ -26,13 +26,17 @@ register_module([
 				$title = "Developers Help - $settings->sitename";
 				$content = "<p>$settings->sitename runs on Pepperminty Wiki, an entire wiki packed into a single file. This page contains some information that developers may find useful.</p>
 				<p>A full guide to developing a Pepperminty Wiki module can be found <a href='//github.com/sbrl/Pepperminty-Wiki/blob/master/Module_API_Docs.md#module-api-documentation'>on GitHub</a>.</p>
+				<h3>Registered Help Sections</h3>
 				<p>The following help sections are currently registered:</p>
 				<table><tr><th>Index</th><th>Title</th><th>Length</th></tr>\n";
 				foreach($help_sections as $index => $section)
 				{
 					$content .= "\t\t\t<tr><td>$index</td><td>" . $section["title"] . "</td><td>" . human_filesize(strlen($section["content"])) . "</td></tr>\n";
 				}
-				$content .= "\t\t</table>";
+				$content .= "\t\t</table>\n";
+				$content .= "<h3>Registered Actions</h3>
+				<p>The following actions are currently registered:</p>\n";
+				$content .= "<p>" . implode(", ", array_keys(get_object_vars($actions))) . "</p>";
 			}
 			else
 			{
