r88632 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88631‎ | r88632 | r88633 >
Date:03:07, 23 May 2011
Author:yaron
Status:deferred
Tags:
Comment:
Tag for version 1.3.1
Modified paths:
  • /tags/extensions/ExternalData/REL_1_3_1 (added) (history)

Diff [purge]

Index: tags/extensions/ExternalData/REL_1_3_1/ExternalData.i18n.magic.php
@@ -0,0 +1,126 @@
 2+<?php
 3+/**
 4+ *
 5+ */
 6+
 7+$magicWords = array();
 8+
 9+/** English (English) */
 10+$magicWords['en'] = array(
 11+ 'get_external_data' => array( 0, 'get_external_data' ),
 12+ 'get_web_data' => array( 0, 'get_web_data' ),
 13+ 'get_ldap_data' => array( 0, 'get_ldap_data' ),
 14+ 'get_db_data' => array( 0, 'get_db_data' ),
 15+ 'external_value' => array( 0, 'external_value' ),
 16+ 'for_external_table' => array( 0, 'for_external_table' ),
 17+ 'store_external_table' => array( 0, 'store_external_table' ),
 18+);
 19+
 20+/** Arabic (العربية) */
 21+$magicWords['ar'] = array(
 22+ 'get_external_data' => array( 0, 'عرض_بيانات_خارجية' ),
 23+ 'get_web_data' => array( 0, 'عرض_بيانات_الويب' ),
 24+ 'get_ldap_data' => array( 0, 'عرض_بيانات_لداب' ),
 25+ 'get_db_data' => array( 0, 'عرض_بيانات_قب' ),
 26+ 'external_value' => array( 0, 'قيمة_خارجية' ),
 27+ 'for_external_table' => array( 0, 'لجدول_خارجي' ),
 28+ 'store_external_table' => array( 0, 'تخزين_جدول_خارجي' ),
 29+);
 30+
 31+/** Egyptian Spoken Arabic (مصرى) */
 32+$magicWords['arz'] = array(
 33+ 'get_external_data' => array( 0, 'عرض_بيانات_خارجية', 'get_external_data' ),
 34+ 'get_ldap_data' => array( 0, 'عرض_بيانات_لداب', 'get_ldap_data' ),
 35+ 'get_db_data' => array( 0, 'عرض_بيانات_قب', 'get_db_data' ),
 36+ 'external_value' => array( 0, 'قيمة_خارجية', 'external_value' ),
 37+ 'for_external_table' => array( 0, 'لجدول_خارجي', 'for_external_table' ),
 38+ 'store_external_table' => array( 0, 'تخزين_جدول_خارجى', 'تخزين_جدول_خارجي', 'store_external_table' ),
 39+);
 40+
 41+/** Chechen (Нохчийн) */
 42+$magicWords['ce'] = array(
 43+ 'get_external_data' => array( 0, 'схьаэца_архьара_хаамаш', 'получить_внешние_данные', 'get_external_data' ),
 44+ 'get_ldap_data' => array( 0, 'схьаэца_хаамаш_ldap', 'получить_данные_ldap', 'get_ldap_data' ),
 45+ 'get_db_data' => array( 0, 'схьаэца_хаамаш_db', 'получить_данные_db', 'get_db_data' ),
 46+ 'external_value' => array( 0, 'архьара_дозалла', 'внешнее_значение', 'external_value' ),
 47+ 'for_external_table' => array( 0, 'оцу_архьара_тебалецlаш', 'для_внешней_таблицы', 'for_external_table' ),
 48+);
 49+
 50+/** Spanish (Español) */
 51+$magicWords['es'] = array(
 52+ 'get_external_data' => array( 0, 'obtener_datos_externos', 'get_external_data' ),
 53+ 'get_db_data' => array( 0, 'obtener_datos_db', 'get_db_data' ),
 54+ 'external_value' => array( 0, 'valor_externo', 'external_value' ),
 55+);
 56+
 57+/** Japanese (日本語) */
 58+$magicWords['ja'] = array(
 59+ 'get_external_data' => array( 0, '外部データ取得' ),
 60+ 'get_ldap_data' => array( 0, 'ldapデータ取得' ),
 61+ 'get_db_data' => array( 0, 'dbデータ取得' ),
 62+ 'external_value' => array( 0, '外部値' ),
 63+ 'for_external_table' => array( 0, '外部テーブル用' ),
 64+ 'store_external_table' => array( 0, '外部テーブル格納' ),
 65+);
 66+
 67+/** Macedonian (Македонски) */
 68+$magicWords['mk'] = array(
 69+ 'get_external_data' => array( 0, 'преземи_надворешни_податоци' ),
 70+ 'external_value' => array( 0, 'надворешна_вредност' ),
 71+ 'for_external_table' => array( 0, 'за_надворешна_табела' ),
 72+ 'store_external_table' => array( 0, 'складирај_надворешна_табела' ),
 73+);
 74+
 75+/** Malayalam (മലയാളം) */
 76+$magicWords['ml'] = array(
 77+ 'get_external_data' => array( 0, 'ബാഹ്യ_വിവരങ്ങൾ_എടുക്കുക' ),
 78+ 'external_value' => array( 0, 'ബാഹ്യ_മൂല്യം' ),
 79+);
 80+
 81+/** Marathi (मराठी) */
 82+$magicWords['mr'] = array(
 83+ 'get_external_data' => array( 0, 'मिळवा_बाह्य_विदा', 'get_external_data' ),
 84+ 'get_ldap_data' => array( 0, 'मिळवा__एलडॅप_विदा', 'get_ldap_data' ),
 85+ 'for_external_table' => array( 0, 'बाह्य_सारणी_करिता', 'for_external_table' ),
 86+);
 87+
 88+/** Nedersaksisch (Nedersaksisch) */
 89+$magicWords['nds-nl'] = array(
 90+ 'get_external_data' => array( 0, 'externe_gegevens_ophaolen', 'externe_gegevens_ophalen', 'get_external_data' ),
 91+ 'get_ldap_data' => array( 0, 'ldap-gegevens_ophaolen', 'ldap_gegevens_ophalen', 'get_ldap_data' ),
 92+ 'get_db_data' => array( 0, 'db-gegevens_ophaolen', 'db_gegevens_ophalen', 'get_db_data' ),
 93+ 'external_value' => array( 0, 'externe_weerde', 'externe_waarde', 'external_value' ),
 94+ 'for_external_table' => array( 0, 'veur_externe_tebel', 'voor_externe_tabel', 'for_external_table' ),
 95+);
 96+
 97+/** Dutch (Nederlands) */
 98+$magicWords['nl'] = array(
 99+ 'get_external_data' => array( 0, 'externe_gegevens_ophalen' ),
 100+ 'get_web_data' => array( 0, 'webgegevens_ophalen' ),
 101+ 'get_ldap_data' => array( 0, 'ldap_gegevens_ophalen' ),
 102+ 'get_db_data' => array( 0, 'db_gegevens_ophalen' ),
 103+ 'external_value' => array( 0, 'externe_waarde' ),
 104+ 'for_external_table' => array( 0, 'voor_externe_tabel' ),
 105+ 'store_external_table' => array( 0, 'opslaan_externe_tabel' ),
 106+);
 107+
 108+/** Russian (Русский) */
 109+$magicWords['ru'] = array(
 110+ 'get_external_data' => array( 0, 'получить_внешние_данные' ),
 111+ 'get_ldap_data' => array( 0, 'получить_данные_ldap' ),
 112+ 'get_db_data' => array( 0, 'получить_данные_db' ),
 113+ 'external_value' => array( 0, 'внешнее_значение' ),
 114+ 'for_external_table' => array( 0, 'для_внешней_таблицы' ),
 115+ 'store_external_table' => array( 0, 'внешняя_таблица_хранения' ),
 116+);
 117+
 118+/** Serbian Cyrillic ekavian (‪Српски (ћирилица)‬) */
 119+$magicWords['sr-ec'] = array(
 120+ 'get_external_data' => array( 0, 'добави_спољне_податке' ),
 121+ 'get_web_data' => array( 0, 'добави_веб_податке' ),
 122+ 'get_ldap_data' => array( 0, 'добави_лдап_податке' ),
 123+ 'get_db_data' => array( 0, 'добави_податке_базе' ),
 124+ 'external_value' => array( 0, 'спољна_вредност' ),
 125+ 'for_external_table' => array( 0, 'за_спољну_табелу' ),
 126+ 'store_external_table' => array( 0, 'смести_спољну_табелу' ),
 127+);
\ No newline at end of file
Property changes on: tags/extensions/ExternalData/REL_1_3_1/ExternalData.i18n.magic.php
___________________________________________________________________
Added: svn:keywords
1128 + Id
Added: svn:eol-style
2129 + native
Index: tags/extensions/ExternalData/REL_1_3_1/ExternalData.i18n.php
@@ -0,0 +1,879 @@
 2+<?php
 3+/**
 4+ * Internationalization file for the External Data extension
 5+ *
 6+ * @addtogroup Extensions
 7+ */
 8+
 9+$messages = array();
 10+
 11+/** English
 12+ * @author Yaron Koren
 13+ */
 14+$messages['en'] = array(
 15+ // user messages
 16+ 'getdata' => 'Get data',
 17+ 'externaldata-desc' => 'Allows for retrieving structured data from external URLs, databases and other sources',
 18+ 'externaldata-ldap-unable-to-connect' => 'Unable to connect to $1',
 19+ 'externaldata-json-decode-not-supported' => 'Error: json_decode() is not supported in this version of PHP',
 20+ 'externaldata-xml-error' => 'XML error: $1 at line $2',
 21+ 'externaldata-db-incomplete-information' => 'Error: Incomplete information for this server ID.',
 22+ 'externaldata-db-could-not-get-url' => 'Could not get URL after $1 {{PLURAL:$1|try|tries}}.',
 23+ 'externaldata-db-unknown-type' => 'Error: Unknown database type.',
 24+ 'externaldata-db-could-not-connect' => 'Error: Could not connect to database.',
 25+ 'externaldata-db-no-return-values' => 'Error: No return values specified.',
 26+ 'externaldata-db-invalid-query' => 'Invalid query.',
 27+ 'externaldata-db-option-unsupported' => 'Error: Parameters $1 and $2 are not supported in this version of MediaWiki.',
 28+);
 29+
 30+/** Message documentation (Message documentation)
 31+ * @author Dead3y3
 32+ * @author Fryed-peach
 33+ */
 34+$messages['qqq'] = array(
 35+ 'externaldata-desc' => '{{desc}}',
 36+);
 37+
 38+/** Afrikaans (Afrikaans)
 39+ * @author Naudefj
 40+ */
 41+$messages['af'] = array(
 42+ 'getdata' => 'Kry data',
 43+ 'externaldata-xml-error' => 'XML-fout: $1 op reël $2',
 44+ 'externaldata-db-unknown-type' => 'Fout: onbekende databasistipe.',
 45+ 'externaldata-db-could-not-connect' => "Fout: kon nie 'n verbinding met databasis bewerkstellig nie.",
 46+ 'externaldata-db-invalid-query' => 'Ongeldige navraag.',
 47+);
 48+
 49+/** Gheg Albanian (Gegë)
 50+ * @author Mdupont
 51+ */
 52+$messages['aln'] = array(
 53+ 'getdata' => 'Merr të dhëna',
 54+ 'externaldata-desc' => 'Lejon retrieving të dhënat e strukturuar nga URL jashtme, bazat e të dhënave dhe burimet tjera',
 55+ 'externaldata-ldap-unable-to-connect' => "Në pamundësi për t'u lidhur tek $1",
 56+ 'externaldata-json-decode-not-supported' => 'Gabim: json_decode() nuk është i mbështetur në këtë version të PHP',
 57+ 'externaldata-xml-error' => 'XML error: $1 tek $2 linjë',
 58+ 'externaldata-db-incomplete-information' => 'Gabim: informata jo të plota për këtë server të identitetit.',
 59+ 'externaldata-db-could-not-get-url' => 'Nuk mund te merrni URL pasi $1 {{PLURAL:$1|provoni|përpiqet}}.',
 60+ 'externaldata-db-unknown-type' => 'Gabim: Lloj i panjohur bazës së të dhënave.',
 61+ 'externaldata-db-could-not-connect' => 'Gabim: Nuk mund të lidheni me bazën e të dhënave.',
 62+ 'externaldata-db-no-return-values' => 'Gabim: Nuk ka kthim vlerat e caktuara.',
 63+ 'externaldata-db-invalid-query' => 'pyetje e pavlefshme.',
 64+);
 65+
 66+/** Arabic (العربية)
 67+ * @author Meno25
 68+ * @author OsamaK
 69+ */
 70+$messages['ar'] = array(
 71+ 'getdata' => 'الحصول على البيانات',
 72+ 'externaldata-desc' => 'يسمح باسترجاع البيانات الهيكلية من مسارات خارجية، قواعد البيانات ومصادر أخرى',
 73+ 'externaldata-ldap-unable-to-connect' => 'تعذّر الاتصال ب$1',
 74+ 'externaldata-json-decode-not-supported' => 'خطأ: json_decode() غير مدعوم في نسخة PHP هذه',
 75+ 'externaldata-xml-error' => 'خطأ XML: $1 عند السطر $2',
 76+ 'externaldata-db-incomplete-information' => 'خطأ: معلومات غير كاملة عن هوية هذا الخادوم.',
 77+ 'externaldata-db-could-not-get-url' => 'تعذّر الحصول على المسار بعد {{PLURAL:$1||محاولة واحدة|محاوتين|$1 محاولات|$1 محاولة }}.',
 78+ 'externaldata-db-unknown-type' => 'خطأ: نوع قاعدة بيانات غير معروف.',
 79+ 'externaldata-db-could-not-connect' => 'خطأ: تعذّر الاتصال بقاعدة البيانات.',
 80+ 'externaldata-db-no-return-values' => 'خطأ: لم تحدد أي قيم عائدة.',
 81+ 'externaldata-db-invalid-query' => 'استعلام غير صالح.',
 82+);
 83+
 84+/** Egyptian Spoken Arabic (مصرى)
 85+ * @author Dudi
 86+ * @author Meno25
 87+ */
 88+$messages['arz'] = array(
 89+ 'getdata' => 'الحصول على البيانات',
 90+ 'externaldata-desc' => 'بيسمح انك تجيب الداتا المتركبه من URLات برّانيه, و قواعد بيانات (databases) و مصادر تانيه',
 91+);
 92+
 93+/** Belarusian (Taraškievica orthography) (‪Беларуская (тарашкевіца)‬)
 94+ * @author EugeneZelenko
 95+ * @author Jim-by
 96+ */
 97+$messages['be-tarask'] = array(
 98+ 'getdata' => 'Атрымаць зьвесткі',
 99+ 'externaldata-desc' => 'Дазваляе атрымліваць структураваныя зьвесткі з вонкавых URL-адрасоў, базаў зьвестак і іншых крыніц',
 100+ 'externaldata-ldap-unable-to-connect' => 'Немагчыма далучыцца да $1',
 101+ 'externaldata-json-decode-not-supported' => 'Памылка: json_decode() не падтрымліваецца ў гэтай вэрсіі PHP',
 102+ 'externaldata-xml-error' => 'Памылка XML: $1 у радку $2',
 103+ 'externaldata-db-incomplete-information' => 'Памылка: Няпоўная інфармацыя для гэтага ідэнтыфікатара сэрвэра.',
 104+ 'externaldata-db-could-not-get-url' => 'Немагчыма атрымаць URL-адрас пасьля $1 {{PLURAL:$1|спробы|спробаў|спробаў}}.',
 105+ 'externaldata-db-unknown-type' => 'Памылка: Невядомы тып базы зьвестак.',
 106+ 'externaldata-db-could-not-connect' => 'Памылка: Немагчыма далучыцца да базы зьвестак.',
 107+ 'externaldata-db-no-return-values' => 'Памылка: Не пазначаныя выніковыя значэньні.',
 108+ 'externaldata-db-invalid-query' => 'Няслушны запыт.',
 109+ 'externaldata-db-option-unsupported' => 'Памылка: Парамэтры $1 і $2 не падтрымліваюцца ў гэтай вэрсіі MediaWiki.',
 110+);
 111+
 112+/** Breton (Brezhoneg)
 113+ * @author Fohanno
 114+ * @author Fulup
 115+ * @author Y-M D
 116+ */
 117+$messages['br'] = array(
 118+ 'getdata' => 'Tapout roadennoù',
 119+ 'externaldata-desc' => 'Talvezout a ra da adtapout roadennoù frammet adalek URLoù diavaez, diazoù titouroù ha mammennoù all.',
 120+ 'externaldata-ldap-unable-to-connect' => "Ne c'haller ket kevreañ ouzh $1",
 121+ 'externaldata-json-decode-not-supported' => "Fazi : json_decode() n'eo ket skoret er stumm-mañ eus PHP",
 122+ 'externaldata-xml-error' => 'Fazi XML : $1 el linenn $2',
 123+ 'externaldata-db-incomplete-information' => 'Fazi : Titouroù diglok evit an ID servijer-mañ.',
 124+ 'externaldata-db-could-not-get-url' => 'Dibosupl eo tapout an URL goude $1 {{PLURAL:$1|taol-esae|taol-esae}}.',
 125+ 'externaldata-db-unknown-type' => 'Fazi : Seurt diaz roadennoù dianav',
 126+ 'externaldata-db-could-not-connect' => "Fazi : Ne c'haller ket kevreañ ouzh an diaz roadennoù.",
 127+ 'externaldata-db-no-return-values' => "Fazi : N'eus bet resisaet talvoud distro ebet.",
 128+ 'externaldata-db-invalid-query' => 'Reked direizh.',
 129+ 'externaldata-db-option-unsupported' => "Fazi : N'eo ket skoret an arventennoù $1 ha $2 er stumm-mañ eus MediaWiki.",
 130+);
 131+
 132+/** Bosnian (Bosanski)
 133+ * @author CERminator
 134+ */
 135+$messages['bs'] = array(
 136+ 'getdata' => 'Uzmi podatke',
 137+ 'externaldata-desc' => 'Omogućuje za preuzimanje strukturnih podataka iz vanjskih URLova, baza podataka i drugih izvora',
 138+ 'externaldata-ldap-unable-to-connect' => 'Ne može se spojiti na $1',
 139+ 'externaldata-json-decode-not-supported' => 'Greška: json_decode() nije podržan u ovoj PHP verziji',
 140+ 'externaldata-xml-error' => 'XML greška: $1 na liniji $2',
 141+ 'externaldata-db-incomplete-information' => 'Greška: Nepotpune informacije za ovaj ID servera.',
 142+ 'externaldata-db-could-not-get-url' => 'Nije pronađen URL nakon $1 {{PLURAL:$1|pokušaja|pokušaja}}.',
 143+ 'externaldata-db-unknown-type' => 'Greška: Nepoznat tip baze podataka.',
 144+ 'externaldata-db-could-not-connect' => 'Greška: Ne može se spojiti na bazu podataka.',
 145+ 'externaldata-db-no-return-values' => 'Greška: Nije navedena povratna vrijednost.',
 146+ 'externaldata-db-invalid-query' => 'Nevaljan upit.',
 147+);
 148+
 149+/** Catalan (Català)
 150+ * @author Paucabot
 151+ * @author Solde
 152+ */
 153+$messages['ca'] = array(
 154+ 'getdata' => 'Obtenir dades',
 155+ 'externaldata-xml-error' => 'Error XML: $1 a la línia $2',
 156+ 'externaldata-db-unknown-type' => 'Error: Tipus de base de dades desconegut.',
 157+ 'externaldata-db-could-not-connect' => "Error: No s'ha pogut connectar a la base de dades.",
 158+ 'externaldata-db-invalid-query' => 'Consulta no vàlida.',
 159+);
 160+
 161+/** Czech (Česky)
 162+ * @author Jkjk
 163+ */
 164+$messages['cs'] = array(
 165+ 'getdata' => 'Získat data',
 166+ 'externaldata-desc' => 'Umožňuje získávání strukturovaných dat z externích webových stránek, databází a jiných zdrojů',
 167+ 'externaldata-ldap-unable-to-connect' => 'Nepodařilo se spojit s $1',
 168+ 'externaldata-json-decode-not-supported' => 'Chyba:tato verzie PHP nepodporuje json_decode()',
 169+ 'externaldata-xml-error' => 'Chyba XML: $1 na řádku $2',
 170+ 'externaldata-db-incomplete-information' => 'Chyba: Nekompletní informace pro toto ID serveru',
 171+ 'externaldata-db-unknown-type' => 'Chyba: Neznámý typ databáze.',
 172+ 'externaldata-db-could-not-connect' => 'Chyba: Nepodařilo se připojit k databázi.',
 173+ 'externaldata-db-no-return-values' => 'Chyba: Nebyly zadány návratové hodnoty.',
 174+ 'externaldata-db-invalid-query' => 'Neplatný požadavek.',
 175+);
 176+
 177+/** German (Deutsch)
 178+ * @author Imre
 179+ * @author Kghbln
 180+ * @author MF-Warburg
 181+ * @author Merlissimo
 182+ * @author Purodha
 183+ * @author Umherirrender
 184+ */
 185+$messages['de'] = array(
 186+ 'getdata' => 'Daten holen',
 187+ 'externaldata-desc' => 'Ermöglicht das Einfügen strukturierter Daten von externen URLs, Datenbanken und anderen Quellen',
 188+ 'externaldata-ldap-unable-to-connect' => 'Keine Verbindung zu $1',
 189+ 'externaldata-json-decode-not-supported' => 'Fehler: json_decode() wird nicht von dieser PHP-Version unterstützt.',
 190+ 'externaldata-xml-error' => 'XML-Fehler: $1 in Zeile $2',
 191+ 'externaldata-db-incomplete-information' => 'Fehler: Unvollständige Informationen für diese Server-ID.',
 192+ 'externaldata-db-could-not-get-url' => 'URL konnte nach $1 {{PLURAL:$1|Versuch|Versuchen}} nicht abgerufen werden.',
 193+ 'externaldata-db-unknown-type' => 'Fehler: Unbekannter Datenbanktyp.',
 194+ 'externaldata-db-could-not-connect' => 'Fehler: Keine Verbindung zur Datenbank.',
 195+ 'externaldata-db-no-return-values' => 'Fehler: Keine Rückgabewerte festgelegt.',
 196+ 'externaldata-db-invalid-query' => 'Ungültige Abfrage.',
 197+ 'externaldata-db-option-unsupported' => 'Fehler: Die Parameter $1 und $2 werden von dieser MediaWiki-Version nicht unterstützt.',
 198+);
 199+
 200+/** Lower Sorbian (Dolnoserbski)
 201+ * @author Michawiki
 202+ */
 203+$messages['dsb'] = array(
 204+ 'getdata' => 'Daty wobstaraś',
 205+ 'externaldata-desc' => 'Zmóžnja wótwołowanje strukturěrowanych datow z eksternych URL, datowych bankow a drugich žrědłow',
 206+ 'externaldata-ldap-unable-to-connect' => 'Njemóžno z $1 zwězaś',
 207+ 'externaldata-json-decode-not-supported' => 'Zmólka: json_decode() njepódpěra se w toś tej wersiji PHP',
 208+ 'externaldata-xml-error' => 'Zmólka XML: $1 na smužce $2',
 209+ 'externaldata-db-incomplete-information' => "'''Zmólka: Njedopołne informacije za toś ten serwerowy ID.'''",
 210+ 'externaldata-db-could-not-get-url' => 'Njemóžno URL pó $1 {{PLURAL:$1|wopyśe|wopytoma|wopytach|wopytach}} dostaś.',
 211+ 'externaldata-db-unknown-type' => "'''Zmólka: Njeznata datowa banka.'''",
 212+ 'externaldata-db-could-not-connect' => "'''Zmólka: Njemóžno z datoweju banku zwězaś.'''",
 213+ 'externaldata-db-no-return-values' => "'''Zmólka: Žedne gódnoty slědkdaśa pódane.'''",
 214+ 'externaldata-db-invalid-query' => 'Njepłaśiwe napšašowanje.',
 215+);
 216+
 217+/** Greek (Ελληνικά)
 218+ * @author Dead3y3
 219+ * @author Omnipaedista
 220+ */
 221+$messages['el'] = array(
 222+ 'getdata' => 'Πάρε δεδομένα',
 223+ 'externaldata-desc' => 'Επιτρέπει την ανάκτηση δεδομένων σε μορφές CSV, JSON και XML και για εξωτερικά URLs και για σελίδες του τοπικού wiki',
 224+ 'externaldata-xml-error' => 'Σφάλμα XML : $1 στη γραμμή $2',
 225+ 'externaldata-db-invalid-query' => 'Άκυρο αίτημα.',
 226+);
 227+
 228+/** Esperanto (Esperanto)
 229+ * @author Yekrats
 230+ */
 231+$messages['eo'] = array(
 232+ 'externaldata-db-invalid-query' => 'Malvalida serĉomendo.',
 233+);
 234+
 235+/** Spanish (Español)
 236+ * @author Crazymadlover
 237+ * @author Imre
 238+ * @author Manuelt15
 239+ * @author Sanbec
 240+ * @author Translationista
 241+ */
 242+$messages['es'] = array(
 243+ 'getdata' => 'Obtener datos',
 244+ 'externaldata-desc' => 'Permite la recuperación de datos estructurados a partir de direcciones URL externas, bases de datos y otras fuentes',
 245+ 'externaldata-ldap-unable-to-connect' => 'No se pudo conectar con $1',
 246+ 'externaldata-json-decode-not-supported' => 'Error: json_decode() no es compatible con esta versión de PHP',
 247+ 'externaldata-xml-error' => 'Error XML: $1 en línea $2',
 248+ 'externaldata-db-incomplete-information' => 'Error: Información incompleta para este ID de servidor.',
 249+ 'externaldata-db-could-not-get-url' => 'No se pudo obtener la URL después de $1 {{PLURAL:$1|intento|intentos}}.',
 250+ 'externaldata-db-unknown-type' => 'Error: Tipo de base de datos desconocido.',
 251+ 'externaldata-db-could-not-connect' => 'Error: No se pudo lograr conexión con la base de datos.',
 252+ 'externaldata-db-no-return-values' => 'Error: No se ha especificado valores de retorno.',
 253+ 'externaldata-db-invalid-query' => 'Consulta inválida.',
 254+);
 255+
 256+/** Basque (Euskara)
 257+ * @author Kobazulo
 258+ */
 259+$messages['eu'] = array(
 260+ 'getdata' => 'Datuak eskuratu',
 261+);
 262+
 263+/** Finnish (Suomi)
 264+ * @author Centerlink
 265+ * @author Crt
 266+ * @author Silvonen
 267+ * @author Str4nd
 268+ */
 269+$messages['fi'] = array(
 270+ 'getdata' => 'Hae data',
 271+ 'externaldata-desc' => 'Mahdollistaa muotoillun datan noutamisen ulkoisista verkko-osoitteista, tietokannoista ja muista lähteistä.',
 272+ 'externaldata-ldap-unable-to-connect' => 'Ei voitu yhdistää palvelimelle $1',
 273+ 'externaldata-json-decode-not-supported' => 'Virhe: json_decode() ei ole tuettu tässä PHP:n versiossa',
 274+ 'externaldata-xml-error' => 'XML-virhe: $1 rivillä $2',
 275+ 'externaldata-db-incomplete-information' => 'Virhe: Vaillinaiset tiedot tälle palvelintunnukselle.',
 276+ 'externaldata-db-could-not-get-url' => 'Ei voitu hakea verkko-osoitetta $1 {{PLURAL:$1|yrityksen|yrityksen}} jälkeen.',
 277+ 'externaldata-db-unknown-type' => 'Virhe: Tuntematon tietokantatyyppi.',
 278+ 'externaldata-db-could-not-connect' => 'Virhe: Ei yhteyttä tietokantaan.',
 279+ 'externaldata-db-no-return-values' => 'Virhe: Paluuarvoja ei ole annettu.',
 280+ 'externaldata-db-invalid-query' => 'Virheellinen kysely.',
 281+);
 282+
 283+/** French (Français)
 284+ * @author Crochet.david
 285+ * @author IAlex
 286+ * @author McDutchie
 287+ * @author PieRRoMaN
 288+ */
 289+$messages['fr'] = array(
 290+ 'getdata' => 'Obtenir des données',
 291+ 'externaldata-desc' => "Permet de récupérer des données structurées à partir d'URL externes, de bases de données et d'autres sources",
 292+ 'externaldata-ldap-unable-to-connect' => 'Impossible de se connecter à $1',
 293+ 'externaldata-json-decode-not-supported' => "Erreur : json_decode() n'est pas supportée dans cette version de PHP",
 294+ 'externaldata-xml-error' => 'Erreur XML : $1 à la ligne $2',
 295+ 'externaldata-db-incomplete-information' => 'Erreur : Informations incomplètes pour cet identifiant de serveur.',
 296+ 'externaldata-db-could-not-get-url' => "Impossible d'obtenir l'URL après $1 essai{{PLURAL:$1|s|s}}.",
 297+ 'externaldata-db-unknown-type' => 'ERREUR: Type de base de données inconnu.',
 298+ 'externaldata-db-could-not-connect' => 'Erreur : Impossible de se connecter à la base de données.',
 299+ 'externaldata-db-no-return-values' => "Erreur : Aucune valeur de retour n'a été spécifiée.",
 300+ 'externaldata-db-invalid-query' => 'Requête invalide.',
 301+ 'externaldata-db-option-unsupported' => 'Erreur: Les paramètres $1 et $2 ne sont pas supportés dans cette version de MediaWiki.',
 302+);
 303+
 304+/** Galician (Galego)
 305+ * @author Toliño
 306+ */
 307+$messages['gl'] = array(
 308+ 'getdata' => 'Obter os datos',
 309+ 'externaldata-desc' => 'Permite a recuperación de datos estruturados a partir de enderezos URL externos, bases de datos e outras fontes',
 310+ 'externaldata-ldap-unable-to-connect' => 'Non se pode conectar a $1',
 311+ 'externaldata-json-decode-not-supported' => 'Erro: json_decode() non está soportado nesta versión de PHP',
 312+ 'externaldata-xml-error' => 'Erro XML: $1 na liña $2',
 313+ 'externaldata-db-incomplete-information' => 'Erro: información incompleta para este ID de servidor.',
 314+ 'externaldata-db-could-not-get-url' => 'Non se puido obter o enderezo URL despois de $1 {{PLURAL:$1|intento|intentos}}.',
 315+ 'externaldata-db-unknown-type' => 'Erro: tipo de base de datos descoñecido.',
 316+ 'externaldata-db-could-not-connect' => 'Erro: non se puido conectar á base de datos.',
 317+ 'externaldata-db-no-return-values' => 'Erro: non se especificou ningún valor de retorno.',
 318+ 'externaldata-db-invalid-query' => 'Consulta non válida.',
 319+ 'externaldata-db-option-unsupported' => 'Erro: Os parámetros $1 e $2 non están soportados nesta versión de MediaWiki.',
 320+);
 321+
 322+/** Swiss German (Alemannisch)
 323+ * @author Als-Holder
 324+ */
 325+$messages['gsw'] = array(
 326+ 'getdata' => 'Date hole',
 327+ 'externaldata-desc' => 'Erlaubt strukturierti Daten abzruefe vu extärne URL un andre Quälle',
 328+ 'externaldata-ldap-unable-to-connect' => 'Cha kei Verbindig härstellen zue $1',
 329+ 'externaldata-json-decode-not-supported' => 'Fähler: json_decode() wird nit unterstitzt in däre Version vu PHP',
 330+ 'externaldata-xml-error' => 'XML-Fähler: $1 in dr Zyyle $2',
 331+ 'externaldata-db-incomplete-information' => 'Fähler: Nit vollständigi Information fir die Server-ID.',
 332+ 'externaldata-db-could-not-get-url' => 'Cha d URL nit finde no $1 {{PLURAL:$1|Versuech|Versuech}}.',
 333+ 'externaldata-db-unknown-type' => 'Fähler: Nit bekannte Datebanktyp.',
 334+ 'externaldata-db-could-not-connect' => 'Fähler: Cha kei Verbindig härstelle zue dr Datebank.',
 335+ 'externaldata-db-no-return-values' => 'Fähler: Kei Ruckgabewärt spezifiziert.',
 336+ 'externaldata-db-invalid-query' => 'Nit giltigi Umfrog.',
 337+);
 338+
 339+/** Gujarati (ગુજરાતી)
 340+ * @author Ashok modhvadia
 341+ */
 342+$messages['gu'] = array(
 343+ 'getdata' => 'માહિતી પ્રાપ્ત કરો',
 344+ 'externaldata-desc' => 'બાહ્ય કડીઓ અને સ્થાનિક વિકિ પાનાઓ પરથી CSV, JSON અને XML શૈલીમાં માહિતીની પુન:પ્રાપ્તિની છુટ',
 345+);
 346+
 347+/** Hebrew (עברית)
 348+ * @author Amire80
 349+ * @author Rotemliss
 350+ * @author YaronSh
 351+ */
 352+$messages['he'] = array(
 353+ 'getdata' => 'קבלת נתונים',
 354+ 'externaldata-desc' => 'אפשרות לקבלת נתונים במבנים מכתובות חיצוניות, מסדי נתונים ומקורות אחרים',
 355+ 'externaldata-ldap-unable-to-connect' => 'לא ניתן להתחבר ל־$1',
 356+ 'externaldata-json-decode-not-supported' => 'שגיאה: הפקודה json_decode() אינה נתמכת בגרסה זו של PHP',
 357+ 'externaldata-xml-error' => 'שגיאת XML: $1 בשורה $2',
 358+ 'externaldata-db-incomplete-information' => 'שגיאה: יש רק מידע חלקי על מספר השרת הזה.',
 359+ 'externaldata-db-could-not-get-url' => 'לא ניתן לקבל את כתובת ה־URL לאחר {{PLURAL:$1|נסיון אחד|$1 נסיונות}}.',
 360+ 'externaldata-db-unknown-type' => 'שגיאה: סוג בסיס הנתונים אינו מוכר.',
 361+ 'externaldata-db-could-not-connect' => 'שגיאה: לא ניתן להתחבר אל בסיס הנתונים.',
 362+ 'externaldata-db-no-return-values' => 'שגיאה: לא הוגדרו ערכים להחזרה.',
 363+ 'externaldata-db-invalid-query' => 'שאילתה בלתי תקינה.',
 364+ 'externaldata-db-option-unsupported' => 'שגיאה: הפרמטרים $1 ו{{GRAMMAR:תחילית|$2}} אינם נתמכים בגרסה הזאת של מדיה־ויקי',
 365+);
 366+
 367+/** Upper Sorbian (Hornjoserbsce)
 368+ * @author Michawiki
 369+ */
 370+$messages['hsb'] = array(
 371+ 'getdata' => 'Daty wobstarać',
 372+ 'externaldata-desc' => 'Zmóžnja wotwołowanje strukturowanych datow z eksternych URL, datowych bankow a druhich žórłow',
 373+ 'externaldata-ldap-unable-to-connect' => 'Njemóžno z $1 zwjazać',
 374+ 'externaldata-json-decode-not-supported' => 'Zmylk: json_decode() so w tutej wersiji PHP njepodpěruje',
 375+ 'externaldata-xml-error' => 'Zmylk XML: $1 na lince $2',
 376+ 'externaldata-db-incomplete-information' => "'''Zmylk: Njedospołne informacije za ID tutoho serwera.'''",
 377+ 'externaldata-db-could-not-get-url' => 'Njebě móžno URL po $1 {{PLURAL:$1|pospyće|pospytomaj|pospytach|pospytach}} dóstać.',
 378+ 'externaldata-db-unknown-type' => "'''Zmylk: Njeznaty typ datoweje banki.'''",
 379+ 'externaldata-db-could-not-connect' => "'''Zmylk: Njemóžno z datowej banku zwjazać.'''",
 380+ 'externaldata-db-no-return-values' => "'''Zmylk: Žane hódnoty wróćenja podate.'''",
 381+ 'externaldata-db-invalid-query' => 'Njepłaćiwe naprašowanje.',
 382+);
 383+
 384+/** Hungarian (Magyar)
 385+ * @author Glanthor Reviol
 386+ */
 387+$messages['hu'] = array(
 388+ 'getdata' => 'Adatok lekérése',
 389+ 'externaldata-desc' => 'Strukturált adatok lekérése külső URL-ekről, adatbázisokból vagy más forrásokból',
 390+ 'externaldata-ldap-unable-to-connect' => 'Sikertelen csatlakozás a következőhöz: $1',
 391+ 'externaldata-json-decode-not-supported' => 'Hiba: a json_decode() nem támogatott ebben a PHP verzióban',
 392+ 'externaldata-xml-error' => '$1 XML hiba, $2. sor',
 393+ 'externaldata-db-incomplete-information' => 'Hiba: hiányos információ a szerver azonosítóhoz.',
 394+ 'externaldata-db-could-not-get-url' => 'Nem sikerült lekérni az URL-t {{PLURAL:$1|egy|$1}} próbálkozás alatt.',
 395+ 'externaldata-db-unknown-type' => 'Hiba: ismeretlen adatbázis típus.',
 396+ 'externaldata-db-could-not-connect' => 'Hiba: nem sikerült csatlakozni az adatbázishoz.',
 397+ 'externaldata-db-no-return-values' => 'Hiba: nem lettek megadva visszatérési értékek.',
 398+ 'externaldata-db-invalid-query' => 'Érvénytelen lekérdezés.',
 399+);
 400+
 401+/** Interlingua (Interlingua)
 402+ * @author McDutchie
 403+ */
 404+$messages['ia'] = array(
 405+ 'getdata' => 'Obtener datos',
 406+ 'externaldata-desc' => 'Permitte recuperar datos structurate ab adresses URL, bases de datos e altere fontes externe',
 407+ 'externaldata-ldap-unable-to-connect' => 'Impossibile connecter se a $1',
 408+ 'externaldata-json-decode-not-supported' => 'Error: json_decode() non es supportate in iste version de PHP',
 409+ 'externaldata-xml-error' => 'Error de XML: $1 al linea $2',
 410+ 'externaldata-db-incomplete-information' => 'Error: Information incomplete pro iste ID de servitor.',
 411+ 'externaldata-db-could-not-get-url' => 'Non poteva obtener le URL post $1 {{PLURAL:$1|tentativa|tentativas}}.',
 412+ 'externaldata-db-unknown-type' => 'Error: Typo de base de datos incognite.',
 413+ 'externaldata-db-could-not-connect' => 'Error: Impossibile connecter se al base de datos.',
 414+ 'externaldata-db-no-return-values' => 'Error: Nulle valor de retorno specificate.',
 415+ 'externaldata-db-invalid-query' => 'Consulta invalide.',
 416+ 'externaldata-db-option-unsupported' => 'Error: Le parametros $1 e $2 non es supportate in iste version de MediaWiki.',
 417+);
 418+
 419+/** Indonesian (Bahasa Indonesia)
 420+ * @author Bennylin
 421+ * @author IvanLanin
 422+ * @author Iwan Novirion
 423+ */
 424+$messages['id'] = array(
 425+ 'getdata' => 'Ambil data',
 426+ 'externaldata-desc' => 'Memungkinkan untuk mengambil data terstruktur dari URL eksternal, database dan sumber lainnya',
 427+ 'externaldata-ldap-unable-to-connect' => 'Tidak dapat terhubung ke $1',
 428+ 'externaldata-json-decode-not-supported' => 'Galat: json_decode() tidak didukung oleh versi PHP ini',
 429+ 'externaldata-xml-error' => 'Galat XML: $1 pada baris $2',
 430+ 'externaldata-db-incomplete-information' => 'Galat: Informasi tak lengkap untuk ID server ini.',
 431+ 'externaldata-db-could-not-get-url' => 'Tidak dapat mengambil URL setelah dicoba {{PLURAL:$1||}}$1 kali.',
 432+ 'externaldata-db-unknown-type' => 'Galat: Jenis basis data tidak diketahui.',
 433+ 'externaldata-db-could-not-connect' => 'Galat: Tidak dapat terhubung ke basis data.',
 434+ 'externaldata-db-no-return-values' => 'Galat: Nilai pengembalian tidak dispesifikasi.',
 435+ 'externaldata-db-invalid-query' => 'Kueri tidak sah.',
 436+ 'externaldata-db-option-unsupported' => 'Galat: Parameter $1 dan $2 tidak didukung oleh versi MediaWiki ini.',
 437+);
 438+
 439+/** Italian (Italiano)
 440+ * @author Beta16
 441+ * @author Pietrodn
 442+ */
 443+$messages['it'] = array(
 444+ 'getdata' => 'Ottieni dati',
 445+ 'externaldata-desc' => 'Consente di recuperare dati strutturati da URL esterni, database o altre sorgenti',
 446+ 'externaldata-ldap-unable-to-connect' => 'Impossibile connettersi a $1',
 447+ 'externaldata-json-decode-not-supported' => 'Errore: json_decode() non è supportato in questa versione di PHP',
 448+ 'externaldata-xml-error' => 'Errore XML: $1 alla linea $2',
 449+ 'externaldata-db-incomplete-information' => 'Errore: informazioni incomplete per questo server ID.',
 450+ 'externaldata-db-could-not-get-url' => "Impossibile raggiungere l'URL dopo $1 {{PLURAL:$1|tentativo|tentativi}}.",
 451+ 'externaldata-db-unknown-type' => 'Errore: tipo di database sconosciuto.',
 452+ 'externaldata-db-could-not-connect' => 'Errore: impossibile connettersi al database.',
 453+ 'externaldata-db-no-return-values' => 'Errore: non è stato specificato alcun valore di ritorno.',
 454+ 'externaldata-db-invalid-query' => 'Query non valida.',
 455+ 'externaldata-db-option-unsupported' => 'Errore: i parametri $1 e $2 non sono supportati in questa versione di MediaWiki.',
 456+);
 457+
 458+/** Japanese (日本語)
 459+ * @author Fryed-peach
 460+ * @author 青子守歌
 461+ */
 462+$messages['ja'] = array(
 463+ 'getdata' => 'データ取得',
 464+ 'externaldata-desc' => '外部URLやデータベース、その他のソースからデータを取得できるようにする',
 465+ 'externaldata-ldap-unable-to-connect' => '$1 に接続できません',
 466+ 'externaldata-json-decode-not-supported' => 'エラー: json_decode() はこのバージョンの PHP ではサポートされていません',
 467+ 'externaldata-xml-error' => 'XMLエラー: 行$2で$1',
 468+ 'externaldata-db-incomplete-information' => 'エラー: このサーバーIDに対する情報が不十分です。',
 469+ 'externaldata-db-could-not-get-url' => '$1回の試行を行いましたが URL を取得できませんでした。',
 470+ 'externaldata-db-unknown-type' => 'エラー: データベースの種類が不明です。',
 471+ 'externaldata-db-could-not-connect' => 'エラー: データベースに接続できませんでした。',
 472+ 'externaldata-db-no-return-values' => 'エラー: 戻り値が指定されていません。',
 473+ 'externaldata-db-invalid-query' => '不正なクエリー',
 474+);
 475+
 476+/** Khmer (ភាសាខ្មែរ)
 477+ * @author វ័ណថារិទ្ធ
 478+ */
 479+$messages['km'] = array(
 480+ 'getdata' => 'យក​ទិន្នន័យ',
 481+);
 482+
 483+/** Colognian (Ripoarisch)
 484+ * @author Purodha
 485+ */
 486+$messages['ksh'] = array(
 487+ 'getdata' => 'Date holle!',
 488+ 'externaldata-desc' => 'Määt et müjjelich, Date en beshtemmpte Fomaate fun främbde <i lang="en">URLs</i>, Daatebangke, un ander Quälle ze holle.',
 489+ 'externaldata-ldap-unable-to-connect' => 'Kann nit noh $1 verbenge',
 490+ 'externaldata-json-decode-not-supported' => '<span style="text-transform: uppercase">Fähler:</span> De Fungxuhn <code lang="en">json_decode()</code> weedt vun heh dä Version vun <i lang="en">PHP</i> nit ongerschtöz.',
 491+ 'externaldata-xml-error' => 'Fähler em XML, op Reih $2: $1',
 492+ 'externaldata-db-incomplete-information' => '<span style="text-transform: uppercase">Fähler:</span> De Enfomazjuhne vör di ẞööver-Kännong sin nit kumplätt.',
 493+ 'externaldata-db-could-not-get-url' => 'Kunnt {{PLURAL:$1|noh eimohl Versöhke|och noh $1 Mohl Versöhke|ohne enne Versöhk}} nix vun däm <i lang="en">URL</i> krijje.',
 494+ 'externaldata-db-unknown-type' => '<span style="text-transform: uppercase">Fähler:</span> Di Zoot Datebangk es unbikannt.',
 495+ 'externaldata-db-could-not-connect' => '<span style="text-transform: uppercase">Fähler:</span> Kunnt kein Verbendung noh dä Datebangk krijje.',
 496+ 'externaldata-db-no-return-values' => '<span style="text-transform: uppercase">Fähler:</span> Kein Wääte för Zerökzeävve aanjejovve.',
 497+ 'externaldata-db-invalid-query' => 'Onjöltesch Frooch aan de Datebangk.',
 498+ 'externaldata-db-option-unsupported' => 'Fähler: Heh di Version vum MediaWiki vershteiht de Parrmeetere $1 un $2 nit.',
 499+);
 500+
 501+/** Luxembourgish (Lëtzebuergesch)
 502+ * @author Robby
 503+ */
 504+$messages['lb'] = array(
 505+ 'getdata' => 'Donnéeë kréien',
 506+ 'externaldata-desc' => 'Erlaabt et Donnéeën vun externen URLen, Datebanken an anere Quellen ze verschaffen',
 507+ 'externaldata-ldap-unable-to-connect' => 'Onméiglech sech op $1 ze connectéieren',
 508+ 'externaldata-json-decode-not-supported' => 'Feeler: json_decode() gëtt an dëser Versioun vu PHP net ënnerstëtzt',
 509+ 'externaldata-xml-error' => 'XML Feeler: $1 an der Linn $2',
 510+ 'externaldata-db-incomplete-information' => 'Feeler: Informatioun fir dës Server ID net komplett.',
 511+ 'externaldata-db-could-not-get-url' => "D'URL konnt no {{PLURAL:$1|enger Kéier|$1 Versich}} net opgemaach ginn.",
 512+ 'externaldata-db-unknown-type' => 'Feeler: Onbekannten Datebank-Typ.',
 513+ 'externaldata-db-could-not-connect' => "Feeler: D'Verbindung mat der Datebank konnt net opgebaut ginn.",
 514+ 'externaldata-db-no-return-values' => 'Feeler: Kee Retour-Wäert festgeluecht.',
 515+ 'externaldata-db-invalid-query' => 'Net valabel Ufro.',
 516+ 'externaldata-db-option-unsupported' => "Feeler: D'Parametere(n) $1 a(n) $2 gi vun dëser Versioun vu MediaWiki net ënnerstëtzt.",
 517+);
 518+
 519+/** Macedonian (Македонски)
 520+ * @author Bjankuloski06
 521+ */
 522+$messages['mk'] = array(
 523+ 'getdata' => 'Земи податоци',
 524+ 'externaldata-desc' => 'Овозможува добивање структурирани податоци од надворешни URL-адреси, бази на податоци и други извори',
 525+ 'externaldata-ldap-unable-to-connect' => 'Не можам да се поврзам со $1',
 526+ 'externaldata-json-decode-not-supported' => 'Грешка: json_decode() не е поддржан во оваа верзија на PHP',
 527+ 'externaldata-xml-error' => 'XML грешка: $1 во ред $2',
 528+ 'externaldata-db-incomplete-information' => 'Грешка: Нецелосни информации за овој опслужувачки ид. бр.',
 529+ 'externaldata-db-could-not-get-url' => 'Не можев да ја добијам URL адресата по $1 {{PLURAL:$1|обид|обиди}}.',
 530+ 'externaldata-db-unknown-type' => 'Грешка: Непознат тип на база на податоци.',
 531+ 'externaldata-db-could-not-connect' => 'Грешка: Не можев да се поврзам со базата на податоци.',
 532+ 'externaldata-db-no-return-values' => 'Грешка: Нема назначено повратни вредности.',
 533+ 'externaldata-db-invalid-query' => 'Грешно барање.',
 534+ 'externaldata-db-option-unsupported' => 'Грешка: Параметрите $1 и $2 не се поддржани во оваа верзија на МедијаВики.',
 535+);
 536+
 537+/** Erzya (Эрзянь)
 538+ * @author Botuzhaleny-sodamo
 539+ */
 540+$messages['myv'] = array(
 541+ 'getdata' => 'Дата мельга',
 542+);
 543+
 544+/** Dutch (Nederlands)
 545+ * @author Siebrand
 546+ */
 547+$messages['nl'] = array(
 548+ 'getdata' => 'Gegevens ophalen',
 549+ 'externaldata-desc' => "Maakt het mogelijk gegevens van externe URL's, database en andere externe bronnen op te halen",
 550+ 'externaldata-ldap-unable-to-connect' => 'Het was niet mogelijk te verbinden met $1',
 551+ 'externaldata-json-decode-not-supported' => 'Fout: json_decode() wordt niet ondersteund in deze versie van PHP',
 552+ 'externaldata-xml-error' => 'XML-fout: $1 op regel $2',
 553+ 'externaldata-db-incomplete-information' => 'Fout: Onvolledige informatie voor dit servernummer.',
 554+ 'externaldata-db-could-not-get-url' => 'Na $1 {{PLURAL:$1|poging|pogingen}} gaf de URL geen resultaat.',
 555+ 'externaldata-db-unknown-type' => 'Fout: onbekend databasetype.',
 556+ 'externaldata-db-could-not-connect' => 'Fout: het was niet mogelijk met de database te verbinden.',
 557+ 'externaldata-db-no-return-values' => 'Fout: er zijn geen return-waarden ingesteld.',
 558+ 'externaldata-db-invalid-query' => 'Ongeldige zoekopdracht.',
 559+ 'externaldata-db-option-unsupported' => 'Fout: de parameters $1 en $2 worden niet ondersteund in deze versie van MediaWiki.',
 560+);
 561+
 562+/** Norwegian Nynorsk (‪Norsk (nynorsk)‬)
 563+ * @author Gunnernett
 564+ * @author Harald Khan
 565+ */
 566+$messages['nn'] = array(
 567+ 'getdata' => 'Hent data',
 568+ 'externaldata-desc' => 'Gjev høve til å henta strukturerte data frå eksterne URL-ar, databasar og andre kjelder',
 569+ 'externaldata-ldap-unable-to-connect' => 'Kunne ikkje kopla til $1',
 570+ 'externaldata-json-decode-not-supported' => 'Feil: json_decode() er ikkje stødd i denne versjonen av PHP',
 571+ 'externaldata-xml-error' => 'XML-feil: $1 på line $2',
 572+ 'externaldata-db-incomplete-information' => 'Feil: Ufullstendig informasjon for denne tenar-ID-en.',
 573+ 'externaldata-db-could-not-get-url' => 'Kunne ikkje henta URL etter {{PLURAL:$1|eitt forsøk|$1 forsøk}}.',
 574+ 'externaldata-db-unknown-type' => 'Feil: Ukjend databasetype.',
 575+ 'externaldata-db-could-not-connect' => 'Feil: Kunne ikkje kopla til databasen.',
 576+ 'externaldata-db-no-return-values' => 'Feil: Ingen returverdiar oppgjevne.',
 577+ 'externaldata-db-invalid-query' => 'Ugyldig spørjing.',
 578+);
 579+
 580+/** Norwegian (bokmål)‬ (‪Norsk (bokmål)‬)
 581+ * @author Harald Khan
 582+ * @author Nghtwlkr
 583+ */
 584+$messages['no'] = array(
 585+ 'getdata' => 'Hent data',
 586+ 'externaldata-desc' => 'Gir mulighet til å hente strukturerte data fra eksterne internettadresser, databaser og andre kilder',
 587+ 'externaldata-ldap-unable-to-connect' => 'Klarte ikke å koble til $1',
 588+ 'externaldata-json-decode-not-supported' => 'Feil: json_decode() er ikke støttet i denne versjonen av PHP',
 589+ 'externaldata-xml-error' => 'XML-feil: $1 på linje $2',
 590+ 'externaldata-db-incomplete-information' => 'Feil: Ufullstendig informasjon for denne tjener-IDen.',
 591+ 'externaldata-db-could-not-get-url' => 'Kunne ikke hente URL etter {{PLURAL:$1|ett forsøk|$1 forsøk}}.',
 592+ 'externaldata-db-unknown-type' => 'Feil: Ukjent databasetype.',
 593+ 'externaldata-db-could-not-connect' => 'Feil: Kunne ikke koble til database.',
 594+ 'externaldata-db-no-return-values' => 'Feil: Ingen returverdi spesifisert.',
 595+ 'externaldata-db-invalid-query' => 'Ugyldig spørring.',
 596+ 'externaldata-db-option-unsupported' => 'Feil: Parameterne $1 og $2 er ikke støttet i denne versjonen av MediaWiki.',
 597+);
 598+
 599+/** Occitan (Occitan)
 600+ * @author Cedric31
 601+ */
 602+$messages['oc'] = array(
 603+ 'getdata' => 'Obténer de donadas',
 604+ 'externaldata-desc' => "Permet de recuperar de donadas estructuradas a partir d'URL extèrnas, de bancas de donadas e d'autras fonts",
 605+ 'externaldata-ldap-unable-to-connect' => 'Impossible de se connectar a $1',
 606+ 'externaldata-json-decode-not-supported' => 'Error : json_decode() es pas suportada dins aquesta version de PHP',
 607+ 'externaldata-xml-error' => 'Error XML : $1 a la linha $2',
 608+ 'externaldata-db-incomplete-information' => 'Error : Informacions incompletas per aqueste identificant de servidor.',
 609+ 'externaldata-db-could-not-get-url' => "Impossible d'obténer l'URL aprèp $1 {{PLURAL:$1|ensag|ensages}}.",
 610+ 'externaldata-db-unknown-type' => 'ERROR: Tipe de banca de donadas desconegut.',
 611+ 'externaldata-db-could-not-connect' => 'Error : Impossible de se connectar a la banca de donadas.',
 612+ 'externaldata-db-no-return-values' => 'Error : Cap de valor de retorn es pas estada especificada.',
 613+ 'externaldata-db-invalid-query' => 'Requèsta invalida.',
 614+);
 615+
 616+/** Polish (Polski)
 617+ * @author Leinad
 618+ * @author Sp5uhe
 619+ */
 620+$messages['pl'] = array(
 621+ 'getdata' => 'Pobierz dane',
 622+ 'externaldata-desc' => 'Umożliwia pobieranie strukturalnych danych z zewnętrznych adresów URL, baz danych i innych źródeł',
 623+ 'externaldata-ldap-unable-to-connect' => 'Nie można połączyć się z $1',
 624+ 'externaldata-json-decode-not-supported' => 'Błąd – json_decode() nie jest obsługiwana w tej wersji PHP',
 625+ 'externaldata-xml-error' => 'Błąd XML – $1 w wierszu $2',
 626+ 'externaldata-db-incomplete-information' => 'Błąd – niepełne informacje o tym identyfikatorze serwera.',
 627+ 'externaldata-db-could-not-get-url' => 'Nie można uzyskać adresu URL po $1 {{PLURAL:$1|próbie|próbach}}.',
 628+ 'externaldata-db-unknown-type' => 'Błąd: Nieznany typ bazy danych.',
 629+ 'externaldata-db-could-not-connect' => 'Błąd: Nie można połączyć się z bazą danych.',
 630+ 'externaldata-db-no-return-values' => 'Błąd – nie określono zwracanej wartości.',
 631+ 'externaldata-db-invalid-query' => 'Nieprawidłowe zapytanie.',
 632+);
 633+
 634+/** Piedmontese (Piemontèis)
 635+ * @author Borichèt
 636+ * @author Dragonòt
 637+ */
 638+$messages['pms'] = array(
 639+ 'getdata' => 'Oten dij dat',
 640+ 'externaldata-desc' => "A përmët d'arcuperé dat struturà da adrësse dl'aragnà esterne, base ëd dàit e d'àutre sorgiss",
 641+ 'externaldata-ldap-unable-to-connect' => 'A peul pa coleghesse a $1',
 642+ 'externaldata-json-decode-not-supported' => "Eror: json_decode() a l'é pa suportà an sta vërsion ëd PHP",
 643+ 'externaldata-xml-error' => 'Eror XML: $1 a la linia $2',
 644+ 'externaldata-db-incomplete-information' => 'Eror: Anformassion pa completa për sto server ID-sì.',
 645+ 'externaldata-db-could-not-get-url' => "A peul pa oten-e l'URL d'apress ëd $1 {{PLURAL:$1|preuva|preuve}}.",
 646+ 'externaldata-db-unknown-type' => 'Eror: Sòrt ëd database pa conossùa',
 647+ 'externaldata-db-could-not-connect' => 'Eror: a peul pa coleghesse al database.',
 648+ 'externaldata-db-no-return-values' => "Eror: Pa gnun valor d'artorn spessifià.",
 649+ 'externaldata-db-invalid-query' => 'Ciamà pa bon-a.',
 650+ 'externaldata-db-option-unsupported' => 'Eror: paràmetr $1 e $2 a son pa apogià an sta vërsion ëd MediaWiki.',
 651+);
 652+
 653+/** Portuguese (Português)
 654+ * @author Giro720
 655+ * @author Hamilton Abreu
 656+ * @author Waldir
 657+ */
 658+$messages['pt'] = array(
 659+ 'getdata' => 'Obter dados',
 660+ 'externaldata-desc' => 'Permite a importação de dados estruturados a partir de URLs, bases de dados e outras fontes externas',
 661+ 'externaldata-ldap-unable-to-connect' => 'Não foi possível estabelecer ligação a $1',
 662+ 'externaldata-json-decode-not-supported' => 'Erro: json_decode() não é suportado nesta versão do PHP',
 663+ 'externaldata-xml-error' => 'Erro XML: $1 na linha $2',
 664+ 'externaldata-db-incomplete-information' => 'Erro: Informação incompleta para o ID deste servidor.',
 665+ 'externaldata-db-could-not-get-url' => 'Não foi possível importar a URL após {{PLURAL:$1|uma tentativa|$1 tentativas}}.',
 666+ 'externaldata-db-unknown-type' => 'Erro: Tipo de base de dados desconhecido.',
 667+ 'externaldata-db-could-not-connect' => 'Erro: Não foi possível estabelecer ligação à base de dados.',
 668+ 'externaldata-db-no-return-values' => 'Erro: Não foram especificados nenhuns valores de retorno.',
 669+ 'externaldata-db-invalid-query' => "''Query'' inválida.",
 670+ 'externaldata-db-option-unsupported' => 'Erro: Os parâmetros $1 e $2 não são suportados nesta versão do MediaWiki.',
 671+);
 672+
 673+/** Brazilian Portuguese (Português do Brasil)
 674+ * @author Eduardo.mps
 675+ * @author Giro720
 676+ */
 677+$messages['pt-br'] = array(
 678+ 'getdata' => 'Obter dados',
 679+ 'externaldata-desc' => 'Permite a obtenção de dados em CSV, JSON e XML a partir de URLs externos, banco de dados e outras fontes',
 680+ 'externaldata-ldap-unable-to-connect' => 'Não foi possível conectar-se a $1',
 681+ 'externaldata-json-decode-not-supported' => 'Erro: json_decode() não é suportado nesta versão do PHP',
 682+ 'externaldata-xml-error' => 'Erro no XML: $1 na linha $2',
 683+ 'externaldata-db-incomplete-information' => 'Erro: Informação incompleta para o ID deste servidor</P>',
 684+ 'externaldata-db-could-not-get-url' => 'Não foi possível obter o URL após $1 {{PLURAL:$1|tentativa|tentativas}}.',
 685+ 'externaldata-db-unknown-type' => 'Erro: Tipo de base de dados desconhecido.',
 686+ 'externaldata-db-could-not-connect' => 'Erro: Não foi possível conectar-se a base de dados.',
 687+ 'externaldata-db-no-return-values' => 'Erro: Nenhum valor de retorno especificado.',
 688+ 'externaldata-db-invalid-query' => 'Consulta inválida.',
 689+);
 690+
 691+/** Romanian (Română)
 692+ * @author Firilacroco
 693+ * @author KlaudiuMihaila
 694+ * @author Stelistcristi
 695+ */
 696+$messages['ro'] = array(
 697+ 'getdata' => 'Obține date',
 698+ 'externaldata-desc' => 'Permite obținerea datelor în format CSV, JSON și XML din atât adrese URL externe, cât și pagini wiki locale',
 699+ 'externaldata-ldap-unable-to-connect' => 'Nu se poate conecta la $1',
 700+ 'externaldata-xml-error' => 'Eroare XML: $1 la linia $2',
 701+ 'externaldata-db-unknown-type' => 'Eroare: Tipul bazei de date necunoscut.',
 702+ 'externaldata-db-could-not-connect' => 'Eroare: Nu s-a putut conecta la baza de date.',
 703+ 'externaldata-db-invalid-query' => 'Interogare invalidă.',
 704+);
 705+
 706+/** Tarandíne (Tarandíne)
 707+ * @author Joetaras
 708+ */
 709+$messages['roa-tara'] = array(
 710+ 'getdata' => 'Pigghie le date',
 711+ 'externaldata-desc' => 'Permette de repigghià data strutturate da URL fore a Uicchipèdie, database e otre sorgende',
 712+);
 713+
 714+/** Russian (Русский)
 715+ * @author Ferrer
 716+ * @author Александр Сигачёв
 717+ */
 718+$messages['ru'] = array(
 719+ 'getdata' => 'Получить данные',
 720+ 'externaldata-desc' => 'Позволяет получать структурированные данные с внешних адресов, баз данных и других источников',
 721+ 'externaldata-ldap-unable-to-connect' => 'Не удаётся подключиться к $1',
 722+ 'externaldata-json-decode-not-supported' => 'Ошибка. json_decode() не поддерживается в данной версии PHP',
 723+ 'externaldata-xml-error' => 'Ошибка XML. $1 в строке $2',
 724+ 'externaldata-db-incomplete-information' => 'ОШИБКА. Неполная информация для этого ID сервера.',
 725+ 'externaldata-db-could-not-get-url' => 'Не удалось получить URL после $1 {{PLURAL:$1|попытки|попыток|попыток}}.',
 726+ 'externaldata-db-unknown-type' => 'ОШИБКА. Неизвестный тип базы данных.',
 727+ 'externaldata-db-could-not-connect' => 'ОШИБКА. Не удаётся подключиться к базе данных.',
 728+ 'externaldata-db-no-return-values' => 'ОШИБКА. Не указаны возвращаемые значение.',
 729+ 'externaldata-db-invalid-query' => 'Ошибочный запрос.',
 730+ 'externaldata-db-option-unsupported' => 'Ошибка. Параметры $1 и $2 не поддерживаются в этой версии MediaWiki.',
 731+);
 732+
 733+/** Slovak (Slovenčina)
 734+ * @author Helix84
 735+ */
 736+$messages['sk'] = array(
 737+ 'getdata' => 'Získať dáta',
 738+ 'externaldata-desc' => 'Umožňuje získavanie štrukturovaných údajov z externých URL, databáz a iných zdrojov',
 739+ 'externaldata-ldap-unable-to-connect' => 'Nepodarilo sa pripojiť k $1',
 740+ 'externaldata-json-decode-not-supported' => 'Chyba: táto verzia PHP nepodporuje json_decode()',
 741+ 'externaldata-xml-error' => 'Chyba XML: $1 na riadku $2',
 742+ 'externaldata-db-incomplete-information' => 'Chyba: Nekompletné informácie s týmto ID servera.',
 743+ 'externaldata-db-could-not-get-url' => 'Nepodarilo sa získať URL po $1 {{PLURAL:$1|pokuse|pokusoch}}.',
 744+ 'externaldata-db-unknown-type' => 'Chyba: Neznámy typ databázy.',
 745+ 'externaldata-db-could-not-connect' => 'Chyba: Nepodarilo sa pripojiť k databáze.',
 746+ 'externaldata-db-no-return-values' => 'Chyba: Neboli zadané žiadne návratové hodnoty.',
 747+ 'externaldata-db-invalid-query' => 'Neplatná požiadavka.',
 748+);
 749+
 750+/** Serbian Cyrillic ekavian (‪Српски (ћирилица)‬)
 751+ * @author Charmed94
 752+ * @author Михајло Анђелковић
 753+ */
 754+$messages['sr-ec'] = array(
 755+ 'getdata' => 'Преузми податке',
 756+ 'externaldata-desc' => 'Омогућава преузимање података из спољашњих адреса, бази података и других извора',
 757+ 'externaldata-ldap-unable-to-connect' => 'Повезивање на $1 није успело',
 758+ 'externaldata-json-decode-not-supported' => 'Грешка: json_decode() није подржан у овом издању PHP-а',
 759+ 'externaldata-xml-error' => 'XML грешка: $1 по линији $2',
 760+ 'externaldata-db-incomplete-information' => 'Грешка: Непотпуни подаци за овај ID сервера.',
 761+ 'externaldata-db-could-not-get-url' => 'Преузимање адресе после $1 {{PLURAL:$1|try|покушаја}} није успело.',
 762+ 'externaldata-db-unknown-type' => 'Грешка: Непозната врста базе података.',
 763+ 'externaldata-db-could-not-connect' => 'Грешка: Повезивање с базом података није успело.',
 764+ 'externaldata-db-no-return-values' => 'Грешка: Повратне вредности нису одређене.',
 765+ 'externaldata-db-invalid-query' => 'Неисправан упит.',
 766+);
 767+
 768+/** Serbian Latin ekavian (‪Srpski (latinica)‬)
 769+ * @author Michaello
 770+ */
 771+$messages['sr-el'] = array(
 772+ 'getdata' => 'Preuzmi podatke',
 773+ 'externaldata-desc' => 'Omogućava preuzimanje podataka iz spoljašnjih adresa, bazi podataka i drugih izvora',
 774+ 'externaldata-ldap-unable-to-connect' => 'Povezivanje na $1 nije uspelo',
 775+ 'externaldata-json-decode-not-supported' => 'Greška: json_decode() nije podržan u ovom izdanju PHP-a',
 776+ 'externaldata-xml-error' => 'XML greška: $1 po liniji $2',
 777+ 'externaldata-db-incomplete-information' => 'Greška: Nepotpuni podaci za ovaj ID servera.',
 778+ 'externaldata-db-could-not-get-url' => 'Preuzimanje adrese posle $1 {{PLURAL:$1|try|pokušaja}} nije uspelo.',
 779+ 'externaldata-db-unknown-type' => 'Greška: Nepoznata vrsta baze podataka.',
 780+ 'externaldata-db-could-not-connect' => 'Greška: Povezivanje s bazom podataka nije uspelo.',
 781+ 'externaldata-db-no-return-values' => 'Greška: Povratne vrednosti nisu određene.',
 782+ 'externaldata-db-invalid-query' => 'Neispravan upit.',
 783+);
 784+
 785+/** Swedish (Svenska)
 786+ * @author Ainali
 787+ * @author Boivie
 788+ * @author Najami
 789+ * @author Per
 790+ */
 791+$messages['sv'] = array(
 792+ 'getdata' => 'Hämta data',
 793+ 'externaldata-desc' => 'Ger möjlighet att hämta strukturerad data från externa URL:er, databaser och andra källor',
 794+ 'externaldata-ldap-unable-to-connect' => 'Kunde inte koppla till $1',
 795+ 'externaldata-json-decode-not-supported' => 'Fel: json_decode() stöds inte i denna version av PHP',
 796+ 'externaldata-xml-error' => 'XML-fel: $1 på rad $2',
 797+ 'externaldata-db-incomplete-information' => 'Fel: Informationen för server-ID inte komplett.',
 798+ 'externaldata-db-could-not-get-url' => 'Kunde inte hämta URL på $1 {{PLURAL:$1|försök|försök}}.',
 799+ 'externaldata-db-unknown-type' => 'Fel: Okänd databastyp.',
 800+ 'externaldata-db-could-not-connect' => 'Fel: Kunde inte koppla till databasen.',
 801+ 'externaldata-db-no-return-values' => 'Fel: Inga returvärden specificerade.',
 802+ 'externaldata-db-invalid-query' => 'Ogiltig fråga.',
 803+);
 804+
 805+/** Telugu (తెలుగు)
 806+ * @author Chaduvari
 807+ * @author Kiranmayee
 808+ */
 809+$messages['te'] = array(
 810+ 'getdata' => 'విషయములు తీసుకునిరా',
 811+ 'externaldata-ldap-unable-to-connect' => '$1 కు కనెక్టు కాలేకున్నాం',
 812+);
 813+
 814+/** Tagalog (Tagalog)
 815+ * @author AnakngAraw
 816+ * @author Sky Harbor
 817+ */
 818+$messages['tl'] = array(
 819+ 'getdata' => 'Kunin ang dato',
 820+ 'externaldata-desc' => 'Nagpapahintulot sa pagkuha ng nakabalangkas na datos mula sa panlabas na mga URL, mga kalipunan ng datos at sa ibang mga pinagmulan',
 821+ 'externaldata-ldap-unable-to-connect' => 'Hindi makakunekta sa $1',
 822+ 'externaldata-json-decode-not-supported' => 'Kamalian: hindi sinusuporta ang json_decode() sa bersyong ito ng PHP',
 823+ 'externaldata-xml-error' => 'Kamalian sa XML: $1 sa linyang $2',
 824+ 'externaldata-db-incomplete-information' => 'Kamalian: Hindi-kumpletong impormasyon para sa itong ID ng serbidor.',
 825+ 'externaldata-db-could-not-get-url' => 'Hindi makuha ang URL pagkatapos ng $1 {{PLURAL:$1|pagsubok|pagsubok}}',
 826+ 'externaldata-db-unknown-type' => 'Kamalian: Hindi-kilalang uri ng kalipunan ng datos.',
 827+ 'externaldata-db-could-not-connect' => 'Kamalian: Hindi makakunekta sa talaan ng dato.',
 828+ 'externaldata-db-no-return-values' => 'Kamalian: Walang tinukoy na halagang pabalik.',
 829+ 'externaldata-db-invalid-query' => 'Hindi tanggap na katanungan.',
 830+ 'externaldata-db-option-unsupported' => 'Kamalian: Ang mga parametrong $1 at $2 ay hindi tinatangkilik sa bersyong ito MediaWiki.',
 831+);
 832+
 833+/** Turkish (Türkçe)
 834+ * @author Karduelis
 835+ * @author Vito Genovese
 836+ */
 837+$messages['tr'] = array(
 838+ 'getdata' => 'Veri al',
 839+ 'externaldata-db-unknown-type' => 'Hata: Bilinmeyen veritabanı türü.',
 840+ 'externaldata-db-could-not-connect' => 'Hata: Veritabanına bağlanılamıyor.',
 841+ 'externaldata-db-no-return-values' => 'Hata: Dönüş değeri belirtilmedi.',
 842+ 'externaldata-db-invalid-query' => 'Geçersiz sorgu.',
 843+);
 844+
 845+/** Ukrainian (Українська)
 846+ * @author Тест
 847+ */
 848+$messages['uk'] = array(
 849+ 'getdata' => 'Отримати дані',
 850+ 'externaldata-ldap-unable-to-connect' => 'Не вдається підключитися до $1',
 851+ 'externaldata-xml-error' => 'Помилка XML: $1 в рядку $2',
 852+ 'externaldata-db-could-not-get-url' => 'Не вдалося отримати URL після $1 {{PLURAL:$1|спроби|спроб}}.',
 853+ 'externaldata-db-unknown-type' => 'Помилка: Невідомий тип бази даних.',
 854+ 'externaldata-db-could-not-connect' => 'Помилка: не вдалося підключитися до бази даних.',
 855+);
 856+
 857+/** Veps (Vepsan kel')
 858+ * @author Игорь Бродский
 859+ */
 860+$messages['vep'] = array(
 861+ 'getdata' => 'Sada andmused',
 862+);
 863+
 864+/** Vietnamese (Tiếng Việt)
 865+ * @author Minh Nguyen
 866+ * @author Vinhtantran
 867+ */
 868+$messages['vi'] = array(
 869+ 'getdata' => 'Lấy dữ liệu',
 870+ 'externaldata-desc' => 'Cho phép truy xuất dữ liệu từ các địa chỉ URL bên ngoài, cơ sở dữ liệu, và nguồn khác',
 871+ 'externaldata-xml-error' => 'Lỗi XML ở dòng $2: $1',
 872+);
 873+
 874+/** Yiddish (ייִדיש)
 875+ * @author פוילישער
 876+ */
 877+$messages['yi'] = array(
 878+ 'getdata' => 'באַקומען דאַטן',
 879+);
 880+
Property changes on: tags/extensions/ExternalData/REL_1_3_1/ExternalData.i18n.php
___________________________________________________________________
Added: svn:eol-style
1881 + native
Index: tags/extensions/ExternalData/REL_1_3_1/ExternalData.php
@@ -0,0 +1,81 @@
 2+<?php
 3+/**
 4+ * Initialization file for the External Data extension
 5+ *
 6+ * @file
 7+ * @ingroup ExternalData
 8+ * @author Yaron Koren
 9+ */
 10+
 11+if ( !defined( 'MEDIAWIKI' ) ) die();
 12+
 13+$wgExtensionCredits['parserhook'][] = array(
 14+ 'path' => __FILE__,
 15+ 'name' => 'External Data',
 16+ 'version' => '1.3.1',
 17+ 'author' => array( 'Yaron Koren', 'Michael Dale', 'David Macdonald' ),
 18+ 'url' => 'http://www.mediawiki.org/wiki/Extension:External_Data',
 19+ 'descriptionmsg' => 'externaldata-desc',
 20+);
 21+
 22+$wgHooks['ParserFirstCallInit'][] = 'edgRegisterParser';
 23+$wgExtensionMessagesFiles['ExternalData'] = dirname(__FILE__) . '/ExternalData.i18n.php';
 24+
 25+if ( version_compare( $wgVersion, '1.16alpha', '>=' ) ) {
 26+ $wgExtensionMessagesFiles['ExternalDataMagic'] = dirname(__FILE__) . '/ExternalData.i18n.magic.php';
 27+} else {
 28+ // Pre-1.16alpha backward compatibility for magic words
 29+ $wgHooks['LanguageGetMagic'][] = 'edgLanguageGetMagic';
 30+}
 31+
 32+// Register all special pages and other classes
 33+$wgAutoloadClasses['EDUtils'] = dirname(__FILE__) . '/ED_Utils.php';
 34+$wgAutoloadClasses['EDParserFunctions'] = dirname(__FILE__) . '/ED_ParserFunctions.php';
 35+$wgSpecialPages['GetData'] = 'EDGetData';
 36+$wgAutoloadClasses['EDGetData'] = dirname(__FILE__) . '/ED_GetData.php';
 37+$wgSpecialPageGroups['GetData'] = 'pagetools';
 38+
 39+$edgValues = array();
 40+$edgStringReplacements = array();
 41+$edgCacheTable = null;
 42+$edgAllowSSL = true;
 43+
 44+// Value is in seconds - set to one week
 45+$edgCacheExpireTime = 60 * 60 * 24 * 7;
 46+
 47+$edgDBServer = array();
 48+$edgDBServerType = array();
 49+$edgDBName = array();
 50+$edgDBUser = array();
 51+$edgDBPass = array();
 52+$edgDBFlags = array();
 53+$edgDBTablePrefix = array();
 54+
 55+function edgRegisterParser( &$parser ) {
 56+ $parser->setFunctionHook( 'get_external_data', array( 'EDParserFunctions', 'doGetExternalData' ) );
 57+ $parser->setFunctionHook( 'get_web_data', array( 'EDParserFunctions', 'doGetWebData' ) );
 58+ $parser->setFunctionHook( 'get_ldap_data', array( 'EDParserFunctions', 'doGetLDAPData' ) );
 59+ $parser->setFunctionHook( 'get_db_data', array( 'EDParserFunctions', 'doGetDBData' ) );
 60+ $parser->setFunctionHook( 'external_value', array( 'EDParserFunctions', 'doExternalValue' ) );
 61+ $parser->setFunctionHook( 'for_external_table', array( 'EDParserFunctions', 'doForExternalTable' ) );
 62+ $parser->setFunctionHook( 'store_external_table', array( 'EDParserFunctions', 'doStoreExternalTable' ) );
 63+ $parser->setFunctionHook( 'clear_external_data', array( 'EDParserFunctions', 'doClearExternalData' ) );
 64+
 65+ return true; // always return true, in order not to stop MW's hook processing!
 66+}
 67+
 68+// Pre-1.16alpha backward compatibility for magic words
 69+function edgLanguageGetMagic( &$magicWords, $langCode = "en" ) {
 70+ switch ( $langCode ) {
 71+ default:
 72+ $magicWords['get_external_data'] = array ( 0, 'get_external_data' );
 73+ $magicWords['get_web_data'] = array ( 0, 'get_web_data' );
 74+ $magicWords['get_ldap_data'] = array ( 0, 'get_ldap_data' );
 75+ $magicWords['get_db_data'] = array ( 0, 'get_db_data' );
 76+ $magicWords['external_value'] = array ( 0, 'external_value' );
 77+ $magicWords['for_external_table'] = array ( 0, 'for_external_table' );
 78+ $magicWords['store_external_table'] = array ( 0, 'store_external_table' );
 79+ $magicWords['clear_external_data'] = array ( 0, 'clear_external_data' );
 80+ }
 81+ return true;
 82+}
Property changes on: tags/extensions/ExternalData/REL_1_3_1/ExternalData.php
___________________________________________________________________
Added: svn:eol-style
183 + native
Index: tags/extensions/ExternalData/REL_1_3_1/ED_ParserFunctions.php
@@ -0,0 +1,382 @@
 2+<?php
 3+/**
 4+ * Class for handling the parser functions for External Data
 5+ */
 6+
 7+if ( !defined( 'MEDIAWIKI' ) ) {
 8+ die( 'This file is a MediaWiki extension; it is not a valid entry point' );
 9+}
 10+
 11+class EDParserFunctions {
 12+
 13+ /**
 14+ * Render the #get_external_data parser function
 15+ * @deprecated
 16+ */
 17+ static function doGetExternalData( &$parser ) {
 18+ global $wgTitle, $edgCurPageName, $edgValues;
 19+
 20+ // if we're handling multiple pages, reset $edgValues
 21+ // when we move from one page to another
 22+ $cur_page_name = $wgTitle->getText();
 23+ if ( ! isset( $edgCurPageName ) || $edgCurPageName != $cur_page_name ) {
 24+ $edgValues = array();
 25+ $edgCurPageName = $cur_page_name;
 26+ }
 27+
 28+ $params = func_get_args();
 29+ array_shift( $params ); // we already know the $parser ...
 30+ $url = array_shift( $params );
 31+ $url = str_replace( ' ', '%20', $url ); // do some minor URL-encoding
 32+ // if the URL isn't allowed (based on a whitelist), exit
 33+ if ( ! EDUtils::isURLAllowed( $url ) ) {
 34+ return;
 35+ }
 36+
 37+ $format = strtolower( array_shift( $params ) ); // make case-insensitive
 38+ $external_values = EDUtils::getDataFromURL( $url, $format );
 39+ if ( count( $external_values ) == 0 ) {
 40+ return;
 41+ }
 42+
 43+ // Get set of filters and set of mappings, determining each
 44+ // one by whether there's a double or single equals sign,
 45+ // respectively.
 46+ $filters = array();
 47+ $mappings = array();
 48+ foreach ( $params as $param ) {
 49+ if ( strpos( $param, '==' ) ) {
 50+ list( $external_var, $value ) = explode( '==', $param );
 51+ // set to all lowercase to avoid casing issues
 52+ $external_var = strtolower( $external_var );
 53+ $filters[$external_var] = $value;
 54+ } elseif ( strpos( $param, '=' ) ) {
 55+ list( $local_var, $external_var ) = explode( '=', $param );
 56+ // set to all lowercase to avoid casing issues
 57+ $external_var = strtolower( $external_var );
 58+ $mappings[$local_var] = $external_var;
 59+ } else {
 60+ // if the parameter contains no equals signs,
 61+ // do nothing
 62+ }
 63+ }
 64+ self::setGlobalValuesArray( $external_values, $filters, $mappings );
 65+ }
 66+
 67+ /**
 68+ * A helper function, since it's called by both doGetExternalData()
 69+ * and doGetWebData() - the former is deprecated.
 70+ */
 71+ static public function setGlobalValuesArray( $external_values, $filters, $mappings ) {
 72+ global $edgValues;
 73+
 74+ foreach ( $filters as $filter_var => $filter_value ) {
 75+ // Find the entry of $external_values that matches
 76+ // the filter variable; if none exists, just ignore
 77+ // the filter.
 78+ if ( array_key_exists( $filter_var, $external_values ) ) {
 79+ if ( is_array( $external_values[$filter_var] ) ) {
 80+ $column_values = $external_values[$filter_var];
 81+ foreach ( $column_values as $i => $single_value ) {
 82+ // if a value doesn't match
 83+ // the filter value, remove
 84+ // the value from this row for
 85+ // all columns
 86+ if ( trim( $single_value ) != trim( $filter_value ) ) {
 87+ foreach ( $external_values as $external_var => $external_value ) {
 88+ unset( $external_values[$external_var][$i] );
 89+ }
 90+ }
 91+ }
 92+ } else {
 93+ // if we have only one row of values,
 94+ // and the filter doesn't match, just
 95+ // keep the results array blank and
 96+ // return
 97+ if ( $external_values[$filter_var] != $filter_value ) {
 98+ return;
 99+ }
 100+ }
 101+ }
 102+ }
 103+ // for each external variable name specified in the function
 104+ // call, get its value or values (if any exist), and attach it
 105+ // or them to the local variable name
 106+ foreach ( $mappings as $local_var => $external_var ) {
 107+ if ( array_key_exists( $external_var, $external_values ) ) {
 108+ if ( is_array( $external_values[$external_var] ) )
 109+ // array_values() restores regular
 110+ // 1, 2, 3 indexes to array, after unset()
 111+ // in filtering may have removed some
 112+ $edgValues[$local_var] = array_values( $external_values[$external_var] );
 113+ else
 114+ $edgValues[$local_var][] = $external_values[$external_var];
 115+ }
 116+ }
 117+ }
 118+
 119+ /**
 120+ * Render the #get_web_data parser function
 121+ */
 122+ static function doGetWebData( &$parser ) {
 123+ global $wgTitle, $edgCurPageName, $edgValues;
 124+
 125+ // If we're handling multiple pages, reset $edgValues
 126+ // when we move from one page to another.
 127+ $cur_page_name = $wgTitle->getText();
 128+ if ( ! isset( $edgCurPageName ) || $edgCurPageName != $cur_page_name ) {
 129+ $edgValues = array();
 130+ $edgCurPageName = $cur_page_name;
 131+ }
 132+
 133+ $params = func_get_args();
 134+ array_shift( $params ); // we already know the $parser ...
 135+ $args = EDUtils::parseParams( $params ); // parse params into name-value pairs
 136+ if ( array_key_exists( 'url', $args ) ) {
 137+ $url = $args['url'];
 138+ } else {
 139+ return;
 140+ }
 141+ $url = str_replace( ' ', '%20', $url ); // do some minor URL-encoding
 142+ // if the URL isn't allowed (based on a whitelist), exit
 143+ if ( ! EDUtils::isURLAllowed( $url ) ) {
 144+ return;
 145+ }
 146+
 147+ if ( array_key_exists( 'format', $args ) ) {
 148+ $format = strtolower( $args['format'] );
 149+ } else {
 150+ $format = '';
 151+ }
 152+ $external_values = EDUtils::getDataFromURL( $url, $format );
 153+ if ( count( $external_values ) == 0 ) {
 154+ return;
 155+ }
 156+
 157+ if ( array_key_exists( 'data', $args ) ) {
 158+ // parse the 'data' arg into mappings
 159+ $mappings = EDUtils::paramToArray( $args['data'], false, true );
 160+ } else {
 161+ return;
 162+ }
 163+ if ( array_key_exists( 'filters', $args ) ) {
 164+ // parse the 'filters' arg
 165+ $filters = EDUtils::paramToArray( $args['filters'], true, false );
 166+ } else {
 167+ $filters = array();
 168+ }
 169+
 170+ self::setGlobalValuesArray( $external_values, $filters, $mappings );
 171+ }
 172+
 173+ /**
 174+ * Render the #get_ldap_data parser function
 175+ */
 176+ static function doGetLDAPData( &$parser ) {
 177+ global $wgTitle, $edgCurPageName, $edgValues;
 178+
 179+ // if we're handling multiple pages, reset $edgValues
 180+ // when we move from one page to another
 181+ $cur_page_name = $wgTitle->getText();
 182+ if ( ! isset( $edgCurPageName ) || $edgCurPageName != $cur_page_name ) {
 183+ $edgValues = array();
 184+ $edgCurPageName = $cur_page_name;
 185+ }
 186+
 187+ $params = func_get_args();
 188+ array_shift( $params ); // we already know the $parser ...
 189+ $args = EDUtils::parseParams( $params ); // parse params into name-value pairs
 190+ $mappings = EDUtils::paramToArray( $args['data'] ); // parse the data arg into mappings
 191+
 192+ $external_values = EDUtils::getLDAPData( $args['filter'], $args['domain'], array_values( $mappings ) );
 193+
 194+ // Build $edgValues
 195+ foreach ( $mappings as $local_var => $external_var ) {
 196+ $edgValues[$local_var][] = $external_values[0][$external_var][0];
 197+ }
 198+ return;
 199+ }
 200+
 201+ /**
 202+ * Render the #get_db_data parser function
 203+ */
 204+ static function doGetDBData( &$parser ) {
 205+ global $wgTitle, $edgCurPageName, $edgValues;
 206+
 207+ // if we're handling multiple pages, reset $edgValues
 208+ // when we move from one page to another
 209+ $cur_page_name = $wgTitle->getText();
 210+ if ( ! isset( $edgCurPageName ) || $edgCurPageName != $cur_page_name ) {
 211+ $edgValues = array();
 212+ $edgCurPageName = $cur_page_name;
 213+ }
 214+
 215+ $params = func_get_args();
 216+ array_shift( $params ); // we already know the $parser ...
 217+ $args = EDUtils::parseParams( $params ); // parse params into name-value pairs
 218+ $data = ( array_key_exists( 'data', $args ) ) ? $args['data'] : null;
 219+ $dbID = ( array_key_exists( 'db', $args ) ) ? $args['db'] : null;
 220+ // For backwards-compatibility - 'db' parameter was added
 221+ // in External Data version 1.3.
 222+ if ( is_null( $dbID ) ) {
 223+ $dbID = ( array_key_exists( 'server', $args ) ) ? $args['server'] : null;
 224+ }
 225+ $table = ( array_key_exists( 'from', $args ) ) ? $args['from'] : null;
 226+ $conds = ( array_key_exists( 'where', $args ) ) ? $args['where'] : null;
 227+ $limit = ( array_key_exists( 'limit', $args ) ) ? $args['limit'] : null;
 228+ $orderBy = ( array_key_exists( 'order by', $args ) ) ? $args['order by'] : null;
 229+ $options = array( 'LIMIT' => $limit, 'ORDER BY' => $orderBy );
 230+ $mappings = EDUtils::paramToArray( $data ); // parse the data arg into mappings
 231+
 232+ $external_values = EDUtils::getDBData( $dbID, $table, array_values( $mappings ), $conds, $options );
 233+ // handle error cases
 234+ if ( is_null( $external_values ) )
 235+ return;
 236+
 237+ // Build $edgValues
 238+ foreach ( $mappings as $local_var => $external_var ) {
 239+ if ( array_key_exists( $external_var, $external_values ) ) {
 240+ foreach ( $external_values[$external_var] as $value ) {
 241+ $edgValues[$local_var][] = $value;
 242+ }
 243+ }
 244+ }
 245+ return;
 246+ }
 247+
 248+ /**
 249+ * Get the specified index of the array for the specified local
 250+ * variable retrieved by #get_external_data
 251+ */
 252+ static function getIndexedValue( $var, $i ) {
 253+ global $edgValues;
 254+ if ( array_key_exists( $var, $edgValues ) && count( $edgValues[$var] > $i ) )
 255+ return $edgValues[$var][$i];
 256+ else
 257+ return '';
 258+ }
 259+
 260+ /**
 261+ * Render the #external_value parser function
 262+ */
 263+ static function doExternalValue( &$parser, $local_var = '' ) {
 264+ global $edgValues;
 265+ if ( ! array_key_exists( $local_var, $edgValues ) )
 266+ return '';
 267+ elseif ( is_array( $edgValues[$local_var] ) )
 268+ return $edgValues[$local_var][0];
 269+ else
 270+ return $edgValues[$local_var];
 271+ }
 272+
 273+ /**
 274+ * Render the #for_external_table parser function
 275+ */
 276+ static function doForExternalTable( &$parser, $expression = '' ) {
 277+ global $edgValues;
 278+
 279+ // get the variables used in this expression, get the number
 280+ // of values for each, and loop through
 281+ $matches = array();
 282+ preg_match_all( '/{{{([^}]*)}}}/', $expression, $matches );
 283+ $variables = $matches[1];
 284+ $num_loops = 0;
 285+ foreach ( $variables as $variable ) {
 286+ // ignore the presence of '.urlencode' - it's a command,
 287+ // not part of the actual variable name
 288+ $variable = str_replace( '.urlencode', '', $variable );
 289+ if ( array_key_exists( $variable, $edgValues ) ) {
 290+ $num_loops = max( $num_loops, count( $edgValues[$variable] ) );
 291+ }
 292+ }
 293+ $text = "";
 294+ for ( $i = 0; $i < $num_loops; $i++ ) {
 295+ $cur_expression = $expression;
 296+ foreach ( $variables as $variable ) {
 297+ // if variable name ends with a ".urlencode",
 298+ // that's a command - URL-encode the value of
 299+ // the actual variable
 300+ $loc_of_urlencode = strrpos( $variable, '.urlencode' );
 301+ if ( ( $loc_of_urlencode > 0 ) && ( $loc_of_urlencode == strlen( $variable ) - strlen( '.urlencode' ) ) ) {
 302+ $real_var = str_replace( '.urlencode', '', $variable );
 303+ $value = urlencode( self::getIndexedValue( $real_var , $i ) );
 304+ } else {
 305+ $value = self::getIndexedValue( $variable , $i );
 306+ }
 307+ $cur_expression = str_replace( '{{{' . $variable . '}}}', $value, $cur_expression );
 308+ }
 309+ $text .= $cur_expression;
 310+ }
 311+ return $text;
 312+ }
 313+
 314+ /**
 315+ * Render the #store_external_table parser function
 316+ */
 317+ static function doStoreExternalTable( &$parser ) {
 318+ if ( ! class_exists( 'SIOHandler' ) ) {
 319+ return 'Semantic Internal Objects is not installed';
 320+ }
 321+ global $edgValues;
 322+
 323+ $params = func_get_args();
 324+ array_shift( $params ); // we already know the $parser...
 325+
 326+ // get the variables used in this expression, get the number
 327+ // of values for each, and loop through
 328+ $expression = implode( '|', $params );
 329+ $matches = array();
 330+ preg_match_all( '/{{{([^}]*)}}}/', $expression, $matches );
 331+ $variables = $matches[1];
 332+ $num_loops = 0;
 333+ foreach ( $variables as $variable ) {
 334+ // ignore the presence of '.urlencode' - it's a command,
 335+ // not part of the actual variable name
 336+ $variable = str_replace( '.urlencode', '', $variable );
 337+ if ( array_key_exists( $variable, $edgValues ) ) {
 338+ $num_loops = max( $num_loops, count( $edgValues[$variable] ) );
 339+ }
 340+ }
 341+ $text = "";
 342+ for ( $i = 0; $i < $num_loops; $i++ ) {
 343+ // re-get $params
 344+ $params = func_get_args();
 345+ array_shift( $params );
 346+ foreach ( $params as $j => $param ) {
 347+ foreach ( $variables as $variable ) {
 348+ // if variable name ends with a ".urlencode",
 349+ // that's a command - URL-encode the value of
 350+ // the actual variable
 351+ if ( strrpos( $variable, '.urlencode' ) == strlen( $variable ) - strlen( '.urlencode' ) ) {
 352+ $real_var = str_replace( '.urlencode', '', $variable );
 353+ $value = urlencode( self::getIndexedValue( $real_var , $i ) );
 354+ } else {
 355+ $value = self::getIndexedValue( $variable , $i );
 356+ }
 357+ $params[$j] = str_replace( '{{{' . $variable . '}}}', $value, $params[$j] );
 358+ }
 359+ }
 360+ // Add $parser to the beginning of the $params array,
 361+ // and pass the whole thing in as arguments to
 362+ // doSetInternal, to mimic a call to #set_internal.
 363+ array_unshift( $params, $parser );
 364+ // As of PHP 5.3.1, call_user_func_array() requires that
 365+ // the function params be references. Workaround via
 366+ // http://stackoverflow.com/questions/2045875/pass-by-reference-problem-with-php-5-3-1
 367+ $refParams = array();
 368+ foreach ( $params as $key => $value ) {
 369+ $refParams[$key] = &$params[$key];
 370+ }
 371+ call_user_func_array( array( 'SIOHandler', 'doSetInternal' ), $refParams );
 372+ }
 373+ return null;
 374+ }
 375+
 376+ /**
 377+ * Render the #clear_external_data parser function
 378+ */
 379+ static function doClearExternalData( &$parser ) {
 380+ global $edgValues;
 381+ $edgValues = null;
 382+ }
 383+}
Property changes on: tags/extensions/ExternalData/REL_1_3_1/ED_ParserFunctions.php
___________________________________________________________________
Added: svn:eol-style
1384 + native
Index: tags/extensions/ExternalData/REL_1_3_1/ED_GetData.php
@@ -0,0 +1,71 @@
 2+<?php
 3+/**
 4+ * A special page for retrieving selected rows of any wiki page that contains
 5+ * data in CSV format
 6+ */
 7+
 8+if ( !defined( 'MEDIAWIKI' ) ) die();
 9+
 10+class EDGetData extends SpecialPage {
 11+
 12+ /**
 13+ * Constructor
 14+ */
 15+ function __construct() {
 16+ parent::__construct( 'GetData' );
 17+ EDUtils::loadMessages();
 18+ }
 19+
 20+ function execute( $query ) {
 21+ global $wgRequest, $wgOut;
 22+ $wgOut->disable();
 23+
 24+ $this->setHeaders();
 25+ $page_name = $query;
 26+ $title = Title::newFromText( $page_name );
 27+ if ( is_null( $title ) )
 28+ return;
 29+ if ( ! $title->userCanRead() )
 30+ return;
 31+ $article = new Article( $title );
 32+ $page_text = $article->fetchContent();
 33+ // Remove <noinclude> sections and <includeonly> tags from text
 34+ $page_text = StringUtils::delimiterReplace( '<noinclude>', '</noinclude>', '', $page_text );
 35+ $page_text = strtr( $page_text, array( '<includeonly>' => '', '</includeonly>' => '' ) );
 36+ $orig_lines = explode( "\n", $page_text );
 37+ // ignore lines that are either blank or start with a semicolon
 38+ $page_lines = array();
 39+ foreach ( $orig_lines as $i => $line )
 40+ if ( $line != '' && $line[0] != ';' )
 41+ $page_lines[] = $line;
 42+ $headers = EDUtils::getValuesFromCSVLine( $page_lines[0] );
 43+ $queried_headers = array();
 44+ foreach ( $wgRequest->getValues() as $key => $value ) {
 45+ foreach ( $headers as $header_index => $header_value ) {
 46+ $header_value = str_replace( ' ', '_', $header_value );
 47+ if ( $key == $header_value ) {
 48+ $queried_headers[$header_index] = $value;
 49+ }
 50+ }
 51+ }
 52+ // include header in output
 53+ $text = $page_lines[0];
 54+ foreach ( $page_lines as $i => $line ) {
 55+ if ( $i == 0 ) continue;
 56+ $row_values = EDUtils::getValuesFromCSVLine( $line );
 57+ $found_match = true;
 58+ foreach ( $queried_headers as $i => $query_value ) {
 59+ $single_value = str_replace( ' ', '_', $row_values[$i] );
 60+ if ( $single_value != $query_value ) {
 61+ $found_match = false;
 62+ }
 63+ }
 64+ if ( $found_match ) {
 65+ if ( $text != '' ) $text .= "\n";
 66+ $text .= $line;
 67+ }
 68+ }
 69+ print $text;
 70+ }
 71+
 72+}
Property changes on: tags/extensions/ExternalData/REL_1_3_1/ED_GetData.php
___________________________________________________________________
Added: svn:eol-style
173 + native
Index: tags/extensions/ExternalData/REL_1_3_1/ExternalData.sql
@@ -0,0 +1,9 @@
 2+CREATE TABLE IF NOT EXISTS `ed_url_cache` (
 3+ `id` int(10) unsigned NOT NULL auto_increment,
 4+ `url` varchar(255) NOT NULL,
 5+ `post_vars` text,
 6+ `req_time` int(11) NOT NULL,
 7+ `result` longtext character set utf8 collate utf8_unicode_ci,
 8+ UNIQUE KEY `id` (`id`),
 9+ KEY `url` (`url`)
 10+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
\ No newline at end of file
Property changes on: tags/extensions/ExternalData/REL_1_3_1/ExternalData.sql
___________________________________________________________________
Added: svn:eol-style
111 + native
Index: tags/extensions/ExternalData/REL_1_3_1/README
@@ -0,0 +1,106 @@
 2+External Data extension
 3+
 4+ Version 1.3.1
 5+ Yaron Koren, Michael Dale and David Macdonald
 6+
 7+This is free software licensed under the GNU General Public License. Please
 8+see http://www.gnu.org/copyleft/gpl.html for further details, including the
 9+full text and terms of the license.
 10+
 11+== Overview ==
 12+
 13+External Data is an extension to MediaWiki that allows for retrieving data
 14+from various sources: external URLs and local wiki pages (in CSV, GFF, JSON
 15+and XML formats), database tables, and LDAP servers.
 16+
 17+The extension defines seven parser functions - #get_web_data,
 18+#get_external_data, #get_db_data, #get_ldap_data, #external_value,
 19+#for_external_table, #store_external_table and #clear_external_data.
 20+They are described below:
 21+
 22+* #get_web_data retrieves the data from a URL that holds CSV, GFF,
 23+JSON or XML, and assigns it to local variables or arrays.
 24+
 25+* #get_external_data is an earlier version of #get_web_data that does
 26+the same thing; it is currently deprecated.
 27+
 28+* #get_db_data retrieves data from a database, using a SQL query, and
 29+assigns it to local variables or arrays.
 30+
 31+* #get_ldap_data retrieves data from an LDAP server and assigns it to
 32+local variables.
 33+
 34+* #external_value displays the value of any retrieved variable, or the
 35+first value if it's an array.
 36+
 37+* #for_external_table applies processing onto multiple rows retrieved by
 38+any of the #get_*_data functions
 39+
 40+* #store_external_table mimics a call to the Semantic Internal Objects
 41+extension's #set_internal parser function onto each row retrieved by
 42+any of the #get_*_data functions, in order to store the entire array
 43+of data semantically.
 44+
 45+* #clear_external_data erases the current set of retrieved data.
 46+
 47+In addition, the extension defines a new special page, 'GetData', that
 48+exports selected rows from a wiki page that holds CSV data, in a format
 49+that is readable by #get_web_data.
 50+
 51+For more information, see the extension homepage at:
 52+http://www.mediawiki.org/wiki/Extension:External_Data
 53+
 54+== Requirements ==
 55+
 56+This version of the External Data extension requires MediaWiki 1.11 or higher.
 57+
 58+== Installation ==
 59+
 60+To install the extension, place the entire 'ExternalData' directory
 61+within your MediaWiki 'extensions' directory, then add the following
 62+line to your 'LocalSettings.php' file:
 63+
 64+ require_once( "$IP/extensions/ExternalData/ExternalData.php" );
 65+
 66+To cache the data from the URLs being accessed, you can call the contents
 67+of ExternalData.sql in your database, then add the following to
 68+LocalSettings.php:
 69+
 70+ $edgCacheTable = 'ed_url_cache';
 71+
 72+You should also add a line like the following, to set the expiration time
 73+of the cache, in seconds; this line will cache data for a week:
 74+
 75+ $edgCacheExpireTime = 7 * 24 * 60 * 60;
 76+
 77+You can also set for string replacements to be done on the URLs you call,
 78+for instance to hide API keys:
 79+
 80+ $edgStringReplacements['MY_API_KEY'] = 'abcd1324';
 81+
 82+You can create a "whitelist" to allow retrieval of data only from trusted
 83+sites, in the manner of MediaWiki's $wgAllowExternalImagesFrom - if you
 84+are hiding API keys, it is very much recommended to create such a
 85+whitelist, to prevent users from being able to discover their values:
 86+
 87+ $edgAllowExternalDataFrom = array('http://example.com/api');
 88+
 89+Finally, to use the database or LDAP retrieval capabilities, you need to
 90+set connection settings as well - see the online documentation for more
 91+information.
 92+
 93+== Contact ==
 94+
 95+Most comments, questions, suggestions and bug reports should be sent to
 96+the Semantic MediaWiki mailing list:
 97+
 98+ https://lists.sourceforge.net/lists/listinfo/semediawiki-user
 99+
 100+Although the External Data extension in general is independent of Semantic
 101+MediaWiki, the fact that it uses Semantic Internal Objects for one of its
 102+functions, along with the fact that the two extensions are often used
 103+together, means that it can be considered part of the Semantic MediaWiki
 104+family for communication purposes.
 105+
 106+If possible, please add "[ED]" at the beginning of the subject line, to
 107+clarify the subject matter.
Property changes on: tags/extensions/ExternalData/REL_1_3_1/README
___________________________________________________________________
Added: svn:eol-style
1108 + native
Index: tags/extensions/ExternalData/REL_1_3_1/ED_Utils.php
@@ -0,0 +1,552 @@
 2+<?php
 3+/**
 4+ * Utility functions for External Data
 5+ */
 6+
 7+if ( !defined( 'MEDIAWIKI' ) ) {
 8+ die( 'This file is a MediaWiki extension; it is not a valid entry point' );
 9+}
 10+
 11+class EDUtils {
 12+ // how many times to try an HTTP request
 13+ private static $http_number_of_tries = 3;
 14+
 15+ /*
 16+ * Loads messages only for MediaWiki versions that need it (< 1.16)
 17+ */
 18+ public static function loadMessages() {
 19+ global $wgVersion;
 20+ if ( version_compare( $wgVersion, '1.16', '<' ) ) {
 21+ wfLoadExtensionMessages( 'ExternalData' );
 22+ }
 23+ }
 24+
 25+ // XML-handling functions based on code found at
 26+ // http://us.php.net/xml_set_element_handler
 27+ static function startElement( $parser, $name, $attrs ) {
 28+ global $edgCurrentXMLTag, $edgXMLValues;
 29+ // set to all lowercase to avoid casing issues
 30+ $edgCurrentXMLTag = strtolower( $name );
 31+ foreach ( $attrs as $attr => $value ) {
 32+ $attr = strtolower( $attr );
 33+ if ( array_key_exists( $attr, $edgXMLValues ) )
 34+ $edgXMLValues[$attr][] = $value;
 35+ else
 36+ $edgXMLValues[$attr] = array( $value );
 37+ }
 38+ }
 39+
 40+ static function endElement( $parser, $name ) {
 41+ global $edgCurrentXMLTag;
 42+ $edgCurrentXMLTag = "";
 43+ }
 44+
 45+ static function getContent( $parser, $content ) {
 46+ global $edgCurrentXMLTag, $edgXMLValues;
 47+ if ( array_key_exists( $edgCurrentXMLTag, $edgXMLValues ) )
 48+ $edgXMLValues[$edgCurrentXMLTag][] = $content;
 49+ else
 50+ $edgXMLValues[$edgCurrentXMLTag] = array( $content );
 51+ }
 52+
 53+ static function parseParams( $params ) {
 54+ $args = array();
 55+ foreach ( $params as $param ) {
 56+ $param = preg_replace ( "/\s\s+/", ' ', $param ); // whitespace
 57+ $param_parts = explode( "=", $param, 2 );
 58+ if ( count( $param_parts ) < 2 ) {
 59+ continue;
 60+ }
 61+ list( $name, $value ) = $param_parts;
 62+ $args[$name] = $value;
 63+ }
 64+ return $args;
 65+ }
 66+
 67+ /**
 68+ * Parses an argument of the form "a=b,c=d,..." into an array
 69+ */
 70+ static function paramToArray( $arg, $lowercaseKeys = false, $lowercaseValues = false ) {
 71+ $arg = preg_replace ( "/\s\s+/", ' ', $arg ); // whitespace
 72+
 73+ // Split text on commas, except for commas found within quotes
 74+ // and parentheses. Code copied from:
 75+ // http://stackoverflow.com/questions/1373735/regexp-split-string-by-commas-and-spaces-but-ignore-the-inside-quotes-and-parent#1381895
 76+ $pattern = <<<END
 77+ /
 78+ [,\s]++
 79+ (?=(?:(?:[^"]*+"){2})*+[^"]*+$)
 80+ (?=(?:(?:[^']*+'){2})*+[^']*+$)
 81+ (?=(?:[^()]*+\([^()]*+\))*+[^()]*+$)
 82+ /x
 83+END;
 84+ // " - fix for color highlighting in vi :)
 85+ $keyValuePairs = preg_split( $pattern, $arg );
 86+
 87+ $returnArray = array();
 88+ foreach ( $keyValuePairs as $keyValuePair ) {
 89+ $keyAndValue = explode( '=', $keyValuePair, 2 );
 90+ if ( count( $keyAndValue ) == 2 ) {
 91+ $key = trim( $keyAndValue[0] );
 92+ if ( $lowercaseKeys ) {
 93+ $key = strtolower( $key );
 94+ }
 95+ $value = trim( $keyAndValue[1] );
 96+ if ( $lowercaseValues ) {
 97+ $value = strtolower( $value );
 98+ }
 99+ $returnArray[$key] = $value;
 100+ }
 101+ }
 102+ return $returnArray;
 103+ }
 104+
 105+ static function getLDAPData( $filter, $domain, $params ) {
 106+ global $edgLDAPServer;
 107+ global $edgLDAPUser;
 108+ global $edgLDAPPass;
 109+
 110+ $ds = EDUtils::connectLDAP( $edgLDAPServer[$domain], $edgLDAPUser[$domain], $edgLDAPPass[$domain] );
 111+ $results = EDUtils::searchLDAP( $ds, $domain, $filter, $params );
 112+
 113+ return $results;
 114+ }
 115+
 116+ static function connectLDAP( $server, $username, $password ) {
 117+ $ds = ldap_connect( $server );
 118+ if ( $ds ) {
 119+ // these options for Active Directory only?
 120+ ldap_set_option( $ds, LDAP_OPT_PROTOCOL_VERSION, 3 );
 121+ ldap_set_option( $ds, LDAP_OPT_REFERRALS, 0 );
 122+
 123+ if ( $username ) {
 124+ $r = ldap_bind( $ds, $username, $password );
 125+ } else {
 126+ # no username, so do anonymous bind
 127+ $r = ldap_bind( $ds );
 128+ }
 129+
 130+ # should check the result of the bind here
 131+ return $ds;
 132+ } else {
 133+ echo ( wfMsgExt( "externaldata-ldap-unable-to-connect", array( 'parse', 'escape' ), $server ) );
 134+ }
 135+ }
 136+
 137+ static function searchLDAP( $ds, $domain, $filter, $attributes ) {
 138+ global $edgLDAPBaseDN;
 139+
 140+ $sr = ldap_search( $ds, $edgLDAPBaseDN[$domain], $filter, $attributes );
 141+ $results = ldap_get_entries( $ds, $sr );
 142+ return $results;
 143+ }
 144+
 145+ static function getDBData( $dbID, $from, $columns, $where, $options ) {
 146+ global $edgDBServerType;
 147+ global $edgDBServer;
 148+ global $edgDBName;
 149+ global $edgDBUser;
 150+ global $edgDBPass;
 151+ global $edgDBFlags;
 152+ global $edgDBTablePrefix;
 153+
 154+ // Mandatory parameters
 155+ if ( ( ! array_key_exists( $dbID, $edgDBServerType ) ) ||
 156+ ( ! array_key_exists( $dbID, $edgDBServer ) ) ||
 157+ ( ! array_key_exists( $dbID, $edgDBName ) ) ||
 158+ ( ! array_key_exists( $dbID, $edgDBUser ) ) ||
 159+ ( ! array_key_exists( $dbID, $edgDBPass ) ) ) {
 160+ echo ( wfMsgExt( "externaldata-db-incomplete-information", array( 'parse', 'escape' ) ) );
 161+ return;
 162+ }
 163+
 164+ $db_type = $edgDBServerType[$dbID];
 165+ $db_server = $edgDBServer[$dbID];
 166+ $db_name = $edgDBName[$dbID];
 167+ $db_username = $edgDBUser[$dbID];
 168+ $db_password = $edgDBPass[$dbID];
 169+
 170+ // Optional parameters
 171+ if ( array_key_exists( $dbID, $edgDBFlags ) ) {
 172+ $db_flags = $edgDBFlags[$dbID];
 173+ } else {
 174+ $db_flags = DBO_DEFAULT;
 175+ }
 176+ if ( array_key_exists( $dbID, $edgDBTablePrefix ) ) {
 177+ $db_tableprefix = $edgDBTablePrefix[$dbID];
 178+ } else {
 179+ $db_tableprefix = '';
 180+ }
 181+
 182+ // DatabaseBase::newFromType() was added in MW 1.17
 183+ $realFunction = array( 'DatabaseBase', 'newFromType' );
 184+ if ( is_callable( $realFunction ) ) {
 185+ $db = DatabaseBase::newFromType( $db_type,
 186+ array(
 187+ 'host' => $db_server,
 188+ 'user' => $db_username,
 189+ 'password' => $db_password,
 190+ 'dbname' => $db_name,
 191+ 'flags' => $db_flags,
 192+ 'tableprefix' => $db_tableprefix,
 193+ )
 194+ );
 195+ } else {
 196+ if ( ( $db_flags !== DBO_DEFAULT ) || ( $db_tableprefix !== '' ) ) {
 197+ print wfMsg( "externaldata-db-option-unsupported", '<code>$edgDBFlags</code>', '<code>$edgDBTablePrefix</code>' );
 198+ return;
 199+ }
 200+
 201+ if ( $db_type == "mysql" ) {
 202+ $db = new Database( $db_server, $db_username, $db_password, $db_name );
 203+ } elseif ( $db_type == "postgres" ) {
 204+ $db = new DatabasePostgres( $db_server, $db_username, $db_password, $db_name );
 205+ } elseif ( $db_type == "mssql" ) {
 206+ $db = new DatabaseMssql( $db_server, $db_username, $db_password, $db_name );
 207+ } elseif ( $db_type == "oracle" ) {
 208+ $db = new DatabaseOracle( $db_server, $db_username, $db_password, $db_name );
 209+ } else {
 210+ $db = null;
 211+ }
 212+ }
 213+
 214+ if ( $db == null ) {
 215+ echo ( wfMsgExt( "externaldata-db-unknown-type", array( 'parse', 'escape' ) ) );
 216+ return;
 217+ }
 218+
 219+ if ( ! $db->isOpen() ) {
 220+ echo ( wfMsgExt( "externaldata-db-could-not-connect", array( 'parse', 'escape' ) ) );
 221+ return;
 222+ }
 223+
 224+ if ( count( $columns ) == 0 ) {
 225+ echo ( wfMsgExt( "externaldata-db-no-return-values", array( 'parse', 'escape' ) ) );
 226+ return;
 227+ }
 228+
 229+ $rows = self::searchDB( $db, $from, $columns, $where, $options );
 230+ $db->close();
 231+
 232+ $values = array();
 233+ foreach ( $rows as $row ) {
 234+ foreach ( $columns as $column ) {
 235+ $values[$column][] = $row[$column];
 236+ }
 237+ }
 238+
 239+ return $values;
 240+ }
 241+
 242+ static function searchDB( $db, $table, $vars, $conds, $options ) {
 243+ // Add on a space at the beginning of $table so that
 244+ // $db->select() will treat it as a literal, instead of
 245+ // putting quotes around it or otherwise trying to parse it.
 246+ $table = ' ' . $table;
 247+ $result = $db->select( $table, $vars, $conds, 'EDUtils::searchDB', $options );
 248+ if ( !$result ) {
 249+ echo ( wfMsgExt( "externaldata-db-invalid-query", array( 'parse', 'escape' ) ) );
 250+ return false;
 251+ } else {
 252+ $rows = array();
 253+ while ( $row = $db->fetchRow( $result ) ) {
 254+ // Create a new row object, that uses the
 255+ // passed-in column names as keys, so that
 256+ // there's always an exact match between
 257+ // what's in the query and what's in the
 258+ // return value (so that "a.b", for instance,
 259+ // doesn't get chopped off to just "b").
 260+ $new_row = array();
 261+ foreach ( $vars as $i => $column_name ) {
 262+ // Data that comes from the DB will
 263+ // (always?) be in ISO-8859-1 format -
 264+ // convert it to UTF8.
 265+ $new_row[$column_name] = utf8_encode( $row[$i] );
 266+ }
 267+ $rows[] = $new_row;
 268+ }
 269+ return $rows;
 270+ }
 271+ }
 272+
 273+ static function getXMLData( $xml ) {
 274+ global $edgXMLValues;
 275+ $edgXMLValues = array();
 276+
 277+ // Remove comments from XML - for some reason, xml_parse()
 278+ // can't handle them.
 279+ $xml = preg_replace( '/<!--.*?-->/s', '', $xml );
 280+
 281+ $xml_parser = xml_parser_create();
 282+ xml_set_element_handler( $xml_parser, array( 'EDUtils', 'startElement' ), array( 'EDUtils', 'endElement' ) );
 283+ xml_set_character_data_handler( $xml_parser, array( 'EDUtils', 'getContent' ) );
 284+ if ( !xml_parse( $xml_parser, $xml, true ) ) {
 285+ echo ( wfMsgExt( 'externaldata-xml-error',
 286+ xml_error_string( xml_get_error_code( $xml_parser ) ),
 287+ xml_get_current_line_number( $xml_parser ), array( 'parse', 'escape' ) ) );
 288+ }
 289+ xml_parser_free( $xml_parser );
 290+ return $edgXMLValues;
 291+ }
 292+
 293+ static function getValuesFromCSVLine( $csv_line ) {
 294+ // regular expression copied from http://us.php.net/fgetcsv
 295+ $vals = preg_split( '/,(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))/', $csv_line );
 296+ $vals2 = array();
 297+ foreach ( $vals as $val )
 298+ $vals2[] = trim( $val, '"' );
 299+ return $vals2;
 300+ }
 301+
 302+ static function getCSVData( $csv, $has_header ) {
 303+ // from http://us.php.net/manual/en/function.str-getcsv.php#88311
 304+ // str_getcsv() is a function that was only added in PHP 5.3.0,
 305+ // so use the much older fgetcsv() if it's not there
 306+
 307+ // actually, for now, always use fgetcsv(), since this call to
 308+ // str_getcsv() doesn't work, and I can't test/debug it at the
 309+ // moment
 310+ //if ( function_exists( 'str_getcsv' ) ) {
 311+ // $table = str_getcsv( $csv );
 312+ //} else {
 313+ $fiveMBs = 5 * 1024 * 1024;
 314+ $fp = fopen( "php://temp/maxmemory:$fiveMBs", 'r+' );
 315+ fputs( $fp, $csv );
 316+ rewind( $fp );
 317+ $table = array();
 318+ while ( $line = fgetcsv( $fp ) ) {
 319+ array_push( $table, $line );
 320+ }
 321+ fclose( $fp );
 322+ //}
 323+ // now "flip" the data, turning it into a column-by-column
 324+ // array, instead of row-by-row
 325+ if ( $has_header ) {
 326+ $header_vals = array_shift( $table );
 327+ }
 328+ $values = array();
 329+ foreach ( $table as $line ) {
 330+ foreach ( $line as $i => $row_val ) {
 331+ if ( $has_header ) {
 332+ $column = strtolower( $header_vals[$i] );
 333+ } else {
 334+ // start with an index of 1 instead of 0
 335+ $column = $i + 1;
 336+ }
 337+ if ( array_key_exists( $column, $values ) )
 338+ $values[$column][] = $row_val;
 339+ else
 340+ $values[$column] = array( $row_val );
 341+ }
 342+ }
 343+ return $values;
 344+ }
 345+
 346+ /**
 347+ * This function handles version 3 of the genomic-data format GFF,
 348+ * defined here:
 349+ * http://www.sequenceontology.org/gff3.shtml
 350+ */
 351+ static function getGFFData( $gff ) {
 352+ // use an fgetcsv() call, similar to the one in getCSVData()
 353+ // (fgetcsv() can handle delimiters other than commas, in this
 354+ // case a tab)
 355+ $fiveMBs = 5 * 1024 * 1024;
 356+ $fp = fopen( "php://temp/maxmemory:$fiveMBs", 'r+' );
 357+ fputs( $fp, $gff );
 358+ rewind( $fp );
 359+ $table = array();
 360+ while ( $line = fgetcsv( $fp, null, "\t" ) ) {
 361+ // ignore comment lines
 362+ if ( strpos( $line[0], '##' ) !== 0 ) {
 363+ // special handling for final 'attributes' column
 364+ if ( array_key_exists( 8, $line ) ) {
 365+ $attributes = explode( ';', $line[8] );
 366+ foreach ( $attributes as $attribute ) {
 367+ $keyAndValue = explode( '=', $attribute, 2 );
 368+ if ( count( $keyAndValue ) == 2 ) {
 369+ $key = strtolower( $keyAndValue[0] );
 370+ $value = $keyAndValue[1];
 371+ $line[$key] = $value;
 372+ }
 373+ }
 374+ }
 375+ array_push( $table, $line );
 376+ }
 377+ }
 378+ fclose( $fp );
 379+ // now "flip" the data, turning it into a column-by-column
 380+ // array, instead of row-by-row
 381+ if ( $has_header ) {
 382+ $header_vals = array_shift( $table );
 383+ }
 384+ $values = array();
 385+ foreach ( $table as $line ) {
 386+ foreach ( $line as $i => $row_val ) {
 387+ // each of the columns in GFF have a
 388+ // pre-defined name - even the last column
 389+ // has its own name, "attributes"
 390+ if ( $i === 0 ) {
 391+ $column = 'seqid';
 392+ } elseif ( $i == 1 ) {
 393+ $column = 'source';
 394+ } elseif ( $i == 2 ) {
 395+ $column = 'type';
 396+ } elseif ( $i == 3 ) {
 397+ $column = 'start';
 398+ } elseif ( $i == 4 ) {
 399+ $column = 'end';
 400+ } elseif ( $i == 5 ) {
 401+ $column = 'score';
 402+ } elseif ( $i == 6 ) {
 403+ $column = 'strand';
 404+ } elseif ( $i == 7 ) {
 405+ $column = 'phase';
 406+ } elseif ( $i == 8 ) {
 407+ $column = 'attributes';
 408+ } else {
 409+ // this is hopefully an attribute key
 410+ $column = $i;
 411+ }
 412+ if ( array_key_exists( $column, $values ) )
 413+ $values[$column][] = $row_val;
 414+ else
 415+ $values[$column] = array( $row_val );
 416+ }
 417+ }
 418+ return $values;
 419+ }
 420+
 421+ /**
 422+ * Recursive function for use by getJSONData()
 423+ */
 424+ static function parseTree( $tree, &$retrieved_values ) {
 425+ foreach ( $tree as $key => $val ) {
 426+ if ( is_array( $val ) ) {
 427+ self::parseTree( $val, $retrieved_values );
 428+ } else {
 429+ $key = strtolower( $key );
 430+ if ( array_key_exists( $key, $retrieved_values ) )
 431+ $retrieved_values[$key][] = $val;
 432+ else
 433+ $retrieved_values[$key] = array( $val );
 434+ }
 435+ }
 436+ }
 437+
 438+ static function getJSONData( $json ) {
 439+ // escape if json_decode() isn't supported
 440+ if ( ! function_exists( 'json_decode' ) ) {
 441+ echo ( wfMsgExt( "externaldata-json-decode-not-supported", array( 'parse', 'escape' ) ) );
 442+ return array();
 443+ }
 444+ $json_tree = json_decode( $json, true );
 445+ $values = array();
 446+ if ( is_array( $json_tree ) ) {
 447+ self::parseTree( $json_tree, $values );
 448+ }
 449+ return $values;
 450+ }
 451+
 452+ static function fetchURL( $url, $post_vars = array(), $get_fresh = false, $try_count = 1 ) {
 453+ $dbr = wfGetDB( DB_SLAVE );
 454+ global $edgStringReplacements, $edgCacheTable,
 455+ $edgCacheExpireTime, $edgAllowSSL;
 456+
 457+ // do any special variable replacements in the URLs, for
 458+ // secret API keys and the like
 459+ foreach ( $edgStringReplacements as $key => $value ) {
 460+ $url = str_replace( $key, $value, $url );
 461+ }
 462+
 463+ if ( !isset( $edgCacheTable ) || is_null( $edgCacheTable ) ) {
 464+ if ( $edgAllowSSL ) {
 465+ // The hardcoded 'CURLOPT_SSL_VERIFYPEER' is
 466+ // needed for MW < 1.17
 467+ return Http::get( $url, 'default', array( CURLOPT_SSL_VERIFYPEER => false, 'sslVerifyCert' => false, 'followRedirects' => false ) );
 468+ } else {
 469+ return Http::get( $url );
 470+ }
 471+ }
 472+
 473+ // check the cache (only the first 254 chars of the url)
 474+ $row = $dbr->selectRow( $edgCacheTable, '*', array( 'url' => substr( $url, 0, 254 ) ), 'EDUtils::fetchURL' );
 475+
 476+ if ( $row && ( ( time() - $row->req_time ) > $edgCacheExpireTime ) ) {
 477+ $get_fresh = true;
 478+ }
 479+
 480+ if ( !$row || $get_fresh ) {
 481+ if ( $edgAllowSSL ) {
 482+ $page = Http::get( $url, 'default', array( CURLOPT_SSL_VERIFYPEER => false ) );
 483+ } else {
 484+ $page = Http::get( $url );
 485+ }
 486+ if ( $page === false ) {
 487+ sleep( 1 );
 488+ if ( $try_count >= self::$http_number_of_tries ) {
 489+ echo ( wfMsgExt( 'externaldata-db-could-not-get-url', array( 'parsemag', 'escape' ), self::$http_number_of_tries ) );
 490+ return '';
 491+ }
 492+ $try_count++;
 493+ return self::fetchURL( $url, $post_vars, $get_fresh, $try_count );
 494+ }
 495+ if ( $page != '' ) {
 496+ $dbw = wfGetDB( DB_MASTER );
 497+ // insert contents into the cache table
 498+ $dbw->insert( $edgCacheTable, array( 'url' => substr( $url, 0, 254 ), 'result' => $page, 'req_time' => time() ) );
 499+ return $page;
 500+ }
 501+ } else {
 502+ return $row->result;
 503+ }
 504+ }
 505+
 506+ /**
 507+ * Checks whether this URL is allowed, based on the
 508+ * $edgAllowExternalDataFrom whitelist
 509+ */
 510+ static public function isURLAllowed( $url ) {
 511+ // this code is based on Parser::maybeMakeExternalImage()
 512+ global $edgAllowExternalDataFrom;
 513+ $data_from = $edgAllowExternalDataFrom;
 514+ $text = false;
 515+ if ( empty( $data_from ) ) {
 516+ return true;
 517+ } elseif ( is_array( $data_from ) ) {
 518+ foreach ( $data_from as $match ) {
 519+ if ( strpos( $url, $match ) === 0 ) {
 520+ return true;
 521+ }
 522+ }
 523+ return false;
 524+ } else {
 525+ if ( strpos( $url, $data_from ) === 0 ) {
 526+ return true;
 527+ } else {
 528+ return false;
 529+ }
 530+ }
 531+ }
 532+
 533+ static public function getDataFromURL( $url, $format ) {
 534+ $url_contents = EDUtils::fetchURL( $url );
 535+ // exit if there's nothing there
 536+ if ( empty( $url_contents ) )
 537+ return array();
 538+
 539+ if ( $format == 'xml' ) {
 540+ return self::getXMLData( $url_contents );
 541+ } elseif ( $format == 'csv' ) {
 542+ return self::getCSVData( $url_contents, false );
 543+ } elseif ( $format == 'csv with header' ) {
 544+ return self::getCSVData( $url_contents, true );
 545+ } elseif ( $format == 'json' ) {
 546+ return self::getJSONData( $url_contents );
 547+ } elseif ( $format == 'gff' ) {
 548+ return self::getGFFData( $url_contents );
 549+ }
 550+ return array();
 551+ }
 552+
 553+}
Property changes on: tags/extensions/ExternalData/REL_1_3_1/ED_Utils.php
___________________________________________________________________
Added: svn:eol-style
1554 + native

Status & tagging log