jenkins-bot has submitted this change and it was merged.

Change subject: Replace some wfMsg* calls
......................................................................


Replace some wfMsg* calls

Bug: T70750
Change-Id: I39a0613838088cc4a18ef800c8a767e118a66e3f
---
M ImageLink.body.php
1 file changed, 145 insertions(+), 145 deletions(-)

Approvals:
  Reedy: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ImageLink.body.php b/ImageLink.body.php
index b748892..9f73c89 100644
--- a/ImageLink.body.php
+++ b/ImageLink.body.php
@@ -11,7 +11,7 @@
        // constants.
        const thisName = 'ImageLink';
        const thisType = 'other';
-       
+
        public $links;
 
        // For Messages
@@ -28,9 +28,9 @@
        const codeEmptyList             = 7;
        const codeRestrictedParam   = 8;
        const codeListEmpty         = 9;
-       
+
        /* Parameters for {{#img}} magic word
-        * 
+        *
         * m: mandatory parameter
         * s: sanitization required
         * l: which parameters to pick from list
@@ -38,7 +38,7 @@
         */
        static $parameters = array(
                'image'         => array( 'm' => true,  's' => false, 'l' => 
false, 'd' => null ),
-               'default'       => array( 'm' => false, 's' => false, 'l' => 
false, 'd' => null ),              
+               'default'       => array( 'm' => false, 's' => false, 'l' => 
false, 'd' => null ),
                'page'          => array( 'm' => false, 's' => false, 'l' => 
false, 'd' => '' ),
                'content'       => array( 'm' => false, 's' => false, 'l' => 
false, 'd' => null, 'dq' => true, 'sq' => true ),
                'target'        => array( 'm' => false, 's' => false, 'l' => 
false, 'd' => null, 'dq' => true, 'sq' => true ),
@@ -48,7 +48,7 @@
                'title'         => array( 'm' => false, 's' => true,  'l' => 
true,  'd' => null, 'dq' => true, 'sq' => true  ),
                'border'        => array( 'm' => false, 's' => true,  'l' => 
true,  'd' => null, 'dq' => true, 'sq' => true  ),
                'class'         => array( 'm' => false, 's' => true,  'l' => 
true,  'd' => null, 'dq' => true, 'sq' => true  ),
-               
+
                // Events
                // Restricted parameters
                'onchange'      => array( 'm' => false, 's' => true,  'l' => 
true,  'd' => null, 'dq' => true, 'sq' => true, 'r' => true  ),
@@ -58,7 +58,7 @@
 
                'onblur'        => array( 'm' => false, 's' => true,  'l' => 
true,  'd' => null, 'dq' => true, 'sq' => true, 'r' => true  ),
                'onfocus'       => array( 'm' => false, 's' => true,  'l' => 
true,  'd' => null, 'dq' => true, 'sq' => true, 'r' => true  ),
-               
+
                'onkeydown'     => array( 'm' => false, 's' => true,  'l' => 
true,  'd' => null, 'dq' => true, 'sq' => true, 'r' => true  ),
                'onkeyup'       => array( 'm' => false, 's' => true,  'l' => 
true,  'd' => null, 'dq' => true, 'sq' => true, 'r' => true  ),
                'onkeypress'=> array( 'm' => false, 's' => true,  'l' => true,  
'd' => null, 'dq' => true, 'sq' => true, 'r' => true  ),
@@ -73,7 +73,7 @@
                'onmouseup'      => array( 'm' => false, 's' => true,  'l' => 
true,  'd' => null, 'dq' => true, 'sq' => true, 'r' => true  ),
        );
        /* Parameters for {{#iconlink}} magic word
-        * 
+        *
         * m: mandatory parameter
         * s: sanitization required
         * l: which parameters to pick from list
@@ -81,12 +81,12 @@
         */
        static $parametersIconLink = array(
                'site'           => array( 'm' => true,  's' => false, 'l' => 
false, 'd' => '' ),
-               'domaincheck'=> array( 'm' => false,'s' => false, 'l' => false, 
 'd' => 'n' ),          
-               
+               'domaincheck'=> array( 'm' => false,'s' => false, 'l' => false, 
 'd' => 'n' ),
+
                // same as for #img
-               'default'       => array( 'm' => false, 's' => false, 'l' => 
false, 'd' => null ),              
-               'target'        => array( 'm' => false, 's' => false, 'l' => 
false, 'd' => null, 'dq' => true, 'sq' => true ),          
-               'content'       => array( 'm' => false, 's' => false, 'l' => 
false, 'd' => null, 'dq' => true, 'sq' => true ),          
+               'default'       => array( 'm' => false, 's' => false, 'l' => 
false, 'd' => null ),
+               'target'        => array( 'm' => false, 's' => false, 'l' => 
false, 'd' => null, 'dq' => true, 'sq' => true ),
+               'content'       => array( 'm' => false, 's' => false, 'l' => 
false, 'd' => null, 'dq' => true, 'sq' => true ),
                'alt'           => array( 'm' => false, 's' => true,  'l' => 
true,  'd' => null, 'dq' => true, 'sq' => true ),
                'height'        => array( 'm' => false, 's' => true,  'l' => 
true,  'd' => null, 'dq' => true, 'sq' => true  ),
                'width'         => array( 'm' => false, 's' => true,  'l' => 
true,  'd' => null, 'dq' => true, 'sq' => true  ),
@@ -94,7 +94,7 @@
                'title'         => array( 'm' => false, 's' => true,  'l' => 
true,  'd' => null, 'dq' => true, 'sq' => true  ),
                'border'        => array( 'm' => false, 's' => true,  'l' => 
true,  'd' => null, 'dq' => true, 'sq' => true  ),
                'class'         => array( 'm' => false, 's' => true,  'l' => 
true,  'd' => null, 'dq' => true, 'sq' => true  ),
-               
+
                // Events
                // Restricted parameters
                'onchange'      => array( 'm' => false, 's' => true,  'l' => 
true,  'd' => null, 'dq' => true, 'sq' => true, 'r' => true  ),
@@ -104,7 +104,7 @@
 
                'onblur'        => array( 'm' => false, 's' => true,  'l' => 
true,  'd' => null, 'dq' => true, 'sq' => true, 'r' => true  ),
                'onfocus'       => array( 'm' => false, 's' => true,  'l' => 
true,  'd' => null, 'dq' => true, 'sq' => true, 'r' => true  ),
-               
+
                'onkeydown'     => array( 'm' => false, 's' => true,  'l' => 
true,  'd' => null, 'dq' => true, 'sq' => true, 'r' => true  ),
                'onkeyup'       => array( 'm' => false, 's' => true,  'l' => 
true,  'd' => null, 'dq' => true, 'sq' => true, 'r' => true  ),
                'onkeypress'=> array( 'm' => false, 's' => true,  'l' => true,  
'd' => null, 'dq' => true, 'sq' => true, 'r' => true  ),
@@ -127,16 +127,16 @@
                global $wgMessageCache;
 
                foreach( self::$msg as $key => $value )
-                       $wgMessageCache->addMessages( self::$msg[$key], $key ); 
        
-       }        
+                       $wgMessageCache->addMessages( self::$msg[$key], $key );
+       }
        /**
         * legacy parser function... please use #img instead
-        * @deprecated 
+        * @deprecated
         */
-       public function mg_imagelink( &$parser, $img, $page='',                 
                                        // mandatory parameters  
+       public function mg_imagelink( &$parser, $img, $page='',                 
                                        // mandatory parameters
                                                                $alt=null, 
$width=null, $height=null, $border=null, $title = null )// optional parameters
        /**
-        *  $img  = image reference i.e. a valid image name e.g. "New 
Clock.gif" 
+        *  $img  = image reference i.e. a valid image name e.g. "New Clock.gif"
         *  $page = page reference i.e. a valid page name e.g. "Admin:Show Time"
         *
         * {{#imagelink:New Clock.gif|Admin:Show Time|alternate text}}
@@ -145,12 +145,12 @@
                $html = $this->buildHTML( $img, $page, $alt, $width, $height, 
$border, $title );
                if ($this->isError( $html ))
                        return $this->getErrorMsg( $html );
-               return array( $html, 'noparse' => true, 'isHTML' => true );     
        
+               return array( $html, 'noparse' => true, 'isHTML' => true );
        }
        /**
         * Can be used with [[Extension:ParserPhase2]]
         */
-       public function mg_imagelink_raw( &$parser, $img, $page='',             
                                        // mandatory parameters  
+       public function mg_imagelink_raw( &$parser, $img, $page='',             
                                        // mandatory parameters
                                                                $alt=null, 
$width=null, $height=null, $border=null, $title = null )// optional parameters
        {
                $html = $this->buildHTML( $img, $page, $alt, $width, $height, 
$border, $title );
@@ -161,34 +161,34 @@
        /**
         * This method builds the HTML code relative to the required imagelink
         */
-       protected function buildHTML( $img, $page,                              
                        // mandatory parameters  
+       protected function buildHTML( $img, $page,                              
                        // mandatory parameters
                                                                $alt=null, 
$width=null, $height=null, $border=null, $title = null )
        {
                $iURL = $this->getImageURL( $img );
                if ($this->isError( $iURL ))
                        return $iURL;
-               
+
                // prepare for 'link-less' case ... if required.
                $anchor_open = '';
                $anchor_close = '';
-               
+
                $ret = $this->getLinkToPageAnchor( $page, $anchor_open, 
$anchor_close );
                if ($this->isError( $ret ) && ( $ret !== self::codeLinkLess))
                        return $ret;
-               
+
                // sanitize the input
                $alt    = htmlspecialchars( $alt );
                $width  = htmlspecialchars( $width );
                $height = htmlspecialchars( $height );
                $border = htmlspecialchars( $border );
-               $title = htmlspecialchars( $title );            
-                                                               
+               $title = htmlspecialchars( $title );
+
                // Optional parameters
                if ($alt    !== null)   $alt    = "alt='${alt}'";               
else $alt='';
                if ($width  !== null)   $width  = "width='${width}'";   else 
$width='';
                if ($height !== null)   $height = "height='${height}'"; else 
$height='';
                if ($border !== null)   $border = "border='${border}'"; else 
$border='';
-               if ($title  !== null)   $title =  "title='${title}'";   else 
$title='';         
+               if ($title  !== null)   $title =  "title='${title}'";   else 
$title='';
 
                // let's put an easy marker that we can 'safely' find once we 
need to render the HTML
                return $anchor_open."<img src='${iURL}' $alt $width $height 
$border $title />".$anchor_close;
@@ -200,19 +200,19 @@
        protected function getImageURL( &$img, &$default = null )
        {
                $iURL = $this->getImageURLreal( $img );
-               
+
                // try out the specified image page name and
                // revert to default if it does not exists
                if ( ($iURL===self::codeInvalidTitleImage) || 
($iURL===self::codeImageNotExist) )
                {
                        if ( $default === null )
                                return self::codeDefaultNotProvided;
-                               
+
                        // if this one fails, not much we can do...
                        $iURL = $this->getImageURLreal( $default );
                }
-               
-               return $iURL;   
+
+               return $iURL;
        }
        /**
         * Really returns an URL for a given image page.
@@ -221,33 +221,33 @@
        {
                $ititle = Title::newFromText( $img );
 
-               // this really shouldn't happen... not much we can do here.     
        
-               if (!is_object($ititle)) 
+               // this really shouldn't happen... not much we can do here.
+               if (!is_object($ititle))
                        return self::codeInvalidTitleImage;
 
                // check if we are dealing with an InterWiki link
                if ( $ititle->isLocal() )
                {
                        $image = Image::newFromName( $img );
-                       if ( !$image->exists() ) 
+                       if ( !$image->exists() )
                                return self::codeImageNotExist;
-       
+
                        $iURL = $image->getURL();
                }
                else
                        $iURL = $ititle->getFullURL();
 
-               return $iURL;           
-       } 
+               return $iURL;
+       }
        /**
         * getLinkToPage
         */
        protected function getLinkToPageAnchor( &$page, &$anchor_open, 
&$anchor_close, $target = null, $content = null ) {
-       
+
                // check if we are asked to render a 'link-less' element
                if (empty( $page ))
                        return self::codeLinkLess;
-                       
+
                $ptitle = Title::newFromText( $page );
 
                // Extract fragment i.e. #section-on-page
@@ -256,196 +256,196 @@
                if ( $fragmentStart !== false ) {
                        $fragment = substr( htmlspecialchars( $page ), 
$fragmentStart );
                }
-               
+
                // this might happen in templates...
                if (!is_object( $ptitle ))
                        return self::codeInvalidTitleLink;
-                               
+
                if ( $ptitle->isLocal() ) {
                        // check if the local article exists
                        if ( !$ptitle->exists() )
                                return self::codeArticleNotExist;
-                               
+
                        $tURL = $ptitle->getLocalUrl();
                        $aClass='';
-                                               
+
                } else {
                        // we can't know easily what is at the end of this 
URL...
                        $tURL = $ptitle->getFullURL();
                        $aClass = 'class="extiw"';
                }
-               
+
                //  Is there a # already? Strip it.
                $tFragmentStart = stripos( $tURL, '#' );
                if ( $tFragmentStart !== false ) {
                        $tURL = substr( $tURL, 0, $tFragmentStart );
                }
                // Add fragment back to url
-               //  This is required to support things like "#tab=section"      
        
+               //  This is required to support things like "#tab=section"
                $tURL .= $fragment;
-               
+
                $this->formatLinkAnchor( $tURL, $aClass, $anchor_open, 
$anchor_close, $target, $content );
 
                return true;
        }
        /**
         * Formats an HTML anchor
-        * 
+        *
         * @return $this
         * @param $url string
         * @param $anchor_open string
         * @param $anchor_close string
-        */     
-       protected function formatLinkAnchor( &$url, &$classe, &$anchor_open, 
&$anchor_close, 
+        */
+       protected function formatLinkAnchor( &$url, &$classe, &$anchor_open, 
&$anchor_close,
                                                                                
$target = null, $content = null )
        {
                $_target = !is_null( $target ) ? 'target="'.$target.'"':null;
-                       
+
                $anchor_open = "<a ".$classe." $_target href='${url}'>";
                $anchor_close = " $content</a>";
                return $this;
-       }       
-       
+       }
+
        /**
-        * {{#img:  image=image-page 
-        *                      [|page=page-to-link-to] 
+        * {{#img:  image=image-page
+        *                      [|page=page-to-link-to]
         *                      [|alt=alternate-text]
-        *                      [|target=target-text] 
-        *                      [|content=anchor-text] 
+        *                      [|target=target-text]
+        *                      [|content=anchor-text]
         *                      [|height=height-parameter]
-        *                      [|width=width-parameter]         
+        *                      [|width=width-parameter]
         *                      [|border=border-parameter]
         *                      [|class=class-parameter]
         *                      [|title=title-parameter]
         *                      [|default=image-page-used-for-default]
         *                      [|onchange=onchange-handler]
-        *                      [|onsubmit=onsubmit-handler]     
-        *                      [|onreset=onreset-handler]       
-        *                      [|onselect=onselect-handler]     
-        *                      [|onblur=onblur-handler]         
-        *                      [|onfocus=onfocus-handler]       
-        *                      [|onkeydown=onkeydown-handler]   
-        *                      [|onkeyup=onkeyup-handler]       
-        *                      [|onkeypress=onkeypress-handler]         
-        *                      [|onclick=onclick-handler]       
+        *                      [|onsubmit=onsubmit-handler]
+        *                      [|onreset=onreset-handler]
+        *                      [|onselect=onselect-handler]
+        *                      [|onblur=onblur-handler]
+        *                      [|onfocus=onfocus-handler]
+        *                      [|onkeydown=onkeydown-handler]
+        *                      [|onkeyup=onkeyup-handler]
+        *                      [|onkeypress=onkeypress-handler]
+        *                      [|onclick=onclick-handler]
         *                      [|ondblclick=ondblclick-handler]
         *                      [|onmousedown=onmousedown-handler]
-        *                      [|onmousemove=onmousemove-handler]       
-        *                      [|onmouseout=onmouseout-handler]                
 
-        *                      [|onmouseover=onmouseover-handler]              
         
-        *                      [|onmouseup=onmouseup-handler]                  
 
-        * }} 
+        *                      [|onmousemove=onmousemove-handler]
+        *                      [|onmouseout=onmouseout-handler]
+        *                      [|onmouseover=onmouseover-handler]
+        *                      [|onmouseup=onmouseup-handler]
+        * }}
         */
        public function mg_img( &$parser )
        {
                $params = func_get_args();
-               
+
                $liste = StubManager::processArgList( $params, true );
-               
+
                $sliste= ExtHelper::doListSanitization( $liste, 
self::$parameters );
                if (empty( $sliste ))
                        return $this->getErrorMsg( self::codeListEmpty );
-               
+
                if (!is_array( $sliste ))
                        return $this->getErrorMsg( self::codeMissingParameter, 
$sliste);
-               
+
                ExtHelper::doSanitization( $sliste, self::$parameters );
-               
+
                $result = ExtHelper::checkListForRestrictions( $sliste, 
self::$parameters );
                $title  = $parser->mTitle;
-               
+
                // first check for restricted parameter usage
                $check = $this->checkRestrictionStatus( $title, $result );
                if ($this->isError( $check ))
                        return $this->getErrorMsg( $check, $result );
-               
-               $html = $this->buildHTMLfromList( $sliste, self::$parameters ); 
        
+
+               $html = $this->buildHTMLfromList( $sliste, self::$parameters );
                if ($this->isError( $html ))
                        return $this->getErrorMsg( $html );
-                                       
-               return array( $html, 'noparse' => true, 'isHTML' => true );     
                
+
+               return array( $html, 'noparse' => true, 'isHTML' => true );
        }
        /**
         * Creates an 'icon link':
         *  Fetches a site's ''favicon.ico''
-        * 
-        * {{#iconlink:  
-        *                      [|site=url-of-page] 
-        *                      [|domaincheck=y|n] 
-        *                      [|target=target-text] 
-        *                      [|content=anchor-text] 
+        *
+        * {{#iconlink:
+        *                      [|site=url-of-page]
+        *                      [|domaincheck=y|n]
+        *                      [|target=target-text]
+        *                      [|content=anchor-text]
         *                      [|alt=alternate-text]
         *                      [|height=height-parameter]
-        *                      [|width=width-parameter]         
-        *                      [|border=border-parameter]       
-        *                      [|class=class-parameter]         
+        *                      [|width=width-parameter]
+        *                      [|border=border-parameter]
+        *                      [|class=class-parameter]
         *                      [|title=title-parameter]
         *                      [|default=image-page-used-for-default]
         *                      [|onchange=onchange-handler]
-        *                      [|onsubmit=onsubmit-handler]     
-        *                      [|onreset=onreset-handler]       
-        *                      [|onselect=onselect-handler]     
-        *                      [|onblur=onblur-handler]         
-        *                      [|onfocus=onfocus-handler]       
-        *                      [|onkeydown=onkeydown-handler]   
-        *                      [|onkeyup=onkeyup-handler]       
-        *                      [|onkeypress=onkeypress-handler]         
-        *                      [|onclick=onclick-handler]       
+        *                      [|onsubmit=onsubmit-handler]
+        *                      [|onreset=onreset-handler]
+        *                      [|onselect=onselect-handler]
+        *                      [|onblur=onblur-handler]
+        *                      [|onfocus=onfocus-handler]
+        *                      [|onkeydown=onkeydown-handler]
+        *                      [|onkeyup=onkeyup-handler]
+        *                      [|onkeypress=onkeypress-handler]
+        *                      [|onclick=onclick-handler]
         *                      [|ondblclick=ondblclick-handler]
         *                      [|onmousedown=onmousedown-handler]
-        *                      [|onmousemove=onmousemove-handler]       
-        *                      [|onmouseout=onmouseout-handler]                
 
-        *                      [|onmouseover=onmouseover-handler]              
         
-        *                      [|onmouseup=onmouseup-handler]                  
 
-        * }} 
+        *                      [|onmousemove=onmousemove-handler]
+        *                      [|onmouseout=onmouseout-handler]
+        *                      [|onmouseover=onmouseover-handler]
+        *                      [|onmouseup=onmouseup-handler]
+        * }}
         */
        public function mg_iconlink( &$parser )
        {
                $params = func_get_args();
-               
+
                $liste = StubManager::processArgList( $params, true );
-               
+
                $sliste= ExtHelper::doListSanitization( $liste, 
self::$parametersIconLink );
                if (empty( $sliste ))
                        return $this->getErrorMsg( self::codeListEmpty );
-               
+
                if (!is_array( $sliste ))
                        return $this->getErrorMsg( self::codeMissingParameter, 
$sliste);
-               
+
                ExtHelper::doSanitization( $sliste, self::$parameters );
-               
+
                $result = ExtHelper::checkListForRestrictions( $sliste, 
self::$parametersIconLink );
                $title  = $parser->mTitle;
-               
+
                // first check for restricted parameter usage
                $check = $this->checkRestrictionStatus( $title, $result );
                if ($this->isError( $check ))
                        return $this->getErrorMsg( $check, $result );
-               
+
                // Normalize domainCheck parameter
                $site = $liste[ 'site' ];
                $domainCheckParam = @$liste['domaincheck'];
                $domainCheck = $this->extractBoolean( $domainCheckParam );
-               
+
                $iconURL = $this->getFavicon( $site, $domainCheck );
-               
+
                // Build the HTML element
-               $html = $this->buildHTMLfromList( $sliste, 
self::$parametersIconLink, $iconURL );       
+               $html = $this->buildHTMLfromList( $sliste, 
self::$parametersIconLink, $iconURL );
                if ($this->isError( $html ))
                        return $this->getErrorMsg( $html );
 
-               return array( $html, 'noparse' => true, 'isHTML' => true );     
                
+               return array( $html, 'noparse' => true, 'isHTML' => true );
        }
-       
+
        // 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-       // IconLink functionality helpers       
-       // 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%       
+       // IconLink functionality helpers
+       // 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        /**
         * Retrieves the 'favicon' from the site pointed to by $url.
         * Currently, only the /favicon.ico icon is looked for.
-        * 
+        *
         * @TODO: parse the root web page for the <link 'rel' ...>
-        * 
+        *
         * @return string URL to favicon
         * @return null if none exists or isn't available
         * @param $url string
@@ -453,41 +453,41 @@
        protected function getFavicon( &$url, $domainCheck = true )
        {
                $icoURL = $url.'/favicon.ico';
-               
+
                // if we were to get NULL as return code, then we couldn't
                // provide much feedback in terms of error checking...
-               if ( $this->validateURI( $icoURL, $domainCheck ) === false )    
+               if ( $this->validateURI( $icoURL, $domainCheck ) === false )
                        return null;
 
                // check if the icon uri exists
                $responseHeader = @get_headers( $icoURL );
                $exists = !( strpos( $responseHeader[0], '200 OK' ) === FALSE );
-               
+
                if ( !$exists )
                        return null;
-               
+
                return $icoURL;
        }
        /**
         * Validates a given URI using PEAR::Validate package
-        * 
+        *
         * @param string $uri
         * @return boolean (if the function was able to perform the validation)
         * @return null if PEAR::Validate package isn't available
-        */     
+        */
        protected function validateURI( &$uri, $domainCheck = true )
        {
                @include_once 'Validate.php';
                if (!class_exists( 'Validate' ))
                        return null;
-                       
+
                $validate = new Validate;
-               
+
                return $validate->uri( $uri, array( 'domain_check' => 
$domainCheck ) );
        }
        /**
         * Extracts a 'boolean'
-        * 
+        *
         * @return boolean
         * @param $param string
         */
@@ -506,9 +506,9 @@
                return $result;
        }
        // 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-       //      
-       // 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%       
-       
+       //
+       // 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
        /**
         * @return false invalid image page title
         * @return null  invalid target title
@@ -522,20 +522,20 @@
                        if ($this->isError( $img_url ))
                                return $img_url;
                }
-               
+
                // <a> anchor 'target' attribute
                $target  = @!is_null( $liste['target'] )  ? $liste['target'] 
:null;
-               
+
                // text between the <a> $content </a>
                $content = @!is_null( $liste['content'] ) ? 
$liste['content']:null;
-               
+
                $page = null;
                $link = null;
 
                // prepare for 'link-less' case ... if required.
                $anchor_open = '';
                $anchor_close = '';
-               
+
                // #img case
                if ( isset( $liste['page'] ))
                {
@@ -545,7 +545,7 @@
                        if ( $this->isError( $r ) && ( $r !== 
self::codeLinkLess) )
                                return $r;
                }
-               
+
                // #iconlink case
                if ( isset( $liste['site'] ))
                {
@@ -555,7 +555,7 @@
                }
 
                $params = ExtHelper::buildList( $liste, $ref_liste );
-               
+
                return $anchor_open."<img src='${img_url}' $params 
/>".$anchor_close;
        }
        /**
@@ -570,11 +570,11 @@
         */
        protected function getErrorMsg( $code, $param = null )
        {
-               return wfMsgForContent( 'imagelink'.$code, $param );    
+               return wfMessage( 'imagelink'.$code, $param 
)->inContentLanguage()->text();
        }
        /**
-        * Verifies a page's edit protection status 
-        * 
+        * Verifies a page's edit protection status
+        *
         * @return bool false means ''no-restriction''
         */
        protected function checkRestrictionStatus( &$title, $result )
@@ -584,16 +584,16 @@
                // if the page is protected, then anything goes!
                if ( $protected === true )
                        return false;
-               
+
                // check if we are in the MediaWiki namespace
                // i.e. edit protected by default.
                if ( $title->getNamespace() === NS_MEDIAWIKI )
                        return false;
-               
+
                // empty list.
                if ( $result === null )
                        return false;
-               
+
                // page is not protected... are there any restricted parameters 
then?
                return ( $result !== false ) ? self::codeRestrictedParam:false;
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/262058
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I39a0613838088cc4a18ef800c8a767e118a66e3f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ImageLink
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to