r110333 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110332‎ | r110333 | r110334 >
Date:22:15, 30 January 2012
Author:maxsem
Status:ok (Comments)
Tags:miscextensions 
Comment:
Bug 33966 - Wrong href in ApiSandbox examples. Since they annoy people, there will be no hrefs at all:P Example data will be stored elsewhere
Modified paths:
  • /trunk/extensions/ApiSandbox/ext.apiSandbox.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ApiSandbox/ext.apiSandbox.js
@@ -115,7 +115,7 @@
116116 e.preventDefault();
117117
118118 resetUI();
119 - link = $( this ).attr( 'href' ).replace( /^.*?\?/, '' );
 119+ link = $( this ).data( 'exampleLink' ).replace( /^.*?\?/, '' );
120120 params = link.split( '&' );
121121 for ( i = 0; i < params.length; i++ ) {
122122 pieces = params[i].split( '=' );
@@ -200,7 +200,8 @@
201201 .append( $prefix )
202202 .append(
203203 $( '<a>' )
204 - .attr( 'href', href )
 204+ .attr( 'href', '#' )
 205+ .data( 'exampleLink', href )
205206 .text( linkText )
206207 .click( exampleClick )
207208 ).appendTo( $list );

Comments

#Comment by MarkAHershberger (talk | contribs)   23:14, 30 January 2012

Why not change the lone href to the equiv of

$wgScriptPath + "/" + href

Status & tagging log