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"))."
";
$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 = "
if(document.getElementById("dbqcheck").checked == false){
document.getElementById("dbqtags").disabled = true;
document.getElementById("dbqsubmit").disabled = true;
}else{
document.getElementById("dbqtags").disabled = false;
document.getElementById("dbqsubmit").disabled = false;
}";
/* 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));
}
}
?>