Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the install hook. #231

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions tide_core.install
Original file line number Diff line number Diff line change
Expand Up @@ -1087,10 +1087,5 @@ function tide_core_update_8045() {
* Enable tide_edit_protection module.
*/
function tide_core_update_8046() {
Copy link
Contributor

Choose a reason for hiding this comment

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

@vincent-gao this update hook was released in 2.0.8 so you can't remove it. The body of the hook can be removed. but the hook itself must stay.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sonnykt sure. indeed it should keep same number with database.

$administrator = Role::load('administrator');
$anonymous = Role::load('anonymous');
if ($administrator && $anonymous && !\Drupal::moduleHandler()->moduleExists('tide_edit_protection')) {
$module_installer = \Drupal::service('module_installer');
$module_installer->install(['tide_edit_protection']);
}
// @todo This update will be removed before Drupal 9.0.0
}