Skip to content

Add new changes#4

Open
avishka-ra wants to merge 1 commit intomasterfrom
INTGRTNS-482-Email-Solution-Review-and-verify-module-changes-for-WHMCS-9.0.0-compatability-new
Open

Add new changes#4
avishka-ra wants to merge 1 commit intomasterfrom
INTGRTNS-482-Email-Solution-Review-and-verify-module-changes-for-WHMCS-9.0.0-compatability-new

Conversation

@avishka-ra
Copy link

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates logging labels in the WHMCS email_solution server module and performs a minor whitespace cleanup.

Changes:

  • Renames logModuleCall “module” labels in hooks.php from Email Account to MailCow Email Account.
  • Minor formatting/whitespace adjustment in email_solution.php.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
email_solution/whmcs/modules/servers/email_solution/hooks.php Updates logModuleCall identifiers and adjusts formatting in one catch block.
email_solution/whmcs/modules/servers/email_solution/email_solution.php Removes an extra blank line at the top of the file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

// assignConfigOption($vars['pid'], $groupID, 1);
// }
logModuleCall('Email Account',__FUNCTION__,$vars,'',['status'=>'successfully save changes ']);
logModuleCall('MailCow Email Account', __FUNCTION__, $vars, '', ['status' => 'successfully save changes ']);
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log message has a trailing space and ungrammatical phrasing. Consider changing it to a correctly worded, trimmed string (e.g., "successfully saved changes") so logs are consistent and easier to search.

Suggested change
logModuleCall('MailCow Email Account', __FUNCTION__, $vars, '', ['status' => 'successfully save changes ']);
logModuleCall('MailCow Email Account', __FUNCTION__, $vars, '', ['status' => 'successfully saved changes']);

Copilot uses AI. Check for mistakes.
// assignConfigOption($vars['pid'], $groupID, 1);
// }
logModuleCall('Email Account',__FUNCTION__,$vars,'',['status'=>'successfully save changes ']);
logModuleCall('MailCow Email Account', __FUNCTION__, $vars, '', ['status' => 'successfully save changes ']);
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first argument to logModuleCall is now "MailCow Email Account", but the rest of this module logs under "Email Solution" (e.g., email_solution.php:86,338,626,882). Using a different module name will split log entries across categories and make troubleshooting harder; consider standardizing this value across the module (and update the other occurrences in this file too).

Copilot uses AI. Check for mistakes.
}
} catch (Exception $e) {
logModuleCall('Email Account',__FUNCTION__,'',$e->getMessage(),['error'=>$e->getMessage()]);
logModuleCall('MailCow Email Account', __FUNCTION__, '', $e->getMessage(), ['error' => $e->getMessage()]);
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation in this catch block is inconsistent with the rest of the file (the logModuleCall line is not indented under the catch). Please align indentation to improve readability and avoid accidental diff noise in future edits.

Suggested change
logModuleCall('MailCow Email Account', __FUNCTION__, '', $e->getMessage(), ['error' => $e->getMessage()]);
logModuleCall('MailCow Email Account', __FUNCTION__, '', $e->getMessage(), ['error' => $e->getMessage()]);

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants