r112216 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112215‎ | r112216 | r112217 >
Date:16:29, 23 February 2012
Author:jeroendedauw
Status:deferred (Comments)
Tags:
Comment:
use params field, not m_params
Modified paths:
  • /trunk/extensions/SemanticResultFormats/Gallery/SRF_Gallery.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/Gallery/SRF_Gallery.php
@@ -31,7 +31,7 @@
3232 $ig->setParser( $wgParser );
3333 $ig->setCaption( $this->mIntro ); // set caption to IQ header
3434
35 - if ( $this->m_params['galleryformat'] == 'carousel' ) {
 35+ if ( $this->params['galleryformat'] == 'carousel' ) {
3636 static $carouselNr = 0;
3737
3838 // Set attributes for jcarousel
@@ -45,11 +45,11 @@
4646 );
4747
4848 // Use perrow parameter to determine the scroll sequence.
49 - if ( empty( $this->m_params['perrow'] ) ) {
 49+ if ( empty( $this->params['perrow'] ) ) {
5050 $attribs['scroll'] = 1; // default 1
5151 } else {
52 - $attribs['scroll'] = $this->m_params['perrow'];
53 - $attribs['visible'] = $this->m_params['perrow'];
 52+ $attribs['scroll'] = $this->params['perrow'];
 53+ $attribs['visible'] = $this->params['perrow'];
5454 }
5555
5656 $ig->setAttributes( $mAttribs );
@@ -59,16 +59,16 @@
6060 }
6161
6262 // In case galleryformat = carousel, perrow should not be set
63 - if ( $this->m_params['perrow'] !== '' && $this->m_params['galleryformat'] !== 'carousel' ) {
64 - $ig->setPerRow( $this->m_params['perrow'] );
 63+ if ( $this->params['perrow'] !== '' && $this->params['galleryformat'] !== 'carousel' ) {
 64+ $ig->setPerRow( $this->params['perrow'] );
6565 }
6666
67 - if ( $this->m_params['widths'] !== '' ) {
68 - $ig->setWidths( $this->m_params['widths'] );
 67+ if ( $this->params['widths'] !== '' ) {
 68+ $ig->setWidths( $this->params['widths'] );
6969 }
7070
71 - if ( $this->m_params['heights'] !== '' ) {
72 - $ig->setHeights( $this->m_params['heights'] );
 71+ if ( $this->params['heights'] !== '' ) {
 72+ $ig->setHeights( $this->params['heights'] );
7373 }
7474
7575 $printReqLabels = array();
@@ -77,8 +77,8 @@
7878 $printReqLabels[] = $printReq->getLabel();
7979 }
8080
81 - if ( $this->m_params['imageproperty'] !== '' && in_array( $this->m_params['imageproperty'], $printReqLabels ) ) {
82 - $this->addImageProperties( $results, $ig, $this->m_params['imageproperty'], $this->m_params['captionproperty'] );
 81+ if ( $this->params['imageproperty'] !== '' && in_array( $this->params['imageproperty'], $printReqLabels ) ) {
 82+ $this->addImageProperties( $results, $ig, $this->params['imageproperty'], $this->params['captionproperty'] );
8383 }
8484 else {
8585 $this->addImagePages( $results, $ig );

Comments

#Comment by Nikerabbit (talk | contribs)   08:57, 24 February 2012

What's the difference anyway? do Both work?

#Comment by Jeroen De Dauw (talk | contribs)   16:57, 24 February 2012

Both work. m_params is the old one, and is now deprecated.