diff --git a/includes/scald.admin.inc b/includes/scald.admin.inc index 4b026fc..40e2048 100644 --- a/includes/scald.admin.inc +++ b/includes/scald.admin.inc @@ -24,9 +24,9 @@ function scald_admin_dashboard() { $message = '
' . t('This is the Scald administration dashboard. It allows to manage Atom Types (entity bundles) and Representation Contexts (entity view modes). In each context, it is possible to choose which transcoder (for Image atoms, it is image style) is used and how atom is rendered using different players. The context settings is for the atom itself, while "manage display" is to controlled how are fields displayed. If you are strange to the terminology, please read the short README.txt or the long documentation pages.', array('@readme' => 'http://drupalcode.org/project/scald.git/blob/refs/heads/7.x-1.x:/README.txt', '@doc' => 'https://drupal.org/node/1652740')) . '
'; drupal_set_message($message); - // Tell the user he can switch to a new export with feature. + // Tell the user, he can switch to a new export with Features. if (!variable_get('scald_switch_feature_export', FALSE)) { - $content .= '' . t('You can now export your contexts with feature. This will break existing exports and you will have to review your existing features containing scald contexts.') . '
', + '#markup' => '' . t('You can now export your contexts with Features. This will break existing exports and you will have to review your existing features containing scald contexts.') . '
', ); $form['submit'] = array( '#type' => 'submit', - '#value' => t('Switch to features') + '#value' => t('Switch to Features Export') ); return $form; @@ -757,8 +757,8 @@ function scald_switch_to_feature_form_submit($form, &$form_state) { variable_set('scald_switch_feature_export', TRUE); cache_clear_all(); - $message = '' . t('You are now using the new feature export. Please make sure you checked and recreated involved features.') . '
'; + $message = '' . t('You are now using the new Features export. Please make sure you have checked and recreated the features involved. Cache clear is necessary.') . '
'; drupal_set_message($message, 'warning'); $form_state['redirect'] = 'admin/structure/scald'; -} \ No newline at end of file +} diff --git a/scald.info b/scald.info index f8dbb1e..62c623c 100644 --- a/scald.info +++ b/scald.info @@ -20,4 +20,4 @@ files[] = includes/scald_views_handler_filter_atom_type.inc files[] = includes/ScaldAtom.inc files[] = includes/ScaldAtomController.inc files[] = tests/scald.test -files[] = scald.features.inc \ No newline at end of file +files[] = scald.features.inc diff --git a/scald.install b/scald.install index e208e12..591e406 100644 --- a/scald.install +++ b/scald.install @@ -254,9 +254,8 @@ function scald_install() { // Get Scald hooks to run earlier than other modules. db_query("UPDATE {system} SET weight = -50 WHERE name = 'scald'"); - // By default, the context export will be handled by features. - // But not for existing installs where CTools old export may be used. - variable_set('scald_switch_feature_export', TRUE); + // By default, the context export will not be handled by Features. + variable_set('scald_switch_feature_export', FALSE); } /** diff --git a/scald.module b/scald.module index dac472f..44fca31 100644 --- a/scald.module +++ b/scald.module @@ -2608,10 +2608,11 @@ if(!function_exists('entity_view_mode_prepare')) { /** * Implements hook_features_api(). + * + * If the user did choose to switch to Features exportable. */ -function scald_features_api() { - // If the user did choose to switch to feature exportable. - if (variable_get('scald_switch_feature_export', FALSE)) { +if (variable_get('scald_switch_feature_export', FALSE)) { + function scald_features_api() { return array( 'scald_context_type' => array( 'name' => 'Scald Context Configurations by type', @@ -2621,4 +2622,4 @@ function scald_features_api() { ), ); } -} \ No newline at end of file +}