diff --git a/civicrm.module b/civicrm.module index 034dbd31f..5308e9f12 100644 --- a/civicrm.module +++ b/civicrm.module @@ -201,11 +201,10 @@ function civicrm_initialize() { if (!include_once 'CRM/Core/Config.php') { $failure = TRUE; drupal_set_message(t("

Oops! - The path for including CiviCRM code files is not set properly. Most likely there is an error in the civicrm_root setting in your CiviCRM settings file (!1).

» civicrm_root is currently set to: !2

!3

", array( - '!1' => $settingsFile, - '!2' => $civicrm_root, - '!3' => $errorMsgAdd, - )) - ); + '!1' => $settingsFile, + '!2' => $civicrm_root, + '!3' => $errorMsgAdd, + ))); return FALSE; } @@ -330,7 +329,7 @@ function _civicrm_registerClassLoader() { * * @param string $default contact type * - * @return string $ctype + * @return string * Contact type */ function civicrm_get_ctype($default = NULL) { @@ -445,7 +444,7 @@ function civicrm_invoke() { $pageContent = CRM_Core_Invoke::invoke($args); $printedContent = ob_get_clean(); - if (empty($pageContent) AND + if (empty($pageContent) and !empty($printedContent) ) { $pageContent = $printedContent; @@ -664,7 +663,7 @@ function _civicrm_get_user_profile_id($name) { )); continue; } - catch (Exception $e){ + catch (Exception $e) { } } } @@ -945,8 +944,7 @@ function civicrm_theme_registry_alter(&$theme_registry) { */ function civicrm_preprocess_page(&$variables) { // to increase it's flexibility. - if (module_exists('date_popup') && (in_array(arg(0), array( - 'civicrm', 'user')))) { + if (module_exists('date_popup') && (in_array(arg(0), array('civicrm', 'user')))) { /** * Have hidden this function as it is not needed, diff --git a/modules/civicrm_contact_ref/civicrm_contact_ref.module b/modules/civicrm_contact_ref/civicrm_contact_ref.module index 23037a47a..9b83eff1c 100644 --- a/modules/civicrm_contact_ref/civicrm_contact_ref.module +++ b/modules/civicrm_contact_ref/civicrm_contact_ref.module @@ -27,7 +27,8 @@ function civicrm_contact_ref_field_info() { 'description' => t('Reference a CiviCRM contact.'), 'default_widget' => 'options_select', 'default_formatter' => 'civicrm_contact_ref_link', - 'property_type' => 'integer', // note that this property is used by entity.module + // note that this property is used by entity.module + 'property_type' => 'integer', ), ); } diff --git a/modules/civicrm_engage/civicrm_engage.module b/modules/civicrm_engage/civicrm_engage.module index 3a094e02c..9825e8268 100644 --- a/modules/civicrm_engage/civicrm_engage.module +++ b/modules/civicrm_engage/civicrm_engage.module @@ -36,6 +36,7 @@ define('CIVICRM_ENGAGE_CG_DEMOGRAPHICS_NAME', 'Demographics'); define('CIVICRM_ENGAGE_DEMOGRAPHICS_PREFIX', 'demographics_'); define('CIVICRM_ENGAGE_DEMOGRAPHICS_TITLE', 'Demographics'); + function _civicrm_engage_getCustomGroupID($customGroupName) { require_once 'CRM/Utils/Type.php'; $customGroupName = CRM_Utils_Type::escape($customGroupName, 'String'); diff --git a/modules/civicrm_group_roles/civicrm_group_roles.module b/modules/civicrm_group_roles/civicrm_group_roles.module index bcdf32be3..22ee1d6b7 100644 --- a/modules/civicrm_group_roles/civicrm_group_roles.module +++ b/modules/civicrm_group_roles/civicrm_group_roles.module @@ -551,9 +551,9 @@ function civicrm_group_roles_add_rule_form_submit($form, &$form_state) { if (isset($form_state['values']['edit_flag'])) { $edit_rule = db_update('civicrm_group_roles_rules')->fields(array( - 'role_id' => (int) $form_state['values']['add_rule']['select_role'], - 'group_id' => (int) $form_state['values']['add_rule']['select_group'], - ))->condition('id', (int) $form_state['values']['edit_flag'])->execute(); + 'role_id' => (int) $form_state['values']['add_rule']['select_role'], + 'group_id' => (int) $form_state['values']['add_rule']['select_group'], + ))->condition('id', (int) $form_state['values']['edit_flag'])->execute(); if ($edit_rule) { drupal_set_message(t('Your association rule has been edited.')); @@ -561,9 +561,9 @@ function civicrm_group_roles_add_rule_form_submit($form, &$form_state) { } else { $add_rule = db_insert('civicrm_group_roles_rules')->fields(array( - 'role_id' => (int) $form_state['values']['add_rule']['select_role'], - 'group_id' => (int) $form_state['values']['add_rule']['select_group'], - ))->execute(); + 'role_id' => (int) $form_state['values']['add_rule']['select_role'], + 'group_id' => (int) $form_state['values']['add_rule']['select_group'], + ))->execute(); if ($add_rule) { drupal_set_message(t('Your association rule has been added.')); @@ -648,7 +648,8 @@ function civicrm_group_roles_add_remove_groups($roles, $user, $op) { } //end foreach } //end foreach - } //end if contact_id + } + //end if contact_id else { watchdog('civicrm_group_roles', $msg, $variables, WATCHDOG_ERROR); @@ -660,7 +661,6 @@ function civicrm_group_roles_add_remove_groups($roles, $user, $op) { } //endif $roles } - /** * Manual sync form. Provides a submit button to manually sync groups to roles. * diff --git a/modules/civicrm_member_roles/civicrm_member_roles.module b/modules/civicrm_member_roles/civicrm_member_roles.module index 2e05d7c12..ce450b6ae 100644 --- a/modules/civicrm_member_roles/civicrm_member_roles.module +++ b/modules/civicrm_member_roles/civicrm_member_roles.module @@ -438,10 +438,10 @@ function civicrm_member_roles_add_rule_form_submit($form, &$form_state) { //If edit_flag is set then process as an edit form, if not then process as an add form. if (isset($form_state['values']['edit_flag'])) { $edit_rule = db_update('civicrm_member_roles_rules')->fields(array( - 'rid' => (int) $form_state['values']['add_rule']['select_role'], - 'type_id' => (int) $form_state['values']['add_rule']['select_membership'], - 'status_codes' => serialize($codes), - ))->condition('rule_id', (int) $form_state['values']['edit_flag'])->execute(); + 'rid' => (int) $form_state['values']['add_rule']['select_role'], + 'type_id' => (int) $form_state['values']['add_rule']['select_membership'], + 'status_codes' => serialize($codes), + ))->condition('rule_id', (int) $form_state['values']['edit_flag'])->execute(); if ($edit_rule) { drupal_set_message(t('Your association rule has been edited.')); @@ -449,10 +449,10 @@ function civicrm_member_roles_add_rule_form_submit($form, &$form_state) { } else { $add_rule = db_insert('civicrm_member_roles_rules')->fields(array( - 'rid' => (int) $form_state['values']['add_rule']['select_role'], - 'type_id' => (int) $form_state['values']['add_rule']['select_membership'], - 'status_codes' => serialize($codes), - ))->execute(); + 'rid' => (int) $form_state['values']['add_rule']['select_role'], + 'type_id' => (int) $form_state['values']['add_rule']['select_membership'], + 'status_codes' => serialize($codes), + ))->execute(); if ($add_rule) { drupal_set_message(t('Your association rule has been added.')); } diff --git a/modules/civicrm_og_sync/civicrm_og_sync.module b/modules/civicrm_og_sync/civicrm_og_sync.module index 7aaca5015..0ee8cc5f3 100644 --- a/modules/civicrm_og_sync/civicrm_og_sync.module +++ b/modules/civicrm_og_sync/civicrm_og_sync.module @@ -53,7 +53,6 @@ * mirroring OG for most organizations. */ - /** * Implements hook_node_update(). */ diff --git a/modules/civicrm_rules/civicrm_rules.module b/modules/civicrm_rules/civicrm_rules.module index 852f17459..d65ca829a 100644 --- a/modules/civicrm_rules/civicrm_rules.module +++ b/modules/civicrm_rules/civicrm_rules.module @@ -185,6 +185,7 @@ FROM civicrm_mailing } } } + /** * Implements hook_permission(). */ diff --git a/modules/civicrmtheme/civicrmtheme.module b/modules/civicrmtheme/civicrmtheme.module index 3a180dc70..ba34d85b5 100644 --- a/modules/civicrmtheme/civicrmtheme.module +++ b/modules/civicrmtheme/civicrmtheme.module @@ -69,7 +69,8 @@ function civicrmtheme_form_system_themes_admin_form_alter(&$form, $form_state) { $form['admin_theme']['civicrm']['civicrm_admin'] = array( '#type' => 'select', '#options' => array( - 0 => t('Default theme')) + $theme_list, + 0 => t('Default theme'), + ) + $theme_list, '#title' => t('CiviCRM Administration theme'), '#description' => t('Choose theme for CiviCRM administration/backend pages.'), '#default_value' => variable_get('civicrmtheme_theme_admin', 0), @@ -78,7 +79,8 @@ function civicrmtheme_form_system_themes_admin_form_alter(&$form, $form_state) { $form['admin_theme']['civicrm']['civicrm_public'] = array( '#type' => 'select', '#options' => array( - 0 => t('Default theme')) + $theme_list, + 0 => t('Default theme'), + ) + $theme_list, '#title' => t('CiviCRM Public theme'), '#description' => t('Choose theme for CiviCRM frontend pages.'), '#default_value' => variable_get('civicrmtheme_theme_public', 0),