Index: branches/wmf/1.18wmf1/extensions/CongressLookup/maintenance/checkContacts.php |
— | — | @@ -44,13 +44,30 @@ |
45 | 45 | } |
46 | 46 | |
47 | 47 | protected function checkContactLink( $name, $url, &$countOk ) { |
48 | | - $req = MWHttpRequest::factory( $url, array( |
49 | | - 'method' => 'GET', |
50 | | - 'timeout' => 8, |
51 | | - 'sslVerifyHost' => false, // just check if it can be reached |
52 | | - 'sslVerifyCert' => false, // just check if it can be reached |
53 | | - ) ); |
54 | | - if ( $req->execute()->isOK() ) { |
| 48 | + global $wgVersion; |
| 49 | + |
| 50 | + $ok = false; |
| 51 | + if ( Sanitizer::validateEmail( $url ) ) { |
| 52 | + $ok = true; // assume OK |
| 53 | + } else { |
| 54 | + $bits = wfParseUrl( $url ); |
| 55 | + if ( $bits && isset( $bits['scheme'] ) ) { |
| 56 | + if ( $bits['scheme'] == 'mailto' ) { |
| 57 | + $ok = true; // assume OK |
| 58 | + } elseif ( in_array( $bits['scheme'], array( 'http', 'https' ) ) ) { |
| 59 | + $req = MWHttpRequest::factory( $url, array( |
| 60 | + 'method' => 'GET', |
| 61 | + 'timeout' => 8, |
| 62 | + 'sslVerifyHost' => false, // just check if it can be reached |
| 63 | + 'sslVerifyCert' => false, // just check if it can be reached |
| 64 | + ) ); |
| 65 | + $req->setUserAgent( "MediaWiki {$wgVersion}, CheckCongressLinks Checker" ); |
| 66 | + $ok = $req->execute()->isOK(); |
| 67 | + } |
| 68 | + } |
| 69 | + } |
| 70 | + |
| 71 | + if ( $ok ) { |
55 | 72 | ++$countOk; |
56 | 73 | } else { |
57 | 74 | $this->output( "Broken: [$name] [$url]\n" ); |
Index: branches/wmf/1.18wmf1/extensions/CongressLookup/maintenance/populateCache.php |
— | — | @@ -0,0 +1,142 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * @ingroup Maintenance |
| 5 | + */ |
| 6 | +if ( getenv( 'MW_INSTALL_PATH' ) ) { |
| 7 | + $IP = getenv( 'MW_INSTALL_PATH' ); |
| 8 | +} else { |
| 9 | + $IP = dirname(__FILE__).'/../../..'; |
| 10 | +} |
| 11 | + |
| 12 | +require_once( "$IP/maintenance/Maintenance.php" ); |
| 13 | + |
| 14 | +class PopulateCache extends Maintenance { |
| 15 | + public $isOK = 0; |
| 16 | + public $isBad = 0; |
| 17 | + protected $dbr; |
| 18 | + |
| 19 | + public function __construct() { |
| 20 | + parent::__construct(); |
| 21 | + $this->mDescription = "Prepopulate caches with zipcode queries"; |
| 22 | + |
| 23 | + $this->addOption( 'url', 'The base URL for zipcode lookup.', true, true ); |
| 24 | + $this->addOption( 'limit', 'The amount of values to return during a db query.', false, false ); |
| 25 | + $this->addOption( 'cache_warmup', 'If this is used, the script will attempt to hit all of the possible URLs for you to warm up the cache.', false, false ); |
| 26 | + $this->addOption( 'path', 'The file path to output all possible zip code URLs. If this option is specified, this script will NOT attempt to hit the URLs for you.', false, false ); |
| 27 | + |
| 28 | + } |
| 29 | + |
| 30 | + public function execute() { |
| 31 | + $this->dbr = wfGetDB( DB_SLAVE ); |
| 32 | + $path = $this->getOption( 'path', null ); |
| 33 | + if ( $path ) { |
| 34 | + $this->writeUrlsToFile( $path ); |
| 35 | + } |
| 36 | + if ( $this->getOption( 'cache_warmup', null )) { |
| 37 | + $this->warmUpCache(); |
| 38 | + } |
| 39 | + } |
| 40 | + |
| 41 | + public function warmUpCache() { |
| 42 | + $this->output( "Populating caches...\n" ); |
| 43 | + |
| 44 | + $limit = $this->getOption( 'limit', 1000 ); |
| 45 | + $offset = 0; |
| 46 | + $keepGoing = true; |
| 47 | + |
| 48 | + while( $keepGoing ) { |
| 49 | + $result = $this->dbr->select( |
| 50 | + 'cl_zip5', |
| 51 | + 'clz5_zip', |
| 52 | + array(), |
| 53 | + __METHOD__, |
| 54 | + array( |
| 55 | + 'LIMIT' => $limit, |
| 56 | + 'OFFSET' => $offset, |
| 57 | + ) |
| 58 | + ); |
| 59 | + |
| 60 | + if ( !$result->numRows() ) { |
| 61 | + $keepGoing = false; |
| 62 | + } |
| 63 | + |
| 64 | + foreach ( $result as $row ) { |
| 65 | + $this->hitUrl( $row->clz5_zip ); |
| 66 | + } |
| 67 | + |
| 68 | + $offset += $limit; |
| 69 | + $this->output( "...Attempted $offset URLs so far.\n" ); |
| 70 | + $this->output( "...OK so far: " . $this->isOK . "\n" ); |
| 71 | + $this->output( "...Bad so far: " . $this->isBad . "\n" ); |
| 72 | + sleep( 1 ); // rate limit |
| 73 | + } |
| 74 | + $this->ouput( "Done!\n" ); |
| 75 | + } |
| 76 | + |
| 77 | + public function writeUrlsToFile( $path ) { |
| 78 | + $this->output( "Preparing to write URLs to file...\n" ); |
| 79 | + $limit = $this->getOption( 'limit', 1000 ); |
| 80 | + $offset = 0; |
| 81 | + $keepGoing = true; |
| 82 | + $fh = fopen( $path, 'w' ); |
| 83 | + |
| 84 | + while( $keepGoing ) { |
| 85 | + $result = $this->dbr->select( |
| 86 | + 'cl_zip5', |
| 87 | + 'clz5_zip', |
| 88 | + array(), |
| 89 | + __METHOD__, |
| 90 | + array( |
| 91 | + 'LIMIT' => $limit, |
| 92 | + 'OFFSET' => $offset, |
| 93 | + ) |
| 94 | + ); |
| 95 | + |
| 96 | + if ( !$result->numRows() ) { |
| 97 | + $keepGoing = false; |
| 98 | + } |
| 99 | + |
| 100 | + foreach ( $result as $row ) { |
| 101 | + $url = $this->makeUrl( $row->clz5_zip ); |
| 102 | + fwrite( $fh, $url ."\n" ); |
| 103 | + } |
| 104 | + $offset += $limit; |
| 105 | + } |
| 106 | + fclose( $fh ); |
| 107 | + $this->output( "Done!\n" ); |
| 108 | + } |
| 109 | + |
| 110 | + public function hitUrl( $zip, $attempt=0 ) { |
| 111 | + $url = $this->makeUrl( $zip ); |
| 112 | + //$this->output( "*Trying to hit $url\n" ); |
| 113 | + $req = MWHttpRequest::factory( $url, array( |
| 114 | + 'method' => 'GET', |
| 115 | + 'timeout' => 2, |
| 116 | + 'sslVerifyHost' => false, // just check if it can be reached |
| 117 | + 'sslVerifyCert' => false, // just check if it can be reached |
| 118 | + ) ); |
| 119 | + if ( $req->execute()->isOK()) { |
| 120 | + $this->isOK++; |
| 121 | + } else { |
| 122 | + sleep( 2 ); |
| 123 | + $attempt++; |
| 124 | + if ( $attempt < 3 ) { |
| 125 | + $this->hitUrl( $zip, $attempt ); |
| 126 | + } else { |
| 127 | + $this->isBad++; |
| 128 | + } |
| 129 | + } |
| 130 | + } |
| 131 | + |
| 132 | + public function makeUrl( $zip ) { |
| 133 | + $zip = intval( $zip ); |
| 134 | + if ( $zip < 10000 ) { // make sure there are 5 digits |
| 135 | + $zip = sprintf( "%05d", $zip ); |
| 136 | + } |
| 137 | + $url = $this->getOption( 'url' ) . "?zip=" . $zip . "&submit=Look+up"; |
| 138 | + return $url; |
| 139 | + } |
| 140 | +} |
| 141 | + |
| 142 | +$maintClass = "PopulateCache"; |
| 143 | +require_once( DO_MAINTENANCE ); |
\ No newline at end of file |
Property changes on: branches/wmf/1.18wmf1/extensions/CongressLookup/maintenance/populateCache.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 144 | + native |
Index: branches/wmf/1.18wmf1/extensions/CongressLookup/SpecialCongressLookup.php |
— | — | @@ -43,12 +43,11 @@ |
44 | 44 | * @return true |
45 | 45 | */ |
46 | 46 | private function buildPage() { |
| 47 | + global $wgScriptPath; |
47 | 48 | $htmlOut = ''; |
48 | 49 | |
49 | 50 | // Output beginning of the page |
50 | 51 | $htmlOut .= <<<HTML |
51 | | - |
52 | | - |
53 | 52 | <!DOCTYPE html> |
54 | 53 | <html lang="en" dir="ltr" class="client-nojs"> |
55 | 54 | <head> |
— | — | @@ -56,6 +55,54 @@ |
57 | 56 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
58 | 57 | <meta http-equiv="Content-Style-Type" content="text/css" /> |
59 | 58 | <meta name="generator" content="MediaWiki 1.18wmf1" /> |
| 59 | +<script src="//geoiplookup.wikimedia.org/" type="text/javascript"></script> |
| 60 | +HTML; |
| 61 | + $htmlOut .= '<script type="text/javascript" src="' . $wgScriptPath . '/load.php?lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20111213T185322Z"> </script>'; |
| 62 | + $htmlOut .= <<<HTML |
| 63 | +<script type="text/javascript"> |
| 64 | + |
| 65 | +$(document).ready(function() { |
| 66 | + |
| 67 | + var geoHasUsRep = [ |
| 68 | + 'US', // USA |
| 69 | + 'PR', // Puerto Rico |
| 70 | + 'VI', // Virgin Islands |
| 71 | + 'MP', // Northern Mariana Islands |
| 72 | + 'AS', // American Samoa |
| 73 | + 'GU' // Guam |
| 74 | + ]; |
| 75 | + |
| 76 | + // Fake country from get param |
| 77 | + // Parse out GET params from the URL |
| 78 | + var urlParams = {}; |
| 79 | + (function () { |
| 80 | + var e, |
| 81 | + a = /\+/g, |
| 82 | + r = /([^&=]+)=?([^&]*)/g, |
| 83 | + d = function (s) { return decodeURIComponent(s.replace(a, " ")); }, |
| 84 | + q = window.location.search.substring(1); |
| 85 | + |
| 86 | + while (e = r.exec(q)) { |
| 87 | + urlParams[d(e[1])] = d(e[2]); |
| 88 | + } |
| 89 | + })(); |
| 90 | + |
| 91 | + // Defaults to the US, so if we can't determine location, show form |
| 92 | + var country = 'US'; |
| 93 | + if ( urlParams.country ) { |
| 94 | + country = urlParams.country; |
| 95 | + } else if ( window.Geo && window.Geo.country ) { |
| 96 | + country = window.Geo.country; |
| 97 | + } |
| 98 | + |
| 99 | + var hasUsRep = ( $.inArray( country, geoHasUsRep ) === 0 ); |
| 100 | + if( !hasUsRep ) { |
| 101 | + $("#sopaShareOptions").show(); |
| 102 | + $("#sopaZipForm").hide(); |
| 103 | + } |
| 104 | + |
| 105 | +}); |
| 106 | +</script> |
60 | 107 | <style type="text/css"> |
61 | 108 | body { |
62 | 109 | color: #dedede; |
— | — | @@ -88,7 +135,7 @@ |
89 | 136 | div#instructions { |
90 | 137 | position: absolute; |
91 | 138 | top: 67px; |
92 | | - left: 440px; |
| 139 | + left: 480px; |
93 | 140 | text-align: left; |
94 | 141 | width: 500px; |
95 | 142 | padding-bottom: 30px; |
— | — | @@ -99,7 +146,7 @@ |
100 | 147 | div#contacts { |
101 | 148 | position: absolute; |
102 | 149 | top: 50px; |
103 | | - left: 50px; |
| 150 | + left: 80px; |
104 | 151 | width: 320px; |
105 | 152 | background-color: #161616; |
106 | 153 | padding: 5px 20px 20px 20px; |
— | — | @@ -144,6 +191,19 @@ |
145 | 192 | font-size: 1.2em; |
146 | 193 | margin-bottom: 0.2em; |
147 | 194 | } |
| 195 | +.sopaSocial { |
| 196 | + float: left; |
| 197 | + text-align: center; |
| 198 | + margin-right: 12px; |
| 199 | + margin-bttom: 3px; |
| 200 | + font-size: small; |
| 201 | +} |
| 202 | +.sopaActionHead { |
| 203 | + font-weight: bold |
| 204 | +} |
| 205 | +#sopaShareOptions { |
| 206 | + display: none; |
| 207 | +} |
148 | 208 | </style> |
149 | 209 | </head> |
150 | 210 | <body> |
— | — | @@ -161,7 +221,7 @@ |
162 | 222 | </p> |
163 | 223 | |
164 | 224 | <p> |
165 | | - In a post SOPA/PIPA world, Wikipedia --and many other useful informational sites-- cannot survive in a world where politicians regulate the Internet based on the influence of big money in Washington. It represents a framework for future restrictions and suppression. Congress says it's trying to protect the rights of copyright owners, but the "cure" that SOPA and PIPA represent is much more destructive than the disease they are trying to fix. |
| 225 | + In a post SOPA/PIPA world, Wikipedia—and many other useful informational sites—cannot survive in a world where politicians regulate the Internet based on the influence of big money in Washington. It represents a framework for future restrictions and suppression. Congress says it's trying to protect the rights of copyright owners, but the "cure" that SOPA and PIPA represent is much more destructive than the disease they are trying to fix. |
166 | 226 | </p> |
167 | 227 | |
168 | 228 | <p> |
— | — | @@ -179,6 +239,7 @@ |
180 | 240 | $htmlOut .= $this->getCongressTables(); |
181 | 241 | } else { |
182 | 242 | $htmlOut .= $this->getZipForm(); |
| 243 | + $htmlOut .= $this->getSocialMedia(); |
183 | 244 | } |
184 | 245 | |
185 | 246 | // Output end of the page |
— | — | @@ -188,8 +249,17 @@ |
189 | 250 | |
190 | 251 | return true; |
191 | 252 | } |
192 | | - |
| 253 | + |
193 | 254 | /** |
| 255 | + * Given twitter handle, return an HTML link to the account. Make sure to use rawElement to wrap this. |
| 256 | + * @param string twitter handle, assumed to be in ascii, without leading at-sign |
| 257 | + * @return string HTML for the link |
| 258 | + */ |
| 259 | + private function getTwitterHtml( $handle ) { |
| 260 | + return Html::element( 'a', array( 'target' => '_blank', 'href' => 'http://twitter.com/!#/' . $handle ), '@' . $handle ); |
| 261 | + } |
| 262 | + |
| 263 | + /** |
194 | 264 | * Get an HTML table of data for the user's congressional representatives |
195 | 265 | * @return string HTML for the table |
196 | 266 | */ |
— | — | @@ -217,13 +287,9 @@ |
218 | 288 | Html::element( 'td', array(), wfMsg( 'congresslookup-phone', $myRepresentative['phone'] ) ) |
219 | 289 | ); |
220 | 290 | |
221 | | - $congressTable .= "\n" . Html::rawElement( 'tr', array(), |
222 | | - Html::element( 'td', array(), wfMsg( 'congresslookup-fax', $myRepresentative['fax'] ) ) |
223 | | - ); |
224 | | - |
225 | 291 | if ( $myRepresentative['twitter'] ) { |
226 | 292 | $congressTable .= "\n" . Html::rawElement( 'tr', array(), |
227 | | - Html::element( 'td', array(), wfMsg( 'congresslookup-twitter', $myRepresentative['twitter'] ) ) |
| 293 | + Html::rawElement( 'td', array(), wfMsg( 'congresslookup-twitter', self::getTwitterHtml( $myRepresentative['twitter'] ) ) ) |
228 | 294 | ); |
229 | 295 | } |
230 | 296 | |
— | — | @@ -259,13 +325,15 @@ |
260 | 326 | Html::element( 'td', array(), wfMsg( 'congresslookup-phone', $senator['phone'] ) ) |
261 | 327 | ); |
262 | 328 | |
| 329 | + /* |
263 | 330 | $congressTable .= "\n" . Html::rawElement( 'tr', array(), |
264 | 331 | Html::element( 'td', array(), wfMsg( 'congresslookup-fax', $senator['fax'] ) ) |
265 | 332 | ); |
| 333 | + */ |
266 | 334 | |
267 | 335 | if ( $senator['twitter'] ) { |
268 | 336 | $congressTable .= "\n" . Html::rawElement( 'tr', array(), |
269 | | - Html::element( 'td', array(), wfMsg( 'congresslookup-twitter', $senator['twitter'] ) ) |
| 337 | + Html::rawElement( 'td', array(), wfMsg( 'congresslookup-twitter', self::getTwitterHtml( $senator['twitter'] ) ) ) |
270 | 338 | ); |
271 | 339 | } |
272 | 340 | |
— | — | @@ -300,8 +368,8 @@ |
301 | 369 | */ |
302 | 370 | private function getZipForm( $isError=false ) { |
303 | 371 | $htmlOut = <<<HTML |
| 372 | +<div id="sopaZipForm" class="sopaActionDiv"> |
304 | 373 | <h4>Contact your representatives</h4> |
305 | | -<div class="sopaActionDiv"> |
306 | 374 | HTML; |
307 | 375 | if ( $isError ) { |
308 | 376 | $htmlOut .= Html::element( 'p', array( 'class' => 'error' ), wfMsg( 'congresslookup-zipcode-error' )); |
— | — | @@ -322,32 +390,56 @@ |
323 | 391 | * @return string HTML for social media links |
324 | 392 | */ |
325 | 393 | private function getSocialMedia() { |
| 394 | + // Update links here. Currently pointing to example.com |
326 | 395 | $htmlOut = <<<HTML |
327 | | -<div class="sopaActionDiv"> |
328 | | - <div> |
329 | | - <div class="sopaSocial"> |
330 | | - <a style="text-decoration: none;" href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fexample.com%2F"> |
331 | | - <img width="33" height="33" src="//upload.wikimedia.org/wikipedia/commons/2/2a/WP_SOPA_sm_icon_facebook_dedede.png"> |
332 | | - </a> |
333 | | - <br/> |
334 | | - <a style="text-decoration: none;" href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fexample.com%2F">Facebook</a> |
335 | | - </div> |
336 | | - <div class="sopaSocial"> |
337 | | - <a style="text-decoration: none;" href="https://m.google.com/app/plus/x/?v=compose&content=Google%20Plus%20Post%20Here%20http%3A%2F%2Fexample.com%2F"> |
338 | | - <img width="33" height="33" src="//upload.wikimedia.org/wikipedia/commons/0/08/WP_SOPA_sm_icon_gplus_dedede.png"> |
339 | | - </a> |
340 | | - <br/> |
341 | | - <a style="text-decoration: none; color:" href="https://m.google.com/app/plus/x/?v=compose&content=Google%20Plus%20Post%20Here%20http%3A%2F%2Fexample.com%2F">Google+</a> |
342 | | - </div> |
343 | | - <div class="sopaSocial"> |
344 | | - <a style="text-decoration: none;" href="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Ftest.wikipedia.org%2Fwiki%2FMain_Page%3Fbanner%3Dblackout&text=Tweet%20here%20%23WikipediaBlackout%20http%3A%2F%2Fexample.com%2F"> |
345 | | - <img width="33" height="33" src="//upload.wikimedia.org/wikipedia/commons/4/45/WP_SOPA_sm_icon_twitter_dedede.png"> |
346 | | - </a> |
347 | | - <br/> |
348 | | - <a style="text-decoration: none;" href="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Ftest.wikipedia.org%2Fwiki%2FMain_Page%3Fbanner%3Dblackout&text=Tweet%20here%20%23WikipediaBlackout%20http%3A%2F%2Fexample.com%2F">Twitter</a> |
349 | | - </div> |
350 | | - </div> |
351 | | - <div style="clear: both;"></div> |
| 396 | +<div id="sopaShareOptions" class="sopaActionDiv"> |
| 397 | +<p class="sopaActionHead">Make your voice heard</p> |
| 398 | + <div> |
| 399 | + <div class="sopaSocial"> |
| 400 | + <a style="text-decoration: none;" |
| 401 | + href="https://www.facebook.com/sharer.php?u=http://tinyurl.com/7vq4o8g" |
| 402 | + target="wpblackout_Facebook_share"><img width="33" |
| 403 | + height="33" |
| 404 | + src= |
| 405 | + "//upload.wikimedia.org/wikipedia/commons/2/2a/WP_SOPA_sm_icon_facebook_dedede.png"></a><br> |
| 406 | + |
| 407 | + <a style="text-decoration: none; color: rgb(222, 222, 222);" |
| 408 | + href="https://www.facebook.com/sharer.php?u=http://tinyurl.com/7vq4o8g" |
| 409 | + target="wpblackout_Facebook_share">Facebook</a> |
| 410 | + </div> |
| 411 | + |
| 412 | + <div class="sopaSocial"> |
| 413 | + <a style="text-decoration: none;" |
| 414 | + href= |
| 415 | + "https://m.google.com/app/plus/x/?v=compose&content=I%20support%20the%20January%2018th%20Wikipedia%20blackout%20to%20protest%20SOPA%20and%20PIPA.%20Show%20your%20support%20here%20%20http%3A%2F%2Ftinyurl.com%2F7vq4o8g"> |
| 416 | + <img width="33" |
| 417 | + height="33" |
| 418 | + src= |
| 419 | + "//upload.wikimedia.org/wikipedia/commons/0/08/WP_SOPA_sm_icon_gplus_dedede.png"></a><br> |
| 420 | + |
| 421 | + <a style="text-decoration: none;" |
| 422 | + href= |
| 423 | + "https://m.google.com/app/plus/x/?v=compose&content=I%20support%20the%20January%2018th%20Wikipedia%20blackout%20to%20protest%20SOPA%20and%20PIPA.%20Show%20your%20support%20here%20%20http%3A%2F%2Ftinyurl.com%2F7vq4o8g"> |
| 424 | + Google+</a> |
| 425 | + </div> |
| 426 | + |
| 427 | + <div class="sopaSocial"> |
| 428 | + <a style="text-decoration: none;" |
| 429 | + href= |
| 430 | + "https://twitter.com/intent/tweet?text=I%20support%20%23wikipediablackout!%20Show%20your%20support%20here%20http%3A%2F%2Ftinyurl.com%2F7vq4o8g" |
| 431 | + target="wpblackout_Twitter_share"><img width="33" |
| 432 | + height="33" |
| 433 | + src= |
| 434 | + "//upload.wikimedia.org/wikipedia/commons/4/45/WP_SOPA_sm_icon_twitter_dedede.png"></a><br> |
| 435 | + |
| 436 | + <a style="text-decoration: none; color: rgb(222, 222, 222);" |
| 437 | + href= |
| 438 | + "https://twitter.com/intent/tweet?text=I%20support%20%23wikipediablackout!%20Show%20your%20support%20here%20http%3A%2F%2Ftinyurl.com%2F7vq4o8g" |
| 439 | + target="wpblackout_Twitter_share">Twitter</a> |
| 440 | + </div> |
| 441 | + </div> |
| 442 | + |
| 443 | + <div style="clear: both;"></div> |
352 | 444 | </div> |
353 | 445 | HTML; |
354 | 446 | return $htmlOut; |
Index: branches/wmf/1.18wmf1/extensions/CongressLookup/scripts/zip_file_parser.php |
— | — | @@ -20,15 +20,60 @@ |
21 | 21 | $skip_up_to = $_SERVER['argv'][1]; |
22 | 22 | } |
23 | 23 | $function = 'fillOutNulls'; |
24 | | - if ( !empty( $_SERVER['argv'][1] ) && $_SERVER['argv'][1] === 'findSplits' ){ |
25 | | - $function = 'findSplits'; |
| 24 | + if ( !empty( $_SERVER['argv'][1] ) && !is_numeric( $_SERVER['argv'][1] ) ){ |
| 25 | + $function = $_SERVER['argv'][1]; |
26 | 26 | } |
27 | 27 | |
28 | 28 | switch ( $function ){ |
| 29 | + case 'associate': |
| 30 | + //it should go zip, state, district for the next three params. |
| 31 | + |
| 32 | + if ( !empty( $_SERVER['argv'][2] ) ){ |
| 33 | + $zip = $_SERVER['argv'][2]; |
| 34 | + } else { |
| 35 | + die( "Missing parameter 2: 5-digit zip code." ); |
| 36 | + } |
| 37 | + if ( !empty( $_SERVER['argv'][3] ) ){ |
| 38 | + $state = $_SERVER['argv'][3]; |
| 39 | + } else { |
| 40 | + die( "Missing parameter 3: state code." ); |
| 41 | + } |
| 42 | + if ( !empty( $_SERVER['argv'][4] ) ){ |
| 43 | + $district = $_SERVER['argv'][4]; |
| 44 | + } else { |
| 45 | + die( "Missing parameter 4: district code." ); |
| 46 | + } |
| 47 | + |
| 48 | + $this->associate_zip5_reps( $zip, $state, $district ); |
| 49 | + |
| 50 | + break; |
| 51 | + case 'disassociate': |
| 52 | + //it should go zip, state, district for the next three params. |
| 53 | + |
| 54 | + if ( !empty( $_SERVER['argv'][2] ) ){ |
| 55 | + $zip = $_SERVER['argv'][2]; |
| 56 | + } else { |
| 57 | + die( "Missing parameter 2: 5-digit zip code." ); |
| 58 | + } |
| 59 | + if ( !empty( $_SERVER['argv'][3] ) ){ |
| 60 | + $state = $_SERVER['argv'][3]; |
| 61 | + } else { |
| 62 | + die( "Missing parameter 3: state code." ); |
| 63 | + } |
| 64 | + if ( !empty( $_SERVER['argv'][4] ) ){ |
| 65 | + $district = $_SERVER['argv'][4]; |
| 66 | + } else { |
| 67 | + die( "Missing parameter 4: district code." ); |
| 68 | + } |
| 69 | + |
| 70 | + $this->disassociate_zip5_reps( $zip, $state, $district ); |
| 71 | + |
| 72 | + break; |
29 | 73 | case 'fillOutNulls': |
30 | 74 | $this->fill_out_nulls( $skip_up_to ); |
31 | 75 | break; |
32 | 76 | case 'findSplits': |
| 77 | + default: |
33 | 78 | $this->find_split_zipcodes( $skip_up_to ); |
34 | 79 | break; |
35 | 80 | } |
— | — | @@ -121,7 +166,7 @@ |
122 | 167 | if ( is_array($reps) && count( $reps ) > 0 ){ |
123 | 168 | foreach ( $reps as $rep_id ){ |
124 | 169 | echo "$zip Rep ID: $rep_id\n"; |
125 | | - $this->insert_rep( $zip, $rep_id ); |
| 170 | + $this->update_rep( $zip, $rep_id ); |
126 | 171 | } |
127 | 172 | } else { |
128 | 173 | echo "We got no reps in a really odd way.\n"; |
— | — | @@ -188,7 +233,44 @@ |
189 | 234 | |
190 | 235 | } |
191 | 236 | |
192 | | - function insert_rep( $zip, $rep_id ){ |
| 237 | + function associate_zip5_reps( $zip, $state, $district ){ |
| 238 | + //first, retrieve the state and district rep. |
| 239 | + $reps = $this->get_rep_ids( $state, $district ); |
| 240 | + if ( count( $reps ) !== 1 ){ |
| 241 | + if ( empty($reps) ){ |
| 242 | + die("No rep found in $state $district"); |
| 243 | + } else { |
| 244 | + die("Something very funky happened just then..."); |
| 245 | + } |
| 246 | + } |
| 247 | + |
| 248 | + $rep = $reps[0]; |
| 249 | + $this->insert_rep( $zip, $reps[0] ); |
| 250 | + |
| 251 | + //if it's not already in there, it should put it in there. |
| 252 | + //if it is already in there, do nothing. |
| 253 | + } |
| 254 | + |
| 255 | + function disassociate_zip5_reps( $zip, $state, $district ){ |
| 256 | + //first, retrieve the state and district rep. |
| 257 | + $reps = $this->get_rep_ids( $state, $district ); |
| 258 | + if ( count( $reps ) !== 1 ){ |
| 259 | + if ( empty($reps) ){ |
| 260 | + die("No rep found in $state $district"); |
| 261 | + } else { |
| 262 | + die("Something very funky happened just then..."); |
| 263 | + } |
| 264 | + } |
| 265 | + |
| 266 | + $rep = $reps[0]; |
| 267 | + $this->remove_rep( $zip, $reps[0] ); |
| 268 | + |
| 269 | + //if it's not already in there, it should put it in there. |
| 270 | + //if it is already in there, do nothing. |
| 271 | + } |
| 272 | + |
| 273 | + |
| 274 | + function update_rep( $zip, $rep_id ){ |
193 | 275 | $dbr = wfGetDB( DB_SLAVE ); |
194 | 276 | $dbr->update( 'cl_zip5', |
195 | 277 | array( |
— | — | @@ -201,6 +283,46 @@ |
202 | 284 | echo "Updated $zip to include rep id $rep_id\n"; |
203 | 285 | } |
204 | 286 | |
| 287 | + |
| 288 | + function remove_rep( $zip, $rep_id ){ |
| 289 | + $dbr = wfGetDB( DB_SLAVE ); |
| 290 | + |
| 291 | + $dbr->delete( 'cl_zip5', |
| 292 | + array( |
| 293 | + 'clz5_rep_id' => $rep_id, |
| 294 | + 'clz5_zip' => $zip, |
| 295 | + ) |
| 296 | + ); |
| 297 | + echo "Removed $rep_id from $zip\n"; |
| 298 | + } |
| 299 | + |
| 300 | + function insert_rep( $zip, $rep_id ){ |
| 301 | + $dbr = wfGetDB( DB_SLAVE ); |
| 302 | + |
| 303 | + $rowCheck = $dbr->selectRow( 'cl_zip5', |
| 304 | + array( |
| 305 | + 'clz5_rep_id', |
| 306 | + 'clz5_zip', |
| 307 | + ), |
| 308 | + array( |
| 309 | + 'clz5_rep_id' => $rep_id, |
| 310 | + 'clz5_zip' => $zip, |
| 311 | + ) |
| 312 | + ); |
| 313 | + |
| 314 | + if ( $rowCheck ){ |
| 315 | + echo "Rep id $rep_id already found in $zip."; |
| 316 | + } else { |
| 317 | + $dbr->insert( 'cl_zip5', |
| 318 | + array( |
| 319 | + 'clz5_rep_id' => $rep_id, |
| 320 | + 'clz5_zip' => $zip, |
| 321 | + ) |
| 322 | + ); |
| 323 | + echo "Updated $zip to include rep id $rep_id\n"; |
| 324 | + } |
| 325 | + } |
| 326 | + |
205 | 327 | function insert_reps_by_district( $zip, $districts ){ |
206 | 328 | $dbr = wfGetDB( DB_SLAVE ); |
207 | 329 | echo "Zip: $zip\n"; |
Index: branches/wmf/1.18wmf1/extensions/CongressLookup/data/cl_house.sql |
— | — | @@ -1,10 +1,10 @@ |
2 | 2 | REPLACE INTO /*$wgDBprefix*/cl_house (`clh_id`, `clh_bioguideid`, `clh_gender`, `clh_name`, `clh_title`, `clh_state`, `clh_district`, `clh_phone`, `clh_fax`, `clh_contactform`, `clh_twitter`) VALUES |
3 | 3 | (400003, 'A000022', 'M', 'Rep. Gary Ackerman [D, NY-5]', 'Rep.', 'NY', '5', '202-225-2601', '202-225-1589', 'https://ackerman-forms.house.gov/index.cfm?sectionid=128', NULL), |
4 | 4 | (400004, 'A000055', 'M', 'Rep. Robert Aderholt [R, AL-4]', 'Rep.', 'AL', '4', '202-225-4876', '202-225-5587', 'http://aderholt.house.gov/index.cfm?sectionid=195§iontree=195', 'Robert_Aderholt'), |
5 | | -(400005, 'A000358', 'M', 'Rep. Todd Akin [R, MO-2]', 'Rep.', 'MO', '2', '202-225-2561', '202-225-2563', 'https://forms.house.gov/akin/webforms/issue_subscribe.htm', 'ToddAkin'), |
| 5 | +(400005, 'A000358', 'M', 'Rep. Todd Akin [R, MO-2]', 'Rep.', 'MO', '2', '202-225-2561', '202-225-2563', 'https://forms.house.gov/akin/webforms/issue_subscribe.htm', 'RepToddAkin'), |
6 | 6 | (400006, 'A000361', 'M', 'Rep. Rodney Alexander [R, LA-5]', 'Rep.', 'LA', '5', '202-225-8490', '202-225-5639', 'https://alexanderforms.house.gov/contact-form-cc8', 'USRepAlexander'), |
7 | 7 | (400008, 'A000210', 'M', 'Rep. Robert Andrews [D, NJ-1]', 'Rep.', 'NJ', '1', '202-225-6501', '', 'http://www.house.gov/andrews/contact_form_za.shtml', NULL), |
8 | | -(400009, 'B001234', 'M', 'Rep. Joe Baca [D, CA-43]', 'Rep.', 'CA', '43', '202-225-6161', '202-225-8671', 'https://bacaforms.house.gov/contact-form', 'BacaCA43'), |
| 8 | +(400009, 'B001234', 'M', 'Rep. Joe Baca [D, CA-43]', 'Rep.', 'CA', '43', '202-225-6161', '202-225-8671', 'https://bacaforms.house.gov/contact-form', 'RepJoeBaca'), |
9 | 9 | (400010, 'B000013', 'M', 'Rep. Spencer Bachus [R, AL-6]', 'Rep.', 'AL', '6', '202-225-4921', '202-225-2082', 'https://writerep.house.gov/writerep/welcome.shtml', 'BachusAL06'), |
10 | 10 | (400013, 'B001230', 'F', 'Rep. Tammy Baldwin [D, WI-2]', 'Rep.', 'WI', '2', '202-225-2906', '202-225-6942', 'https://tammybaldwin.house.gov/contact/email-me.shtml', 'RepTammyBaldwin'), |
11 | 11 | (400017, 'B000208', 'M', 'Rep. Roscoe Bartlett [R, MD-6]', 'Rep.', 'MD', '6', '202-225-2721', '202-225-2193', 'https://bartlettforms.house.gov/Email_Roscoe/default.aspx', NULL), |
— | — | @@ -18,10 +18,10 @@ |
19 | 19 | (400030, 'B000490', 'M', 'Rep. Sanford Bishop [D, GA-2]', 'Rep.', 'GA', '2', '202-225-3631', '202-225-2203', 'https://forms.house.gov/bishop/webforms/issue_subscribe.html', 'SanfordBishop'), |
20 | 20 | (400031, 'B001242', 'M', 'Rep. Timothy Bishop [D, NY-1]', 'Rep.', 'NY', '1', '202-225-3826', '202-225-3143', 'http://timbishop.house.gov/index.cfm?sectionid=96§iontree=796', NULL), |
21 | 21 | (400032, 'B001243', 'F', 'Rep. Marsha Blackburn [R, TN-7]', 'Rep.', 'TN', '7', '202-225-2811', '202-225-3004', 'https://blackburnforms.house.gov/contactform/default.aspx', NULL), |
22 | | -(400033, 'B000574', 'M', 'Rep. Earl Blumenauer [D, OR-3]', 'Rep.', 'OR', '3', '202-225-4811', '202-225-8941', 'https://forms.house.gov/blumenauer/webforms/issue_subscribe.html', 'repblumenauer'), |
23 | | -(400036, 'B000589', 'M', 'Rep. John Boehner [R, OH-8]', 'Rep.', 'OH', '8', '202-225-6205', '202-225-0704', 'http://johnboehner.house.gov/Contact/', 'johnboehner'), |
| 22 | +(400033, 'B000574', 'M', 'Rep. Earl Blumenauer [D, OR-3]', 'Rep.', 'OR', '3', '202-225-4811', '202-225-8941', 'https://forms.house.gov/blumenauer/webforms/issue_subscribe.html', 'blumenauermedia'), |
| 23 | +(400036, 'B000589', 'M', 'Rep. John Boehner [R, OH-8]', 'Rep.', 'OH', '8', '202-225-6205', '202-225-0704', 'http://johnboehner.house.gov/Contact/', 'SpeakerBoehner'), |
24 | 24 | (400038, 'B001244', 'M', 'Rep. Jo Bonner [R, AL-1]', 'Rep.', 'AL', '1', '202-225-4931', '202-225-0562', 'https://forms.house.gov/bonner/webforms/issue_subscribe.html', 'RepJoBonner'), |
25 | | -(400039, 'B001228', 'F', 'Rep. Mary Bono Mack [R, CA-45]', 'Rep.', 'CA', '45', '202-225-5330', '202-225-2961', 'https://bonoforms.house.gov/Contact_Mary/ContactForm.htm', 'MaryBonoMack'), |
| 25 | +(400039, 'B001228', 'F', 'Rep. Mary Bono Mack [R, CA-45]', 'Rep.', 'CA', '45', '202-225-5330', '202-225-2961', 'https://bonoforms.house.gov/Contact_Mary/ContactForm.htm', 'Rep_BonoMack'), |
26 | 26 | (400041, 'B001245', 'F', 'Del. Madeleine Bordallo [D, GU-0]', 'Del.', 'GU', '0', '202-225-1188', '', 'http://www.house.gov/bordallo/contact.shtml', NULL), |
27 | 27 | (400042, 'B000652', 'M', 'Rep. Leonard Boswell [D, IA-3]', 'Rep.', 'IA', '3', '202-225-3806', '202-225-5608', 'http://boswell.house.gov/index.cfm?sectionid=81§iontree=481', 'LeonardBoswell'), |
28 | 28 | (400046, 'B000755', 'M', 'Rep. Kevin Brady [R, TX-8]', 'Rep.', 'TX', '8', '202-225-4901', '202-225-5524', 'http://www.house.gov/brady/contact_page.html', 'RepKevinBrady'), |
— | — | @@ -31,28 +31,28 @@ |
32 | 32 | (400055, 'B001149', 'M', 'Rep. Dan Burton [R, IN-5]', 'Rep.', 'IN', '5', '202-225-2276', '202-225-0016', 'http://burton.house.gov/contacts/new', 'RepDanBurton'), |
33 | 33 | (400057, 'C000059', 'M', 'Rep. Ken Calvert [R, CA-44]', 'Rep.', 'CA', '44', '202-225-1986', '202-225-2004', 'http://calvert.house.gov/Contact/', 'KenCalvert'), |
34 | 34 | (400058, 'C000071', 'M', 'Rep. David Camp [R, MI-4]', 'Rep.', 'MI', '4', '202-225-3561', '202-225-9679', 'http://camp.house.gov/Contact/', 'RepDaveCamp'), |
35 | | -(400060, 'C001046', 'M', 'Rep. Eric Cantor [R, VA-7]', 'Rep.', 'VA', '7', '202-225-2815', '202-225-0011', 'http://cantor.house.gov/contact/', 'EricCantor'), |
| 35 | +(400060, 'C001046', 'M', 'Rep. Eric Cantor [R, VA-7]', 'Rep.', 'VA', '7', '202-225-2815', '202-225-0011', 'http://cantor.house.gov/contact/', 'GOPLeader'), |
36 | 36 | (400061, 'C001047', 'F', 'Rep. Shelley Capito [R, WV-2]', 'Rep.', 'WV', '2', '202-225-2711', '202-225-7856', 'https://capitoforms.house.gov/index.cfm?sectionid=58§iontree=358', 'RepShelley'), |
37 | | -(400062, 'C001036', 'F', 'Rep. Lois Capps [D, CA-23]', 'Rep.', 'CA', '23', '202-225-3601', '202-225-5632', 'https://capps.house.gov/contact-me/email-me', NULL), |
| 37 | +(400062, 'C001036', 'F', 'Rep. Lois Capps [D, CA-23]', 'Rep.', 'CA', '23', '202-225-3601', '202-225-5632', 'https://capps.house.gov/contact-me/email-me', 'RepLoisCapps'), |
38 | 38 | (400063, 'C001037', 'M', 'Rep. Michael Capuano [D, MA-8]', 'Rep.', 'MA', '8', '202-225-5111', '202-225-9322', 'http://www.house.gov/capuano/contact/email.shtml', NULL), |
39 | 39 | (400065, 'C001050', 'M', 'Rep. Dennis Cardoza [D, CA-18]', 'Rep.', 'CA', '18', '202-225-6131', '202-225-0819', 'https://writerep.house.gov/writerep/welcome.shtml', 'RepCardoza'), |
40 | 40 | (400068, 'C001051', 'M', 'Rep. John Carter [R, TX-31]', 'Rep.', 'TX', '31', '202-225-3864', '202-225-5886', 'https://carterforms.house.gov/index.cfm?sectionid=139§iontree=139', 'judgecarter'), |
41 | 41 | (400071, 'C000266', 'M', 'Rep. Steven Chabot [R, OH-1]', 'Rep.', 'OH', '1', '202-225-2216', '202-225-3012', 'https://chabotforms.house.gov/index.cfm?sectionid=58§iontree=358', 'RepSteveChabot'), |
42 | | -(400073, 'C000380', 'F', 'Del. Donna Christensen [D, VI-0]', 'Del.', 'VI', '0', '202-225-1790', '', 'https://donnachristensen.house.gov/contact-me/email-me', NULL), |
| 42 | +(400073, 'C000380', 'F', 'Del. Donna Christensen [D, VI-0]', 'Del.', 'VI', '0', '202-225-1790', '', 'https://donnachristensen.house.gov/contact-me/email-me', 'DelegateDonna'), |
43 | 43 | (400074, 'C001049', 'M', 'Rep. William Clay [D, MO-1]', 'Rep.', 'MO', '1', '202-225-2406', '202-226-3717', 'http://lacyclay.house.gov/index.cfm?sectionid=90§iontree=390', NULL), |
44 | | -(400075, 'C000537', 'M', 'Rep. James Clyburn [D, SC-6]', 'Rep.', 'SC', '6', '202-225-3315', '202-225-2313', 'https://forms.house.gov/clyburn/zipauth.shtml', NULL), |
| 44 | +(400075, 'C000537', 'M', 'Rep. James Clyburn [D, SC-6]', 'Rep.', 'SC', '6', '202-225-3315', '202-225-2313', 'https://clyburn.house.gov/contact-me/email-me', 'clyburn'), |
45 | 45 | (400076, 'C000556', 'M', 'Rep. Howard Coble [R, NC-6]', 'Rep.', 'NC', '6', '202-225-3065', '202-225-8611', 'http://coble.house.gov/Contact/ZipCheck.htm', NULL), |
46 | 46 | (400077, 'C001053', 'M', 'Rep. Tom Cole [R, OK-4]', 'Rep.', 'OK', '4', '202-225-6165', '202-225-3512', 'https://coleforms.house.gov/Contact/', NULL), |
47 | 47 | (400080, 'C000714', 'M', 'Rep. John Conyers [D, MI-14]', 'Rep.', 'MI', '14', '202-225-5126', '202-225-0072', 'http://conyers.house.gov/index.cfm?FuseAction=Contact.OnlineContactForm', 'repjohnconyers'), |
48 | 48 | (400081, 'C000754', 'M', 'Rep. Jim Cooper [D, TN-5]', 'Rep.', 'TN', '5', '202-225-4311', '202-226-1035', 'https://forms.house.gov/cooper/webforms/issue_subscribe.html', 'repjimcooper'), |
49 | 49 | (400082, 'C000794', 'M', 'Rep. Jerry Costello [D, IL-12]', 'Rep.', 'IL', '12', '202-225-5661', '202-225-0285', 'http://costello.house.gov/IMA/issue_subscribe.shtml', 'JerryCostello'), |
50 | 50 | (400086, 'C001045', 'M', 'Rep. Ander Crenshaw [R, FL-4]', 'Rep.', 'FL', '4', '202-225-2501', '202-225-2504', 'https://writerep.house.gov/writerep/welcome.shtml', 'AnderCrenshaw'), |
51 | | -(400087, 'C001038', 'M', 'Rep. Joseph Crowley [D, NY-7]', 'Rep.', 'NY', '7', '202-225-3965', '202-225-1909', 'https://crowley.house.gov/contact-me/email-me', NULL), |
| 51 | +(400087, 'C001038', 'M', 'Rep. Joseph Crowley [D, NY-7]', 'Rep.', 'NY', '7', '202-225-3965', '202-225-1909', 'https://crowley.house.gov/contact-me/email-me', 'repjoecrowley'), |
52 | 52 | (400089, 'C001048', 'M', 'Rep. John Culberson [R, TX-7]', 'Rep.', 'TX', '7', '202-225-2571', '202-225-4381', 'http://culbersonforms.house.gov/Contact/ZipAuth.htm', 'johnculberson'), |
53 | | -(400090, 'C000984', 'M', 'Rep. Elijah Cummings [D, MD-7]', 'Rep.', 'MD', '7', '202-225-4741', '202-225-3178', 'https://cummingsforms.house.gov/contact/message-form.shtml', NULL), |
| 53 | +(400090, 'C000984', 'M', 'Rep. Elijah Cummings [D, MD-7]', 'Rep.', 'MD', '7', '202-225-4741', '202-225-3178', 'http://cummings.house.gov/contact/', NULL), |
54 | 54 | (400093, 'D000096', 'M', 'Rep. Danny Davis [D, IL-7]', 'Rep.', 'IL', '7', '202-225-5006', '202-225-5641', 'https://forms.house.gov/davis/webforms/issue_subscribe.htm', NULL), |
55 | 55 | (400097, 'D000598', 'F', 'Rep. Susan Davis [D, CA-53]', 'Rep.', 'CA', '53', '202-225-2040', '202-225-2948', 'https://susandavisforms.house.gov/forms/writeyourrep/', NULL), |
56 | | -(400100, 'D000191', 'M', 'Rep. Peter DeFazio [D, OR-4]', 'Rep.', 'OR', '4', '202-225-6416', '202-225-0032', 'https://forms.house.gov/defazio/IMA/contact.html', NULL), |
| 56 | +(400100, 'D000191', 'M', 'Rep. Peter DeFazio [D, OR-4]', 'Rep.', 'OR', '4', '202-225-6416', '202-225-0032', 'https://forms.house.gov/defazio/IMA/contact.html', 'RepPeterDeFazio'), |
57 | 57 | (400101, 'D000197', 'F', 'Rep. Diana DeGette [D, CO-1]', 'Rep.', 'CO', '1', '202-225-4431', '202-225-5657', 'http://degette.house.gov/index.php?option=com_content&view=article&id=1045&Itemid=202', 'RepDianaDeGette'), |
58 | 58 | (400103, 'D000216', 'F', 'Rep. Rosa DeLauro [D, CT-3]', 'Rep.', 'CT', '3', '202-225-3661', '202-225-4890', 'http://delauro.house.gov/contact_form_email.cfm', 'rosadelauro'), |
59 | 59 | (400108, 'D000600', 'M', 'Rep. Mario Diaz-Balart [R, FL-21]', 'Rep.', 'FL', '21', '202-225-4211', '202-225-8576', 'https://writerep.house.gov/writerep/welcome.shtml', 'MarioDB'), |
— | — | @@ -65,7 +65,7 @@ |
66 | 66 | (400121, 'E000172', 'F', 'Rep. Jo Ann Emerson [R, MO-8]', 'Rep.', 'MO', '8', '202-225-4404', '202-226-0326', 'https://forms.house.gov/emerson/webforms/contact.html', 'joannemerson'), |
67 | 67 | (400122, 'E000179', 'M', 'Rep. Eliot Engel [D, NY-17]', 'Rep.', 'NY', '17', '202-225-2464', '202-225-5513', 'http://engel.house.gov/index.cfm?sectionid=169§iontree=3169', NULL), |
68 | 68 | (400124, 'E000215', 'F', 'Rep. Anna Eshoo [D, CA-14]', 'Rep.', 'CA', '14', '202-225-8104', '202-225-8890', 'https://forms.house.gov/eshoo/webforms/issue_subscribe.htm', 'RepAnnaEshoo'), |
69 | | -(400128, 'F000010', 'M', 'Del. Eni Faleomavaega [D, AS-0]', 'Del.', 'AS', '0', '202-225-8577', '', 'faleomavaega@mail.house.gov', NULL), |
| 69 | +(400128, 'F000010', 'M', 'Del. Eni Faleomavaega [D, AS-0]', 'Del.', 'AS', '0', '202-225-8577', '', 'mailto:faleomavaega@mail.house.gov', NULL), |
70 | 70 | (400129, 'F000030', 'M', 'Rep. Sam Farr [D, CA-17]', 'Rep.', 'CA', '17', '202-225-2861', '202-225-6791', 'https://forms.house.gov/farr/webforms/issue_subscribe.html', NULL), |
71 | 71 | (400130, 'F000043', 'M', 'Rep. Chaka Fattah [D, PA-2]', 'Rep.', 'PA', '2', '202-225-4001', '202-225-5392', 'https://fattahforms.house.gov/index.cfm?sectionid=244§iontree=244', 'chakafattah'), |
72 | 72 | (400133, 'F000116', 'M', 'Rep. Bob Filner [D, CA-51]', 'Rep.', 'CA', '51', '202-225-8045', '202-225-9073', 'https://filner.house.gov/contact-me/email-me', 'CongBobFilner'), |
— | — | @@ -108,7 +108,7 @@ |
109 | 109 | (400211, 'K000009', 'F', 'Rep. Marcy Kaptur [D, OH-9]', 'Rep.', 'OH', '9', '202-225-4146', '202-225-7711', 'https://forms.house.gov/kaptur/webforms/issue_subscribe.htm', NULL), |
110 | 110 | (400216, 'K000172', 'M', 'Rep. Dale Kildee [D, MI-5]', 'Rep.', 'MI', '5', '202-225-3611', '202-225-6393', 'https://kildeeforms.house.gov/contact/contact-form.shtml', NULL), |
111 | 111 | (400218, 'K000188', 'M', 'Rep. Ronald Kind [D, WI-3]', 'Rep.', 'WI', '3', '202-225-5506', '202-225-5739', 'https://kindforms.house.gov/index.cfm?sectionid=146§iontree=18146', NULL), |
112 | | -(400219, 'K000210', 'M', 'Rep. Peter King [R, NY-3]', 'Rep.', 'NY', '3', '202-225-7896', '202-226-2279', 'Pete.King@mail.house.gov', 'RepPeteKing'), |
| 112 | +(400219, 'K000210', 'M', 'Rep. Peter King [R, NY-3]', 'Rep.', 'NY', '3', '202-225-7896', '202-226-2279', 'mailto:Pete.King@mail.house.gov', 'RepPeteKing'), |
113 | 113 | (400220, 'K000362', 'M', 'Rep. Steve King [R, IA-5]', 'Rep.', 'IA', '5', '202-225-4426', '202-225-3193', 'https://forms.house.gov/king/webforms/issue_subscribe.html', 'SteveKingPress'), |
114 | 114 | (400221, 'K000220', 'M', 'Rep. Jack Kingston [R, GA-1]', 'Rep.', 'GA', '1', '202-225-5831', '202-226-2269', 'https://kingstonforms.house.gov/ContactForm/default.aspx', 'JackKingston'), |
115 | 115 | (400224, 'K000363', 'M', 'Rep. John Kline [R, MN-2]', 'Rep.', 'MN', '2', '202-225-2271', '202-225-2595', 'http://kline.house.gov/index.cfm?sectionid=7§iontree=47', NULL), |
Property changes on: branches/wmf/1.18wmf1/extensions/CongressLookup |
___________________________________________________________________ |
Added: svn:mergeinfo |
116 | 116 | Merged /branches/sqlite/extensions/CongressLookup:r58211-58321 |
117 | 117 | Merged /trunk/phase3/extensions/CongressLookup:r92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93520,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94277,94346,94372,94422,94425,94444,94448,94456,94498,94517,94601,94630,94728,94738,94825,94862,94995-94997,95023,95042,95072-95073,95155,95327,95332,95410,95422,95426,95442,95468,95601,95812,98578,98598,98656 |
118 | 118 | Merged /branches/new-installer/phase3/extensions/CongressLookup:r43664-66004 |
119 | 119 | Merged /branches/REL1_15/phase3/extensions/CongressLookup:r51646 |
120 | 120 | Merged /branches/REL1_18/extensions/CongressLookup:r101758,103190 |
121 | 121 | Merged /branches/REL1_17/phase3/extensions/CongressLookup:r81445,81448 |
122 | 122 | Merged /trunk/extensions/CongressLookup:r95614,99592,99653,100092,100419,100516,100686,100692,100699,103260,103315,103378,103382,103669,104337,104736,104862-104863,104865,104971,105275,105902,105908,107043,107050,107337,107783,107816,107818,108701,108789,109299-109315 |