Index: branches/wmf/1.18wmf1/extensions/CentralNotice/NoticePage.php |
— | — | @@ -1,46 +0,0 @@ |
2 | | -<?php |
3 | | - |
4 | | -class NoticePage extends UnlistedSpecialPage { |
5 | | - function execute( $par ) { |
6 | | - global $wgOut; |
7 | | - $wgOut->disable(); |
8 | | - $this->sendHeaders(); |
9 | | - $content = $this->getOutput( $par ); |
10 | | - |
11 | | - if ( strlen( $content ) == 0 ) { |
12 | | - /* Hack for IE/Mac 0-length keepalive problem, see RawPage.php */ |
13 | | - echo "/* Empty */"; |
14 | | - } else { |
15 | | - echo $content; |
16 | | - } |
17 | | - } |
18 | | - |
19 | | - protected function sharedMaxAge() { |
20 | | - return 600; |
21 | | - } |
22 | | - |
23 | | - protected function maxAge() { |
24 | | - return 600; |
25 | | - } |
26 | | - |
27 | | - protected function sendHeaders() { |
28 | | - $smaxage = $this->sharedMaxAge(); |
29 | | - $maxage = $this->maxAge(); |
30 | | - // $epoch = wfTimestamp( TS_RFC2822, efCentralNoticeEpoch() ); |
31 | | - |
32 | | - // Paranoia |
33 | | - $public = ( session_id() == '' ); |
34 | | - |
35 | | - header( "Content-type: text/javascript; charset=utf-8" ); |
36 | | - if ( $public ) { |
37 | | - header( "Cache-Control: public, s-maxage=$smaxage, max-age=$maxage" ); |
38 | | - } else { |
39 | | - header( "Cache-Control: private, s-maxage=0, max-age=$maxage" ); |
40 | | - } |
41 | | - // header( "Last-modified: $epoch" ); |
42 | | - } |
43 | | - |
44 | | - function getOutput( $par ) { |
45 | | - return ""; |
46 | | - } |
47 | | -} |
Property changes on: branches/wmf/1.18wmf1/extensions/CentralNotice |
___________________________________________________________________ |
Modified: svn:mergeinfo |
48 | 1 | Merged /trunk/extensions/CentralNotice:r75910 |