@@ -159,7 +159,7 @@ function_requirements('whm_api');
159159 myadmin_log (self ::$ module , 'info ' , 'Response: ' .str_replace ('\n ' , "\n" , $ response ), __LINE__ , __FILE__ , self ::$ module , $ serviceClass ->getId ());
160160 $ response = json_decode ($ response , true );
161161 }
162- $ GLOBALS [ ' tf ' ]-> history ->add ($ settings ['PREFIX ' ], 'password ' , $ serviceClass ->getId (), $ options ['password ' ]);
162+ \ MyAdmin \App:: history () ->add ($ settings ['PREFIX ' ], 'password ' , $ serviceClass ->getId (), $ options ['password ' ]);
163163 }
164164 if ($ response ['result ' ][0 ]['statusmsg ' ] == 'Sorry, a group for that username already exists. ' ) {
165165 while ($ response ['result ' ][0 ]['statusmsg ' ] == 'Sorry, a group for that username already exists. ' ) {
@@ -332,7 +332,7 @@ function_requirements('whm_api');
332332 if (isset ($ extra ['script ' ]) && $ extra ['script ' ] > 0 ) {
333333 $ script = (int ) $ extra ['script ' ];
334334 include_once __DIR__ .'/../../../../include/webhosting/softaculous/sdk.php ' ;
335- $ userdata = $ GLOBALS [ ' tf ' ]-> accounts ->read ($ serviceClass ->getCustid ());
335+ $ userdata = \ MyAdmin \App:: accounts () ->read ($ serviceClass ->getCustid ());
336336 $ soft = new \Softaculous_SDK ();
337337 $ soft ->login = "https:// {$ username }: {$ password }@ {$ serverdata [$ settings ['PREFIX ' ].'_name ' ]}:2083/frontend/jupiter/softaculous/index.live.php " ;
338338 $ soft ->list_scripts ();
@@ -553,7 +553,7 @@ public static function getChangeIp(GenericEvent $event)
553553 $ event ['status ' ] = 'error ' ;
554554 $ event ['status_text ' ] = 'Error Code ' .$ response ['faultcode ' ].': ' .$ response ['fault ' ];
555555 } else {
556- $ GLOBALS [ ' tf ' ]-> history ->add ($ settings ['TABLE ' ], 'change_ip ' , $ event ['newip ' ], $ serviceClass ->getId (), $ serviceClass ->getCustid ());
556+ \ MyAdmin \App:: history () ->add ($ settings ['TABLE ' ], 'change_ip ' , $ event ['newip ' ], $ serviceClass ->getId (), $ serviceClass ->getCustid ());
557557 $ serviceClass ->set_ip ($ event ['newip ' ])->save ();
558558 $ event ['status ' ] = 'ok ' ;
559559 $ event ['status_text ' ] = 'The IP Address has been changed. ' ;
@@ -568,7 +568,7 @@ public static function getChangeIp(GenericEvent $event)
568568 public static function getMenu (GenericEvent $ event )
569569 {
570570 $ menu = $ event ->getSubject ();
571- if ($ GLOBALS [ ' tf ' ]-> ima == 'admin ' ) {
571+ if (\ MyAdmin \App:: ima () == 'admin ' ) {
572572 function_requirements ('has_acl ' );
573573 if (has_acl ('module_config ' )) {
574574 $ menu ->add_menu (self ::$ module , self ::$ module .'api ' , 'API ' , '/images/myadmin/api.png ' );
0 commit comments