- Fixed. The missing controls now appear at:
Plans & Platform > Plans, Prices & Entitlements > Groups Available for each tier. Config > Feature Availability > Groups Enabled as the global master switch.
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
<?php
|
||||
|
||||
function handleAdminPlatformAction(string $action): ?string {
|
||||
if ($action === 'save_group_availability') {
|
||||
setConfigValues(['groups.enabled' => !empty($_POST['groups_enabled'])]);
|
||||
return 'Group availability saved.';
|
||||
}
|
||||
|
||||
if ($action === 'save_platform_services') {
|
||||
setConfigValues([
|
||||
'subscriptions.enabled' => !empty($_POST['subscriptions_enabled']),
|
||||
@@ -28,7 +33,7 @@ function handleAdminPlatformAction(string $action): ?string {
|
||||
$db = getDB();
|
||||
$plans = $_POST['plans'] ?? [];
|
||||
$boolFeatures = [
|
||||
'voice_messages', 'recording_status', 'auto_voice_send', 'auto_voice_play', 'username_color',
|
||||
'voice_messages', 'recording_status', 'auto_voice_send', 'auto_voice_play', 'groups_available', 'username_color',
|
||||
'text_export', 'voice_archive', 'voice_export', 'email_2fa',
|
||||
];
|
||||
$db->beginTransaction();
|
||||
@@ -82,7 +87,7 @@ function handleAdminPlatformAction(string $action): ?string {
|
||||
$id = (int)$db->lastInsertId();
|
||||
$features = [
|
||||
'voice_messages' => true, 'recording_status' => false, 'auto_voice_send' => false,
|
||||
'auto_voice_play' => false,
|
||||
'auto_voice_play' => false, 'groups_available' => false,
|
||||
'group_member_limit' => 2, 'username_color' => false, 'text_archive_days' => 30,
|
||||
'text_export' => true, 'voice_archive' => false, 'voice_export' => false, 'email_2fa' => false,
|
||||
];
|
||||
@@ -120,7 +125,7 @@ function renderAdminPlatformTab(): void {
|
||||
$events = $db->query("SELECT event_type,COUNT(*) AS total FROM visitor_events
|
||||
WHERE created_at>" . (time() - 2592000) . " GROUP BY event_type ORDER BY total DESC")->fetchAll();
|
||||
$featureKeys = [
|
||||
'voice_messages', 'recording_status', 'auto_voice_send', 'auto_voice_play', 'group_member_limit',
|
||||
'voice_messages', 'recording_status', 'auto_voice_send', 'auto_voice_play', 'groups_available', 'group_member_limit',
|
||||
'username_color', 'text_archive_days', 'text_export', 'voice_archive',
|
||||
'voice_export', 'email_2fa',
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user