keep the features in the central array but sort them by module name
This commit is contained in:
@@ -8,9 +8,9 @@ class Connections {
|
||||
function post() {
|
||||
check_form_security_token_redirectOnErr('/settings/connections', 'settings_connections');
|
||||
|
||||
$features = self::get_features();
|
||||
$features = get_module_features('connections');
|
||||
|
||||
process_features_post(local_channel(), $features, $_POST);
|
||||
process_module_features_post(local_channel(), $features, $_POST);
|
||||
|
||||
build_sync_packet();
|
||||
return;
|
||||
@@ -18,7 +18,7 @@ class Connections {
|
||||
|
||||
function get() {
|
||||
|
||||
$features = self::get_features();
|
||||
$features = get_module_features('connections');
|
||||
$rpath = (($_GET['rpath']) ? $_GET['rpath'] : '');
|
||||
|
||||
$tpl = get_markup_template("settings_module.tpl");
|
||||
@@ -28,26 +28,11 @@ class Connections {
|
||||
'$action_url' => 'settings/connections',
|
||||
'$form_security_token' => get_form_security_token("settings_connections"),
|
||||
'$title' => t('Connections Settings'),
|
||||
'$features' => process_features_get(local_channel(), $features),
|
||||
'$features' => process_module_features_get(local_channel(), $features),
|
||||
'$submit' => t('Submit')
|
||||
));
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
||||
function get_features() {
|
||||
$arr = [
|
||||
[
|
||||
'connfilter',
|
||||
t('Connection Filtering'),
|
||||
t('Filter incoming posts from connections based on keywords/content'),
|
||||
false,
|
||||
get_config('feature_lock','connfilter')
|
||||
]
|
||||
];
|
||||
|
||||
return $arr;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ class Editor {
|
||||
function post() {
|
||||
check_form_security_token_redirectOnErr('/settings/editor', 'settings_editor');
|
||||
|
||||
$features = self::get_features();
|
||||
$features = get_module_features('editor');
|
||||
|
||||
process_features_post(local_channel(), $features, $_POST);
|
||||
process_module_features_post(local_channel(), $features, $_POST);
|
||||
|
||||
build_sync_packet();
|
||||
return;
|
||||
@@ -18,7 +18,7 @@ class Editor {
|
||||
|
||||
function get() {
|
||||
|
||||
$features = self::get_features();
|
||||
$features = get_module_features('editor');
|
||||
$rpath = (($_GET['rpath']) ? $_GET['rpath'] : '');
|
||||
|
||||
$tpl = get_markup_template("settings_module.tpl");
|
||||
@@ -28,84 +28,11 @@ class Editor {
|
||||
'$action_url' => 'settings/editor',
|
||||
'$form_security_token' => get_form_security_token("settings_editor"),
|
||||
'$title' => t('Editor Settings'),
|
||||
'$features' => process_features_get(local_channel(), $features),
|
||||
'$features' => process_module_features_get(local_channel(), $features),
|
||||
'$submit' => t('Submit')
|
||||
));
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
||||
function get_features() {
|
||||
$arr = [
|
||||
|
||||
[
|
||||
'large_photos',
|
||||
t('Large Photos'),
|
||||
t('Include large (1024px) photo thumbnails in posts. If not enabled, use small (640px) photo thumbnails'),
|
||||
false,
|
||||
get_config('feature_lock','large_photos'),
|
||||
],
|
||||
|
||||
[
|
||||
'content_encrypt',
|
||||
t('Even More Encryption'),
|
||||
t('Allow optional encryption of content end-to-end with a shared secret key'),
|
||||
false,
|
||||
get_config('feature_lock','content_encrypt'),
|
||||
],
|
||||
|
||||
[
|
||||
'consensus_tools',
|
||||
t('Enable Voting Tools'),
|
||||
t('Provide a class of post which others can vote on'),
|
||||
false,
|
||||
get_config('feature_lock','consensus_tools'),
|
||||
],
|
||||
|
||||
[
|
||||
'disable_comments',
|
||||
t('Disable Comments'),
|
||||
t('Provide the option to disable comments for a post'),
|
||||
false,
|
||||
get_config('feature_lock','disable_comments'),
|
||||
],
|
||||
|
||||
[
|
||||
'delayed_posting',
|
||||
t('Delayed Posting'),
|
||||
t('Allow posts to be published at a later date'),
|
||||
false,
|
||||
get_config('feature_lock','delayed_posting'),
|
||||
],
|
||||
|
||||
[
|
||||
'content_expire',
|
||||
t('Content Expiration'),
|
||||
t('Remove posts/comments and/or private messages at a future time'),
|
||||
false,
|
||||
get_config('feature_lock','content_expire'),
|
||||
],
|
||||
|
||||
[
|
||||
'suppress_duplicates',
|
||||
t('Suppress Duplicate Posts/Comments'),
|
||||
t('Prevent posts with identical content to be published with less than two minutes in between submissions.'),
|
||||
true,
|
||||
get_config('feature_lock','suppress_duplicates'),
|
||||
],
|
||||
|
||||
[
|
||||
'auto_save_draft',
|
||||
t('Auto-save drafts of posts and comments'),
|
||||
t('Automatically saves post and comment drafts in local browser storage to help prevent accidental loss of compositions'),
|
||||
true,
|
||||
get_config('feature_lock','auto_save_draft'),
|
||||
]
|
||||
|
||||
];
|
||||
|
||||
return $arr;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ class Manage {
|
||||
function post() {
|
||||
check_form_security_token_redirectOnErr('/settings/manage', 'settings_manage');
|
||||
|
||||
$features = self::get_features();
|
||||
$features = get_module_features('manage');
|
||||
|
||||
process_features_post(local_channel(), $features, $_POST);
|
||||
process_module_features_post(local_channel(), $features, $_POST);
|
||||
|
||||
build_sync_packet();
|
||||
return;
|
||||
@@ -18,7 +18,7 @@ class Manage {
|
||||
|
||||
function get() {
|
||||
|
||||
$features = self::get_features();
|
||||
$features = get_module_features('manage');
|
||||
$rpath = (($_GET['rpath']) ? $_GET['rpath'] : '');
|
||||
|
||||
$tpl = get_markup_template("settings_module.tpl");
|
||||
@@ -28,28 +28,11 @@ class Manage {
|
||||
'$action_url' => 'settings/manage',
|
||||
'$form_security_token' => get_form_security_token("settings_manage"),
|
||||
'$title' => t('Channel Manager Settings'),
|
||||
'$features' => process_features_get(local_channel(), $features),
|
||||
'$features' => process__module_features_get(local_channel(), $features),
|
||||
'$submit' => t('Submit')
|
||||
));
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
||||
function get_features() {
|
||||
$arr = [
|
||||
|
||||
[
|
||||
'nav_channel_select',
|
||||
t('Navigation Channel Select'),
|
||||
t('Change channels directly from within the navigation dropdown menu'),
|
||||
false,
|
||||
get_config('feature_lock','nav_channel_select'),
|
||||
]
|
||||
|
||||
];
|
||||
|
||||
return $arr;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ class Network {
|
||||
function post() {
|
||||
check_form_security_token_redirectOnErr('/settings/network', 'settings_network');
|
||||
|
||||
$features = self::get_features();
|
||||
$features = get_module_features('network');
|
||||
|
||||
process_features_post(local_channel(), $features, $_POST);
|
||||
process_module_features_post(local_channel(), $features, $_POST);
|
||||
|
||||
build_sync_packet();
|
||||
return;
|
||||
@@ -18,7 +18,7 @@ class Network {
|
||||
|
||||
function get() {
|
||||
|
||||
$features = self::get_features();
|
||||
$features = get_module_features('network');
|
||||
$rpath = (($_GET['rpath']) ? $_GET['rpath'] : '');
|
||||
|
||||
$tpl = get_markup_template("settings_module.tpl");
|
||||
@@ -28,84 +28,11 @@ class Network {
|
||||
'$action_url' => 'settings/network',
|
||||
'$form_security_token' => get_form_security_token("settings_network"),
|
||||
'$title' => t('Activity Settings'),
|
||||
'$features' => process_features_get(local_channel(), $features),
|
||||
'$features' => process_module_features_get(local_channel(), $features),
|
||||
'$submit' => t('Submit')
|
||||
));
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
||||
function get_features() {
|
||||
$arr = [
|
||||
|
||||
[
|
||||
'archives',
|
||||
t('Search by Date'),
|
||||
t('Ability to select posts by date ranges'),
|
||||
false,
|
||||
get_config('feature_lock','archives')
|
||||
],
|
||||
|
||||
[
|
||||
'savedsearch',
|
||||
t('Saved Searches'),
|
||||
t('Save search terms for re-use'),
|
||||
false,
|
||||
get_config('feature_lock','savedsearch')
|
||||
],
|
||||
|
||||
[
|
||||
'order_tab',
|
||||
t('Alternate Stream Order'),
|
||||
t('Ability to order the stream by last post date, last comment date or unthreaded activities'),
|
||||
false,
|
||||
get_config('feature_lock','order_tab')
|
||||
],
|
||||
|
||||
[
|
||||
'name_tab',
|
||||
t('Contact Filter'),
|
||||
t('Ability to display only posts of a selected contact'),
|
||||
false,
|
||||
get_config('feature_lock','name_tab')
|
||||
],
|
||||
|
||||
[
|
||||
'forums_tab',
|
||||
t('Forum Filter'),
|
||||
t('Ability to display only posts of a specific forum'),
|
||||
false,
|
||||
get_config('feature_lock','forums_tab')
|
||||
],
|
||||
|
||||
[
|
||||
'personal_tab',
|
||||
t('Personal Posts Filter'),
|
||||
t('Ability to display only posts that you\'ve interacted on'),
|
||||
false,
|
||||
get_config('feature_lock','personal_tab')
|
||||
],
|
||||
|
||||
[
|
||||
'affinity',
|
||||
t('Affinity Tool'),
|
||||
t('Filter stream activity by depth of relationships'),
|
||||
false,
|
||||
get_config('feature_lock','affinity')
|
||||
],
|
||||
|
||||
[
|
||||
'suggest',
|
||||
t('Suggest Channels'),
|
||||
t('Show friend and connection suggestions'),
|
||||
false,
|
||||
get_config('feature_lock','suggest')
|
||||
]
|
||||
|
||||
];
|
||||
|
||||
return $arr;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ class Profiles {
|
||||
function post() {
|
||||
check_form_security_token_redirectOnErr('/settings/profiles', 'settings_profiles');
|
||||
|
||||
$features = self::get_features();
|
||||
$features = get_module_features('profiles');
|
||||
|
||||
process_features_post(local_channel(), $features, $_POST);
|
||||
process_module_features_post(local_channel(), $features, $_POST);
|
||||
|
||||
build_sync_packet();
|
||||
return;
|
||||
@@ -18,7 +18,7 @@ class Profiles {
|
||||
|
||||
function get() {
|
||||
|
||||
$features = self::get_features();
|
||||
$features = get_module_features('profiles');
|
||||
$rpath = (($_GET['rpath']) ? $_GET['rpath'] : '');
|
||||
|
||||
$tpl = get_markup_template("settings_module.tpl");
|
||||
@@ -28,45 +28,11 @@ class Profiles {
|
||||
'$action_url' => 'settings/profiles',
|
||||
'$form_security_token' => get_form_security_token("settings_profiles"),
|
||||
'$title' => t('Profile Settings'),
|
||||
'$features' => process_features_get(local_channel(), $features),
|
||||
'$features' => process_module_features_get(local_channel(), $features),
|
||||
'$submit' => t('Submit')
|
||||
));
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
||||
function get_features() {
|
||||
$arr = [
|
||||
|
||||
[
|
||||
'advanced_profiles',
|
||||
t('Advanced Profiles'),
|
||||
t('Additional profile sections and selections'),
|
||||
false,
|
||||
get_config('feature_lock','advanced_profiles'),
|
||||
],
|
||||
|
||||
[
|
||||
'profile_export',
|
||||
t('Profile Import/Export'),
|
||||
t('Save and load profile details across sites/channels'),
|
||||
false,
|
||||
get_config('feature_lock','profile_export'),
|
||||
],
|
||||
|
||||
[
|
||||
'multi_profiles',
|
||||
t('Multiple Profiles'),
|
||||
t('Ability to create multiple profiles'),
|
||||
false,
|
||||
get_config('feature_lock','multi_profiles'),
|
||||
]
|
||||
|
||||
|
||||
];
|
||||
|
||||
return $arr;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user