r81314 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81313‎ | r81314 | r81315 >
Date:19:13, 1 February 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Fixed bug where options wasn't being extended properly because $.extend wasn't using deep mode. This caused no bucket to be used, and subsequently rating API requests to fail.
Modified paths:
  • /trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js
@@ -508,10 +508,10 @@
509509 var context = $(this).data( 'articleFeedback-context' );
510510 if ( !context ) {
511511 // Create context
512 - context = { '$ui': $(this), 'options': { 'ratings': {}, 'pitches': {},'bucket': 0 } };
 512+ context = { '$ui': $(this), 'options': { 'ratings': {}, 'pitches': {}, 'bucket': 0 } };
513513 // Allow customization through an options argument
514514 if ( typeof args[0] === 'object' ) {
515 - context = $.extend( context, { 'options': args[0] } );
 515+ context = $.extend( true, context, { 'options': args[0] } );
516516 }
517517 // Build user interface
518518 $.articleFeedback.fn.build.call( context );

Status & tagging log