mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 04:23:01 +00:00
Bugfix integration between watchlist and watchlist-edit
This commit is contained in:
parent
890c27be02
commit
53c6533a4c
2 changed files with 4 additions and 3 deletions
|
@ -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": []
|
||||
},
|
||||
|
|
|
@ -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'>❌</a> <a href='?page=".rawurlencode($pagename)."'>".htmlentities($pagename)."</a></li>";
|
||||
$content .= "<li><a href='?action=watchlist-edit&page=".rawurlencode($pagename)."&do=remove&returnto=".rawurlencode("?action=watchlist&success=yes")."'>❌</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&do=clear&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");
|
||||
|
|
Loading…
Reference in a new issue