r88668 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88667‎ | r88668 | r88669 >
Date:19:08, 23 May 2011
Author:krinkle
Status:ok (Comments)
Tags:
Comment:
Moving check higher up in case there's a premade toggle _but_ no .wm-collapsible-content premade. This way the link will be caught before it's inner-wrapped, after which it would no longer be a direct child.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/docs/globals.txt (modified) (history)
  • /trunk/phase3/resources/jquery/jquery.makeCollapsible.js (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/globals.txt
@@ -9,7 +9,7 @@
1010 # Generate the article HTML as if viewed by a web request
1111 $article = new Article( Title::newFromText( $t ) );
1212 $article->view();
13 -
 13+
1414 versus
1515
1616 # Save current globals
@@ -29,13 +29,13 @@
3030 globals will be eliminated from MediaWiki entirely, replaced by an application
3131 object which would be passed to constructors. Whether that would be an
3232 efficient, convenient solution remains to be seen, but certainly PHP 5 makes
33 -such object-oriented programming models easier than they were in previous
 33+such object-oriented programming models easier than they were in previous
3434 versions.
3535
3636 For the time being though, MediaWiki programmers will have to work in an
3737 environment with some global context. At the time of writing, 418 globals were
38 -initialised on startup by MediaWiki. 304 of these were configuration settings,
39 -which are documented in DefaultSettings.php. There is no comprehensive
 38+initialised on startup by MediaWiki. 304 of these were configuration settings,
 39+which are documented in DefaultSettings.php. There is no comprehensive
4040 documentation for the remaining 114 globals, however some of the most important
4141 ones are listed below. They are typically initialised either in index.php or in
4242 Setup.php.
Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -100,7 +100,7 @@
101101 * Bhojpuri (bho) (renamed from "bh").
102102 * (bug 29031) When translating block log entries, indefinite, infinite, and
103103 infinity are now considered the same.
104 -
 104+
105105 === Other changes in 1.19 ===
106106 * Removed legacy wgAjaxWatch javascript global object, no longer in use.
107107
Index: trunk/phase3/resources/jquery/jquery.makeCollapsible.js
@@ -294,14 +294,15 @@
295295 }
296296
297297 } else { // <div>, <p> etc.
 298+
 299+ // The toggle-link will be the first child of the element
 300+ var $toggle = $that.find( '> .mw-collapsible-toggle' );
 301+
298302 // If a direct child .content-wrapper does not exists, create it
299303 if ( !$that.find( '> .mw-collapsible-content' ).length ) {
300304 $that.wrapInner( '<div class="mw-collapsible-content"></div>' );
301305 }
302306
303 - // The toggle-link will be the first child of the element
304 - var $toggle = $that.find( '> .mw-collapsible-toggle' );
305 -
306307 // If theres no toggle link, add it
307308 if ( !$toggle.length ) {
308309 $that.prepend( $toggleLink );

Comments

#Comment by Hashar (talk | contribs)   19:58, 2 June 2011

And you managed to snip two unrelated white space changes in :) Well done!

Status & tagging log