r98923 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98922‎ | r98923 | r98924 >
Date:21:07, 4 October 2011
Author:awjrichards
Status:ok
Tags:
Comment:
MFT r75910
Modified paths:
  • /branches/wmf/1.18wmf1/extensions/CentralNotice (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/CentralNotice/NoticePage.php (deleted) (history)

Diff [purge]

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
481 Merged /trunk/extensions/CentralNotice:r75910

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75910Removed NoticePage.php, unused since r73102. Has bugs in, they are annoying me.tstarling05:57, 3 November 2010

Status & tagging log