alias list / edit moved to its own page
git-svn-id: file:///home/shish/svn/shimmie2/trunk@153 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
81ef3dc356
commit
979b0f936a
1 changed files with 12 additions and 5 deletions
|
@ -31,14 +31,15 @@ class AliasEditor extends Extension {
|
||||||
$page->set_redirect(make_link("admin"));
|
$page->set_redirect(make_link("admin"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if($event->get_arg(0) == "list") {
|
||||||
|
global $page;
|
||||||
|
$page->set_title("Alias List");
|
||||||
|
$page->set_heading("Alias List");
|
||||||
|
$page->add_main_block(new Block("Aliases", $this->build_aliases()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(is_a($event, 'AdminBuildingEvent')) {
|
|
||||||
global $page;
|
|
||||||
$page->add_main_block(new Block("Edit Aliases", $this->build_aliases()));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(is_a($event, 'AddAliasEvent')) {
|
if(is_a($event, 'AddAliasEvent')) {
|
||||||
global $database;
|
global $database;
|
||||||
$database->Execute("INSERT INTO aliases(oldtag, newtag) VALUES(?, ?)", array($event->oldtag, $event->newtag));
|
$database->Execute("INSERT INTO aliases(oldtag, newtag) VALUES(?, ?)", array($event->oldtag, $event->newtag));
|
||||||
|
@ -47,6 +48,12 @@ class AliasEditor extends Extension {
|
||||||
$page->set_mode("redirect");
|
$page->set_mode("redirect");
|
||||||
$page->set_redirect(make_link("admin"));
|
$page->set_redirect(make_link("admin"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(is_a($event, 'UserBlockBuildingEvent')) {
|
||||||
|
if($event->user->is_admin()) {
|
||||||
|
$event->add_link("Alias Editor", make_link("alias/list"));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// }}}
|
// }}}
|
||||||
// admin page HTML {{{
|
// admin page HTML {{{
|
||||||
|
|
Reference in a new issue