r109104 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109103‎ | r109104 | r109105 >
Date:04:01, 17 January 2012
Author:kaldari
Status:ok (Comments)
Tags:
Comment:
making into valid HTML
Modified paths:
  • /trunk/extensions/CongressLookup/SpecialCongressLookup.php (modified) (history)
  • /trunk/extensions/CongressLookup/includes (added) (history)
  • /trunk/extensions/CongressLookup/includes/pageBegin.html (added) (history)

Diff [purge]

Index: trunk/extensions/CongressLookup/SpecialCongressLookup.php
@@ -45,10 +45,21 @@
4646 private function buildPage() {
4747 $htmlOut = '';
4848
 49+ $dir = dirname( __FILE__ ) . '/';
 50+
 51+ // Output beginning of the page
 52+ $filename = $dir."includes/pageBegin.html";
 53+ $handle = fopen( $filename, "r" );
 54+ $htmlOut .= fread( $handle, filesize( $filename ) );
 55+ fclose( $handle );
 56+
4957 if ( $this->zip ) {
5058 $htmlOut .= $this->getCongressTable();
5159 }
5260
 61+ // Output end of the page
 62+ $htmlOut .= "\n</body>\n</html>\n";
 63+
5364 echo $htmlOut;
5465
5566 return true;
Index: trunk/extensions/CongressLookup/includes/pageBegin.html
@@ -0,0 +1,9 @@
 2+<!DOCTYPE html>
 3+<html lang="en" dir="ltr" class="client-nojs">
 4+<head>
 5+<title>Wikipedia, the free encyclopedia</title>
 6+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 7+<meta http-equiv="Content-Style-Type" content="text/css" />
 8+<meta name="generator" content="MediaWiki 1.18wmf1" />
 9+</head>
 10+<body>

Comments

#Comment by Johnduhart (talk | contribs)   05:55, 17 January 2012

This makes me sad :(

But honestly opening and closing that file is not going to be good for IO on the day.

Status & tagging log