Skip to content

Commit f7b6f6d

Browse files
committed
updates to myadmin_log calls adding the optional module and service id parameters in applicable places
1 parent 7b886d0 commit f7b6f6d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Plugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,8 @@ function_requirements('whm_api');
378378
public static function getTerminate(GenericEvent $event)
379379
{
380380
if (in_array($event['type'], [get_service_define('WEB_CPANEL'), get_service_define('WEB_WORDPRESS')])) {
381+
$serviceClass = $event->getSubject();
381382
myadmin_log(self::$module, 'info', 'Cpanel Termination', __LINE__, __FILE__);
382-
$serviceClass = $event->getSubject();
383383
$settings = get_module_settings(self::$module);
384384
$serverdata = get_service_master($serviceClass->getServer(), self::$module);
385385
$hash = $serverdata[$settings['PREFIX'].'_key'];
@@ -441,7 +441,7 @@ public static function getChangeIp(GenericEvent $event)
441441
myadmin_log(self::$module, 'info', 'IP Change - (OLD:'.$serviceClass->getIp().") (NEW:{$event['newip']})", __LINE__, __FILE__, self::$module, $serviceClass->getId());
442442
$response = $cpanel->editIp($serviceClass->getIp(), $event['newip']);
443443
if (isset($response['faultcode'])) {
444-
myadmin_log(self::$module, 'error', 'Cpanel editIp('.$serviceClass->getIp().', '.$event['newip'].') returned Fault '.$response['faultcode'].': '.$response['fault'], __LINE__, __FILE__, self::$module);
444+
myadmin_log(self::$module, 'error', 'Cpanel editIp('.$serviceClass->getIp().', '.$event['newip'].') returned Fault '.$response['faultcode'].': '.$response['fault'], __LINE__, __FILE__, self::$module, $serviceClass->getId());
445445
$event['status'] = 'error';
446446
$event['status_text'] = 'Error Code '.$response['faultcode'].': '.$response['fault'];
447447
} else {

0 commit comments

Comments
 (0)