https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113496

Revision: 113496
Author:   maxsem
Date:     2012-03-09 18:32:03 +0000 (Fri, 09 Mar 2012)
Log Message:
-----------
(bug 23795) Add parser itself to ParserMakeImageParams hook.

Modified Paths:
--------------
    trunk/phase3/RELEASE-NOTES-1.20
    trunk/phase3/docs/hooks.txt
    trunk/phase3/includes/parser/Parser.php

Modified: trunk/phase3/RELEASE-NOTES-1.20
===================================================================
--- trunk/phase3/RELEASE-NOTES-1.20     2012-03-09 18:30:02 UTC (rev 113495)
+++ trunk/phase3/RELEASE-NOTES-1.20     2012-03-09 18:32:03 UTC (rev 113496)
@@ -23,6 +23,7 @@
 * (bug 34896) Update jQuery JSON plugin to v2.3 (2011-09-17)
 * (bug 34302) Add CSS classes to email fields in user preferences
 * Introduced $wgDebugDBTransactions to trace transaction status (currently 
PostgreSQL only)
+* (bug 23795) Add parser itself to ParserMakeImageParams hook.
 
 === Bug fixes in 1.20 ===
 * (bug 30245) Use the correct way to construct a log page title.

Modified: trunk/phase3/docs/hooks.txt
===================================================================
--- trunk/phase3/docs/hooks.txt 2012-03-09 18:30:02 UTC (rev 113495)
+++ trunk/phase3/docs/hooks.txt 2012-03-09 18:32:03 UTC (rev 113496)
@@ -1478,6 +1478,7 @@
 $title: title object representing the file
 $file: file object that will be used to create the image
 &$params: 2-D array of parameters
+$parser: Parser object that called the hook
 
 'ParserSectionCreate': Called each time the parser creates a document section
 from wikitext.  Use this to apply per-section modifications to HTML (like

Modified: trunk/phase3/includes/parser/Parser.php
===================================================================
--- trunk/phase3/includes/parser/Parser.php     2012-03-09 18:30:02 UTC (rev 
113495)
+++ trunk/phase3/includes/parser/Parser.php     2012-03-09 18:32:03 UTC (rev 
113496)
@@ -5117,7 +5117,7 @@
                        $params['frame']['title'] = $this->stripAltText( 
$caption, $holders );
                }
 
-               wfRunHooks( 'ParserMakeImageParams', array( $title, $file, 
&$params ) );
+               wfRunHooks( 'ParserMakeImageParams', array( $title, $file, 
&$params, $this ) );
 
                # Linker does the rest
                $time = isset( $options['time'] ) ? $options['time'] : false;


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to