forked from Cavemanon/cavepaintings
admin function for fixing tag cases
This commit is contained in:
@ -125,6 +125,15 @@ class AdminPage extends Extension {
|
||||
return false;
|
||||
}
|
||||
|
||||
private function set_tag_case() {
|
||||
global $database;
|
||||
$database->execute($database->scoreql_to_sql(
|
||||
"UPDATE tags SET tag=:tag1 WHERE SCORE_STRNORM(tag) = SCORE_STRNORM(:tag2)"
|
||||
), array("tag1" => $_POST['tag'], "tag2" => $_POST['tag']));
|
||||
log_info("admin", "Fixed the case of ".html_escape($_POST['tag']), true);
|
||||
return true;
|
||||
}
|
||||
|
||||
private function lowercase_all_tags() {
|
||||
global $database;
|
||||
$database->execute("UPDATE tags SET tag=lower(tag)");
|
||||
|
Reference in New Issue
Block a user