+
Debug Information
+
Total WordPress Sites: {{ total_sites }}
+
User ID: {{ debug_info.user_id }}
+
Is Admin: {{ debug_info.is_admin }}
+
WP Sites Count: {{ debug_info.wp_sites_count }}
+
WordPress Toolkit {% if help_url %}Help{% endif %}
@@ -331,7 +342,7 @@
Manage
-
@@ -593,9 +604,9 @@
}
});
- function DeleteWPNow(url) {
+ function DeleteWPNow(baseUrl, siteId) {
if (confirm('Are you sure you want to delete this WordPress site? This action cannot be undone.')) {
- window.location.href = url;
+ window.location.href = baseUrl + '?DeleteID=' + siteId;
}
}
diff --git a/websiteFunctions/website.py b/websiteFunctions/website.py
index a056861eb..b21a5ea27 100755
--- a/websiteFunctions/website.py
+++ b/websiteFunctions/website.py
@@ -142,7 +142,8 @@ class WebsiteManager:
admin = Administrator.objects.get(pk=userID)
data = {}
- data['wp'] = ACLManager.GetALLWPObjects(currentACL, userID)
+ wp_sites = ACLManager.GetALLWPObjects(currentACL, userID)
+ data['wp'] = wp_sites
try:
if DeleteID != None:
@@ -164,8 +165,18 @@ class WebsiteManager:
'production_status': True # You can modify this based on your needs
})
- proc = httpProc(request, 'websiteFunctions/WPsitesList.html',
- {"wpsite": sites})
+ context = {
+ "wpsite": sites,
+ "status": 1,
+ "total_sites": len(sites),
+ "debug_info": {
+ "user_id": userID,
+ "is_admin": currentACL.get('admin', 0),
+ "wp_sites_count": wp_sites.count()
+ }
+ }
+
+ proc = httpProc(request, 'websiteFunctions/WPsitesList.html', context)
return proc.render()
def WPHome(self, request=None, userID=None, WPid=None, DeleteID=None):