- global $action,$remove,$id;
- if(($action == "submit") && isset($remove) && is_array($id)) {
- $wgOut->addHTML( wfMsg( "removingchecked" ) );
+ # Get query variables
+ $days = $wgRequest->getVal( 'days' );
+ $action = $wgRequest->getVal( 'action' );
+ $remove = $wgRequest->getVal( 'remove' );
+ $id = $wgRequest->getArray( 'id' );
+
+ if( $wgUser->getOption( 'enotifwatchlistpages' ) ) {
+ $wgOut->addHTML( "<div class='enotifinfo'>\n" );
+
+ $wgOut->addWikiText( wfMsg( 'email_notification_infotext' ) );
+
+ $wgOut->addHTML( '<form action="' .
+ $specialTitle->escapeLocalUrl( 'action=submit&magic=yes' ) .
+ '" method="post"><input type="submit" name="dummy" value="' .
+ htmlspecialchars( wfMsg( 'email_notification_reset' ) ) .
+ '" /><input type="hidden" name="reset" value="all" /></form>' .
+ "</div>\n\n" );
+ }
+
+ $uid = $wgUser->getID();
+ if( $wgRequest->getVal( 'reset' ) == 'all' ) {
+ $wgUser->clearAllNotifications( $uid );
+ }
+
+ if(($action == 'submit') && isset($remove) && is_array($id)) {
+ $wgOut->addWikiText( wfMsg( 'removingchecked' ) );
+ $wgOut->addHTML( '<p>' );