From b728e4fabe7aa1b19adce5767b9d8f8c183fb7ad Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Sun, 27 Aug 2006 16:07:45 +0000 Subject: [PATCH] Fix missing img_page in rev 16036 (missing commit of MessagesEn.php) --- includes/Parser.php | 7 ++++++- languages/MessagesEn.php | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/includes/Parser.php b/includes/Parser.php index 2123630731..56b4ccb30e 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -4177,9 +4177,11 @@ class Parser $mwWidth =& MagicWord::get( 'img_width' ); $mwCenter =& MagicWord::get( 'img_center' ); $mwFramed =& MagicWord::get( 'img_framed' ); + $mwPage =& MagicWord::get( 'img_page' ); $caption = ''; $width = $height = $framed = $thumb = false; + $page = null; $manual_thumb = '' ; foreach( $part as $key => $val ) { @@ -4201,6 +4203,9 @@ class Parser } elseif ( ! is_null( $mwNone->matchVariableStartToEnd($val) ) ) { # remember to set an alignment, don't render immediately $align = 'none'; + } elseif ( ! is_null( $match = $mwPage->matchVariableStartToEnd($val) ) ) { + # Select a page in a multipage document + $page = $match; } elseif ( $wgUseImageResize && ! is_null( $match = $mwWidth->matchVariableStartToEnd($val) ) ) { wfDebug( "img_width match: $match\n" ); # $match is the image width in pixels @@ -4227,7 +4232,7 @@ class Parser # Linker does the rest $sk =& $this->mOptions->getSkin(); - return $sk->makeImageLinkObj( $nt, $caption, $alt, $align, $width, $height, $framed, $thumb, $manual_thumb ); + return $sk->makeImageLinkObj( $nt, $caption, $alt, $align, $width, $height, $framed, $thumb, $manual_thumb, $page ); } /** diff --git a/languages/MessagesEn.php b/languages/MessagesEn.php index 03caa2f4ff..27266be0f2 100644 --- a/languages/MessagesEn.php +++ b/languages/MessagesEn.php @@ -253,6 +253,7 @@ $magicWords = array( 'img_width' => array( 1, '$1px' ), 'img_center' => array( 1, 'center', 'centre' ), 'img_framed' => array( 1, 'framed', 'enframed', 'frame' ), + 'img_page' => array( 1, 'page=$1', 'page $1' ), 'int' => array( 0, 'INT:' ), 'sitename' => array( 1, 'SITENAME' ), 'ns' => array( 0, 'NS:' ), @@ -2382,6 +2383,13 @@ Please confirm that really want to recreate this page.', * Italiano|it * Nederlands|nl", +# Multipage image navigation +'imgmultipageprev' => '← previous page', +'imgmultipagenext' => 'next page →', +'imgmultigo' => 'Go!', +'imgmultigotopre' => 'Go to page', +'imgmultigotopost' => '', + # Table pager 'ascending_abbrev' => 'asc', 'descending_abbrev' => 'desc', -- 2.20.1