@@ -87,7 +87,7 @@ public static function getActivate(GenericEvent $event)
8787 if (!is_array ($ response ) || !in_array ($ event ['field1 ' ], array_values ($ response ))) {
8888 $ response = $ cl ->license ($ serviceClass ->getIp (), $ event ['field1 ' ]);
8989 //$serviceExtra = $response['mainKeyNumber'].','.$response['productKey'];
90- request_log (self ::$ module , $ GLOBALS [ ' tf ' ]-> session ->account_id , __FUNCTION__ , 'cloudlinux ' , 'license ' , [$ serviceClass ->getIp (), $ event ['field1 ' ]], $ response , $ serviceClass ->getId ());
90+ request_log (self ::$ module , \ MyAdmin \App:: session () ->account_id , __FUNCTION__ , 'cloudlinux ' , 'license ' , [$ serviceClass ->getIp (), $ event ['field1 ' ]], $ response , $ serviceClass ->getId ());
9191 myadmin_log (self ::$ module , 'info ' , 'Response: ' .json_encode ($ response ), __LINE__ , __FILE__ , self ::$ module , $ serviceClass ->getId ());
9292 if ($ response === false ) {
9393 $ event ['status ' ] = 'error ' ;
@@ -164,7 +164,7 @@ public static function getChangeIp(GenericEvent $event)
164164 }
165165 }
166166 if ($ event ['status ' ] == 'ok ' ) {
167- $ GLOBALS [ ' tf ' ]-> history ->add ($ settings ['TABLE ' ], 'change_ip ' , $ event ['newip ' ], $ serviceClass ->getId (), $ serviceClass ->getCustid ());
167+ \ MyAdmin \App:: history () ->add ($ settings ['TABLE ' ], 'change_ip ' , $ event ['newip ' ], $ serviceClass ->getId (), $ serviceClass ->getCustid ());
168168 $ serviceClass ->set_ip ($ event ['newip ' ])->save ();
169169 }
170170 $ event ->stopPropagation ();
@@ -177,7 +177,7 @@ public static function getChangeIp(GenericEvent $event)
177177 public static function getMenu (GenericEvent $ event )
178178 {
179179 $ menu = $ event ->getSubject ();
180- if ($ GLOBALS [ ' tf ' ]-> ima == 'admin ' ) {
180+ if (\ MyAdmin \App:: ima () == 'admin ' ) {
181181 $ menu ->add_link (self ::$ module .'api ' , 'choice=none.cloudlinux_licenses_list ' , '/images/myadmin/list.png ' , _ ('List all CloudLinux Licenses ' ));
182182 }
183183 }
0 commit comments