Project of the week: "What's in a name?" The big name fixup .
See the long names here (out of those orginally listed on the wiki) Fix them, then click the yellow 'rescan' button on the left.

sort by length, original sort order

query($query); if ($result === false) { die("Error during basic query:". $err); } else { print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "\n"; while ($result->valid()) { // fetch current row $row = $result->current(); $id = $row[0]; $type = $row[1]; $orig_name = $row[2]; $cur_name = $row[3]; $user = $row[4]; $timestamp = $row[5]; $namelen = $row[6]; $note = ""; $rescan=false; if ($id==$rescanid) $rescan=true; if ($rescanlongerthan>0 && strlen($cur_name)>$rescanlongerthan) $rescan=true; if ($cur_name=="" || $rescan ) { $url = "http://www.openstreetmap.org/api/0.6/way/" . $id; $xml = @file_get_contents($url); if (preg_match('#^HTTP/... 4..#', $http_response_header[0])) { $cur_name = $http_response_header[0]; @$db->queryExec("UPDATE objects SET cur_name='" . sqlite_escape_string($cur_name) . "' WHERE id=".$id ); } else { $doc = new DOMDocument(); $doc->loadXML( $xml); $wayElems = $doc->getElementsByTagName("way"); $wayElem = $wayElems->item(0); $user = $wayElem->getAttribute('user'); $timestamp = $wayElem->getAttribute('timestamp'); $tags = $doc->getElementsByTagName( "tag" ); foreach( $tags as $tag ) { $key=$tag->getAttribute('k'); $value=$tag->getAttribute('v'); if ($key=="name") $cur_name=$value; } $note = " (just re-fetched)"; @$db->queryExec("UPDATE objects SET cur_name='" . sqlite_escape_string($cur_name) . "', ". "user_name='" . sqlite_escape_string($user) . "', ". "timestamp='" . sqlite_escape_string($timestamp) . "' ". " WHERE id=".$id ); if ($cur_name=="" && !$rescan) @$db->queryExec("UPDATE objects SET orig_name='" . sqlite_escape_string($cur_name) . " WHERE id=".$id ); } } $timestampcol="RED"; if (substr($timestamp,0,7)=="2010-05") $timestampcol="GREEN"; $nameDisplay = htmlspecialchars($cur_name); if ($orig_name!=$cur_name) $nameDisplay.= " (orig) " . $note; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "\n"; // proceed to next row $result->next(); } print "
idlength;'slast edit userlast edit timeorginal name / current name
"; print "$id" .strlen($cur_name) ."". substr_count($cur_name, ';') ."" . htmlspecialchars($user) . "". $timestamp ."".$nameDisplay."
"; } } else { die($err); } ?> This 'NameCheck' thing was cobbled together by Harry Wood (PHP source)