Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Commit

Permalink
[GOVCMSD7-168] Fatal error caused by custom search module in PHPUnit …
Browse files Browse the repository at this point in the history
…testing
  • Loading branch information
Suhyeon Hong committed Mar 26, 2020
1 parent 205dadb commit 1d587e1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions govcms.profile
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,21 @@ function govcms_paranoia_hide_modules() {
'govcms_register' => 'govCMS',
);
}

function govcms_search_core_install() {
user_role_grant_permissions(
DRUPAL_ANONYMOUS_RID,
array(
'access search_api_page',
)
);
user_role_grant_permissions(
DRUPAL_AUTHENTICATED_RID,
array(
'access search_api_page',
)
);

$themes = govcms_supported_themes();
govcms_core_insert_block('search_api_page', 'default_search', $themes, 'header', 0, 0, '', '<none>');
}

1 comment on commit 1d587e1

@pandaskii
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only need to reloacte govcms_supported_themes() function :)

/**
 * Returns a list of the themes that govCMS supports.
 */
function govcms_supported_themes() {
  return array(
    GOVCMS_DEFAULT_THEME,
    GOVCMS_INSTALL_DEFAULT_THEME,
  );
}

Please sign in to comment.