Fix AngularJS controller registration issue

- Make app variable global in system-status.js to fix [$controller:ctrlreg] errors
- Add module reference check in websiteFunctions.js for compatibility
- Ensures all controllers can register properly with the CyberCP module
- Fixes dashboard data loading and WordPress creation page functionality
This commit is contained in:
master3395
2026-01-22 19:25:00 +01:00
parent 545e85a78a
commit 38ba15d1d6
3 changed files with 273 additions and 103 deletions

View File

@@ -2,6 +2,12 @@
* Created by usman on 7/26/17.
*/
// Ensure app is available (get existing module or create reference)
// This ensures compatibility with the global app variable from system-status.js
if (typeof app === 'undefined') {
app = angular.module('CyberCP');
}
// Global function for deleting staging sites
function deleteStagingGlobal(stagingId) {
if (confirm("Are you sure you want to delete this staging site? This action cannot be undone.")) {