GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • history
  • 😂
  • talk
  • contribs
  • Krinkle
  • talk
  • contribs
  • Catrope
  • talk
  • contribs

This view

  • Original page
  • New address

GeezerVison is showing static-codereview.wikimedia.org — r82025 MediaWiki - Code Review archive

r82025 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:< r82024‎ | r82025 | r82026 >
Date:20:08, 12 February 2011
Author:krinkle
Status:ok
Tags:
Comment:
Since mwsuggest.js is no longer used in core, wgMWSuggestTemplate is not defined either.
This variable was previously defined by default.

Gadgets using this broke with 1.17 since they assumed wgMWSuggestTemplate was defined just like mwsuggest.js did.
I've added the definition for it inside the file itself.
Modified paths:
  • /trunk/phase3/skins/common/mwsuggest.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/mwsuggest.js
——@@ -7,6 +7,12 @@
88 * by Robert Stojnic (April 2008)
99 */
1010
 11+// Make sure wgMWSuggestTemplate is defined
 12+if ( !mw.config.exists( 'wgMWSuggestTemplate' ) ) {
 13+ mw.config.set( 'wgMWSuggestTemplate', mw.config.get( 'wgServer' ) + mw.config.get( 'wgScriptPath' )
 14+ + "/api.php?action=opensearch\x26search={searchTerms}\x26namespace={namespaces}\x26suggest" );
 15+}
 16+
1117 // search_box_id -> Results object
1218 window.os_map = {};
1319 // cached data, url -> json_text
——@@ -416,7 +422,7 @@
417423 var r = os_timer.r;
418424 var query = os_timer.query;
419425 os_timer = null;
420 - var path = wgMWSuggestTemplate.replace( "{namespaces}", os_getNamespaces( r ) )
 426+ var path = mw.config.get( 'wgMWSuggestTemplate' ).replace( "{namespaces}", os_getNamespaces( r ) )
421427 .replace( "{dbname}", wgDBname )
422428 .replace( "{searchTerms}", os_encodeQuery( query ) );
423429

Follow-up revisions

RevisionCommit summaryAuthorDate
r821511.17wmf1: MFT r78964, r79086, r79087, r79091, r82004, r82025, r82048, r82070,...catrope22:55, 14 February 2011
r85151MFT: r82000, r82004, r82020, r82025, r82038, r82039, r82048, r82070, r82081, ...demon20:39, 1 April 2011

Status & tagging log

  • 20:40, 1 April 2011 😂 (talk | contribs) changed the tags for r82025 [removed: 1.17]
  • 19:23, 15 February 2011 Krinkle (talk | contribs) changed the tags for r82025 [removed: 1.17wmf1]
  • 20:51, 14 February 2011 Catrope (talk | contribs) changed the status of r82025 [removed: new added: ok]
  • 20:09, 12 February 2011 Krinkle (talk | contribs) changed the tags for r82025 [added: 1.17,1.17wmf1]
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.