@@ -149,7 +149,7 @@ public static function getActivate(GenericEvent $event)
149149 if ($ result ['error ' ] != "0 " ) {
150150 }
151151 }
152- $ GLOBALS [ ' tf ' ]-> history ->add ($ settings ['PREFIX ' ], 'password ' , $ serviceClass ->getId (), $ options ['passwd ' ]);
152+ \ MyAdmin \App:: history () ->add ($ settings ['PREFIX ' ], 'password ' , $ serviceClass ->getId (), $ options ['passwd ' ]);
153153 }
154154 if (!is_null ($ result ) && isset ($ result ['details ' ]) && $ result ['details ' ] == 'Sorry, a group for that username already exists. ' ) {
155155 while ($ result ['details ' ] == 'Sorry, a group for that username already exists. ' ) {
@@ -256,7 +256,7 @@ public static function getDeactivate(GenericEvent $event)
256256 request_log (self ::$ module , $ serviceClass ->getCustid (), __FUNCTION__ , 'directadmin ' , $ apiCmd , $ apiOptions , $ result , $ serviceClass ->getId ());
257257 myadmin_log ('myadmin ' , 'info ' , 'DirectAdmin ' .$ apiCmd .' ' .json_encode ($ apiOptions ).' Response: ' .json_encode ($ result ), __LINE__ , __FILE__ , self ::$ module , $ serviceClass ->getId ());
258258 $ serviceClass ->setServerStatus ('stopped ' )->save ();
259- $ GLOBALS [ ' tf ' ]-> history ->add ($ settings ['TABLE ' ], 'change_server_status ' , 'stopped ' , $ serviceClass ->getId (), $ serviceClass ->getCustid ());
259+ \ MyAdmin \App:: history () ->add ($ settings ['TABLE ' ], 'change_server_status ' , 'stopped ' , $ serviceClass ->getId (), $ serviceClass ->getCustid ());
260260 }
261261 $ event ['success ' ] = true ;
262262 $ event ->stopPropagation ();
@@ -322,7 +322,7 @@ public static function getChangeIp(GenericEvent $event)
322322 $ event ['status ' ] = 'error ' ;
323323 $ event ['status_text ' ] = 'Error Code ' .$ result ['faultcode ' ].': ' .$ result ['fault ' ];
324324 } else {
325- $ GLOBALS [ ' tf ' ]-> history ->add ($ settings ['TABLE ' ], 'change_ip ' , $ event ['newip ' ], $ serviceClass ->getId (), $ serviceClass ->getCustid ());
325+ \ MyAdmin \App:: history () ->add ($ settings ['TABLE ' ], 'change_ip ' , $ event ['newip ' ], $ serviceClass ->getId (), $ serviceClass ->getCustid ());
326326 $ serviceClass ->set_ip ($ event ['newip ' ])->save ();
327327 $ event ['status ' ] = 'ok ' ;
328328 $ event ['status_text ' ] = 'The IP Address has been changed. ' ;
0 commit comments