Pārlūkot izejas kodu

! And we don't need the Advanced Profile Fields core feature either, the profile fields page is quite capable of taking care of itself.

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer 11 gadi atpakaļ
vecāks
revīzija
1bc664a220

+ 1 - 1
Sources/Admin.php

@@ -119,7 +119,7 @@ function AdminMain()
 						'layout' => array($txt['mods_cat_layout']),
 						'karma' => array($txt['karma'], 'enabled' => in_array('k', $context['admin_features'])),
 						'sig' => array($txt['signature_settings_short']),
-						'profile' => array($txt['custom_profile_shorttitle'], 'enabled' => in_array('cp', $context['admin_features'])),
+						'profile' => array($txt['custom_profile_shorttitle']),
 					),
 				),
 				'securitysettings' => array(

+ 1 - 1
Sources/Load.php

@@ -1797,7 +1797,7 @@ function loadTheme($id_theme = 0, $initialize = true)
 		$modSettings['memberCount'] = $modSettings['totalMembers'];
 
 	// This allows us to change the way things look for the admin.
-	$context['admin_features'] = isset($modSettings['admin_features']) ? explode(',', $modSettings['admin_features']) : array('cd,cp,k,w,rg,ml,pm');
+	$context['admin_features'] = isset($modSettings['admin_features']) ? explode(',', $modSettings['admin_features']) : array('cd,k,w,ml,pm');
 
 	// Default JS variables for use in every theme
 	$context['javascript_vars'] = array(

+ 1 - 28
Sources/ManageSettings.php

@@ -63,11 +63,7 @@ function ModifyFeatureSettings()
 
 	call_integration_hook('integrate_modify_features', array(&$subActions));
 
-	// If Advanced Profile Fields are disabled don't show the setting page
-	if (!in_array('cp', $context['admin_features']))
-		unset($subActions['profile']);
-
-	// Same for Karma
+	// If karma is disabled don't show the setting page.
 	if (!in_array('k', $context['admin_features']))
 		unset($subActions['karma']);
 
@@ -202,29 +198,6 @@ function ModifyCoreFeatures($return_config = false)
 				'cal_enabled' => 1,
 			),
 		),
-		// cp = custom profile fields.
-		'cp' => array(
-			'url' => 'action=admin;area=featuresettings;sa=profile',
-			'save_callback' => create_function('$value', '
-				global $smcFunc;
-				if (!$value)
-				{
-					$smcFunc[\'db_query\'](\'\', \'
-						UPDATE {db_prefix}custom_fields
-						SET active = 0\');
-				}
-			'),
-			'setting_callback' => create_function('$value', '
-				if (!$value)
-					return array(
-						\'disabled_profile_fields\' => \'\',
-						\'registration_fields\' => \'\',
-						\'displayFields\' => \'\',
-					);
-				else
-					return array();
-			'),
-		),
 		// dr = drafts
 		'dr' => array(
 			'url' => 'action=admin;area=managedrafts',

BIN
Themes/default/images/admin/feature_cp.png


+ 0 - 2
Themes/default/languages/ManageSettings.english.php

@@ -300,8 +300,6 @@ $txt['core_settings_item_cd'] = 'Calendar';
 $txt['core_settings_item_cd_desc'] = 'Enabling this feature will open up a selection of options to enable your users to view the calendar, add and review events, see users birthdates on a calendar and much, much more.';
 $txt['core_settings_item_dr'] = 'Drafts';
 $txt['core_settings_item_dr_desc'] = 'Enabling this feature will allow users to save drafts of their posts so they can return later to post them.';
-$txt['core_settings_item_cp'] = 'Advanced Profile Fields';
-$txt['core_settings_item_cp_desc'] = 'This enables you to hide standard profile fields, add profile fields to registration, and create new profile fields for your forum.';
 $txt['core_settings_item_ih'] = 'Integration Hooks Management';
 $txt['core_settings_item_ih_desc'] = 'This feature allows you to enable or disable any integration hooks added by modifications. Changing hooks can prevent your forum from working properly, so use this feature only if you know what you are doing.';
 $txt['core_settings_item_k'] = 'Karma';