Skip to content

Commit 67499ab

Browse files
committed
a bunch of updates improving the code making use of self:: and other imprvoements
1 parent 50c59f2 commit 67499ab

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/Plugin.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static function getHooks() {
2727
public static function getActivate(GenericEvent $event) {
2828
$license = $event->getSubject();
2929
if ($event['category'] == SERVICE_TYPES_FANTASTICO) {
30-
myadmin_log('licenses', 'info', 'Cpanel Activation', __LINE__, __FILE__);
30+
myadmin_log(self::$module, 'info', 'Cpanel Activation', __LINE__, __FILE__);
3131
function_requirements('activate_cpanel');
3232
activate_cpanel($license->get_ip(), $event['field1']);
3333
$event->stopPropagation();
@@ -37,12 +37,12 @@ function_requirements('activate_cpanel');
3737
public static function getChangeIp(GenericEvent $event) {
3838
if ($event['category'] == SERVICE_TYPES_FANTASTICO) {
3939
$license = $event->getSubject();
40-
$settings = get_module_settings('licenses');
40+
$settings = get_module_settings(self::$module);
4141
$cpanel = new Cpanel(FANTASTICO_USERNAME, FANTASTICO_PASSWORD);
42-
myadmin_log('licenses', 'info', "IP Change - (OLD:".$license->get_ip().") (NEW:{$event['newip']})", __LINE__, __FILE__);
42+
myadmin_log(self::$module, 'info', "IP Change - (OLD:".$license->get_ip().") (NEW:{$event['newip']})", __LINE__, __FILE__);
4343
$result = $cpanel->editIp($license->get_ip(), $event['newip']);
4444
if (isset($result['faultcode'])) {
45-
myadmin_log('licenses', 'error', 'Cpanel editIp('.$license->get_ip().', '.$event['newip'].') returned Fault '.$result['faultcode'].': '.$result['fault'], __LINE__, __FILE__);
45+
myadmin_log(self::$module, 'error', 'Cpanel editIp('.$license->get_ip().', '.$event['newip'].') returned Fault '.$result['faultcode'].': '.$result['fault'], __LINE__, __FILE__);
4646
$event['status'] = 'error';
4747
$event['status_text'] = 'Error Code '.$result['faultcode'].': '.$result['fault'];
4848
} else {

0 commit comments

Comments
 (0)