r46740 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46739‎ | r46740 | r46741 >
Date:22:22, 2 February 2009
Author:aaron
Status:deferred
Tags:
Comment:
minor refactoring
Modified paths:
  • /trunk/extensions/FlaggedRevs/specialpages/RatingHistory_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/specialpages/RatingHistory_body.php
@@ -130,12 +130,12 @@
131131 } else if( $sExt === 'png' ) {
132132 $exists = $exists ? $exists : $this->makePngGraph($tag,$filePath);
133133 }
 134+ if( $exists ) $data = true;
134135 // Output plot/chart depending on final output file...
135136 switch( self::getCachedFileExtension() )
136137 {
137138 case 'svg':
138139 if( $exists ) {
139 - $data = true;
140140 $wgOut->addHTML( "<h3>" . wfMsgHtml("readerfeedback-$tag") . "</h3>\n" );
141141 $wgOut->addHTML(
142142 Xml::openElement( 'div', array('class' => 'fr_reader_feedback_graph') ) .
@@ -147,7 +147,6 @@
148148 break;
149149 case 'png':
150150 if( $exists ) {
151 - $data = true;
152151 // Add link for users with non-shitty browsers to see SVG itself
153152 $viewLink = "";
154153 if( $sExt === 'svg' ) {
@@ -166,14 +165,12 @@
167166 break;
168167 default:
169168 if( $exists ) {
170 - $data = true;
171169 $fp = @fopen( $filePath, 'r' );
172170 $table = fread( $fp, filesize($filePath) );
173171 @fclose( $fp );
174172 $wgOut->addHTML( '<h2>' . wfMsgHtml("readerfeedback-$tag") . '</h2>' );
175173 $wgOut->addHTML( $table . "\n" );
176174 } else if( $table = $this->makeHTMLTable( $tag, $filePath ) ) {
177 - $data = true;
178175 $wgOut->addHTML( '<h2>' . wfMsgHtml("readerfeedback-$tag") . '</h2>' );
179176 $wgOut->addHTML( $table . "\n" );
180177 }

Status & tagging log