1111function webuzo_edit_installation ($ host , $ user , $ pass , $ installation_id )
1212{
1313 include_once __DIR__ .'/webuzo_sdk.php ' ;
14- $ vps_id = $ GLOBALS [ ' tf ' ]-> variables ->request ['vps_id ' ] ?? '' ;
15- if (isset ($ GLOBALS [ ' tf ' ]-> variables ->request ['installation_id ' ])) {
16- $ installation_id = $ GLOBALS [ ' tf ' ]-> variables ->request ['installation_id ' ];
14+ $ vps_id = \ MyAdmin \App:: variables () ->request ['vps_id ' ] ?? '' ;
15+ if (isset (\ MyAdmin \App:: variables () ->request ['installation_id ' ])) {
16+ $ installation_id = \ MyAdmin \App:: variables () ->request ['installation_id ' ];
1717 }
1818 $ act = 'editdetail ' ;
1919 $ last_params = "&insid= $ installation_id " ;
2020 function_requirements ('webuzo_api_call ' );
2121 $ response = webuzo_api_call ($ host , $ user , $ pass , $ act , $ last_params );
2222 $ response = myadmin_unstringify ($ response );
2323 add_output ('<h2>Edit Installation Details</h2> ' );
24- if (isset ($ GLOBALS [ ' tf ' ]-> variables ->request ['editins ' ]) && verify_csrf_referrer (__LINE__ , __FILE__ )) {
24+ if (isset (\ MyAdmin \App:: variables () ->request ['editins ' ]) && verify_csrf_referrer (__LINE__ , __FILE__ )) {
2525 $ service = get_service ($ vps_id , 'vps ' );
2626 $ db = get_module_db ('vps ' );
2727 $ query = "select * from history_log where history_owner = ' {$ service ['vps_custid ' ]}' and history_old_value = 'Webuzo Details' " ;
@@ -34,13 +34,13 @@ function_requirements('webuzo_api_call');
3434 }
3535 }
3636 $ post = [
37- 'editins ' => $ GLOBALS [ ' tf ' ]-> variables ->request ['editins ' ],
38- 'edit_dir ' => $ GLOBALS [ ' tf ' ]-> variables ->request ['edit_dir ' ], // Must be the path to installation
39- 'edit_url ' => $ GLOBALS [ ' tf ' ]-> variables ->request ['edit_url ' ], // Must be the URL to installation
40- 'edit_dbname ' => $ GLOBALS [ ' tf ' ]-> variables ->request ['edit_dbname ' ],
41- 'edit_dbuser ' => $ GLOBALS [ ' tf ' ]-> variables ->request ['edit_dbuser ' ],
42- 'edit_dbpass ' => $ GLOBALS [ ' tf ' ]-> variables ->request ['edit_dbpass ' ],
43- 'edit_dbhost ' => $ GLOBALS [ ' tf ' ]-> variables ->request ['edit_dbhost ' ]
37+ 'editins ' => \ MyAdmin \App:: variables () ->request ['editins ' ],
38+ 'edit_dir ' => \ MyAdmin \App:: variables () ->request ['edit_dir ' ], // Must be the path to installation
39+ 'edit_url ' => \ MyAdmin \App:: variables () ->request ['edit_url ' ], // Must be the URL to installation
40+ 'edit_dbname ' => \ MyAdmin \App:: variables () ->request ['edit_dbname ' ],
41+ 'edit_dbuser ' => \ MyAdmin \App:: variables () ->request ['edit_dbuser ' ],
42+ 'edit_dbpass ' => \ MyAdmin \App:: variables () ->request ['edit_dbpass ' ],
43+ 'edit_dbhost ' => \ MyAdmin \App:: variables () ->request ['edit_dbhost ' ]
4444 ];
4545
4646 $ response_update = webuzo_api_call ($ host , $ user , $ pass , $ act , $ last_params , $ post );
0 commit comments