Index: trunk/extensions/FlaggedRevs/specialpages/RatingHistory_body.php |
— | — | @@ -130,12 +130,12 @@ |
131 | 131 | } else if( $sExt === 'png' ) { |
132 | 132 | $exists = $exists ? $exists : $this->makePngGraph($tag,$filePath); |
133 | 133 | } |
| 134 | + if( $exists ) $data = true; |
134 | 135 | // Output plot/chart depending on final output file... |
135 | 136 | switch( self::getCachedFileExtension() ) |
136 | 137 | { |
137 | 138 | case 'svg': |
138 | 139 | if( $exists ) { |
139 | | - $data = true; |
140 | 140 | $wgOut->addHTML( "<h3>" . wfMsgHtml("readerfeedback-$tag") . "</h3>\n" ); |
141 | 141 | $wgOut->addHTML( |
142 | 142 | Xml::openElement( 'div', array('class' => 'fr_reader_feedback_graph') ) . |
— | — | @@ -147,7 +147,6 @@ |
148 | 148 | break; |
149 | 149 | case 'png': |
150 | 150 | if( $exists ) { |
151 | | - $data = true; |
152 | 151 | // Add link for users with non-shitty browsers to see SVG itself |
153 | 152 | $viewLink = ""; |
154 | 153 | if( $sExt === 'svg' ) { |
— | — | @@ -166,14 +165,12 @@ |
167 | 166 | break; |
168 | 167 | default: |
169 | 168 | if( $exists ) { |
170 | | - $data = true; |
171 | 169 | $fp = @fopen( $filePath, 'r' ); |
172 | 170 | $table = fread( $fp, filesize($filePath) ); |
173 | 171 | @fclose( $fp ); |
174 | 172 | $wgOut->addHTML( '<h2>' . wfMsgHtml("readerfeedback-$tag") . '</h2>' ); |
175 | 173 | $wgOut->addHTML( $table . "\n" ); |
176 | 174 | } else if( $table = $this->makeHTMLTable( $tag, $filePath ) ) { |
177 | | - $data = true; |
178 | 175 | $wgOut->addHTML( '<h2>' . wfMsgHtml("readerfeedback-$tag") . '</h2>' ); |
179 | 176 | $wgOut->addHTML( $table . "\n" ); |
180 | 177 | } |