Permalink
Browse files

Merge in fixes to openoutreach install profile.

  • Loading branch information...
1 parent e6714d7 commit 7501575a0ac50d0d7789520bdca180838bf5a60e Nedjo Rogers committed May 12, 2011
Showing with 17 additions and 1 deletion.
  1. +0 −1 profiles/openoutreach/openoutreach.info
  2. +17 −0 profiles/openoutreach/openoutreach.profile
@@ -33,7 +33,6 @@ features[variable][] = "user_picture_style"
features[variable][] = "user_pictures"
features[variable][] = "user_register"
files[] = "openoutreach.profile"
-hidden = TRUE
name = "Open Outreach"
package = "Other"
php = "5.2.4"
@@ -22,3 +22,20 @@ function openoutreach_modules_installed($modules) {
module_load_include('inc', 'openoutreach', 'openoutreach.module_batch');
openoutreach_module_batch($modules);
}
+
+/**
+ * Check that other install profiles are not present to ensure we don't collide with a
+ * similar form alter in their profile.
+ *
+ * Set Open Outreach as default install profile.
+ */
+if (!function_exists('system_form_install_select_profile_form_alter')) {
+ function system_form_install_select_profile_form_alter(&$form, $form_state) {
+ // Only set the value if Open Outreach is the only profile.
+ if (count($form['profile']) == 1) {
+ foreach($form['profile'] as $key => $element) {
+ $form['profile'][$key]['#value'] = 'openoutreach';
+ }
+ }
+ }
+}

0 comments on commit 7501575

Please sign in to comment.