From b4c0782e580c984a6aaf90dcb84ad4a3ac755068 Mon Sep 17 00:00:00 2001
From: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
Date: Sun, 5 Jan 2020 20:59:21 +0000
Subject: [PATCH] bool -> boolean

---
 core/05-functions.php                | 2 +-
 module_index.json                    | 4 ++--
 modules/action-hash.php              | 2 +-
 modules/api-status.php               | 2 +-
 modules/feature-guiconfig.php        | 2 +-
 modules/feature-interwiki-links.php  | 2 +-
 modules/feature-stats.php            | 4 ++--
 modules/feature-upload.php           | 4 ++--
 modules/feature-user-preferences.php | 8 ++++----
 9 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/core/05-functions.php b/core/05-functions.php
index 5f306f6..f75c964 100644
--- a/core/05-functions.php
+++ b/core/05-functions.php
@@ -713,7 +713,7 @@ function extract_user_from_userpage($userPagename) {
  * @param	string	$body		The body of the email.
  * @return	bool	Whether the email was sent successfully or not. Currently, this may fail if the user doesn't have a registered email address.
  */
-function email_user(string $username, string $subject, string $body) : boolean
+function email_user(string $username, string $subject, string $body) : bool
 {
 	global $version, $env, $settings;
 	
diff --git a/module_index.json b/module_index.json
index 0bf35ba..e35c29b 100755
--- a/module_index.json
+++ b/module_index.json
@@ -172,10 +172,10 @@
     {
         "id": "feature-user-preferences",
         "name": "User Preferences",
-        "version": "0.3.4",
+        "version": "0.4",
         "author": "Starbeamrainbowlabs",
         "description": "Adds a user preferences page, letting people do things like change their email address and password.",
-        "lastupdate": 1578257121,
+        "lastupdate": 1578257835,
         "optional": false,
         "extra_data": []
     },
diff --git a/modules/action-hash.php b/modules/action-hash.php
index 30b35b8..7b73da2 100644
--- a/modules/action-hash.php
+++ b/modules/action-hash.php
@@ -13,7 +13,7 @@ register_module([
 		 * @apiPermission Anonymous
 		 * 
 		 * @apiParam {string}	string	The string to hash.
-		 * @apiParam {boolean}	raw		Whether to return the hashed password as a raw string instead of as part of an HTML page.
+		 * @apiParam {bool}	raw		Whether to return the hashed password as a raw string instead of as part of an HTML page.
 		 *
 		 * @apiError	ParamNotFound	The string parameter was not specified.
 		 */
diff --git a/modules/api-status.php b/modules/api-status.php
index 21da6a0..0737842 100644
--- a/modules/api-status.php
+++ b/modules/api-status.php
@@ -13,7 +13,7 @@ register_module([
 		 * @apiGroup Stats
 		 * @apiPermission Anonymous
 		 *
-		 * @apiParam	{boolean}	Whether or not the result should be minified JSON. Default: false
+		 * @apiParam	{bool}	Whether or not the result should be minified JSON. Default: false
 		 */
 		
 	 	/*
diff --git a/modules/feature-guiconfig.php b/modules/feature-guiconfig.php
index f9df4b7..887eecb 100644
--- a/modules/feature-guiconfig.php
+++ b/modules/feature-guiconfig.php
@@ -172,7 +172,7 @@ SCRIPT;
 					else
 						$configValue = $_POST[$configKey];
 					
-					// Convert boolean settings to a boolean, since POST
+					// Convert bool settings to a bool, since POST
 					// parameters don't decode correctly.
 					if(is_bool($settings->$configKey))
 						$configValue = in_array($configValue, [ 1, "on"], true) ? true : false;
diff --git a/modules/feature-interwiki-links.php b/modules/feature-interwiki-links.php
index 51b5951..9b93eab 100644
--- a/modules/feature-interwiki-links.php
+++ b/modules/feature-interwiki-links.php
@@ -136,7 +136,7 @@ function interwiki_get_pagename_url($interwiki_pagename) {
  * Note that this doesn't guarantee that it's a _valid_ interwiki link - only that it looks like one :P
  * @package interwiki-links
  * @param	string	$pagename	The page name to check.
- * @return	boolean	Whether the given page name is an interwiki link or not.
+ * @return	bool	Whether the given page name is an interwiki link or not.
  */
 function is_interwiki_link($pagename) {
 	return strpos($pagename, ":") !== false;
diff --git a/modules/feature-stats.php b/modules/feature-stats.php
index 30f83c9..6e95491 100644
--- a/modules/feature-stats.php
+++ b/modules/feature-stats.php
@@ -234,8 +234,8 @@ register_module([
 /**
  * Updates the wiki's statistics.
  * @package feature-stats
- * @param  boolean $update_all Whether all the statistics should be checked and recalculated, or just as many as we have time for according to the settings.
- * @param  boolean $force      Whether we should recalculate statistics that don't currently require recalculating anyway.
+ * @param  bool $update_all Whether all the statistics should be checked and recalculated, or just as many as we have time for according to the settings.
+ * @param  bool $force      Whether we should recalculate statistics that don't currently require recalculating anyway.
  */
 function update_statistics($update_all = false, $force = false)
 {
diff --git a/modules/feature-upload.php b/modules/feature-upload.php
index 51adc39..e82d1f1 100644
--- a/modules/feature-upload.php
+++ b/modules/feature-upload.php
@@ -13,7 +13,7 @@ register_module([
 		 * @apiGroup Upload
 		 * @apiPermission User
 		 *
-		 * @apiParam	{boolean}	avatar	Optional. If true then a special page to upload your avatar is displayed instead.
+		 * @apiParam	{bool}	avatar	Optional. If true then a special page to upload your avatar is displayed instead.
 		*/
 		
 		/**
@@ -25,7 +25,7 @@ register_module([
 		 * @apiParam {string}	name		The name of the file to upload.
 		 * @apiParam {string}	description	A description of the file.
 		 * @apiParam {file}		file		The file to upload.
-		 * @apiParam {boolean}	avatar		Whether this upload should be uploaded as the current user's avatar. If specified, any filenames provided will be ignored.
+		 * @apiParam {bool}	avatar		Whether this upload should be uploaded as the current user's avatar. If specified, any filenames provided will be ignored.
 		 *
 		 * @apiUse	UserNotLoggedInError
 		 * @apiError	UploadsDisabledError	Uploads are currently disabled in the wiki's settings.
diff --git a/modules/feature-user-preferences.php b/modules/feature-user-preferences.php
index 014b287..fbd7835 100644
--- a/modules/feature-user-preferences.php
+++ b/modules/feature-user-preferences.php
@@ -50,7 +50,7 @@ register_module([
 			}
 			
 			if(has_action("watchlist") && module_exists("feature-watchlist")) {
-				$content .= "<p><em>Looking for your watchlist? Find it <a href='?action=watchlist'>here</a>!</p>";
+				$content .= "<p><em>Looking for your watchlist? Find it <a href='?action=watchlist'>here</a>!</em></p>";
 			}
 			
 			// If avatar support is present, allow the user to upload a new avatar
@@ -67,7 +67,7 @@ register_module([
 			$content .= "	<input type='email' id='email-address' name='email-address' placeholder='e.g. bob@bobsrockets.com' value='{$env->user_data->emailAddress}' />\n";
 			$content .= "	<p><small>Used to send you notifications etc. Never shared with anyone except $settings->admindetails_name, $settings->sitename's administrator.</small></p>\n";
 			if($settings->email_user_verify) {
-				$content .= "	<p>Email verification status: ".(!empty($env->user_data->emailAddressVerificationCode) || !$env->user_data->emailAddressVerificationCode ? "not " : "")."verified <em>Email address verification is required in order to receive emails (other than the verification email itself, of course). Click the link in the verification email sent to you to verify your address, or change it here to get another verification email.</em></p>";
+				$content .= "	<p>Email verification status: <strong>".(empty($env->user_data->emailAddressVerificationCode) ? "not " : "")."verified</strong> <small><em>(Email address verification is required in order to receive emails (other than the verification email itself, of course). Click the link in the verification email sent to you to verify your address, or change it here to get another verification email)</em></small></p>";
 			}
 			$content .= "	<input type='submit' value='Save Preferences' />\n";
 			$content .= "</form>\n";
@@ -303,9 +303,9 @@ register_module([
  * If a user does not need to verify their email address, no verification email 
  * is sent and true is returned.
  * @param	string	$username	The name of the user to send the verification code to.
- * @return	boolean	Whether the verification code was sent successfully. If a user does not need to verify their email address, this returns true.
+ * @return	bool	Whether the verification code was sent successfully. If a user does not need to verify their email address, this returns true.
  */
-function email_user_verify(string $username) : boolean {
+function email_user_verify(string $username) : bool {
 	global $settings;
 	
 	$user_data = $settings->users->$username;
