r104863 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104862‎ | r104863 | r104864 >
Date:15:39, 1 December 2011
Author:maxsem
Status:ok
Tags:
Comment:
ApiSandbox:
* Handle some modules that don't return descriptions for every parameter, /me bites JeroenDeDauw :P
* Rm unused function
Modified paths:
  • /trunk/extensions/ApiSandbox/ext.apiSandbox.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ApiSandbox/ext.apiSandbox.js
@@ -282,17 +282,6 @@
283283 return typeof x != 'undefined';
284284 }
285285
286 - /**
287 - * Merges several objects into one that gets returned
288 - */
289 - function merge( /* ... */ ) {
290 - var res = {};
291 - for ( var i = 0; i < arguments.length; i++ ) {
292 - $.extend( res, arguments[i] );
293 - }
294 - return res;
295 - }
296 -
297286 function showLoading( $element ) {
298287 $element.html(
299288 mw.html.element( 'img',
@@ -394,6 +383,9 @@
395384 * @return {String}
396385 */
397386 function smartEscape( s ) {
 387+ if ( !s ) {
 388+ return ''; // @todo: fully verify paraminfo output
 389+ }
398390 s = mw.html.escape( s );
399391 if ( s.indexOf( '\n ' ) >= 0 ) {
400392 // turns *-bulleted list into a HTML list

Sign-offs

UserFlagDate
Reedyinspected15:36, 11 December 2011

Follow-up revisions

RevisionCommit summaryAuthorDate
r105799MFT r32957...reedy15:39, 11 December 2011

Status & tagging log