r98136 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98135‎ | r98136 | r98137 >
Date:15:15, 26 September 2011
Author:catrope
Status:ok
Tags:
Comment:
MoodBar: 1.17wmf1 compat: comment out static call to Linker::userToolLinks(). Will restore once this extension has been copied to 1.17wmf1. Furthermore, use a calling style for $.ajax() that's compatible with jQuery <1.5 (1.17wmf1 has 1.4)
Modified paths:
  • /trunk/extensions/MoodBar/SpecialMoodBarFeedback.php (modified) (history)
  • /trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/SpecialMoodBarFeedback.php
@@ -124,7 +124,8 @@
125125 );
126126 $timeMsg = wfMessage( 'ago' )->params( $time )->escaped();
127127 $username = htmlspecialchars( $row->user_name === null ? $row->mbf_user_ip : $row->user_name );
128 - $links = Linker::userToolLinks( $row->mbf_user_id, $username );
 128+ //$links = Linker::userToolLinks( $row->mbf_user_id, $username );
 129+ $links = $GLOBALS['wgUser']->getSkin()->userToolLinks( $row->mbf_user_id, $username ); // 1.17wmf1 compat
129130 $comment = htmlspecialchars( $row->mbf_comment );
130131 $permalinkURL = htmlspecialchars( SpecialPage::getTitleFor( 'MoodBarFeedback', $row->mbf_id )->getLinkURL() );
131132 $permalinkText = wfMessage( 'moodbar-feedback-permalink' )->escaped();
Index: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js
@@ -133,7 +133,8 @@
134134 reqData['mbcuser'] = formState.username;
135135 }
136136
137 - $.ajax( mw.util.wikiScript( 'api' ), {
 137+ $.ajax( {
 138+ 'url': mw.util.wikiScript( 'api' ),
138139 'data': reqData,
139140 'success': function( data ) {
140141 // Remove the spinner and restore the "More" link

Status & tagging log