Add conditional link to user preferences page to watchlist

This commit is contained in:
Starbeamrainbowlabs 2019-12-23 22:31:44 +00:00
parent d467222660
commit f6d183a11e
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
2 changed files with 8 additions and 4 deletions

View File

@ -175,7 +175,7 @@
"version": "0.3.3",
"author": "Starbeamrainbowlabs",
"description": "Adds a user preferences page, letting people do things like change their email address and password.",
"lastupdate": 1566671167,
"lastupdate": 1577140256,
"optional": false,
"extra_data": []
},

View File

@ -1,7 +1,7 @@
<?php
register_module([
"name" => "User Preferences",
"version" => "0.3.3",
"version" => "0.3.4",
"author" => "Starbeamrainbowlabs",
"description" => "Adds a user preferences page, letting people do things like change their email address and password.",
"id" => "feature-user-preferences",
@ -45,10 +45,14 @@ register_module([
}
$content = "<h2>User Preferences</h2>\n";
if(isset($_GET["success"]) && $_GET["success"] === "yes")
{
if(isset($_GET["success"]) && $_GET["success"] === "yes") {
$content .= "<p class='user-prefs-status-message'><em>" . $statusMessages[$_GET["operation"]] . "</em></p>\n";
}
if(has_action("watchlist") && module_exists("feature-watchlist")) {
$content .= "<p><em>Looking for your watchlist? Find it <a href='?action=watchlist'>here</a>!</p>";
}
// If avatar support is present, allow the user to upload a new avatar
if(has_action("avatar") && module_exists("feature-upload")) {
$content .= "<a href='?action=upload&avatar=yes' class='preview'><figure>\n";