bug 27146
authorKrinkle <krinkle@users.mediawiki.org>
Sun, 20 Feb 2011 00:12:24 +0000 (00:12 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Sun, 20 Feb 2011 00:12:24 +0000 (00:12 +0000)
resources/mediawiki.action/mediawiki.action.watch.ajax.js

index 1fbbe4a..c0fc405 100644 (file)
@@ -113,7 +113,11 @@ $( document ).ready( function() {
 
                        $link.data( 'action', otheraction );
                        wgAjaxWatch.setLinkText( $link, otheraction );
-                       $link.attr( 'href', $link.attr( 'href' ).replace( '&action=' + action , '&action=' + otheraction ) );
+                       $link.attr( 'href',
+                               mw.config.get( 'wgScript' )
+                               + '?title=' + mw.util.wikiUrlencode( mw.config.get( 'wgPageName' ) )
+                               + '&action=' + otheraction
+                       );
                        if( $link.closest( 'li' ).attr( 'id' ) == 'ca-' + action ) {
                                $link.closest( 'li' ).attr( 'id', 'ca-' + otheraction );
                                // update the link text with the new message