From 77112ec7d350ede3306a5812cba121407c48d7fc Mon Sep 17 00:00:00 2001
From: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
Date: Wed, 31 Oct 2018 16:38:56 +0000
Subject: [PATCH] Bump version & update changelog

---
 Changelog.md                |  7 ++++++-
 build/index.php             | 24 +++++++++++++++---------
 module_index.json           |  6 +++---
 modules/feature-history.php |  2 +-
 version                     |  2 +-
 5 files changed, 26 insertions(+), 15 deletions(-)

diff --git a/Changelog.md b/Changelog.md
index c3d5e0c..81a097c 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,10 +1,15 @@
 # Changelog
 This file holds the changelog for Pepperminty Wiki. This is the master list of things that have changed (second only to the commit history!) - though the information for any particular release can also be found in the description of it's page for every release made on GitHub too.
 
+## v0.18-dev
+
+### Fixed
+ - Squashed a warning in the history revision systme when creating new pages (thanks @tspivey for spotting this!)
+
 ## v0.17.1
 
 ### Fixed
- - Corrected default passwords. If you were having issues, try updating to this release, deleting `peppermint.json` and trying again.
+ - Corrected default passwords. If you were having issues, try updating to this release, deleting `peppermint.json` and trying again (thanks for spotting this, @tspivey!)
 
 ## v0.17
 
diff --git a/build/index.php b/build/index.php
index 1889849..84b86be 100644
--- a/build/index.php
+++ b/build/index.php
@@ -405,8 +405,8 @@ if($settings->sessionprefix == "auto")
 ////// Do not edit below this line unless you know what you are doing! //////
 /////////////////////////////////////////////////////////////////////////////
 /** The version of Pepperminty Wiki currently running. */
-$version = "v0.17.1";
-$commit = "bb58384f9e75d55f158b8ba53f6b5bd6578e2669";
+$version = "v0.18-dev";
+$commit = "3a2d74227d0df78f17bb8f4da7f390a8ed6e45d2";
 /// Environment ///
 /** Holds information about the current request environment. */
 $env = new stdClass();
@@ -1445,7 +1445,7 @@ class page_renderer
 		<meta charset='utf-8' />
 		<title>{title}</title>
 		<meta name='viewport' content='width=device-width, initial-scale=1' />
-		<meta name='generator' content='Pepperminty Wiki v0.17.1' />
+		<meta name='generator' content='Pepperminty Wiki v0.18-dev' />
 		<link rel='shortcut-icon' href='{favicon-url}' />
 		<link rel='icon' href='{favicon-url}' />
 		{header-html}
@@ -1469,7 +1469,7 @@ class page_renderer
 		{extra}
 		<footer>
 			<p>{footer-message}</p>
-			<p>Powered by Pepperminty Wiki v0.17.1, which was built by <a href='//starbeamrainbowlabs.com/'>Starbeamrainbowlabs</a>. Send bugs to 'bugs at starbeamrainbowlabs dot com' or <a href='//github.com/sbrl/Pepperminty-Wiki' title='Github Issue Tracker'>open an issue</a>.</p>
+			<p>Powered by Pepperminty Wiki v0.18-dev, which was built by <a href='//starbeamrainbowlabs.com/'>Starbeamrainbowlabs</a>. Send bugs to 'bugs at starbeamrainbowlabs dot com' or <a href='//github.com/sbrl/Pepperminty-Wiki' title='Github Issue Tracker'>open an issue</a>.</p>
 			<p>Your local friendly moderators are {admins-name-list}.</p>
 			<p>This wiki is managed by <a href='mailto:{admin-details-email}'>{admin-details-name}</a>.</p>
 		</footer>
@@ -1487,7 +1487,7 @@ class page_renderer
 			<p><em>From {sitename}, which is managed by {admin-details-name}.</em></p>
 			<p>{footer-message}</p>
 			<p><em>Timed at {generation-date}</em></p>
-			<p><em>Powered by Pepperminty Wiki v0.17.1.</em></p>
+			<p><em>Powered by Pepperminty Wiki v0.18-dev.</em></p>
 		</footer>";
 	
 	/**
@@ -1576,7 +1576,7 @@ class page_renderer
 			"{body}" => $body_template,
 
 			"{sitename}" => $logo_html,
-			"v0.17.1" => $version,
+			"v0.18-dev" => $version,
 			"{favicon-url}" => $settings->favicon,
 			"{header-html}" => self::get_header_html(),
 
@@ -3274,7 +3274,7 @@ SCRIPT;
 
 register_module([
 	"name" => "Page History",
-	"version" => "0.4",
+	"version" => "0.4.1",
 	"author" => "Starbeamrainbowlabs",
 	"description" => "Adds the ability to keep unlimited page history, limited only by your disk space. Note that this doesn't store file history (yet). Currently depends on feature-recent-changes for rendering of the history page.",
 	"id" => "feature-history",
@@ -3506,8 +3506,8 @@ function history_add_revision(&$pageinfo, &$newsource, &$oldsource, $save_pagein
 	// this point
 	
 	// TODO Store tag changes here
-	end($pageinfo->history); // Calculate the next revision id - we can't jsut count the reivisions here because we might have a revision limit
-	$nextRid = $pageinfo->history[key($pageinfo->history)]->rid + 1;
+	end($pageinfo->history); // Calculate the next revision id - we can't just count the reivisions here because we might have a revision limit
+	$nextRid = !empty($pageindex->history) ? $pageinfo->history[key($pageinfo->history)]->rid + 1 : 0;
 	$ridFilename = "$pageinfo->filename.r$nextRid";
 	// Insert a new entry into the history
 	$pageinfo->history[] = [
@@ -6506,6 +6506,12 @@ register_module([
 					"thing_url" => "",
 					"icon" => "https://avatars2.githubusercontent.com/u/7314006?v=3&s=24"
 				],
+				"More Bug Reports (default credentials + downloader; via Gitter)" => [
+					"author" => "Tyler Spivey",
+					"author_url" => "https://github.com/tspivey/",
+					"thing_url" => "",
+					"icon" => "https://avatars2.githubusercontent.com/u/709407?v=4&s=24"
+				],
 				"PR #135: Fix repeated page names on sidebar" => [
 					"author" => "ikisler",
 					"author_url" => "https://github.com/ikisler",
diff --git a/module_index.json b/module_index.json
index 3b4347a..2539b3d 100755
--- a/module_index.json
+++ b/module_index.json
@@ -73,11 +73,11 @@
     },
     {
         "name": "Page History",
-        "version": "0.4",
+        "version": "0.4.1",
         "author": "Starbeamrainbowlabs",
         "description": "Adds the ability to keep unlimited page history, limited only by your disk space. Note that this doesn't store file history (yet). Currently depends on feature-recent-changes for rendering of the history page.",
         "id": "feature-history",
-        "lastupdate": 1530616470,
+        "lastupdate": 1541003921,
         "optional": false
     },
     {
@@ -149,7 +149,7 @@
         "author": "Starbeamrainbowlabs",
         "description": "Adds the credits page. You *must* have this module :D",
         "id": "page-credits",
-        "lastupdate": 1530618422,
+        "lastupdate": 1540998605,
         "optional": false
     },
     {
diff --git a/modules/feature-history.php b/modules/feature-history.php
index bb3c30b..819b894 100644
--- a/modules/feature-history.php
+++ b/modules/feature-history.php
@@ -1,7 +1,7 @@
 <?php
 register_module([
 	"name" => "Page History",
-	"version" => "0.4",
+	"version" => "0.4.1",
 	"author" => "Starbeamrainbowlabs",
 	"description" => "Adds the ability to keep unlimited page history, limited only by your disk space. Note that this doesn't store file history (yet). Currently depends on feature-recent-changes for rendering of the history page.",
 	"id" => "feature-history",
diff --git a/version b/version
index 0ffcf19..de0ad77 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-v0.17.1
+v0.18-dev
