r113496 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113495‎ | r113496 | r113497 >
Date:18:32, 9 March 2012
Author:maxsem
Status:ok
Tags:
Comment:
(bug 23795) Add parser itself to ParserMakeImageParams hook.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.20 (modified) (history)
  • /trunk/phase3/docs/hooks.txt (modified) (history)
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
@@ -1478,6 +1478,7 @@
14791479 $title: title object representing the file
14801480 $file: file object that will be used to create the image
14811481 &$params: 2-D array of parameters
 1482+$parser: Parser object that called the hook
14821483
14831484 'ParserSectionCreate': Called each time the parser creates a document section
14841485 from wikitext. Use this to apply per-section modifications to HTML (like
Index: trunk/phase3/includes/parser/Parser.php
@@ -5117,7 +5117,7 @@
51185118 $params['frame']['title'] = $this->stripAltText( $caption, $holders );
51195119 }
51205120
5121 - wfRunHooks( 'ParserMakeImageParams', array( $title, $file, &$params ) );
 5121+ wfRunHooks( 'ParserMakeImageParams', array( $title, $file, &$params, $this ) );
51225122
51235123 # Linker does the rest
51245124 $time = isset( $options['time'] ) ? $options['time'] : false;
Index: trunk/phase3/RELEASE-NOTES-1.20
@@ -23,6 +23,7 @@
2424 * (bug 34896) Update jQuery JSON plugin to v2.3 (2011-09-17)
2525 * (bug 34302) Add CSS classes to email fields in user preferences
2626 * Introduced $wgDebugDBTransactions to trace transaction status (currently PostgreSQL only)
 27+* (bug 23795) Add parser itself to ParserMakeImageParams hook.
2728
2829 === Bug fixes in 1.20 ===
2930 * (bug 30245) Use the correct way to construct a log page title.

Status & tagging log