$sites = array(
'wiki' => new Site( 'wiki', 'w', 'wikipedia.org' ),
'wiktionary' => new Site( 'wiktionary', 'wikt', 'wiktionary.org' ),
- 'wikiquote' => new Site( 'wikiquote', 'wikiquote', 'wikiquote.org' ),
- 'wikibooks' => new Site( 'wikibooks', 'wikibooks', 'wikibooks.org' )
+ 'wikiquote' => new Site( 'wikiquote', 'q', 'wikiquote.org' ),
+ 'wikibooks' => new Site( 'wikibooks', 'b', 'wikibooks.org' )
);
$langlist = array_map( "trim", file( "/home/wikipedia/common/langlist" ) );
$dblist = array_map( "trim", file( "/home/wikipedia/common/all.dblist" ) );
$languageAliases = array(
'zh-cn' => 'zh',
'zh-tw' => 'zh',
+ 'dk' => 'da',
);
# Construct a list of reserved prefixes
# Extra links
foreach ( $extraLinks as $link ) {
- $sql .= makeLink( $link, $first );
+ $sql .= makeLink( $link, $first );
}
$sql .= ";\n";
# Intermap links
foreach ( $iwArray as $iwEntry ) {
- $sql .= makeLink( $iwEntry, $first );
+ # Suppress links with the same name as the site
+ if ( ( $suffix == 'wiki' && $iwEntry['iw_prefix'] != 'wikipedia' ) ||
+ ( $suffix != 'wiki' && $suffix != $iwEntry['iw_prefix'] ) )
+ {
+ $sql .= makeLink( $iwEntry, $first );
+ }
}
# Lateral links