QoL 58: audit log types use the names the rest of ITFlow uses - Software and Software Template become License and License Template, Revenue becomes Income and Account Transfer becomes Transfer as the API already logs it, with database 4.1.0 renaming existing entries, link entries naming the license side, icons for RMM Provider, Database, Demo and Undo entries and five unstyled actions, and the Upgrading paragraph counting 4.0.9 and 4.1.0

This commit is contained in:
johnnyq
2026-11-21 01:43:46 -05:00
parent f183f0bddf
commit b5c7eeec39
30 changed files with 100 additions and 75 deletions

View File

@@ -0,0 +1,20 @@
<?php
/*
* ITFlow - Database update to version 4.1.0 (from 4.0.9)
* Included by admin/database_updates.php - do not access directly
*
* The audit log calls each kind of record what the rest of ITFlow calls it:
* logs.log_type Software becomes License, Software Template License Template,
* Revenue Income (the other income records were already logged as Income) and
* Account Transfer Transfer (the API already logged transfers as Transfer).
* Nothing else in an entry changes.
*
* Re-runnable: an entry that already has its new name is left alone.
*/
defined('FROM_DB_UPDATER') || die("Direct file access is not allowed");
foreach (['Software' => 'License', 'Software Template' => 'License Template', 'Revenue' => 'Income', 'Account Transfer' => 'Transfer'] as $old_type => $new_type) {
mysqli_query($mysqli, "UPDATE `logs` SET `log_type` = '$new_type' WHERE `log_type` = '$old_type'");
}