Index: trunk/extensions/Translate/SpecialTranslationStats.php |
— | — | @@ -82,25 +82,21 @@ |
83 | 83 | if ( $this->including() ) { |
84 | 84 | $wgOut->addHTML( $this->image( $opts ) ); |
85 | 85 | } elseif ( $opts['graphit'] ) { |
86 | | - // Cache for two hours |
87 | | - if ( !$opts['preview'] ) { |
88 | | - $lastMod = $wgOut->checkLastModified( wfTimestamp( TS_MW, time() - 2 * 3600 ) ); |
89 | 86 | |
90 | | - if ( $lastMod ) { |
91 | | - return; |
92 | | - } |
93 | | - } |
94 | | - |
95 | | - if ( !$wgRequest->getBool( 'debug' ) ) { |
96 | | - $wgOut->disable(); |
97 | | - } |
98 | | - |
99 | 87 | if ( !class_exists( 'PHPlot' ) ) { |
100 | 88 | header( "HTTP/1.0 500 Multi fail" ); |
101 | 89 | echo "PHPlot not found"; |
102 | 90 | } |
103 | 91 | |
104 | 92 | $this->draw( $opts ); |
| 93 | + |
| 94 | + if ( !$wgRequest->getBool( 'debug' ) ) { |
| 95 | + $wgOut->disable(); |
| 96 | + header( 'Content-Type: image/png' ); |
| 97 | + header( 'Cache-Control: private, max-age=3600' ); |
| 98 | + header( 'Expires: ' . wfTimestamp( TS_RFC2822, time() + 3600 ) ); |
| 99 | + } |
| 100 | + |
105 | 101 | } else { |
106 | 102 | $this->form( $opts ); |
107 | 103 | } |