Fix missing img_page in rev 16036 (missing commit of MessagesEn.php)
authorJens Frank <jeluf@users.mediawiki.org>
Sun, 27 Aug 2006 16:07:45 +0000 (16:07 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Sun, 27 Aug 2006 16:07:45 +0000 (16:07 +0000)
includes/Parser.php
languages/MessagesEn.php

index 2123630..56b4ccb 100644 (file)
@@ -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 );
        }
 
        /**
index 03caa2f..27266be 100644 (file)
@@ -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' => '&larr; previous page',
+'imgmultipagenext' => 'next page &rarr;',
+'imgmultigo' => 'Go!',
+'imgmultigotopre' => 'Go to page',
+'imgmultigotopost' => '',
+
 # Table pager
 'ascending_abbrev' => 'asc',
 'descending_abbrev' => 'desc',