r91320 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91319‎ | r91320 | r91321 >
Date:22:58, 1 July 2011
Author:kaldari
Status:resolved (Comments)
Tags:
Comment:
fixing bug 29668 - WikiLove tab broken in Classic skin
Modified paths:
  • /trunk/extensions/WikiLove/WikiLove.hooks.php (modified) (history)
  • /trunk/extensions/WikiLove/WikiLove.php (modified) (history)
  • /trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiLove/WikiLove.php
@@ -105,6 +105,7 @@
106106 ),
107107 'styles' => 'ext.wikiLove.css',
108108 'messages' => array(
 109+ 'wikilove-tab-text',
109110 'wikilove-dialog-title',
110111 'wikilove-select-type',
111112 'wikilove-get-started-header',
Index: trunk/extensions/WikiLove/WikiLove.hooks.php
@@ -112,6 +112,8 @@
113113 */
114114 private static function skinConfigViewsLinks( $skin, &$views ) {
115115 global $wgWikiLoveGlobal, $wgUser;
 116+
 117+ // If WikiLove is turned off for this user, don't display tab.
116118 if ( !$wgWikiLoveGlobal && !$wgUser->getOption( 'wikilove-enabled' ) ) {
117119 return true;
118120 }
Index: trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js
@@ -770,8 +770,12 @@
771771 */
772772 init: function() {
773773 options = $.wikiLoveOptions;
774 -
775 - var $wikiLoveLink = $( '#ca-wikilove' ).find( 'a' );
 774+
 775+ if ( mw.config.get( 'skin' ) == 'standard' ) {
 776+ var $wikiLoveLink = $( '#topbar a:contains(' + mw.msg( 'wikilove-tab-text' ) + ')' );
 777+ } else {
 778+ var $wikiLoveLink = $( '#ca-wikilove' ).find( 'a' );
 779+ }
776780 $wikiLoveLink.unbind( 'click' );
777781 $wikiLoveLink.click( function( e ) {
778782 e.preventDefault();

Follow-up revisions

RevisionCommit summaryAuthorDate
r91323follow-up to r91320, better fix for bug 29668 - WikiLove tab broken in Classi...kaldari23:14, 1 July 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r91287fixing double encoding - bug 29668kaldari20:31, 1 July 2011

Comments

#Comment by Brion VIBBER (talk | contribs)   23:06, 1 July 2011

Hardcoded check for 'standard' skin means this still fails on cologneblue and other legacy skins.

#Comment by Kaldari (talk | contribs)   23:17, 1 July 2011

Good point. Better fix in r91323.

Status & tagging log