mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-12-26 02:55:02 +00:00
bool -> boolean
This commit is contained in:
parent
4b40cf7c19
commit
b4c0782e58
9 changed files with 15 additions and 15 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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": []
|
||||
},
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue