ordered alias list

git-svn-id: file:///home/shish/svn/shimmie2/trunk@737 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2008-03-31 02:39:08 +00:00
parent 986e8228bb
commit abc2fe278a
2 changed files with 6 additions and 2 deletions

View File

@ -40,7 +40,9 @@ class AliasEditor extends Extension {
}
else if($event->get_arg(0) == "list") {
global $database;
$this->theme->display_aliases($event->page, $database->db->GetAssoc("SELECT oldtag, newtag FROM aliases"), $event->user->is_admin());
$this->theme->display_aliases($event->page,
$database->db->GetAssoc("SELECT oldtag, newtag FROM aliases ORDER BY newtag"),
$event->user->is_admin());
}
else if($event->get_arg(0) == "export") {
global $database;
@ -71,7 +73,8 @@ class AliasEditor extends Extension {
if(is_a($event, 'AddAliasEvent')) {
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));
}
if(is_a($event, 'UserBlockBuildingEvent')) {

View File

@ -45,6 +45,7 @@ class AliasEditorTheme extends Themelet {
$html = "
<table border='1'>
<thead><td>From</td><td>To</td>$action</thead>
$add
$h_aliases
$add
</table>