1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-22 04:23:01 +00:00

Update changelog, and make $settings->css keep a value of auto

This commit is contained in:
Starbeamrainbowlabs 2018-05-10 23:34:53 +01:00
parent 41ea63281c
commit 2a24066d7b
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
5 changed files with 16 additions and 13 deletions

View file

@ -1,6 +1,12 @@
# Changelog # 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. 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-dev
## Changed
- Password hashing has been overhauled! A totally new-and-different system is being used now, so you'll need to rehash all your passwords.
- The `css` setting will now keep a value of auto, even when `peppermint.json` is automatically updated by _Pepperminty Wiki_.
## v0.16 ## v0.16
_(No changes since v0.16-beta1)_ _(No changes since v0.16-beta1)_

View file

@ -379,9 +379,6 @@ summary { cursor: pointer; }
footer { padding: 2rem; } footer { padding: 2rem; }
/* #ffdb6d #36962c hsl(36, 78%, 80%) hsl(262, 92%, 68%, 0.42) */ /* #ffdb6d #36962c hsl(36, 78%, 80%) hsl(262, 92%, 68%, 0.42) */
THEMECSS; THEMECSS;
if($settings->css === "auto")
$settings->css = $defaultCSS;
@ -390,7 +387,7 @@ if($settings->css === "auto")
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
/** The version of Pepperminty Wiki currently running. */ /** The version of Pepperminty Wiki currently running. */
$version = "v0.17-dev"; $version = "v0.17-dev";
$commit = "8010770fd444bb81ba8eb78bd10d8067a715c3c3"; $commit = "41ea63281c23c29c5730cbad90e7f085c59717e8";
/// Environment /// /// Environment ///
/** Holds information about the current request environment. */ /** Holds information about the current request environment. */
$env = new stdClass(); $env = new stdClass();
@ -1654,13 +1651,13 @@ class page_renderer
*/ */
public static function get_css_as_html() public static function get_css_as_html()
{ {
global $settings; global $settings, $defaultCSS;
if(preg_match("/^[^\/]*\/\/|^\//", $settings->css)) if(preg_match("/^[^\/]*\/\/|^\//", $settings->css))
return "<link rel='stylesheet' href='$settings->css' />\n"; return "<link rel='stylesheet' href='$settings->css' />\n";
else else
{ {
$css = $settings->css; $css = $settings->css == "auto" ? $defaultCSS : $settings->css;
if(!empty($settings->optimize_pages)) if(!empty($settings->optimize_pages))
{ {
// CSS Minification ideas by Jean from catswhocode.com // CSS Minification ideas by Jean from catswhocode.com
@ -7429,7 +7426,10 @@ function do_password_hash_code_update() {
// There's no point if we're using Argon2i, as it doesn't take a cost // There's no point if we're using Argon2i, as it doesn't take a cost
if(hash_password_properties()["algorithm"] == PASSWORD_ARGON2I) if(hash_password_properties()["algorithm"] == PASSWORD_ARGON2I)
return; return;
// Skip rechecking if the automatic check has been disabled
if($settings->password_cost_time_interval == -1)
return;
// Skip the recheck if we've done one recently // Skip the recheck if we've done one recently
if(isset($settings->password_cost_time_lastcheck) && if(isset($settings->password_cost_time_lastcheck) &&
time() - $settings->password_cost_time_lastcheck < $settings->password_cost_time_interval) time() - $settings->password_cost_time_lastcheck < $settings->password_cost_time_interval)

View file

@ -1274,13 +1274,13 @@ class page_renderer
*/ */
public static function get_css_as_html() public static function get_css_as_html()
{ {
global $settings; global $settings, $defaultCSS;
if(preg_match("/^[^\/]*\/\/|^\//", $settings->css)) if(preg_match("/^[^\/]*\/\/|^\//", $settings->css))
return "<link rel='stylesheet' href='$settings->css' />\n"; return "<link rel='stylesheet' href='$settings->css' />\n";
else else
{ {
$css = $settings->css; $css = $settings->css == "auto" ? $defaultCSS : $settings->css;
if(!empty($settings->optimize_pages)) if(!empty($settings->optimize_pages))
{ {
// CSS Minification ideas by Jean from catswhocode.com // CSS Minification ideas by Jean from catswhocode.com

View file

@ -203,7 +203,7 @@
"author": "Starbeamrainbowlabs", "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.", "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", "id": "page-login",
"lastupdate": 1525991211, "lastupdate": 1525991341,
"optional": false "optional": false
}, },
{ {

View file

@ -64,7 +64,4 @@ if($settingsUpgraded)
$defaultCSS = <<<THEMECSS $defaultCSS = <<<THEMECSS
{default-css} {default-css}
THEMECSS; THEMECSS;
if($settings->css === "auto")
$settings->css = $defaultCSS;
?> ?>