r109336 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109335‎ | r109336 | r109337 >
Date:07:43, 18 January 2012
Author:neilk
Status:ok
Tags:
Comment:
make report link go to Special:CongressFail
Modified paths:
  • /trunk/extensions/CongressLookup/CongressLookup.php (modified) (history)
  • /trunk/extensions/CongressLookup/SpecialCongressLookup.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CongressLookup/CongressLookup.php
@@ -46,7 +46,7 @@
4747 $wgCongressLookupMaxAge = 600; // 10 minutes client-side
4848
4949 // Where to report errors
50 -$wgCongressLookupErrorPage = '//meta.wikimedia.org/wiki/English_Wikipedia_SOPA_blackout/Congress_data';
 50+$wgCongressLookupErrorPage = '/wiki/Special:CongressFail';
5151
5252 $dir = dirname( __FILE__ ) . '/';
5353
Index: trunk/extensions/CongressLookup/SpecialCongressLookup.php
@@ -215,7 +215,7 @@
216216 * @return string HTML for the table
217217 */
218218 private function getCongressTables() {
219 - global $wgCongressLookupErrorPage;
 219+ global $wgCongressLookupErrorPage, $wgRequest;
220220
221221 $myRepresentatives = CongressLookupDB::getRepresentative( $this->zip );
222222 $mySenators = CongressLookupDB::getSenators( $this->zip );
@@ -310,8 +310,11 @@
311311 }
312312
313313 $congressTable .= Html::openElement( 'p' );
314 - $congressTable .= Html::element( 'a', array ( 'href' => $wgCongressLookupErrorPage ),
315 - wfMsg( 'congresslookup-report-errors' ) );
 314+ $congressTable .= Html::element(
 315+ 'a',
 316+ array ( 'href' => $wgCongressLookupErrorPage . '?zip=' . $wgRequest->getVal( 'zip' ) ),
 317+ wfMsg( 'congresslookup-report-errors' )
 318+ );
316319 $congressTable .= Html::closeElement( 'p' );
317320
318321 return $congressTable;

Status & tagging log