set_title("Admin Tools");
$page->set_heading("Admin Tools");
$page->add_block(new NavBlock());
}
/*
* Show a form which links to admin_utils with POST[action] set to one of:
* 'lowercase all tags'
* 'recount tag use'
* 'purge unused tags'
*/
public function display_form(Page $page) {
global $user;
$html = '
'.make_form(make_link("admin_utils"),"post", false, false, "return imgidconfirm()")."
";
$page->add_block(new Block("Misc Admin Tools", $html));
/* First check
Requires you to click the checkbox to enable the delete by query form */
$dbqcheck = 'javascript:$(function() {
if($("#dbqcheck:checked").length != 0){
$("#dbqtags").attr("disabled", false);
$("#dbqsubmit").attr("disabled", false);
}else{
$("#dbqtags").attr("disabled", true);
$("#dbqsubmit").attr("disabled", true);
}
});';
/* Second check
Requires you to confirm the deletion by clicking ok. */
$html = "
"
.make_form(make_link("admin_utils"),"post",false,false,"return checkform()")."
";
$page->add_block(new Block("Delete by Query", $html));
}
}
?>