From: Brion Vibber Date: Thu, 21 Aug 2003 11:20:38 +0000 (+0000) Subject: Move interwiki management from big ugly array into the database, with X-Git-Tag: 1.1.0~319 X-Git-Url: http://git.cyclocoop.org/data/Luca_Pacioli_%28Gemaelde%29.jpeg?a=commitdiff_plain;h=3002e1d8a66c13e9b5504de2d5817c9ae7039e9b;p=lhc%2Fweb%2Fwiklou.git Move interwiki management from big ugly array into the database, with memcached backing. Second 'wikipedia-interwiki.sql' has Wikipedia's local interlanguage URLs. --- diff --git a/includes/Interwiki.php b/includes/Interwiki.php index e31f8be755..0dfcd87898 100644 --- a/includes/Interwiki.php +++ b/includes/Interwiki.php @@ -1,273 +1,5 @@ "http://www.ourpla.net/cgi-bin/pikie.cgi?$1", - "AcadWiki" => "http://xarch.tu-graz.ac.at/autocad/wiki/$1", - "Acronym" => "http://www.acronymfinder.com/af-query.asp?String=exact&Acronym=$1", - "Advogato" => "http://www.advogato.org/$1", - "AIWiki" => "http://www.ifi.unizh.ch/ailab/aiwiki/aiw.cgi?$1", - "ALife" => "http://news.alife.org/wiki/index.php?$1", - "AndStuff" => "http://andstuff.org/wiki.php?$1", - "Annotation" => "http://bayle.stanford.edu/crit/nph-med.cgi/$1", - "AnnotationWiki" => "http://www.seedwiki.com/page.cfm?wikiid=368&doc=$1", - "AwarenessWiki" => "http://taoriver.net/aware/$1", - "BenefitsWiki" => "http://www.benefitslink.com/cgi-bin/wiki.cgi?$1", - "BridgesWiki" => "http://c2.com/w2/bridges/$1", - "C2find" => "http://c2.com/cgi/wiki?FindPage&value=$1", - "Cache" => "http://www.google.com/search?q=cache:$1", - "CLiki" => "http://ww.telent.net/cliki/$1", - "CmWiki" => "http://www.ourpla.net/cgi-bin/wiki.pl?$1", - "CreationMatters" => "http://www.ourpla.net/cgi-bin/wiki.pl?$1", - "DejaNews" => "http://www.deja.com/=dnc/getdoc.xp?AN=$1", - "Dictionary" => "http://www.dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1", - "DiveIntoOsx" => "http://diveintoosx.org/$1", - "DocBook" => "http://docbook.org/wiki/moin.cgi/$1", - "DolphinWiki" => "http://www.object-arts.com/wiki/html/Dolphin/$1", - "EfnetCeeWiki" => "http://purl.net/wiki/c/$1", - "EfnetCppWiki" => "http://purl.net/wiki/cpp/$1", - "EfnetPythonWiki" => "http://purl.net/wiki/python/$1", - "EfnetXmlWiki" => "http://purl.net/wiki/xml/$1", - "EljWiki" => "http://elj.sourceforge.net/phpwiki/index.php/$1", - "EmacsWiki" => "http://www.emacswiki.org/cgi-bin/wiki.pl?$1", - "FinalEmpire" => "http://final-empire.sourceforge.net/cgi-bin/wiki.pl?$1", - "Foldoc" => "http://www.foldoc.org/foldoc/foldoc.cgi?$1", - "FoxWiki" => "http://fox.wikis.com/wc.dll?Wiki~$1", - "FreeBSDman" => "http://www.FreeBSD.org/cgi/man.cgi?apropos=1&query=$1", - "Google" => "http://www.google.com/search?q=$1", - "GoogleGroups" => "http://groups.google.com/groups?q=$1", - "GreenCheese" => "http://www.greencheese.org/$1", - "HammondWiki" => "http://www.dairiki.org/HammondWiki/index.php3?$1", - "Haribeau" => "http://wiki.haribeau.de/cgi-bin/wiki.pl?$1", - "IAWiki" => "http://www.IAwiki.net/$1", - "IMDB" => "http://us.imdb.com/Title?$1", - "JargonFile" => "http://sunir.org/apps/meta.pl?wiki=JargonFile&redirect=$1", - "JiniWiki" => "http://www.cdegroot.com/cgi-bin/jini?$1", - "JspWiki" => "http://www.ecyrd.com/JSPWiki/Wiki.jsp?page=$1", - "KmWiki" => "http://www.voght.com/cgi-bin/pywiki?$1", - "KnowHow" => "http://www2.iro.umontreal.ca/~paquetse/cgi-bin/wiki.cgi?$1", - "LanifexWiki" => "http://opt.lanifex.com/cgi-bin/wiki.pl?$1", - "LegoWiki" => "http://www.object-arts.com/wiki/html/Lego-Robotics/$1", - "LinuxWiki" => "http://www.linuxwiki.de/$1", - "LugKR" => "http://lug-kr.sourceforge.net/cgi-bin/lugwiki.pl?$1", - "MathSongsWiki" => "http://SeedWiki.com/page.cfm?wikiid=237&doc=$1", - "MbTest" => "http://www.usemod.com/cgi-bin/mbtest.pl?$1", - "MeatBall" => "http://www.usemod.com/cgi-bin/mb.pl?$1", - "MetaWiki" => "http://sunir.org/apps/meta.pl?$1", - "MetaWikiPedia" => "http://meta.wikipedia.org/wiki/$1", - "MoinMoin" => "http://purl.net/wiki/moin/$1", - "MuWeb" => "http://www.dunstable.com/scripts/MuWebWeb?$1", - "NetVillage" => "http://www.netbros.com/?$1", - "OpenWiki" => "http://openwiki.com/?$1", - "OrgPatterns" => "http://www.bell-labs.com/cgi-user/OrgPatterns/OrgPatterns?$1", - "PangalacticOrg" => "http://www.pangalactic.org/Wiki/$1", - "PersonalTelco" => "http://www.personaltelco.net/index.cgi/$1", - "PhpWiki" => "http://phpwiki.sourceforge.net/phpwiki/index.php?$1", - "Pikie" => "http://pikie.darktech.org/cgi/pikie?$1", - "PPR" => "http://c2.com/cgi/wiki?$1", - "PurlNet" => "http://purl.oclc.org/NET/$1", - "PythonInfo" => "http://www.python.org/cgi-bin/moinmoin/$1", - "PythonWiki" => "http://www.pythonwiki.de/$1", - "PyWiki" => "http://www.voght.com/cgi-bin/pywiki?$1", - "SeaPig" => "http://www.seapig.org/ $1", - "SeattleWireless" => "http://seattlewireless.net/?$1", - "SenseisLibrary" => "http://senseis.xmp.net/?$1", - "Shakti" => "http://cgi.algonet.se/htbin/cgiwrap/pgd/ShaktiWiki/$1", - "SourceForge" => "http://sourceforge.net/$1", - "Squeak" => "http://minnow.cc.gatech.edu/squeak/$1", - "StrikiWiki" => "http://ch.twi.tudelft.nl/~mostert/striki/teststriki.pl?$1", - "SVGWiki" => "http://www.protocol7.com/svg-wiki/default.asp?$1", - "Tavi" => "http://tavi.sourceforge.net/index.php?$1", - "TmNet" => "http://www.technomanifestos.net/?$1", - "TMwiki" => "http://www.EasyTopicMaps.com/?page=$1", - "TWiki" => "http://twiki.org/cgi-bin/view/$1", - "TwistedWiki" => "http://purl.net/wiki/twisted/$1", - "Unreal" => "http://wiki.beyondunreal.com/wiki/$1", - "UseMod" => "http://www.usemod.com/cgi-bin/wiki.pl?$1", - "VisualWorks" => "http://wiki.cs.uiuc.edu/VisualWorks/$1", - "WebDevWikiNL" => "http://www.promo-it.nl/WebDevWiki/index.php?page=$1", - "WebSeitzWiki" => "http://webseitz.fluxent.com/wiki/$1", - "Why" => "http://clublet.com/c/c/why?$1", - "Wiki" => "http://c2.com/cgi/wiki?$1", - "WikiPedia" => "http://www.wikipedia.org/wiki/$1", - "Wiktionary" => "http://wiktionary.org/wiki/$1", - "WikiWorld" => "http://WikiWorld.com/wiki/index.php/$1", - "YpsiEyeball" => "http://sknkwrks.dyndns.org:1957/writewiki/wiki.pl?$1", - "ZWiki" => "http://www.zwiki.org/$1", - - # Some custom additions: - "ReVo" => "http://purl.org/NET/voko/revo/art/$1.html", - # eg [[ReVo:cerami]], [[ReVo:astero]] - note X-sensitive! - "EcheI" => "http://www.ikso.net/cgi-bin/wiki.pl?$1", - "E\xc4\x89eI" => "http://www.ikso.net/cgi-bin/wiki.pl?$1", - "UnuMondo" => "http://unumondo.com/cgi-bin/wiki.pl?$1", # X-sensitive! - "JEFO" => "http://esperanto.jeunes.free.fr/vikio/index.php?$1", - "PMEG" => "http://www.bertilow.com/pmeg/$1.php", - # ekz [[PMEG:gramatiko/kunligaj vortetoj/au]] - "EnciclopediaLibre" => "http://enciclopedia.us.es/wiki.phtml?title=$1", - - # Wikipedia-specific stuff: - # Special cases - "w" => "http://www.wikipedia.org/wiki/$1", # DEPRECATED - "m" => "http://meta.wikipedia.org/wiki/$1", - "meta" => "http://meta.wikipedia.org/wiki/$1", - "sep11" => "http://sep11.wikipedia.org/wiki/$1", - "simple"=> "http://simple.wikipedia.com/wiki.cgi?$1", - "wiktionary" => "http://wiktionary.org/wiki/$1", - - # These may not be recommended, may change... - "PageHistory" => "http://www.wikipedia.org/w/wiki.phtml?title=$1&action=history", - "UserContributions" => "http://www.wikipedia.org/w/wiki.phtml?title=Special:Contributions&target=$1", - "BackLinks" => "http://www.wikipedia.org/w/wiki.phtml?title=Special:Whatlinkshere&target=$1" - ); - - # ISO 639 2-letter language codes -$WikiPediaLanguages = array( - "aa" => "http://aa.wikipedia.com/wiki.cgi?$1", - "ab" => "http://ab.wikipedia.com/wiki.cgi?$1", - "af" => "http://af.wikipedia.com/wiki.cgi?$1", - "am" => "http://am.wikipedia.com/wiki.cgi?$1", - "ar" => "http://ar.wikipedia.org/wiki/$1", - "as" => "http://as.wikipedia.com/wiki.cgi?$1", - "ay" => "http://ay.wikipedia.com/wiki.cgi?$1", - "az" => "http://az.wikipedia.com/wiki.cgi?$1", - "ba" => "http://ba.wikipedia.com/wiki.cgi?$1", - "be" => "http://be.wikipedia.com/wiki.cgi?$1", - "bh" => "http://bh.wikipedia.com/wiki.cgi?$1", - "bi" => "http://bi.wikipedia.com/wiki.cgi?$1", - "bn" => "http://bn.wikipedia.com/wiki.cgi?$1", - "bs" => "http://bs.wikipedia.org/wiki/$1", - "bo" => "http://bo.wikipedia.com/wiki.cgi?$1", - "ca" => "http://ca.wikipedia.com/wiki.cgi?$1", - "co" => "http://co.wikipedia.com/wiki.cgi?$1", - "cs" => "http://cs.wikipedia.org/wiki/$1", - "cy" => "http://cy.wikipedia.org/wiki/$1", - "da" => "http://da.wikipedia.org/wiki/$1", - "de" => "http://de.wikipedia.org/wiki/$1", - "dk" => "http://da.wikipedia.org/wiki/$1", - "dz" => "http://dz.wikipedia.com/wiki.cgi?$1", - "el" => "http://el.wikipedia.org/wiki/$1", - "en" => "http://www.wikipedia.org/wiki/$1", # May in future be renamed to en.wikipedia.org; should work as alternate - "eo" => "http://eo.wikipedia.org/wiki/$1", - "es" => "http://es.wikipedia.org/wiki/$1", - "et" => "http://et.wikipedia.com/wiki.cgi?$1", - "eu" => "http://eu.wikipedia.com/wiki.cgi?$1", - "fa" => "http://fa.wikipedia.com/wiki.cgi?$1", - "fi" => "http://fi.wikipedia.com/wiki.cgi?$1", - "fj" => "http://fj.wikipedia.com/wiki.cgi?$1", - "fo" => "http://fo.wikipedia.com/wiki.cgi?$1", - "fr" => "http://fr.wikipedia.org/wiki/$1", - "fy" => "http://fy.wikipedia.com/wiki.cgi?$1", - "ga" => "http://ga.wikipedia.com/wiki.cgi?$1", - "gl" => "http://gl.wikipedia.com/wiki.cgi?$1", - "gn" => "http://gn.wikipedia.com/wiki.cgi?$1", - "gu" => "http://gu.wikipedia.com/wiki.cgi?$1", - "ha" => "http://ha.wikipedia.com/wiki.cgi?$1", - "he" => "http://he.wikipedia.org/wiki/$1", - "hi" => "http://hi.wikipedia.org/wiki/$1", - "hr" => "http://hr.wikipedia.org/wiki/$1", - "hu" => "http://hu.wikipedia.org/wiki/$1", - "hy" => "http://hy.wikipedia.com/wiki.cgi?$1", - "ia" => "http://ia.wikipedia.com/wiki.cgi?$1", - "id" => "http://id.wikipedia.com/wiki.cgi?$1", - "ik" => "http://ik.wikipedia.com/wiki.cgi?$1", - "is" => "http://is.wikipedia.com/wiki.cgi?$1", - "it" => "http://it.wikipedia.com/wiki.cgi?$1", - "iu" => "http://iu.wikipedia.com/wiki.cgi?$1", - "ja" => "http://ja.wikipedia.org/wiki/$1", - "jv" => "http://jv.wikipedia.com/wiki.cgi?$1", - "ka" => "http://ka.wikipedia.com/wiki.cgi?$1", - "kk" => "http://kk.wikipedia.com/wiki.cgi?$1", - "kl" => "http://kl.wikipedia.com/wiki.cgi?$1", - "km" => "http://km.wikipedia.com/wiki.cgi?$1", - "kn" => "http://kn.wikipedia.com/wiki.cgi?$1", - "ko" => "http://ko.wikipedia.org/wiki/$1", - "ks" => "http://ks.wikipedia.com/wiki.cgi?$1", - "ku" => "http://ku.wikipedia.com/wiki.cgi?$1", - "ky" => "http://ky.wikipedia.com/wiki.cgi?$1", - "la" => "http://la.wikipedia.com/wiki.cgi?$1", - "lo" => "http://lo.wikipedia.com/wiki.cgi?$1", - "lv" => "http://lv.wikipedia.com/wiki.cgi?$1", - "mg" => "http://mg.wikipedia.com/wiki.cgi?$1", - "mi" => "http://mi.wikipedia.com/wiki.cgi?$1", - "mk" => "http://mk.wikipedia.com/wiki.cgi?$1", - "ml" => "http://ml.wikipedia.org/wiki/$1", - "mn" => "http://mn.wikipedia.com/wiki.cgi?$1", - "mo" => "http://mo.wikipedia.com/wiki.cgi?$1", - "mr" => "http://mr.wikipedia.com/wiki.cgi?$1", - "ms" => "http://ms.wikipedia.org/wiki/$1", - "my" => "http://my.wikipedia.com/wiki.cgi?$1", - "na" => "http://na.wikipedia.com/wiki.cgi?$1", - "ne" => "http://ne.wikipedia.com/wiki.cgi?$1", - "nl" => "http://nl.wikipedia.org/wiki/$1", - "no" => "http://no.wikipedia.com/wiki.cgi?$1", - "oc" => "http://oc.wikipedia.com/wiki.cgi?$1", - "om" => "http://om.wikipedia.com/wiki.cgi?$1", - "or" => "http://or.wikipedia.com/wiki.cgi?$1", - "pa" => "http://pa.wikipedia.com/wiki.cgi?$1", - "pl" => "http://pl.wikipedia.org/wiki/$1", - "ps" => "http://ps.wikipedia.com/wiki.cgi?$1", - "pt" => "http://pt.wikipedia.com/wiki.cgi?$1", - "qu" => "http://qu.wikipedia.com/wiki.cgi?$1", - "rm" => "http://rm.wikipedia.com/wiki.cgi?$1", - "rn" => "http://rn.wikipedia.com/wiki.cgi?$1", - "ro" => "http://ro.wikipedia.org/wiki/$1", - "ru" => "http://ru.wikipedia.org/wiki/$1", - "rw" => "http://rw.wikipedia.com/wiki.cgi?$1", - "sa" => "http://sa.wikipedia.com/wiki.cgi?$1", - "sd" => "http://sd.wikipedia.com/wiki.cgi?$1", - "sg" => "http://sg.wikipedia.com/wiki.cgi?$1", - "sh" => "http://sh.wikipedia.org/wiki/$1", - "si" => "http://si.wikipedia.com/wiki.cgi?$1", - "sk" => "http://sk.wikipedia.org/wiki/$1", - "sl" => "http://sl.wikipedia.org/wiki/$1", - "sm" => "http://sm.wikipedia.com/wiki.cgi?$1", - "sn" => "http://sn.wikipedia.com/wiki.cgi?$1", - "so" => "http://so.wikipedia.com/wiki.cgi?$1", - "sq" => "http://sq.wikipedia.com/wiki.cgi?$1", - "sr" => "http://sr.wikipedia.org/wiki/$1", - "ss" => "http://ss.wikipedia.com/wiki.cgi?$1", - "st" => "http://st.wikipedia.com/wiki.cgi?$1", - "su" => "http://su.wikipedia.com/wiki.cgi?$1", - "sv" => "http://sv.wikipedia.org/wiki/$1", - "sw" => "http://sw.wikipedia.com/wiki.cgi?$1", - "ta" => "http://ta.wikipedia.com/wiki.cgi?$1", - "te" => "http://te.wikipedia.com/wiki.cgi?$1", - "tg" => "http://tg.wikipedia.com/wiki.cgi?$1", - "th" => "http://th.wikipedia.com/wiki.cgi?$1", - "ti" => "http://ti.wikipedia.com/wiki.cgi?$1", - "tk" => "http://tk.wikipedia.com/wiki.cgi?$1", - "tl" => "http://tl.wikipedia.com/wiki.cgi?$1", - "tn" => "http://tn.wikipedia.com/wiki.cgi?$1", - "to" => "http://to.wikipedia.com/wiki.cgi?$1", - "tr" => "http://tr.wikipedia.org/wiki/$1", - "ts" => "http://ts.wikipedia.com/wiki.cgi?$1", - "tt" => "http://tt.wikipedia.com/wiki.cgi?$1", - "tw" => "http://tw.wikipedia.com/wiki.cgi?$1", - "ug" => "http://ug.wikipedia.com/wiki.cgi?$1", - "uk" => "http://uk.wikipedia.com/wiki.cgi?$1", - "ur" => "http://ur.wikipedia.com/wiki.cgi?$1", - "uz" => "http://uz.wikipedia.com/wiki.cgi?$1", - "vi" => "http://vi.wikipedia.com/wiki.cgi?$1", - "vo" => "http://vo.wikipedia.com/wiki.cgi?$1", - "wo" => "http://wo.wikipedia.com/wiki.cgi?$1", - "xh" => "http://xh.wikipedia.com/wiki.cgi?$1", - "yi" => "http://yi.wikipedia.com/wiki.cgi?$1", - "yo" => "http://yo.wikipedia.com/wiki.cgi?$1", - "za" => "http://za.wikipedia.com/wiki.cgi?$1", - "zh" => "http://zh.wikipedia.org/wiki/$1", - "zh-cn" => "http://zh.wikipedia.org/wiki/$1", - "zh-tw" => "http://zh.wikipedia.org/wiki/$1", - "zu" => "http://zu.wikipedia.com/wiki.cgi?$1", - "nds" => "http://nds.wikipedia.org/wiki.cgi?$1" -); -foreach($WikiPediaLanguages as $code => $url) { - $wgValidInterwikis[ucfirst($code) . "WikiPedia"] = $url; - $wgValidInterwikis[ucfirst($code) . "Wikipedia"] = $url; - # If you're not Wikipedia, comment out next line! - $wgValidInterwikis[$code] = $url; -} +/* This file is obsolete... 2003-08-21 */ ?> diff --git a/includes/Title.php b/includes/Title.php index 0df3f6c720..a342a31a4f 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1,7 +1,5 @@ get( $k ); + if( $s !== false ) return $s->iw_url; + + $dkey = wfStrencode( $key ); + $query = "SELECT iw_url FROM interwiki WHERE iw_prefix='$dkey'"; + $res = wfQuery( $query, "Title::getInterwikiLink" ); + if(!$res) return ""; + + $s = wfFetchObject( $res ); + if(!$s) { + $s = (object)false; + $s->iw_url = ""; + } + $wgMemc->set( $k, $s ); + return $s->iw_url; } function getText() { return $this->mTextform; } @@ -169,12 +179,12 @@ class Title { function getFullURL() { - global $wgLang, $wgArticlePath, $wgValidInterwikis; + global $wgLang, $wgArticlePath; if ( "" == $this->mInterwiki ) { $p = $wgArticlePath; } else { - $p = $wgValidInterwikis[$this->mInterwiki]; + $p = $this->getInterwikiLink( $this->mInterwiki ); } $n = $wgLang->getNsText( $this->mNamespace ); if ( "" != $n ) { $n .= ":"; } @@ -302,7 +312,7 @@ class Title { # /* private */ function secureAndSplit() { - global $wgLang, $wgValidInterwikis, $wgLocalInterwiki; + global $wgLang, $wgLocalInterwiki; $validNamespaces = $wgLang->getNamespaces(); unset( $validNamespaces[0] ); @@ -329,7 +339,10 @@ class Title { if ( preg_match( "/^((?:i|x|[a-z]{2,3})(?:-[a-z0-9]+)?|[A-Za-z0-9_\\x80-\\xff]+):(.*)$/", $t, $m ) ) { #$p = strtolower( $m[1] ); $p = $m[1]; - if ( array_key_exists( $p, $wgValidInterwikis ) ) { + if ( $ns = $wgLang->getNsIndex( strtolower( $p ) )) { + $t = $m[2]; + $this->mNamespace = $ns; + } elseif ( $this->getInterwikiLink( $p ) ) { $t = $m[2]; $this->mInterwiki = $p; @@ -342,20 +355,6 @@ class Title { if($this->mInterwiki != $wgLocalInterwiki) $done = true; } - if ( ! $done ) { - if ( $ns = $wgLang->getNsIndex( str_replace( " ", "_", $p ))) { - $t = $m[2]; - $this->mNamespace = $ns; - } - # foreach ( $validNamespaces as $ns ) { - # if ( 0 == strcasecmp( $p, $ns ) ) { - # $t = $m[2]; - # $this->mNamespace = $wgLang->getNsIndex( - # str_replace( " ", "_", $p ) ); - # break; - # } - # } - } } $r = $t; } diff --git a/install.php b/install.php index e5aec8a999..71d27ec420 100644 --- a/install.php +++ b/install.php @@ -120,6 +120,7 @@ mysql_select_db( $wgDBname, $rconn ); dbsource( $rconn, "./maintenance/tables.sql" ); dbsource( $rconn, "./maintenance/users.sql" ); dbsource( $rconn, "./maintenance/initialdata.sql" ); +dbsource( $rconn, "./maintenance/interwiki.sql" ); populatedata(); # Needs internationalized messages diff --git a/maintenance/interwiki.sql b/maintenance/interwiki.sql new file mode 100644 index 0000000000..e7f05fe295 --- /dev/null +++ b/maintenance/interwiki.sql @@ -0,0 +1,103 @@ +-- Based more or less on the public interwiki map from MeatballWiki +-- Default interwiki prefixes... + +INSERT INTO interwiki (iw_prefix,iw_url,iw_local) VALUES +('AbbeNormal','http://www.ourpla.net/cgi-bin/pikie.cgi?$1',0), +('AcadWiki','http://xarch.tu-graz.ac.at/autocad/wiki/$1',0), +('Acronym','http://www.acronymfinder.com/af-query.asp?String=exact&Acronym=$1',0), +('Advogato','http://www.advogato.org/$1',0), +('AIWiki','http://www.ifi.unizh.ch/ailab/aiwiki/aiw.cgi?$1',0), +('ALife','http://news.alife.org/wiki/index.php?$1',0), +('AndStuff','http://andstuff.org/wiki.php?$1',0), +('Annotation','http://bayle.stanford.edu/crit/nph-med.cgi/$1',0), +('AnnotationWiki','http://www.seedwiki.com/page.cfm?wikiid=368&doc=$1',0), +('AwarenessWiki','http://taoriver.net/aware/$1',0), +('BenefitsWiki','http://www.benefitslink.com/cgi-bin/wiki.cgi?$1',0), +('BridgesWiki','http://c2.com/w2/bridges/$1',0), +('C2find','http://c2.com/cgi/wiki?FindPage&value=$1',0), +('Cache','http://www.google.com/search?q=cache:$1',0), +('CLiki','http://ww.telent.net/cliki/$1',0), +('CmWiki','http://www.ourpla.net/cgi-bin/wiki.pl?$1',0), +('CreationMatters','http://www.ourpla.net/cgi-bin/wiki.pl?$1',0), +('DejaNews','http://www.deja.com/=dnc/getdoc.xp?AN=$1',0), +('Dictionary','http://www.dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1',0), +('DiveIntoOsx','http://diveintoosx.org/$1',0), +('DocBook','http://docbook.org/wiki/moin.cgi/$1',0), +('DolphinWiki','http://www.object-arts.com/wiki/html/Dolphin/$1',0), +('EfnetCeeWiki','http://purl.net/wiki/c/$1',0), +('EfnetCppWiki','http://purl.net/wiki/cpp/$1',0), +('EfnetPythonWiki','http://purl.net/wiki/python/$1',0), +('EfnetXmlWiki','http://purl.net/wiki/xml/$1',0), +('EljWiki','http://elj.sourceforge.net/phpwiki/index.php/$1',0), +('EmacsWiki','http://www.emacswiki.org/cgi-bin/wiki.pl?$1',0), +('FinalEmpire','http://final-empire.sourceforge.net/cgi-bin/wiki.pl?$1',0), +('Foldoc','http://www.foldoc.org/foldoc/foldoc.cgi?$1',0), +('FoxWiki','http://fox.wikis.com/wc.dll?Wiki~$1',0), +('FreeBSDman','http://www.FreeBSD.org/cgi/man.cgi?apropos=1&query=$1',0), +('Google','http://www.google.com/search?q=$1',0), +('GoogleGroups','http://groups.google.com/groups?q=$1',0), +('GreenCheese','http://www.greencheese.org/$1',0), +('HammondWiki','http://www.dairiki.org/HammondWiki/index.php3?$1',0), +('Haribeau','http://wiki.haribeau.de/cgi-bin/wiki.pl?$1',0), +('IAWiki','http://www.IAwiki.net/$1',0), +('IMDB','http://us.imdb.com/Title?$1',0), +('JargonFile','http://sunir.org/apps/meta.pl?wiki=JargonFile&redirect=$1',0), +('JiniWiki','http://www.cdegroot.com/cgi-bin/jini?$1',0), +('JspWiki','http://www.ecyrd.com/JSPWiki/Wiki.jsp?page=$1',0), +('KmWiki','http://www.voght.com/cgi-bin/pywiki?$1',0), +('KnowHow','http://www2.iro.umontreal.ca/~paquetse/cgi-bin/wiki.cgi?$1',0), +('LanifexWiki','http://opt.lanifex.com/cgi-bin/wiki.pl?$1',0), +('LegoWiki','http://www.object-arts.com/wiki/html/Lego-Robotics/$1',0), +('LinuxWiki','http://www.linuxwiki.de/$1',0), +('LugKR','http://lug-kr.sourceforge.net/cgi-bin/lugwiki.pl?$1',0), +('MathSongsWiki','http://SeedWiki.com/page.cfm?wikiid=237&doc=$1',0), +('MbTest','http://www.usemod.com/cgi-bin/mbtest.pl?$1',0), +('MeatBall','http://www.usemod.com/cgi-bin/mb.pl?$1',0), +('MetaWiki','http://sunir.org/apps/meta.pl?$1',0), +('MetaWikiPedia','http://meta.wikipedia.org/wiki/$1',0), +('MoinMoin','http://purl.net/wiki/moin/$1',0), +('MuWeb','http://www.dunstable.com/scripts/MuWebWeb?$1',0), +('NetVillage','http://www.netbros.com/?$1',0), +('OpenWiki','http://openwiki.com/?$1',0), +('OrgPatterns','http://www.bell-labs.com/cgi-user/OrgPatterns/OrgPatterns?$1',0), +('PangalacticOrg','http://www.pangalactic.org/Wiki/$1',0), +('PersonalTelco','http://www.personaltelco.net/index.cgi/$1',0), +('PhpWiki','http://phpwiki.sourceforge.net/phpwiki/index.php?$1',0), +('Pikie','http://pikie.darktech.org/cgi/pikie?$1',0), +('PPR','http://c2.com/cgi/wiki?$1',0), +('PurlNet','http://purl.oclc.org/NET/$1',0), +('PythonInfo','http://www.python.org/cgi-bin/moinmoin/$1',0), +('PythonWiki','http://www.pythonwiki.de/$1',0), +('PyWiki','http://www.voght.com/cgi-bin/pywiki?$1',0), +('SeaPig','http://www.seapig.org/ $1',0), +('SeattleWireless','http://seattlewireless.net/?$1',0), +('SenseisLibrary','http://senseis.xmp.net/?$1',0), +('Shakti','http://cgi.algonet.se/htbin/cgiwrap/pgd/ShaktiWiki/$1',0), +('SourceForge','http://sourceforge.net/$1',0), +('Squeak','http://minnow.cc.gatech.edu/squeak/$1',0), +('StrikiWiki','http://ch.twi.tudelft.nl/~mostert/striki/teststriki.pl?$1',0), +('SVGWiki','http://www.protocol7.com/svg-wiki/default.asp?$1',0), +('Tavi','http://tavi.sourceforge.net/index.php?$1',0), +('TmNet','http://www.technomanifestos.net/?$1',0), +('TMwiki','http://www.EasyTopicMaps.com/?page=$1',0), +('TWiki','http://twiki.org/cgi-bin/view/$1',0), +('TwistedWiki','http://purl.net/wiki/twisted/$1',0), +('Unreal','http://wiki.beyondunreal.com/wiki/$1',0), +('UseMod','http://www.usemod.com/cgi-bin/wiki.pl?$1',0), +('VisualWorks','http://wiki.cs.uiuc.edu/VisualWorks/$1',0), +('WebDevWikiNL','http://www.promo-it.nl/WebDevWiki/index.php?page=$1',0), +('WebSeitzWiki','http://webseitz.fluxent.com/wiki/$1',0), +('Why','http://clublet.com/c/c/why?$1',0), +('Wiki','http://c2.com/cgi/wiki?$1',0), +('WikiPedia','http://www.wikipedia.org/wiki/$1',0), +('Wiktionary','http://wiktionary.org/wiki/$1',0), +('WikiWorld','http://WikiWorld.com/wiki/index.php/$1',0), +('YpsiEyeball','http://sknkwrks.dyndns.org:1957/writewiki/wiki.pl?$1',0), +('ZWiki','http://www.zwiki.org/$1',0), +('ReVo','http://purl.org/NET/voko/revo/art/$1.html',0), +('EcheI','http://www.ikso.net/cgi-bin/wiki.pl?$1',0), +('EĉeI','http://www.ikso.net/cgi-bin/wiki.pl?$1',0), +('JEFO','http://esperanto.jeunes.free.fr/vikio/index.php?$1',0), +('PMEG','http://www.bertilow.com/pmeg/$1.php',0), +('EnciclopediaLibre','http://enciclopedia.us.es/wiki.phtml?title=$1',0); + diff --git a/maintenance/tables.sql b/maintenance/tables.sql index 9b904733cf..388bbfe052 100644 --- a/maintenance/tables.sql +++ b/maintenance/tables.sql @@ -177,3 +177,11 @@ CREATE TABLE searchindex ( UNIQUE KEY (si_page) ) TYPE=MyISAM PACK_KEYS=1; +DROP TABLE IF EXISTS interwiki; +CREATE TABLE interwiki ( + iw_prefix char(32) NOT NULL, + iw_url char(127) NOT NULL, + iw_local BOOL NOT NULL, + UNIQUE KEY iw_prefix (iw_prefix) +); + diff --git a/maintenance/wikipedia-interwiki.sql b/maintenance/wikipedia-interwiki.sql new file mode 100644 index 0000000000..5feea61c88 --- /dev/null +++ b/maintenance/wikipedia-interwiki.sql @@ -0,0 +1,147 @@ +-- For convenience, here are the *in-project* interwiki prefixes +-- for Wikipedia. + +REPLACE INTO interwiki (iw_prefix,iw_url,iw_local) VALUES +('w','http://www.wikipedia.org/wiki/$1',1), +('m','http://meta.wikipedia.org/wiki/$1',1), +('meta','http://meta.wikipedia.org/wiki/$1',1), +('sep11','http://sep11.wikipedia.org/wiki/$1',1), +('simple','http://simple.wikipedia.com/wiki.cgi?$1',1), +('aa','http://aa.wikipedia.com/wiki.cgi?$1',1), +('ab','http://ab.wikipedia.com/wiki.cgi?$1',1), +('af','http://af.wikipedia.com/wiki.cgi?$1',1), +('am','http://am.wikipedia.com/wiki.cgi?$1',1), +('ar','http://ar.wikipedia.org/wiki/$1',1), +('as','http://as.wikipedia.com/wiki.cgi?$1',1), +('ay','http://ay.wikipedia.com/wiki.cgi?$1',1), +('az','http://az.wikipedia.com/wiki.cgi?$1',1), +('ba','http://ba.wikipedia.com/wiki.cgi?$1',1), +('be','http://be.wikipedia.com/wiki.cgi?$1',1), +('bh','http://bh.wikipedia.com/wiki.cgi?$1',1), +('bi','http://bi.wikipedia.com/wiki.cgi?$1',1), +('bn','http://bn.wikipedia.com/wiki.cgi?$1',1), +('bs','http://bs.wikipedia.org/wiki/$1',1), +('bo','http://bo.wikipedia.com/wiki.cgi?$1',1), +('ca','http://ca.wikipedia.com/wiki.cgi?$1',1), +('co','http://co.wikipedia.com/wiki.cgi?$1',1), +('cs','http://cs.wikipedia.org/wiki/$1',1), +('cy','http://cy.wikipedia.org/wiki/$1',1), +('da','http://da.wikipedia.org/wiki/$1',1), +('de','http://de.wikipedia.org/wiki/$1',1), +('dk','http://da.wikipedia.org/wiki/$1',1), +('dz','http://dz.wikipedia.com/wiki.cgi?$1',1), +('el','http://el.wikipedia.org/wiki/$1',1), +('en','http://www.wikipedia.org/wiki/$1',1), +('eo','http://eo.wikipedia.org/wiki/$1',1), +('es','http://es.wikipedia.org/wiki/$1',1), +('et','http://et.wikipedia.com/wiki.cgi?$1',1), +('eu','http://eu.wikipedia.com/wiki.cgi?$1',1), +('fa','http://fa.wikipedia.com/wiki.cgi?$1',1), +('fi','http://fi.wikipedia.com/wiki.cgi?$1',1), +('fj','http://fj.wikipedia.com/wiki.cgi?$1',1), +('fo','http://fo.wikipedia.com/wiki.cgi?$1',1), +('fr','http://fr.wikipedia.org/wiki/$1',1), +('fy','http://fy.wikipedia.com/wiki.cgi?$1',1), +('ga','http://ga.wikipedia.com/wiki.cgi?$1',1), +('gl','http://gl.wikipedia.com/wiki.cgi?$1',1), +('gn','http://gn.wikipedia.com/wiki.cgi?$1',1), +('gu','http://gu.wikipedia.com/wiki.cgi?$1',1), +('ha','http://ha.wikipedia.com/wiki.cgi?$1',1), +('he','http://he.wikipedia.org/wiki/$1',1), +('hi','http://hi.wikipedia.org/wiki/$1',1), +('hr','http://hr.wikipedia.org/wiki/$1',1), +('hu','http://hu.wikipedia.org/wiki/$1',1), +('hy','http://hy.wikipedia.com/wiki.cgi?$1',1), +('ia','http://ia.wikipedia.com/wiki.cgi?$1',1), +('id','http://id.wikipedia.com/wiki.cgi?$1',1), +('ik','http://ik.wikipedia.com/wiki.cgi?$1',1), +('is','http://is.wikipedia.com/wiki.cgi?$1',1), +('it','http://it.wikipedia.com/wiki.cgi?$1',1), +('iu','http://iu.wikipedia.com/wiki.cgi?$1',1), +('ja','http://ja.wikipedia.org/wiki/$1',1), +('jv','http://jv.wikipedia.com/wiki.cgi?$1',1), +('ka','http://ka.wikipedia.com/wiki.cgi?$1',1), +('kk','http://kk.wikipedia.com/wiki.cgi?$1',1), +('kl','http://kl.wikipedia.com/wiki.cgi?$1',1), +('km','http://km.wikipedia.com/wiki.cgi?$1',1), +('kn','http://kn.wikipedia.com/wiki.cgi?$1',1), +('ko','http://ko.wikipedia.org/wiki/$1',1), +('ks','http://ks.wikipedia.com/wiki.cgi?$1',1), +('ku','http://ku.wikipedia.com/wiki.cgi?$1',1), +('ky','http://ky.wikipedia.com/wiki.cgi?$1',1), +('la','http://la.wikipedia.com/wiki.cgi?$1',1), +('lo','http://lo.wikipedia.com/wiki.cgi?$1',1), +('lv','http://lv.wikipedia.com/wiki.cgi?$1',1), +('mg','http://mg.wikipedia.com/wiki.cgi?$1',1), +('mi','http://mi.wikipedia.com/wiki.cgi?$1',1), +('mk','http://mk.wikipedia.com/wiki.cgi?$1',1), +('ml','http://ml.wikipedia.org/wiki/$1',1), +('mn','http://mn.wikipedia.com/wiki.cgi?$1',1), +('mo','http://mo.wikipedia.com/wiki.cgi?$1',1), +('mr','http://mr.wikipedia.com/wiki.cgi?$1',1), +('ms','http://ms.wikipedia.org/wiki/$1',1), +('my','http://my.wikipedia.com/wiki.cgi?$1',1), +('na','http://na.wikipedia.com/wiki.cgi?$1',1), +('nah','http://nah.wikipedia.org/wiki/$1',1), +('ne','http://ne.wikipedia.com/wiki.cgi?$1',1), +('nl','http://nl.wikipedia.org/wiki/$1',1), +('no','http://no.wikipedia.com/wiki.cgi?$1',1), +('oc','http://oc.wikipedia.com/wiki.cgi?$1',1), +('om','http://om.wikipedia.com/wiki.cgi?$1',1), +('or','http://or.wikipedia.com/wiki.cgi?$1',1), +('pa','http://pa.wikipedia.com/wiki.cgi?$1',1), +('pl','http://pl.wikipedia.org/wiki/$1',1), +('ps','http://ps.wikipedia.com/wiki.cgi?$1',1), +('pt','http://pt.wikipedia.com/wiki.cgi?$1',1), +('qu','http://qu.wikipedia.com/wiki.cgi?$1',1), +('rm','http://rm.wikipedia.com/wiki.cgi?$1',1), +('rn','http://rn.wikipedia.com/wiki.cgi?$1',1), +('ro','http://ro.wikipedia.org/wiki/$1',1), +('ru','http://ru.wikipedia.org/wiki/$1',1), +('rw','http://rw.wikipedia.com/wiki.cgi?$1',1), +('sa','http://sa.wikipedia.com/wiki.cgi?$1',1), +('sd','http://sd.wikipedia.com/wiki.cgi?$1',1), +('sg','http://sg.wikipedia.com/wiki.cgi?$1',1), +('sh','http://sh.wikipedia.org/wiki/$1',1), +('si','http://si.wikipedia.com/wiki.cgi?$1',1), +('sk','http://sk.wikipedia.org/wiki/$1',1), +('sl','http://sl.wikipedia.org/wiki/$1',1), +('sm','http://sm.wikipedia.com/wiki.cgi?$1',1), +('sn','http://sn.wikipedia.com/wiki.cgi?$1',1), +('so','http://so.wikipedia.com/wiki.cgi?$1',1), +('sq','http://sq.wikipedia.com/wiki.cgi?$1',1), +('sr','http://sr.wikipedia.org/wiki/$1',1), +('ss','http://ss.wikipedia.com/wiki.cgi?$1',1), +('st','http://st.wikipedia.com/wiki.cgi?$1',1), +('su','http://su.wikipedia.com/wiki.cgi?$1',1), +('sv','http://sv.wikipedia.org/wiki/$1',1), +('sw','http://sw.wikipedia.com/wiki.cgi?$1',1), +('ta','http://ta.wikipedia.com/wiki.cgi?$1',1), +('te','http://te.wikipedia.com/wiki.cgi?$1',1), +('tg','http://tg.wikipedia.com/wiki.cgi?$1',1), +('th','http://th.wikipedia.com/wiki.cgi?$1',1), +('ti','http://ti.wikipedia.com/wiki.cgi?$1',1), +('tk','http://tk.wikipedia.com/wiki.cgi?$1',1), +('tl','http://tl.wikipedia.com/wiki.cgi?$1',1), +('tn','http://tn.wikipedia.com/wiki.cgi?$1',1), +('to','http://to.wikipedia.com/wiki.cgi?$1',1), +('tr','http://tr.wikipedia.org/wiki/$1',1), +('ts','http://ts.wikipedia.com/wiki.cgi?$1',1), +('tt','http://tt.wikipedia.com/wiki.cgi?$1',1), +('tw','http://tw.wikipedia.com/wiki.cgi?$1',1), +('ug','http://ug.wikipedia.com/wiki.cgi?$1',1), +('uk','http://uk.wikipedia.com/wiki.cgi?$1',1), +('ur','http://ur.wikipedia.com/wiki.cgi?$1',1), +('uz','http://uz.wikipedia.com/wiki.cgi?$1',1), +('vi','http://vi.wikipedia.com/wiki.cgi?$1',1), +('vo','http://vo.wikipedia.com/wiki.cgi?$1',1), +('wo','http://wo.wikipedia.com/wiki.cgi?$1',1), +('xh','http://xh.wikipedia.com/wiki.cgi?$1',1), +('yi','http://yi.wikipedia.com/wiki.cgi?$1',1), +('yo','http://yo.wikipedia.com/wiki.cgi?$1',1), +('za','http://za.wikipedia.com/wiki.cgi?$1',1), +('zh','http://zh.wikipedia.org/wiki/$1',1), +('zh-cn','http://zh.wikipedia.org/wiki/$1',1), +('zh-tw','http://zh.wikipedia.org/wiki/$1',1), +('zu','http://zu.wikipedia.com/wiki.cgi?$1',1), +('nds','http://nds.wikipedia.org/wiki.cgi?$1',1);