mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-20 03:32:48 +00:00
chore(dashboard): remove the Maintenance page
The page held one-off repairs from Nexus Dashboard (approve known pet names, find/delete orphaned pet names, remove every buff, fix property clone IDs, list mission rewards without a commendation price). Removed the page, its sidebar entry, its /api/maintenance/* routes, the `maintenance` permission and the two database calls only it used (GetAllPetNames, FixPropertyCloneIds). The scheduled tasks (lift expired bans, fill in pet owners, approve known pet names) and property model import/removal stay. Check: the Admin sidebar group has no Maintenance link; /maintenance is a 404; the Tasks page still lists "Approve known pet names" and "Fill in pet owners"; property import still works; the Permissions page no longer lists "Data maintenance". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -344,16 +344,6 @@ uint32_t SQLiteDatabase::ApprovePreviouslyApprovedPetNames() {
|
||||
"(SELECT name FROM (SELECT pet_name AS name FROM pet_names WHERE approved = 2) AS approved_names);"));
|
||||
}
|
||||
|
||||
std::vector<std::pair<LWOOBJID, std::string>> SQLiteDatabase::GetAllPetNames() {
|
||||
std::vector<std::pair<LWOOBJID, std::string>> pets;
|
||||
auto [_, result] = ExecuteSelect("SELECT id, pet_name FROM pet_names;");
|
||||
while (!result.eof()) {
|
||||
pets.emplace_back(result.getInt64Field("id"), result.getStringField("pet_name"));
|
||||
result.nextRow();
|
||||
}
|
||||
return pets;
|
||||
}
|
||||
|
||||
void SQLiteDatabase::ForEachCharacterXml(const std::function<void(LWOOBJID, const std::string&)>& visit) {
|
||||
auto [_, result] = ExecuteSelect("SELECT id, xml_data FROM charxml;");
|
||||
while (!result.eof()) {
|
||||
@@ -369,10 +359,3 @@ void SQLiteDatabase::ForEachCharacterXmlContaining(const std::string& needle, co
|
||||
result.nextRow();
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t SQLiteDatabase::FixPropertyCloneIds() {
|
||||
return static_cast<uint32_t>(ExecuteUpdate(
|
||||
"UPDATE properties SET clone_id = (SELECT c.prop_clone_id FROM charinfo c WHERE c.id = properties.owner_id) "
|
||||
"WHERE EXISTS (SELECT 1 FROM charinfo c WHERE c.id = properties.owner_id AND c.prop_clone_id IS NOT NULL "
|
||||
"AND (properties.clone_id IS NULL OR c.prop_clone_id != properties.clone_id));"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user