From 987cd597647497b1091442ae00c9fdc7ae02b0a4 Mon Sep 17 00:00:00 2001 From: wrongecho Date: Tue, 8 Oct 2024 23:08:05 +0100 Subject: [PATCH] Tidying - Move more things to new permissions system - Deduplicate assets post logic into model - Swap out some "SELECT *" queries when only a couple of rows are actually needed --- admin_api_key_add_modal.php | 2 +- client_document_details.php | 8 +- client_document_link_software_modal.php | 2 +- client_document_link_vendor_modal.php | 2 +- client_services.php | 8 +- post/user/asset.php | 113 ++---------------------- post/user/asset_interface_model.php | 11 +++ post/user/asset_model.php | 43 +++++++++ post/user/certificate.php | 2 +- post/user/client.php | 2 +- post/user/contact.php | 37 ++++---- post/user/document.php | 65 ++++++-------- post/user/document_model.php | 8 ++ post/user/domain.php | 42 ++++----- post/user/domain_model.php | 10 +++ post/user/expense.php | 1 - post/user/invoice.php | 6 +- post/user/network.php | 15 ++-- post/user/quote.php | 2 +- post/user/service.php | 7 +- post/user/software.php | 14 +-- post/user/trip.php | 2 +- post/user/vendor.php | 2 +- ticket_bulk_assign_modal.php | 2 +- ticket_edit_modal.php | 2 +- 25 files changed, 188 insertions(+), 220 deletions(-) create mode 100644 post/user/asset_interface_model.php create mode 100644 post/user/asset_model.php create mode 100644 post/user/document_model.php create mode 100644 post/user/domain_model.php diff --git a/admin_api_key_add_modal.php b/admin_api_key_add_modal.php index 2d98cd8d..208593cc 100644 --- a/admin_api_key_add_modal.php +++ b/admin_api_key_add_modal.php @@ -60,7 +60,7 @@ $decryptPW = randomString(160);