Merge "Hooks: change wikipedia is made for you warning to a notice message"

This commit is contained in:
jenkins-bot 2024-08-02 17:19:51 +00:00 committed by Gerrit Code Review
commit bb57b22eb3
2 changed files with 6 additions and 5 deletions

View file

@ -193,14 +193,15 @@ class Hooks implements
) );
}
} else {
// Add default warning message to Special:UserLogin and Special:UserCreate
// if no warning message set.
// Add default notice message to Special:UserLogin and Special:UserCreate
// if no warning or notice message is set.
if (
!$request->getCheck( 'warning' ) &&
!$request->getCheck( 'notice' ) &&
!$special->getUser()->isRegistered() &&
!$request->wasPosted()
) {
$request->setVal( 'warning', 'mobile-frontend-generic-login-new' );
$request->setVal( 'notice', 'mobile-frontend-generic-login-new' );
}
}
}

View file

@ -61,13 +61,13 @@ function initWatchstarCta( $watchstar ) {
watchCtaDrawer = CtaDrawer( {
content: mw.msg( 'minerva-watchlist-cta' ),
queryParams: {
warning: 'mobile-frontend-watchlist-purpose',
notice: 'mobile-frontend-watchlist-purpose',
campaign: 'mobile_watchPageActionCta',
returntoquery: 'article_action=watch'
},
onBeforeHide: drawers.discardDrawer,
signupQueryParams: {
warning: 'mobile-frontend-watchlist-signup-action'
notice: 'mobile-frontend-watchlist-signup-action'
}
} );
}