From 5728cd92e855a580a04a1e1279e837f3e9f61e1b Mon Sep 17 00:00:00 2001 From: Sae126V Date: Mon, 7 Aug 2023 07:51:15 +0000 Subject: [PATCH] [GT-184] Update comments --- htdocs/web_portal/views/site/edit_api_auth.php | 4 ++-- lib/Gocdb_Services/APIAuthenticationService.php | 2 +- lib/Gocdb_Services/Site.php | 7 +++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/htdocs/web_portal/views/site/edit_api_auth.php b/htdocs/web_portal/views/site/edit_api_auth.php index ad1085f3f..5006618e1 100644 --- a/htdocs/web_portal/views/site/edit_api_auth.php +++ b/htdocs/web_portal/views/site/edit_api_auth.php @@ -29,7 +29,7 @@ if ($params['isRenewalRequest']) { echo("WARNING: Renewing this will change the linked user from '"); } else { - echo("WARNING: editing will change the linked user from '"); + echo("WARNING: Editing will change the linked user from '"); } xecho($entUser->getFullname()); echo("' to '"); @@ -79,7 +79,7 @@ class="input_input_text"
- WARNING: it is possible to delete information using the write functionality of the API. + WARNING: It is possible to delete information using the write functionality of the API. Leave Allow API write unchecked if you do not need to write data.
diff --git a/lib/Gocdb_Services/APIAuthenticationService.php b/lib/Gocdb_Services/APIAuthenticationService.php index 7cbab91af..9bdb2f33e 100644 --- a/lib/Gocdb_Services/APIAuthenticationService.php +++ b/lib/Gocdb_Services/APIAuthenticationService.php @@ -152,7 +152,7 @@ public function deleteAPIAuthentication(\APIAuthentication $authEntity) * * @param \APIAuthentication Entity to update * @param \User Owning user - * @param mixed $newValues Holds the new values. + * @param mixed $newValues Holds the new data for updating the `APIAuthentication` entity. * * @throws \Exception on error with commit rolled back */ diff --git a/lib/Gocdb_Services/Site.php b/lib/Gocdb_Services/Site.php index 7464d01de..4f8248179 100644 --- a/lib/Gocdb_Services/Site.php +++ b/lib/Gocdb_Services/Site.php @@ -1429,6 +1429,13 @@ public function deleteAPIAuthEntity(\APIAuthentication $authEntity, \User $user) $authEntServ->deleteAPIAuthentication($authEntity); } + /** + * Helper to edit an `APIAuthentication` entity. + * + * @param \APIAuthentication $authEntity `APIAuthentication` entity to check. + * @param \User $user User doing the edit. + * @param mixed $newValues Holds the new data for updating the `APIAuthentication` entity. + */ public function editAPIAuthEntity(\APIAuthentication $authEntity, \User $user, $newValues) { $parentSite = $authEntity->getParentSite();