From f69c74fcd0316854c973dd8537ee2695f97afb91 Mon Sep 17 00:00:00 2001
From: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
Date: Sat, 20 Oct 2018 16:43:30 +0100
Subject: [PATCH] It's time for v0.17! :smiley_cat: :fireworks:

---
 Changelog.md           |  6 ++++++
 README.md              |  2 +-
 build/index.php        | 19 +++++++++----------
 module_index.json      |  2 +-
 modules/page-login.php |  6 +++---
 theme_default.css      |  1 -
 version                |  2 +-
 7 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/Changelog.md b/Changelog.md
index 81a554e..a4f4d9b 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,6 +1,12 @@
 # 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.17
+
+### Fixed
+ - Removed stray debugging output
+ - Tweaked css to make new search context generation look better
+
 ## v0.17-beta2
 
 ### Fixed
diff --git a/README.md b/README.md
index d36476f..25042d0 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ Pepperminty Wiki is a complete wiki contained in a single file, inspired by @am2
 
 Developed by Starbeamrainbowlabs (though contributions from others are welcome!), Pepperminty Wiki has a variety of useful (and cool!) features - such as file upload, a dynamic help page, page revision history, page tags, and more! Other amazing features are in the works too (like a theme gallery, autoupdate, and user watchlists), so check the release notes to see what's been added recently.
 
-**Latest Version:** v0.16 (stable) v0.17-dev (development) ([Changelog](https://github.com/sbrl/Pepperminty-Wiki/blob/master/Changelog.md))
+**Latest Version:** v0.17 (stable) v0.18-dev (development) ([Changelog](https://github.com/sbrl/Pepperminty-Wiki/blob/master/Changelog.md))
 
 ## Table of Contents
  - [Screenshots and Demo](#screenshots-and-demo)
diff --git a/build/index.php b/build/index.php
index e31d004..de97bec 100644
--- a/build/index.php
+++ b/build/index.php
@@ -307,7 +307,6 @@ a.redlink:visited { color: rgb(130, 15, 15); /*#8b1a1a*/ }
 .search-result > h2 { margin-left: 3rem; }
 .search-result-badges { font-size: 1rem; font-weight: normal; }
 .search-context { min-height: 3em; max-height: 20em; overflow: hidden; }
-.search-context::after { content: ""; position: absolute; bottom: 0; width: 100%; height: 3em; display: block; background: linear-gradient(to bottom, transparent, #faf8fb); pointer-events: none; }
 
 textarea[name=content] { resize: none; }
 .fit-text-mirror { position: absolute; left: -10000vw; word-wrap: break-word; white-space: pre-wrap; }
@@ -406,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-beta2";
-$commit = "197d065266983f43e4bca2602407f365982cdb2a";
+$version = "v0.17";
+$commit = "1cec17a4419d4ba1f56f7734cc99f75bcb8e4722";
 /// Environment ///
 /** Holds information about the current request environment. */
 $env = new stdClass();
@@ -1446,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-beta2' />
+		<meta name='generator' content='Pepperminty Wiki v0.17' />
 		<link rel='shortcut-icon' href='{favicon-url}' />
 		<link rel='icon' href='{favicon-url}' />
 		{header-html}
@@ -1470,7 +1469,7 @@ class page_renderer
 		{extra}
 		<footer>
 			<p>{footer-message}</p>
-			<p>Powered by Pepperminty Wiki v0.17-beta2, 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.17, 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>
@@ -1488,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-beta2.</em></p>
+			<p><em>Powered by Pepperminty Wiki v0.17.</em></p>
 		</footer>";
 	
 	/**
@@ -1577,7 +1576,7 @@ class page_renderer
 			"{body}" => $body_template,
 
 			"{sitename}" => $logo_html,
-			"v0.17-beta2" => $version,
+			"v0.17" => $version,
 			"{favicon-url}" => $settings->favicon,
 			"{header-html}" => self::get_header_html(),
 
@@ -8027,7 +8026,7 @@ register_module([
 			}
 			
 			$time_compute = microtime(true);
-			$cost = hash_password_compute_cost();
+			$cost = hash_password_compute_cost(true);
 			$time_compute = (microtime(true) - $time_compute)*1000;
 			
 			$time_cost = microtime(true);
@@ -8139,7 +8138,7 @@ function hash_password_update($pass, $hash) {
  * found that's greater than the target - or 10x the target time elapses.
  * @return integer The automatically calculated password hashing cost.
  */
-function hash_password_compute_cost() {
+function hash_password_compute_cost($verbose = false) {
 	global $settings;
 	$props = hash_password_properties();
 	if($props["algorithm"] == PASSWORD_ARGON2I)
@@ -8153,7 +8152,7 @@ function hash_password_compute_cost() {
 		$start_i = microtime(true);
 		password_hash("testing", $props["algorithm"], $props["options"]);
 		$end_i =  microtime(true);
-		echo("Attempt | cost = {$props["options"]["cost"]}, time = " . ($end_i - $start_i)*1000 . "ms\n");
+		if($verbose) echo("Attempt | cost = {$props["options"]["cost"]}, time = " . ($end_i - $start_i)*1000 . "ms\n");
 		// Iterate until we find a cost high enough
 		// ....but don't keep going forever - try for at most 10x the target
 		// time in total (in case the specified algorithm doesn't take a
diff --git a/module_index.json b/module_index.json
index 1bab8cb..3b4347a 100755
--- a/module_index.json
+++ b/module_index.json
@@ -212,7 +212,7 @@
         "author": "Starbeamrainbowlabs",
         "description": "Adds a pair of actions (login and checklogin) that allow users to login. You need this one if you want your users to be able to login.",
         "id": "page-login",
-        "lastupdate": 1538315378,
+        "lastupdate": 1540050129,
         "optional": false
     },
     {
diff --git a/modules/page-login.php b/modules/page-login.php
index 0931e12..c7c8d19 100644
--- a/modules/page-login.php
+++ b/modules/page-login.php
@@ -161,7 +161,7 @@ register_module([
 			}
 			
 			$time_compute = microtime(true);
-			$cost = hash_password_compute_cost();
+			$cost = hash_password_compute_cost(true);
 			$time_compute = (microtime(true) - $time_compute)*1000;
 			
 			$time_cost = microtime(true);
@@ -273,7 +273,7 @@ function hash_password_update($pass, $hash) {
  * found that's greater than the target - or 10x the target time elapses.
  * @return integer The automatically calculated password hashing cost.
  */
-function hash_password_compute_cost() {
+function hash_password_compute_cost($verbose = false) {
 	global $settings;
 	$props = hash_password_properties();
 	if($props["algorithm"] == PASSWORD_ARGON2I)
@@ -287,7 +287,7 @@ function hash_password_compute_cost() {
 		$start_i = microtime(true);
 		password_hash("testing", $props["algorithm"], $props["options"]);
 		$end_i =  microtime(true);
-		echo("Attempt | cost = {$props["options"]["cost"]}, time = " . ($end_i - $start_i)*1000 . "ms\n");
+		if($verbose) echo("Attempt | cost = {$props["options"]["cost"]}, time = " . ($end_i - $start_i)*1000 . "ms\n");
 		// Iterate until we find a cost high enough
 		// ....but don't keep going forever - try for at most 10x the target
 		// time in total (in case the specified algorithm doesn't take a
diff --git a/theme_default.css b/theme_default.css
index 598d051..83f80cf 100644
--- a/theme_default.css
+++ b/theme_default.css
@@ -67,7 +67,6 @@ a.redlink:visited { color: rgb(130, 15, 15); /*#8b1a1a*/ }
 .search-result > h2 { margin-left: 3rem; }
 .search-result-badges { font-size: 1rem; font-weight: normal; }
 .search-context { min-height: 3em; max-height: 20em; overflow: hidden; }
-.search-context::after { content: ""; position: absolute; bottom: 0; width: 100%; height: 3em; display: block; background: linear-gradient(to bottom, transparent, #faf8fb); pointer-events: none; }
 
 textarea[name=content] { resize: none; }
 .fit-text-mirror { position: absolute; left: -10000vw; word-wrap: break-word; white-space: pre-wrap; }
diff --git a/version b/version
index 0d9cad9..2b8bac3 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-v0.17-beta2
+v0.17
