1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-12-22 13:45:02 +00:00

Bugfix integration between watchlist and watchlist-edit

This commit is contained in:
Starbeamrainbowlabs 2019-12-23 16:09:39 +00:00
parent 890c27be02
commit 53c6533a4c
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 4 additions and 3 deletions

View file

@ -195,7 +195,7 @@
"version": "0.1",
"author": "Starbeamrainbowlabs",
"description": "Adds per-user watchlists. When a page on a user's watchlist is edited, a notification email is sent.",
"lastupdate": 1577116869,
"lastupdate": 1577117322,
"optional": false,
"extra_data": []
},

View file

@ -61,10 +61,10 @@ register_module([
if(!empty($watchlist)) {
$content .= "<ul class='page-list watchlist'>\n";
foreach($watchlist as $pagename) {
$content .= "<li><a href='?action=watchlist-edit&page=".rawurlencode($pagename)."&do=remove'>&#x274c;</a> <a href='?page=".rawurlencode($pagename)."'>".htmlentities($pagename)."</a></li>";
$content .= "<li><a href='?action=watchlist-edit&amp;page=".rawurlencode($pagename)."&amp;do=remove&amp;returnto=".rawurlencode("?action=watchlist&success=yes")."'>&#x274c;</a> <a href='?page=".rawurlencode($pagename)."'>".htmlentities($pagename)."</a></li>";
}
$content .= "</ul>";
$content .= "<p>You can also <a href='?action=watchlist&do=clear'>clear your entire list</a> and start again.</p>";
$content .= "<p>You can also <a href='?action=watchlist-edit&amp;do=clear&amp;returnto=".rawurlencode("?action=watchlist")."'>clear your entire list</a> and start again.</p>";
}
else {
$content .= "<p><em>You don't have any pages on your watchlist. Try visiting some pages and adding them to your watchlist and then coming back here.</em></p>";
@ -194,6 +194,7 @@ register_module([
case "clear":
$env->user_data->watchlist = [];
save_settings();
break;
default:
http_response_code(400);
header("x-status: failed");