From a6c005a183c679d3f730ba6cfeb41d4c4526f8e1 Mon Sep 17 00:00:00 2001 From: Jesper Kristensen Date: Mon, 3 Jun 2013 13:00:43 +0200 Subject: [PATCH] Moved profile create into features from hook_enable() --- alma.features.field_base.inc | 2 +- alma.features.inc | 21 +++++++++++++++++++++ alma.info | 4 +++- alma.install | 17 ----------------- alma.module | 8 +++++--- 5 files changed, 30 insertions(+), 22 deletions(-) create mode 100644 alma.features.inc diff --git a/alma.features.field_base.inc b/alma.features.field_base.inc index 201aca3..fd8dc6f 100644 --- a/alma.features.field_base.inc +++ b/alma.features.field_base.inc @@ -154,7 +154,7 @@ function alma_field_default_field_bases() { 60 => '2 months', 90 => '3 months', 180 => '6 months', - 360 => '12 months' + 360 => '12 months', ), 'allowed_values_function' => '', 'profile2_private' => 0, diff --git a/alma.features.inc b/alma.features.inc new file mode 100644 index 0000000..70cdb4b --- /dev/null +++ b/alma.features.inc @@ -0,0 +1,21 @@ + 'provider_alma', - 'label' => t('Profile for Alma'), - 'userCategory' => TRUE, - 'userView' => TRUE, - ) - ); - $profile_type->save(); -} - /** * Update system table set alma weight=10 to ensure form_alter hooks are called * AFTER ding_user and ding_provider diff --git a/alma.module b/alma.module index 189391a..c943fc4 100644 --- a/alma.module +++ b/alma.module @@ -1,8 +1,7 @@ field_alma_mail->set($patron->email); } } -} \ No newline at end of file +} + +// Include the feature code. +include_once 'alma.features.inc';