Update main.php
This commit is contained in:
parent
fc294bfb3c
commit
5ceb6f4193
@ -36,7 +36,7 @@ class AliasEditor extends Extension
|
|||||||
|
|
||||||
if ($event->page_matches("alias")) {
|
if ($event->page_matches("alias")) {
|
||||||
if ($event->get_arg(0) == "add") {
|
if ($event->get_arg(0) == "add") {
|
||||||
if ($user->can(Permissions::MANAGE_ALIAS_LIST))) {
|
if ($user->can(Permissions::MANAGE_ALIAS_LIST)) {
|
||||||
if (isset($_POST['oldtag']) && isset($_POST['newtag'])) {
|
if (isset($_POST['oldtag']) && isset($_POST['newtag'])) {
|
||||||
try {
|
try {
|
||||||
$aae = new AddAliasEvent($_POST['oldtag'], $_POST['newtag']);
|
$aae = new AddAliasEvent($_POST['oldtag'], $_POST['newtag']);
|
||||||
@ -49,7 +49,7 @@ class AliasEditor extends Extension
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif ($event->get_arg(0) == "remove") {
|
} elseif ($event->get_arg(0) == "remove") {
|
||||||
if ($user->can(Permissions::MANAGE_ALIAS_LIST))) {
|
if ($user->can(Permissions::MANAGE_ALIAS_LIST)) {
|
||||||
if (isset($_POST['oldtag'])) {
|
if (isset($_POST['oldtag'])) {
|
||||||
$database->execute("DELETE FROM aliases WHERE oldtag=:oldtag", ["oldtag" => $_POST['oldtag']]);
|
$database->execute("DELETE FROM aliases WHERE oldtag=:oldtag", ["oldtag" => $_POST['oldtag']]);
|
||||||
log_info("alias_editor", "Deleted alias for ".$_POST['oldtag'], "Deleted alias");
|
log_info("alias_editor", "Deleted alias for ".$_POST['oldtag'], "Deleted alias");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user