Add import/export and update system

Implement CSV/JSON import and export for domains, notification groups and tags (with masking for sensitive channel data), including size/format validation, in-memory CSV building, and logging. Add tag transfer and bulk transfer actions (admin-only). Introduce a new update system: Add UpdateController and UpdateService, migration 025_add_update_system_v1.1.3.sql, and installer changes to include the new migration and version handling; provide endpoints to check, apply, rollback and configure updates. Update helpers and UI bits: add getUpdateBadgeInfo in LayoutHelper, update notification icons/redirects, and add getMaxUploadSize in ViewHelper. Misc: add NotificationGroup::findByName, tweak .gitignore backups path, and update related views and routes.
This commit is contained in:
Hosteroid
2026-02-11 17:43:23 +02:00
parent 0c759cdd1d
commit 3688c8b71b
32 changed files with 4268 additions and 350 deletions

View File

@@ -93,7 +93,7 @@ class NotificationController extends Controller
$this->notificationModel->markAsRead($notificationId, $userId);
// If redirect=domain, go to the domain view page
// Optional redirect after marking read
$redirect = $_GET['redirect'] ?? '';
if ($redirect === 'domain') {
$domainId = (int)($_GET['domain_id'] ?? 0);
@@ -102,6 +102,10 @@ class NotificationController extends Controller
return;
}
}
if ($redirect === 'settings') {
$this->redirect('/settings#updates');
return;
}
// AJAX request - return JSON (check multiple detection methods)
$isAjax = (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest')
@@ -225,6 +229,7 @@ class NotificationController extends Controller
'whois_failed' => 'exclamation-circle',
'system_welcome' => 'hand-sparkles',
'system_upgrade' => 'arrow-up',
'update_available' => 'cloud-download-alt',
default => 'bell'
};
}
@@ -247,6 +252,7 @@ class NotificationController extends Controller
'whois_failed' => 'gray',
'system_welcome' => 'purple',
'system_upgrade' => 'indigo',
'update_available' => 'blue',
default => 'gray'
};
}