? .DS_Store ? make_node_optional_14.patch ? node_decouple_block_03.patch ? node_decouple_block_04.patch ? node_decouple_help_00.patch ? node_decouple_locale_04.patch ? node_decouple_profile_00.patch ? remove_fieldset_body_title_01.patch ? modules/.DS_Store ? sites/.DS_Store ? sites/default/files ? sites/default/settings.php Index: modules/profile/profile.module =================================================================== RCS file: /cvs/drupal/drupal/modules/profile/profile.module,v retrieving revision 1.265 diff -u -p -r1.265 profile.module --- modules/profile/profile.module 6 Aug 2009 05:05:59 -0000 1.265 +++ modules/profile/profile.module 9 Aug 2009 00:55:15 -0000 @@ -129,30 +129,36 @@ function profile_menu() { * Implement hook_block_list(). */ function profile_block_list() { - $blocks['author-information']['info'] = t('Author information'); - $blocks['author-information']['cache'] = BLOCK_CACHE_PER_PAGE | BLOCK_CACHE_PER_ROLE; - return $blocks; + if (module_exists('node')) { + $blocks['author-information']['info'] = t('Author information'); + $blocks['author-information']['cache'] = BLOCK_CACHE_PER_PAGE | BLOCK_CACHE_PER_ROLE; + + return $blocks; + } } /** * Implement hook_block_configure(). */ function profile_block_configure($delta = '') { - // Compile a list of fields to show - $fields = array(); - $result = db_query('SELECT name, title, weight, visibility FROM {profile_field} WHERE visibility IN (:visibility) ORDER BY weight', array(':visibility' => array(PROFILE_PUBLIC, PROFILE_PUBLIC_LISTINGS))); - foreach ($result as $record) { - $fields[$record->name] = check_plain($record->title); + if (module_exists('node')) { + // Compile a list of fields to show + $fields = array(); + $result = db_query('SELECT name, title, weight, visibility FROM {profile_field} WHERE visibility IN (:visibility) ORDER BY weight', array(':visibility' => array(PROFILE_PUBLIC, PROFILE_PUBLIC_LISTINGS))); + foreach ($result as $record) { + $fields[$record->name] = check_plain($record->title); + } + $fields['user_profile'] = t('Link to full user profile'); + $form['profile_block_author_fields'] = array( + '#type' => 'checkboxes', + '#title' => t('Profile fields to display'), + '#default_value' => variable_get('profile_block_author_fields', array()), + '#options' => $fields, + '#description' => t('Select which profile fields you wish to display in the block. Only fields designated as public in the profile field configuration are available.', array('@profile-admin' => url('admin/settings/profile'))), + ); + + return $form; } - $fields['user_profile'] = t('Link to full user profile'); - $form['profile_block_author_fields'] = array( - '#type' => 'checkboxes', - '#title' => t('Profile fields to display'), - '#default_value' => variable_get('profile_block_author_fields', array()), - '#options' => $fields, - '#description' => t('Select which profile fields you wish to display in the block. Only fields designated as public in the profile field configuration are available.', array('@profile-admin' => url('admin/settings/profile'))), - ); - return $form; } /** @@ -166,7 +172,7 @@ function profile_block_save($delta = '', * Implement hook_block_view(). */ function profile_block_view($delta = '') { - if (user_access('access user profiles')) { + if (module_exists('node') || user_access('access user profiles')) { $output = ''; if ((arg(0) == 'node') && is_numeric(arg(1)) && (arg(2) == NULL)) { $node = node_load(arg(1));