Skip to content

Commit

Permalink
work on the disable events for plugins adding whatever code is missin…
Browse files Browse the repository at this point in the history
…g for each ofthe various addons
  • Loading branch information
detain committed Jul 8, 2017
1 parent 219d7d9 commit 49a35a6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Plugin.php
Expand Up @@ -47,7 +47,17 @@ function_requirements('activate_fantastico');
$GLOBALS['tf']->history->add($settings['TABLE'], 'add_fantastico', $serviceInfo[$settings['PREFIX'].'_id'], $serviceInfo[$settings['PREFIX'].'_ip'], $serviceInfo[$settings['PREFIX'].'_custid']);
}

public static function doDisable(\Service_Order $serviceOrder) {
public static function doDisable(\Service_Order $serviceOrder, $repeatInvoiceId, $regexMatch = FALSE) {
$serviceInfo = $serviceOrder->getServiceInfo();
$settings = get_module_settings(self::$module);
myadmin_log(self::$module, 'info', self::$name.' Deactivation', __LINE__, __FILE__);
$email = $settings['TBLNAME'].' ID: '.$serviceInfo[$settings['PREFIX'].'_id'].'<br>'.$settings['TBLNAME'].' Hostname: '.$serviceInfo[$settings['PREFIX'].'_hostname'].'<br>Invoice: '.$repeatInvoiceId.'<br>Description: '.$repeat_invoice->getDescription().'<br>';
$subject = $settings['TBLNAME'].' '.$repeat_invoice->getService().' Canceled '.self::$name;
$headers = '';
$headers .= 'MIME-Version: 1.0'.EMAIL_NEWLINE;
$headers .= 'Content-type: text/html; charset=UTF-8'.EMAIL_NEWLINE;
$headers .= 'From: '.$settings['TITLE'].' <'.$settings['EMAIL_FROM'].'>'.EMAIL_NEWLINE;
admin_mail($subject, $email, $headers, false, 'admin_email_vps_cpanel_canceled.tpl');

}

Expand Down

0 comments on commit 49a35a6

Please sign in to comment.