Index: branches/wmf/1.18wmf1/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.body.php |
— | — | @@ -114,20 +114,22 @@ |
115 | 115 | } elseif ( self::$renderZeroRatedBanner === true ) { |
116 | 116 | // a2enmod headers >>> .htaccess >>> RequestHeader set HTTP_CARRIER Verizon |
117 | 117 | self::$carrier = $this->lookupCarrier( $carrier ); |
118 | | - $html = $out->getHTML(); |
119 | | - $parsedHtml = $this->parseLinksForZeroQueryString( $html ); |
120 | | - $out->clearHTML(); |
121 | | - $out->addHTML( $parsedHtml ); |
122 | | - $carrierLink = ( isset( self::$carrier['link'] ) ) ? self::$carrier['link'] : ''; |
123 | | - $bannerText = Html::rawElement( 'h3', |
124 | | - array( 'id' => 'zero-rated-banner-text' ), |
125 | | - wfMsg( 'zero-rated-mobile-access-banner-text', $carrierLink ) ); |
126 | | - $banner = Html::rawElement( 'div', |
127 | | - array( 'style' => 'display:none;', |
128 | | - 'id' => 'zero-rated-banner' ), |
129 | | - $bannerText |
130 | | - ); |
131 | | - $output .= $banner; |
| 118 | + if ( isset( self::$carrier['name'] ) ) { |
| 119 | + $html = $out->getHTML(); |
| 120 | + $parsedHtml = $this->parseLinksForZeroQueryString( $html ); |
| 121 | + $out->clearHTML(); |
| 122 | + $out->addHTML( $parsedHtml ); |
| 123 | + $carrierLink = ( isset( self::$carrier['link'] ) ) ? self::$carrier['link'] : ''; |
| 124 | + $bannerText = Html::rawElement( 'h3', |
| 125 | + array( 'id' => 'zero-rated-banner-text' ), |
| 126 | + wfMsg( 'zero-rated-mobile-access-banner-text', $carrierLink ) ); |
| 127 | + $banner = Html::rawElement( 'div', |
| 128 | + array( 'style' => 'display:none;', |
| 129 | + 'id' => 'zero-rated-banner' ), |
| 130 | + $bannerText |
| 131 | + ); |
| 132 | + $output .= $banner; |
| 133 | + } |
132 | 134 | } |
133 | 135 | if ( self::$renderZeroRatedLandingPage === true ) { |
134 | 136 | $out->clearHTML(); |
— | — | @@ -806,6 +808,6 @@ |
807 | 809 | } |
808 | 810 | |
809 | 811 | public function getVersion() { |
810 | | - return __CLASS__ . ': $Id: ZeroRatedMobileAccess.body.php 108582 2012-01-11 01:03:51Z preilly $'; |
| 812 | + return __CLASS__ . ': $Id: ZeroRatedMobileAccess.body.php 108586 2012-01-11 01:36:07Z preilly $'; |
811 | 813 | } |
812 | 814 | } |