r109110 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109109‎ | r109110 | r109111 >
Date:06:12, 17 January 2012
Author:kaldari
Status:ok
Tags:
Comment:
getting rid of include so there isnt a file read
Modified paths:
  • /trunk/extensions/CongressLookup/SpecialCongressLookup.php (modified) (history)
  • /trunk/extensions/CongressLookup/includes (deleted) (history)

Diff [purge]

Index: trunk/extensions/CongressLookup/SpecialCongressLookup.php
@@ -48,11 +48,85 @@
4949 $dir = dirname( __FILE__ ) . '/';
5050
5151 // 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 );
 52+ $htmlOut .= <<<HTML
 53+<!DOCTYPE html>
 54+<html lang="en" dir="ltr" class="client-nojs">
 55+<head>
 56+<title>Wikipedia, the free encyclopedia</title>
 57+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 58+<meta http-equiv="Content-Style-Type" content="text/css" />
 59+<meta name="generator" content="MediaWiki 1.18wmf1" />
 60+<style type="text/css">
 61+body {
 62+ background-color: black;
 63+ color: white;
 64+ margin: 2em;
 65+ font-family: arial, sans-serif;
 66+ font-size: 15px;
 67+}
 68+a:link, a:visited {
 69+ color: #28a6b1;
 70+}
 71+a:hover, a:active {
 72+ color: #55a73c;
 73+}
 74+table#takeAction {
 75+ font-family: inherit;
 76+ font-size: inherit;
 77+ width: 100%;
 78+}
 79+table#takeAction td {
 80+ vertical-align: top;
 81+ padding: 0.2em;
 82+}
 83+table#takeAction td#instructions {
 84+ font-family: georgia, serif;
 85+ width: 60%;
 86+}
 87+table#takeAction td#contacts {
 88+ padding: 0.2em 2em;
 89+}
 90+table.person {
 91+ margin-bottom: 1em;
 92+}
 93+table.person td.name {
 94+ font-weight: bold;
 95+}
 96+p {
 97+ margin: 1em 0;
 98+}
 99+h3 {
 100+ font-weight: bold;
 101+ font-size: 12px;
 102+}
 103+</style>
 104+</head>
 105+<body>
 106+<table id="takeAction" border="0" cellspacing="0" cellpadding="0" style="border:none;">
 107+ <tr>
 108+ <td id="instructions">
 109+ <p>
 110+ For maximum impact, please consider calling your US Representative and US Senators and explain that you are a constituent and that you oppose these bills and similar future legislation.
 111+ </p>
56112
 113+ <h4>Things you may want to say to your Senator or Representative</h4>
 114+ <p>
 115+ “As one of your concerned constituents, I urge you to oppose SOPA and PIPA or any future bill that would censor free speech and damage the security of the Internet.”
 116+ </p>
 117+
 118+ <h4>Regarding Censorship</h4>
 119+ <p>
 120+ “The Internet has become an important communications tool allowing the free flow of ideas. As introduced in the House and the Senate, SOPA and PIPA would give the Justice Department and courts tremendous power to shut down entire sites. These bills ignore the principles of the First Amendment that require tailored solutions in lieu of across-the-board censorship. Unfortunately these bills represent terrible precedents for the United States and the world.”
 121+ </p>
 122+
 123+ <h4>Regarding Cybersecurity</h4>
 124+ <p>
 125+ “A safe and secure Web is vital to our privacy, our access to free knowledge, and to commerce. Hundreds of established authorities on the Internet believe that the required blocking of Internet sites in SOPA and PIPA is badly thought out and threatens Internet security.”
 126+ </p>
 127+ </td>
 128+ <td id="contacts">
 129+ <h4>Your Representatives:</h4>
 130+HTML;
57131 if ( $this->zip ) {
58132 $htmlOut .= $this->getCongressTable();
59133 }

Status & tagging log