Index: trunk/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(); |