r109072 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109071‎ | r109072 | r109073 >
Date:22:55, 16 January 2012
Author:khorn
Status:ok
Tags:
Comment:
followup r109065
Cleans up a bunch of function calls and field names.
Modified paths:
  • /trunk/extensions/CongressLookup/CongressLookup.db.php (modified) (history)
  • /trunk/extensions/CongressLookup/SpecialCongressLookup.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CongressLookup/SpecialCongressLookup.php
@@ -29,7 +29,7 @@
3030
3131 if ( $zip ) {
3232 $zip = $this->trimZip( $zip );
33 - showMatches( $zip );
 33+ $this->showMatches( $zip );
3434 }
3535 }
3636
@@ -43,8 +43,8 @@
4444
4545 $myRepresentative = array();
4646 $mySenators = array();
47 - $myRepresentative = CongressLookupDB->getRepresentative();
48 - $mySenators = CongressLookupDB->getSenators();
 47+ $myRepresentative = CongressLookupDB::getRepresentative( $zip );
 48+ $mySenators = CongressLookupDB::getSenators( $zip );
4949
5050 // TODO: stuffz.
5151 }
Index: trunk/extensions/CongressLookup/CongressLookup.db.php
@@ -12,10 +12,10 @@
1313 public static function getRepresentative( $zip ) {
1414 $dbr = wfGetDB( DB_SLAVE );
1515
16 - $zip = $this->trimZip( $zip, 5 ); // Trim it to 5 digit
 16+ $zip = self::trimZip( $zip, 5 ); // Trim it to 5 digit
1717 $zip = intval( $zip ); // Convert into an integer
1818
19 - $row = $dbr->selectRow( 'cl_zip5', 'rep_id', array( 'zip' => $zip ) );
 19+ $row = $dbr->selectRow( 'cl_zip5', 'sz5_rep_id', array( 'sz5_zip' => $zip ) );
2020 if ( $row ) {
2121 // TODO: stuffz.
2222 }
@@ -29,10 +29,10 @@
3030 public static function getSenators( $zip ) {
3131 $dbr = wfGetDB( DB_SLAVE );
3232
33 - $zip = $this->trimZip( $zip, 3 ); // Trim it to 3 digit
 33+ $zip = self::trimZip( $zip, 3 ); // Trim it to 3 digit
3434 $zip = intval( $zip ); // Convert into an integer
3535
36 - $row = $dbr->selectRow( 'cl_zip3', 'state', array( 'zip' => $zip ) );
 36+ $row = $dbr->selectRow( 'cl_zip3', 'sz3_state', array( 'sz3_zip' => $zip ) );
3737 if ( $row ) {
3838 // TODO: stuffz.
3939 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r109065some more work on CongressLookupkaldari21:47, 16 January 2012

Status & tagging log