r87884 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87883‎ | r87884 | r87885 >
Date:16:13, 11 May 2011
Author:ashley
Status:deferred (Comments)
Tags:
Comment:
new extension
Modified paths:
  • /trunk/extensions/PrivateDomains (added) (history)
  • /trunk/extensions/PrivateDomains/PrivateDomains.i18n.php (added) (history)
  • /trunk/extensions/PrivateDomains/PrivateDomains.php (added) (history)
  • /trunk/extensions/PrivateDomains/SpecialPrivateDomains.php (added) (history)

Diff [purge]

Index: trunk/extensions/PrivateDomains/PrivateDomains.i18n.php
@@ -0,0 +1,304 @@
 2+<?php
 3+/**
 4+ * Internationalization file for PrivateDomains extension.
 5+ *
 6+ * @file
 7+ * @ingroup Extensions
 8+ */
 9+
 10+$messages = array();
 11+
 12+/** English
 13+ * @author Inez Korczyński <korczynski@gmail.com>
 14+ */
 15+$messages['en'] = array(
 16+ 'privatedomains-nomanageaccess' => "<p>Sorry, you do not have enough rights to manage the allowed private domains for this wiki. Only wiki bureaucrats and staff members have access.</p><p>If you aren't logged in, you probably [[Special:UserLogin|should]].</p>",
 17+ 'privatedomains' => 'Manage Private Domains',
 18+ 'privatedomains-ifemailcontact' => '<p>Otherwise, please contact [[Special:EmailUser/$1|$1]] if you have any questions.</p>',
 19+ 'saveprivatedomains-success' => 'Private Domains changes saved.',
 20+ 'privatedomains-invalidemail' => "<p>Sorry, access to this wiki is restricted to members of $1. If you have an email address affiliated with $1, you can enter or reconfirm your email address on your account preference page [[Special:Preferences|here]]. You can still view pages on this wiki, but you will be unable to edit.</p>",
 21+ 'privatedomains-affiliatenamelabel' => 'Name of organization:',
 22+ 'privatedomains-emailadminlabel' => 'Contact username for access problems or queries:',
 23+ 'privatedomains-instructions' => "<br /> <br /> <p>Below is the list of email domains allowed for editors of this wiki. Each line designates an email suffix that is given access for editing. This should be formatted with one suffix per line. For example:</p> <p style=\"width: 20%; padding:5px; border: 1px solid grey;\">cs.stanford.edu<br /> stanfordalumni.org</p> <p>This would allow edits from anyone with the email address whatever@cs.stanford.edu or whatever@stanfordalumni.org</p> <p><b>Enter the allowed domains in the text box below, and click \"save\".</b></p>",
 24+ // For Special:ListGroupRights
 25+ 'right-privatedomains' => 'Manage Private Domains',
 26+);
 27+
 28+/** Afrikaans (Afrikaans)
 29+ * @author Naudefj
 30+ */
 31+$messages['af'] = array(
 32+ 'privatedomains' => 'Bestuur private domeine',
 33+ 'saveprivatedomains-success' => 'Die wysigings aan privaatdomeine is gestoor.',
 34+ 'privatedomains-affiliatenamelabel' => 'Naam van organisasie:',
 35+);
 36+
 37+/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца))
 38+ * @author EugeneZelenko
 39+ * @author Jim-by
 40+ * @author Wizardist
 41+ */
 42+$messages['be-tarask'] = array(
 43+ 'privatedomains-nomanageaccess' => "Выбачайце, Вы ня маеце правоў для кіраваньня дазволенымі ўласнымі дамэнамі ў {{GRAMMAR:месны|{{SITENAME}}}}. Маюць доступ толькі бюракраты і супрацоўнікі.</p><p>Калі вы не ўвайшлі ў сыстэму, Вам, магчыма, [[Special:UserLogin|трэба ўвайсьці]].",
 44+ 'privatedomains' => 'Кіраваньне ўласнымі дамэнамі',
 45+ 'privatedomains-ifemailcontact' => 'У іншым выпадку, калі ласка, зьвярніцеся да [[Special:EmailUser/$1|$1]], калі Вы маеце якія-небудзь пытаньні.',
 46+ 'saveprivatedomains-success' => 'Зьмены ў прыватных дамэнах захаваныя.',
 47+ 'privatedomains-invalidemail' => 'Прабачце, доступ да {{GRAMMAR:родны|{{SITENAME}}}} забаронены для ўдзельнікаў $1. Калі Вы маеце адрас электроннай пошты зьвязаны з $1, Вы можаце ўвесьці альбо перапацьвердзіць Ваш адрас электроннай пошты на старонцы Вашых установак [[Special:Preferences|тут]]. Вы можаце праглядаць старонкі {{GRAMMAR:родны|{{SITENAME}}}}, але ня можаце іх рэдагаваць.',
 48+ 'privatedomains-affiliatenamelabel' => 'Назва арганізацыі:',
 49+ 'privatedomains-emailadminlabel' => 'Кантактнае імя ўдзельніка для праблемаў уваходу альбо запытаў:',
 50+ 'privatedomains-instructions' => 'Ніжэй пададзены сьпіс паштовых дамэнаў дазволеных для рэдактараў {{GRAMMAR:родны|{{SITENAME}}}}. Кожны радок вызначае суфікс адрасу электроннай пошты, які дазваляе доступ да рэдагаваньня. Ён павінен мець выгляд: адзін суфікс на радок. Напрыклад: </p><p style="width: 20%; padding:5px; border: 1px solid grey;">cs.stanford.edu<br /> stanfordalumni.org</p><p>Гэта дазволіць рэдагаваньне толькі удзельнікам з адрасам электроннай пошты whatever@cs.stanford.edu альбо whatever@stanfordalumni.org</p><p><b>Увядзіце дазволеныя дамэны ў тэкставае поле ніжэй і націсьніце «Захаваць».</b>',
 51+);
 52+
 53+/** Breton (Brezhoneg)
 54+ * @author Gwenn-Ael
 55+ */
 56+$messages['br'] = array(
 57+ 'privatedomains_nomanageaccess' => "Ma digarezit, n'ho peus ket gwirioù a-walc'h evit merañ domanioù prevez ar wiki-mañ. N'eus nemet ar vurevourien hag izili ar c'hoskor a c'hall mont warnañ.</p><p> Ma n'oc'h ket kevreet, ret e vefe deoc'h [[Special:UserLogin|kevreañ]] marteze.",
 58+ 'privatedomains' => 'Merañ an domanioù prevez',
 59+ 'privatedomains-ifemailcontact' => "Anez, kit e darempred gant [[Special:Emailuser/$1|$1]] m'ho peus goulenn pe c'houlenn.",
 60+ 'saveprivatedomains-success' => 'Kemmoù en domanioù prevez saveteet.',
 61+ 'privatedomains-invalidemail' => "Ma digarezit, Miret eo ar moned d'ar wiki-mañ evit izili $1. M'ho peus ur chomlec'h postel emezelet ouzh $1 e challit mont e-barzh pe adkarnaat ho chomlec'h postel war pajenn zibaboù ar gont [[Special:Preferences|amañ]]. Gallout a rit gwelet pajennoù ar wiki-mañ, met ne c'hallit ket kemmañ anezho.",
 62+ 'privatedomains-affiliatenamelabel' => 'Anv an aozadur :',
 63+ 'privatedomains-emailadminlabel' => "Anv implijer an darempred m'ho peus kudennoù mont pe rekedoù :",
 64+ 'privatedomains-instructions' => 'Diskwelet eo roll domanioù ar chomlec\'hioù postel zo aotreet evit embannerien ar wiki-mañ. Pep linenn a ziskouez ur rakverk postel a ro tro d\'an embannerien da vont warno. Furmadet e tle ar roll bezañ gant ur rakverk dre linenn. Da skouer, :</p><p style="width: 20%; padding:5px; border: 1px solid grey;">cs.stanford.edu<br /> stanfordalumni.org</p><p>p>This would allow edits from anyone with the email address whatever@cs.stanford.edu or whatever@stanfordalumni.org</p><p><b>Ebarzhit roll an domanioù aotreet er voest amañ amañ dindan ha klikit war « saveteiñ».</b>',
 65+);
 66+
 67+/** German (Deutsch)
 68+ * @author LWChris
 69+ */
 70+$messages['de'] = array(
 71+ 'privatedomains-nomanageaccess' => "Sorry, du hast nicht genügend Rechte, um die erlaubten privaten Domains für dieses Wiki zu verwalten. Nur Wiki Bürokraten und Mitarbeiter haben Zugang.</p><p>Wenn du nicht eingeloggt bist, solltest du das wahrscheinlich [[Special:UserLogin|machen]].",
 72+ 'privatedomains' => 'Private Domains verwalten',
 73+ 'privatedomains-ifemailcontact' => 'Andernfalls wende dich bitte an [[Special:EmailUser/$1|$1]] falls du Fragen hast.',
 74+ 'saveprivatedomains-success' => 'Änderungen an privaten Domains gespeichert.',
 75+ 'privatedomains-invalidemail' => 'Tut uns leid, aber der Zugang zu diesem Wiki ist auf Mitglieder von $1 beschränkt. Wenn du eine E-Mail-Adresse von $1 besitzt, kannst du es betreten, oder bestätige deine E-Mail Adresse in deinen Konteneinstellungen [[Special:Preferences|hier]]. Du kannst weiterhin Seiten in diesem Wiki ansehen, wirst sie aber nicht bearbeiten können.',
 76+ 'privatedomains-affiliatenamelabel' => 'Name der Organisation:',
 77+ 'privatedomains-emailadminlabel' => 'Kontakt-Benutzername bei Zugangsproblemen oder Fragen:',
 78+ 'privatedomains-instructions' => 'Unten ist die Liste der erlaubten E-Mail-Domains für Editoren dieses Wikis. Jede Zeile bezeichnet einen E-Mail-Suffix, dem Bearbeitungen erlaubt werden. Dies sollte mit einem Suffix pro Zeile formatiert werden. Zum Beispiel:</p><p style="width: 20%; padding:5px; border: 1px solid grey;"> cs.stanford.edu<br /> stanfordalumni.org</p><p>Dies würde Bearbeitungen von jedem mit der E-Mail-Adresse whatever@cs.stanford.edu oder whatever@stanfordalumni.org erlauben.</p><p><b>Gib die erlaubten Domains in das Textfeld unterhalb ein und klicke auf "Speichern".</b>',
 79+);
 80+
 81+/** German (formal address) (Deutsch (Sie-Form))
 82+ * @author LWChris
 83+ */
 84+$messages['de-formal'] = array(
 85+ 'privatedomains-nomanageaccess' => "Entschuldigung, Sie haben nicht genügend Rechte, um die erlaubten privaten Domains für dieses Wiki zu verwalten. Nur Wiki Bürokraten und Mitarbeiter haben Zugang.</p><p>Wenn Sie nicht eingeloggt sind, sollten Sie dies wahrscheinlich [[Special:UserLogin|machen]].",
 86+ 'privatedomains-ifemailcontact' => 'Andernfalls wenden Sie sich bitte an [[Special:EmailUser/$1|$1]] falls Sie Fragen haben.',
 87+ 'privatedomains-invalidemail' => 'Tut uns leid, aber der Zugang zu diesem Wiki ist auf Mitglieder von $1 beschränkt. Wenn Sie eine E-Mail-Adresse von $1 besitzen, können Sie es betreten, oder bestätigen Sie Ihre E-Mail Adresse in Ihren Konteneinstellungen [[Special:Preferences|hier]]. Sie können weiterhin Seiten in diesem Wiki ansehen, werden sie aber nicht bearbeiten können.',
 88+ 'privatedomains-instructions' => 'Unten ist die Liste der erlaubten E-Mail-Domains für Editoren dieses Wikis. Jede Zeile bezeichnet einen E-Mail-Suffix, dem Bearbeitungen erlaubt werden. Dies sollte mit einem Suffix pro Zeile formatiert werden. Zum Beispiel:</p><p style="width: 20%; padding:5px; border: 1px solid grey;"> cs.stanford.edu<br /> stanfordalumni.org</p><p>Dies würde Bearbeitungen von jedem mit der E-Mail-Adresse whatever@cs.stanford.edu oder whatever@stanfordalumni.org erlauben.</p><p><b>Geben Sie die erlaubten Domains in das Textfeld unterhalb ein und klicken Sie auf "Speichern".</b>',
 89+);
 90+
 91+/** Spanish (Español)
 92+ * @author Pertile
 93+ */
 94+$messages['es'] = array(
 95+ 'privatedomains-nomanageaccess' => "Lo sentimos, no tiene los privilegios suficientes para administrar los dominios privados permitidos para esta wiki. Solamente los burócratas wiki y los miembros del personal tienen acceso.</p><p>Si no accedió al sistema, probablemente [[Special:UserLogin|debería hacerlo]].",
 96+ 'privatedomains' => 'Administrar Dominios Privados',
 97+ 'privatedomains-ifemailcontact' => 'En caso contrario, póngase en contacto con [[Special:EmailUser/$1|$1]] por cualquier consulta.',
 98+ 'saveprivatedomains-success' => 'Se guardaron los cambios en los Dominios Privados.',
 99+ 'privatedomains-invalidemail' => 'Lo sentimos, el acceso a esta wiki está restringido a los miembros de $1. Si posee una cuenta de correo electrónico afiliada a $1, puede ingresarla o volver a confirmar su dirección de correo electrónico en la página de preferencias de su cuenta [[Special:Preferences|aquí]]. Todavía puede ver las páginas en esta wiki, pero no podrá editarlas.',
 100+ 'privatedomains-affiliatenamelabel' => 'Nombre de la organización:',
 101+ 'privatedomains-emailadminlabel' => 'Nombre de usuario del contacto para problemas o consultas:',
 102+ 'privatedomains-instructions' => 'A continuación se presenta la lista de dominios de correo electrónico permitidos para los editores de esta wiki. Cad línea designa un sufijo de correo electrónico que puede editar en esta wiki. Esta debería tener un formato de un sufijo por línea. Por ejemplo:</p><p style="width: 20%; padding:5px; border: 1px solid grey;">cs.stanford.edu<br /> stanfordalumni.org</p><p>El ejemplo anterior debería permitir las ediciones de alguien cuya dirección de correo sea loquesea@cs.stanford.edu o loquesea@stanfordalumni.org</p><p><b>Ingrese los dominios permitidos en el cuadro de texto que se muestra debajo y haga clic en "guardar".</b>',
 103+);
 104+
 105+/** Finnish (Suomi)
 106+ * @author Centerlink
 107+ */
 108+$messages['fi'] = array(
 109+ 'privatedomains' => 'Hallinnoi yksityisiä verkkoalueita',
 110+ 'privatedomains-ifemailcontact' => 'Muussa tapauksessa, ota yhteys [[Special:EmailUser/$1|$1]], jos sinulla on kysyttävää.',
 111+ 'saveprivatedomains-success' => 'Yksityisen verkkoalueen muutokset on tallennettu.',
 112+ 'privatedomains-affiliatenamelabel' => 'Organisaation nimi:',
 113+ 'privatedomains-emailadminlabel' => 'Yhteystietokäyttäjänimi pääsypulmissa tai kyselyissä:',
 114+);
 115+
 116+/** French (Français)
 117+ * @author Alexandre Emsenhuber
 118+ */
 119+$messages['fr'] = array(
 120+ 'privatedomains-nomanageaccess' => "<p>Désolé, vous n'avez les droits suffisants pour gérer les domaines privés de ce wiki. Seuls les bureaucrates et les membres du personnel y ont accès.</p><p>Si vous n'êtes pas connecté, vous devriez probablement [[Special:UserLogin|vous connecter]].</p>",
 121+ 'privatedomains' => 'Gérer les domaines privés',
 122+ 'privatedomains-ifemailcontact' => '<p>Sinon, veuillez contacter [[Special:EmailUser/$1|$1]] si vous avec une question.</p>',
 123+ 'saveprivatedomains-success' => 'Modifications dans les domaines privés sauvegardés.',
 124+ 'privatedomains-invalidemail' => "<p>Désolé, l'accès à ce wiki est réservé aux membre de $1. Si vos avez une adresse de courriel affiliée avec $1, vous pouvez entrer ou reconfirmer votre adresse de courriel dans sur la page de préférences du compte [[Special:Preferences|ici]]. Vous pouvez toujours voir les pages de ce wiki, mais vous ne pouvez pas le modifier.</p>",
 125+ 'privatedomains-affiliatenamelabel' => "Nom de l'organisation :",
 126+ 'privatedomains-emailadminlabel' => "Nom d'utilisateur du contact pour des problèmes d'accès ou requêtes :",
 127+ 'privatedomains-instructions' => "<br /> <br /> <p>La liste des domaines des adresses de courriel autorisées pour les éditeurs de ce wiki est affichée ci-dessous. Chaque ligne désigne un suffixe d'adresse de courriel qui donne accès aux éditeurs. La liste doit être formatée avec un suffixe par ligne. Par exemple :</p> <p style=\"width: 20%; padding:5px; border: 1px solid grey;\">cs.stanford.edu<br /> stanfordalumni.org</p> <p>Ceci permettra à toutes les personnes ayant une adresse de courriel se terminant par « @cs.stanford.edu » et « @stanfordalumni.org » de modifier le wiki.</p> <p><b>Entrez la liste des domaines autorisés dans la boîte ci-dessous et cliquez sur « sauvegarder ».</b></p>",
 128+);
 129+
 130+/** Galician (Galego)
 131+ * @author Toliño
 132+ */
 133+$messages['gl'] = array(
 134+ 'privatedomains-nomanageaccess' => "<p>Sentímolo, non ten os dereitos necesarios para xestionar os dominios privados deste wiki. Só os burócratas do wiki e os membros do persoal teñen acceso.</p><p>Se non accedeu ao sistema, probabelmente [[Special:UserLogin|debería]] facelo.</p>",
 135+ 'privatedomains' => 'Xestionar os dominios privados',
 136+ 'privatedomains-ifemailcontact' => '<p>Se non, póñase en contacto con [[Special:EmailUser/$1|$1]] se ten algunha dúbida.</p>',
 137+ 'saveprivatedomains-success' => 'Gardáronse os cambios feitos nos dominios privados.',
 138+ 'privatedomains-invalidemail' => "<p>Sentímolo, o acceso a este wiki está restrinxido aos membros de $1. Se ten un enderezo de correo electrónico afiliado con $1, pode entrar ou confirmar o seu enderezo de correo electrónico na páxina de preferencias da súa conta [[Special:Preferences|aquí]]. Aínda pode ver páxinas neste wiki, pero non será capaz de editalas.</p>",
 139+ 'privatedomains-affiliatenamelabel' => 'Nome da organización:',
 140+ 'privatedomains-emailadminlabel' => 'Nome de usuario de contacto para os problemas de acceso ou dúbida:',
 141+ 'privatedomains-instructions' => "<br /> <br /> <p>A continuación está a lista de dominios de correo electrónico autorizados para os editores deste wiki. Cada liña designa un sufixo que dá acceso á edición. A lista debe estar ordenada de xeito que haxa un sufixo por liña. Por exemplo:</p> <p style=\"width: 20%; padding:5px; border: 1px solid grey;\">cs.stanford.edu<br /> stanfordalumni.org</p> <p>Isto permitirá as edicións de aqueles que teña un enderezo de correo electrónico o_que_sexa@cs.stanford.edu ou o_que_sexa@stanfordalumni.org</p> <p><b>Insira os dominios autorizados no cadro de texto de embaixo e prema en \"Gardar\".</b></p>",
 142+);
 143+
 144+/** Hungarian (Magyar)
 145+ * @author Glanthor Reviol
 146+ */
 147+$messages['hu'] = array(
 148+ 'privatedomains' => 'Privát tartományok kezelése',
 149+ 'privatedomains-affiliatenamelabel' => 'Szervezet neve:',
 150+ 'privatedomains-emailadminlabel' => 'Kapcsolattartó neve hozzáférési problémák vagy kérdések esetére:',
 151+);
 152+
 153+/** Interlingua (Interlingua)
 154+ * @author McDutchie
 155+ */
 156+$messages['ia'] = array(
 157+ 'privatedomains-nomanageaccess' => "Pardono, tu non ha le derectos necessari pro gerer le dominios private de iste wiki. Solmente le bureaucrates del wiki e le personal ha accesso.</p><p>Si tu non ha aperite un session, tu deberea probabilemente [[Special:UserLogin|facer lo]].",
 158+ 'privatedomains' => 'Gerer dominios private',
 159+ 'privatedomains-ifemailcontact' => 'Si non, contacta [[Special:EmailUser/$1|$1]] si tu ha alcun questiones.',
 160+ 'saveprivatedomains-success' => 'Le alterationes in le dominios private ha essite salveguardate.',
 161+ 'privatedomains-invalidemail' => 'Pardono, le accesso a iste wiki es restringite al membros de $1. Si tu ha un adresse de e-mail affiliate con $1, tu pote entrar o reconfirmar tu adresse de e-mail in [[Special:Preferences|le pagina de preferentias de tu conto]]. Tu pote vider paginas in iste wiki, ma non modificar los.',
 162+ 'privatedomains-affiliatenamelabel' => 'Nomine del organisation:',
 163+ 'privatedomains-emailadminlabel' => 'Nomine de usator de contacto pro problemas de accesso o questiones:',
 164+ 'privatedomains-instructions' => 'Hic infra se trova le lista de dominios de e-mail permittite pro le contributores de iste wiki. Cata linea designa un suffixo de e-mail que da accesso al modification. Isto debe esser formatate con un suffixo per linea. Per exemplo:</p><p style="width: 20%; padding:5px; border: 1px solid grey;">cs.stanford.edu<br /> stanfordalumni.org</p><p>Isto permitterea le modificationes de omne persona con le adresse de e-mail quecunque@cs.stanford.edu o quecunque@stanfordalumni.org</p><p><b>Entra le dominios permittite in le quadro de texto sequente, e clicca "salveguardar".</b>',
 165+);
 166+
 167+/** Luxembourgish (Lëtzebuergesch)
 168+ * @author Robby
 169+ */
 170+$messages['lb'] = array(
 171+ 'privatedomains-affiliatenamelabel' => 'Numm vun der Organisatioun',
 172+);
 173+
 174+/** Macedonian (Македонски)
 175+ * @author Bjankuloski06
 176+ */
 177+$messages['mk'] = array(
 178+ 'privatedomains-nomanageaccess' => "Жалиме, немате доволно права за да раководите со дозволените приватни домени за ова вики. Само вики-бирократи и членови на персоналот имаат таков пристап.</p><p>Ако не сте најавени, веројатно ќе [[Special:UserLogin|треба да се најавите]].",
 179+ 'privatedomains' => 'Раководење со приватни домени',
 180+ 'privatedomains-ifemailcontact' => 'Во спротивно, обратете се на [[Special:EmailUser/$1|$1]] ако имате било какви прашања.',
 181+ 'saveprivatedomains-success' => 'Промените во приватните домени се зачувани.',
 182+ 'privatedomains-invalidemail' => 'Жалиме, но само членови на $1 имаат пристап на ова вики. Ако имате е-поштенска адреса здружена со $1, можете да ја внесете или препотврдите на страницата за нагодување на сметката [[Special:Preferences|тука]]. Ќе можете и понатаму да ги гледате страниците на ова вики, но нема да можете да уредувате.',
 183+ 'privatedomains-affiliatenamelabel' => 'Име на организација:',
 184+ 'privatedomains-emailadminlabel' => 'Корисничко име за контакт при проблеми или прашања за пристап:',
 185+ 'privatedomains-instructions' => 'Подолу е наведен список на е-поштенски домени дозволени за уредниците на ова вики. Во секој ред е назначена е-поштенска наставка што добива право на уредување. Ова треба да се форматира со по една наставка за секој ред. На пример:</p><p style="width: 20%; padding:5px; border: 1px solid grey;">cs.stanford.edu<br /> stanfordalumni.org</p><p>Ова дозволува уредувања од секој со адреса нешто@cs.stanford.edu или нешто@stanfordalumni.org</p><p><b>Во полето подолу внесете ги дозволените домени, и кликнете на „зачувај“.</b>',
 186+);
 187+
 188+/** Dutch (Nederlands)
 189+ * @author Mark van Alphen
 190+ * @author Mitchel Corstjens
 191+ * @author Siebrand Mazeland
 192+ */
 193+$messages['nl'] = array(
 194+ 'privatedomains' => 'Privédomeinen beheren',
 195+ 'privatedomains-affiliatenamelabel' => 'Organisatienaam:',
 196+ 'privatedomains-emailadminlabel' => 'Neem contact op met gebruikersnaam voor toegangsproblemen of als je vragen hebt',
 197+ 'privatedomains-ifemailcontact' => '<p>Anders, contacteer a.u.b. [[Special:EmailUser/$1|$1]] als je vragen hebt.</p>',
 198+ 'privatedomains-instructions' => "<br /> <br /> <p>Onderstaande is een lijst van email domeinen toegestaan voor bewerkers op deze wiki. Elke regel wijst een email achtervoegsel toe die in staat is om deze wiki te bewerken. Formateer dit met een achtervoegsel per regel. Voorbeeld</p> <p style=\"width: 20%; padding:5px; border: 1px solid grey;\">cs.stanford.edu<br /> stanfordalumni.org</p> <p>Dit zou iedereen toe moeten staan om te bewerken met het email adres whatever@cs.stanford.edu of whatever@stanfordalumni.org</p> <p><b>Type de toegestane domeinen in de onderstaande tekst box, en klik op \"opslaan\".</b></p>",
 199+ 'privatedomains-invalidemail' => "<p>Sorry, toegang tot deze wiki is alleen toegestaan voor leden van $1. Als je een email adres hebt die verwant is met $1, kan je je email adres invoeren of bevestigen op je account voorkeuren pagina [[Special:Preferences|hier]]. Je kan nog steeds pagina's op de wiki bekijken, maar kan niet bewerken.</p>",
 200+ 'privatedomains-nomanageaccess' => "<p>Sorry, maar je hebt niet genoeg rechten om privé domeinen voor deze wiki te beheren. Alleen wiki bureaucraten en staff leden hebben toegang.</p><p>Als je niet ingelogd bent, zou je dat [[Special:UserLogin|moeten doen]].</p>",
 201+);
 202+
 203+/** Norwegian (bokmål)‬ (‪Norsk (bokmål)‬)
 204+ * @author Nghtwlkr
 205+ */
 206+$messages['no'] = array(
 207+ 'privatedomains-nomanageaccess' => 'Beklager, du har ikke nok rettigheter til å håndtere tillatte private domener for denne wikien. Kun wikibyråkrater og stabsmedlemmer har tilgang.</p><p>Du bør [[Special:UserLogin|logge inn]] om du ikke alt har gjort det.',
 208+ 'privatedomains' => 'Håndter private domener',
 209+ 'privatedomains-ifemailcontact' => 'Hvis ikke, kontakt [[Special:EmailUser/$1|$1]] om du har spørsmål.',
 210+ 'saveprivatedomains-success' => 'Endringer for private domener lagret.',
 211+ 'privatedomains-invalidemail' => 'Beklager, tilgang til denne wikien er begrenset til medlemmer av $1. Om du har en e-postadresse tilknyttet $1 kan du skrive den inn eller bekrefte den på din side for [[Special:Preferences|kontoinnstillinger]]. Du kan fortsatt se sidene på denne wikien, men du kan ikke redigere dem.',
 212+ 'privatedomains-affiliatenamelabel' => 'Navn på organisasjon:',
 213+ 'privatedomains-emailadminlabel' => 'Kontakt brukernavn for tilgangsproblemer eller spørsmål:',
 214+ 'privatedomains-instructions' => 'Under er en liste over e-postdomener som er tillatt for bidragsytere i denne wikien. Hver linje angir et e-postsuffiks som er gitt tilgang til redigering. Denne bør være formatert med ett suffiks per linje. For eksempel:</p><p style="width:20%; padding:5px; border:1px solid grey;">cs.stanford.edu<br /> stanfordalumni.org</p><p>Dette ville tillatt redigeringer fra enhver med e-postadresse hvasomhelst@cs.stanford.edu og hvasomhelst@stanfordalumni.org</p><p><b>Skriv inn tillatte domener i tekstboksen under og klikk «lagre».</b>',
 215+);
 216+
 217+/** Polish (Polski)
 218+ * @author Sp5uhe
 219+ */
 220+$messages['pl'] = array(
 221+ 'privatedomains-nomanageaccess' => 'Nie masz wystarczających uprawnień do zarządzania prywatnymi domenami tej wiki. Robić to mogą wyłącznie członkowie grup biurokraci oraz personel.
 222+
 223+Jeśli nie jesteś zalogowany możliwe, że powinieneś najpierw [[Special:UserLogin|zalogować się]].',
 224+ 'privatedomains' => 'Zarządzanie prywatnymi domenami',
 225+ 'privatedomains-ifemailcontact' => 'W przeciwnym wypadku należy kontaktować się z [[Special:EmailUser/$1|$1]], o ile masz jakieś pytania.',
 226+ 'saveprivatedomains-success' => 'Zmiany dla domen prywatnych zostały zapisane.',
 227+ 'privatedomains-invalidemail' => 'Dostęp do tej wiki został ograniczony do członków $1. Jeśli masz adres e-mail powiązany z $1, możesz wprowadzić lub potwierdzić swój adres e‐mail na [[Special:Preferences|stronie preferencji]]. Nadal możesz przeglądać strony, ale edycja nie będzie możliwa.',
 228+ 'privatedomains-affiliatenamelabel' => 'Nazwa organizacji',
 229+ 'privatedomains-emailadminlabel' => 'Użytkownik kontaktowy w sprawie pytań lub problemów z dostępem',
 230+ 'privatedomains-instructions' => 'Poniżej znajduje się lista domen poczty elektronicznej dostępnych dla redaktorów tej wiki. Każdy wiersz określa sufiks adresu e-mail, którego posiadanie umożliwia edycję. Należy umieścić jedną końcówkę w jednej linii. Na przykład:</p>
 231+<p style="width: 20%; padding:5px; border: 1px solid grey;">cs.stanford.edu<br /> stanfordalumni.org</p>
 232+<p>Pozwoli to edytować np posiadaczom adresów whatever@cs.stanford.edu lub whatever@stanfordalumni.org</p>
 233+<p><b>Wprowadź dozwolone domeny w polu tekstowym i kliknij przycisk „{{int:saveprefs}}“.</b>',
 234+);
 235+
 236+/** Piedmontese (Piemontèis)
 237+ * @author Borichèt
 238+ * @author Dragonòt
 239+ */
 240+$messages['pms'] = array(
 241+ 'privatedomains-nomanageaccess' => "<p>Belavans a l'ha pa basta drit për gestì ël domini privà për sta wiki-sì. Mach mangiapapé dla wiki e mèmber ëd l'echip a l'han acess.</p><p>S'a l'é pa rintrà ant ël sistema, a peul esse [[Special:UserLogin|ch'a deva felo]].</p>",
 242+ 'privatedomains' => 'Gestiss Domini Privà',
 243+ 'privatedomains-ifemailcontact' => "<p>Dësnò, për piasì ch'a contata [[Special:EmailUser/$1|$1]] s'a l'has chèich chestion.</p>",
 244+ 'saveprivatedomains-success' => 'Salvà ij cangiament ai Domini Privà.',
 245+ 'privatedomains-invalidemail' => "<p>Belavans l'acess a sta wiki-sì a l'é arstrenzù ai mèmber ëd $1. S'a l'ha n'adrëssa ëd pòsta eletrònica afilià con $1, a peul anserì o riconfirmé soa adrëssa an soa pàgina dle preferense ëd sò cont [[Special:Preferences|ambelessì]]. A peul ancó visualisé pàgine an sta wiki-sì, ma a podrà pa fé 'd modìfiche.</p>",
 246+ 'privatedomains-instructions' => "<br /> <br /> <p>Sota a-i é la lista dij domini ëd pòsta eletrònica përmëttù a j'editor dë sta wiki-sì. Minca linia a spessìfica un sufiss ëd pòsta eletrònica che a l'ha acess për modifiché. Sòn a dovrìa pijé la forma con un sufiss për linia. Për esempi:</p> <p style=\"width: 20%; padding:5px; border: 1px solid grey;\">cs.stanford.edu<br /> stanfordalumni.org</p> <p>Sòn a përmët modìfiche da tuti coj ch'a l'han l'adrëssa ëd pòsta eletrònica whatever@cs.stanford.edu o whatever@stanfordalumni.org</p> <p><b>Ch'a anserissa ij domini përmëttù ant la casela ëd test sì-sota, e ch'a sgnaca \"salvé\".</b></p>",
 247+ 'privatedomains-affiliatenamelabel' => "Nòm ëd l'organisassion:",
 248+ 'privatedomains-emailadminlabel' => "Contata nòm utent për problem d'acess o custion:",
 249+);
 250+
 251+/** Portuguese (Português)
 252+ * @author Hamilton Abreu
 253+ */
 254+$messages['pt'] = array(
 255+ 'privatedomains-nomanageaccess' => "Desculpe, mas não tem privilégios para administrar os domínios privados permitidos nesta wiki. Só os burocratas e os membros da equipa têm acesso.</p><p>Se não se autenticou, provavelmente [[Special:UserLogin|devia]].",
 256+ 'privatedomains' => 'Administrar Domínios Privados',
 257+ 'privatedomains-ifemailcontact' => 'Caso contrário, contacte [[Special:EmailUser/$1|$1]] se tiver dúvidas, por favor.',
 258+ 'saveprivatedomains-success' => 'As alterações aos Domínios Privados foram gravadas.',
 259+ 'privatedomains-invalidemail' => 'Desculpe, mas o acesso a esta wiki está restrito aos membros de $1. Se tem um correio electrónico afiliado com $1 pode introduzir ou reconfirmar o endereço de correio electrónico na página de preferências da sua conta [[Special:Preferences|aqui]]. Pode continuar a ver as páginas da wiki, mas não pode editá-las.',
 260+ 'privatedomains-affiliatenamelabel' => 'Nome da organização:',
 261+ 'privatedomains-emailadminlabel' => 'Nome do utilizador de contacto para problemas e questões:',
 262+ 'privatedomains-instructions' => 'É apresentada abaixo a lista de domínios de correio electrónico permitidos para os editores desta wiki. Cada linha designa um sufixo de correio electrónico com permissões de edição. Deve existir um sufixo por linha. Por exemplo:</p><p style="width: 20%; padding:5px; border: 1px solid grey;">uma.pt<br /> unl.pt</p><p>Isto permite edições a todos aqueles com um endereço de correio electrónico nome@uma.pt ou nome@unl.pt</p><p><b>Introduza os domínios permitidos na caixa de texto abaixo e clique "gravar".</b>',
 263+);
 264+
 265+/** Russian (Русский)
 266+ * @author Александр Сигачёв
 267+ */
 268+$messages['ru'] = array(
 269+ 'privatedomains-nomanageaccess' => "Извините, у вас недостаточно полномочий для управления частными доменами этой вики. Только вики-бюрократы и сотрудники имеют подобный доступ.</p><p>Если вы не вошли в систему, то вам, вероятно, [[Special:UserLogin|следует это сделать]].",
 270+ 'privatedomains' => 'Управление частными доменами',
 271+ 'privatedomains-ifemailcontact' => 'В противном случае, просим обращаться к [[Special:EmailUser/$1|$1]], если у вас есть какие-либо вопросы.',
 272+ 'saveprivatedomains-success' => 'Изменения в частных доменах сохранены.',
 273+ 'privatedomains-invalidemail' => 'Извините, доступ к этой вики доступен только для членов $1. Если у вас есть адрес электронной почты, связанный с $1, вы можете ввести или подтвердить ваш адрес электронной почты на вашей [[Special:Preferences|странице настроек]]. Вы можете просматривать страницы этой вики, но вы не сможете их править.',
 274+ 'privatedomains-affiliatenamelabel' => 'Название организации:',
 275+ 'privatedomains-emailadminlabel' => 'Контактное имя участника для запросов или проблем с доступом:',
 276+ 'privatedomains-instructions' => 'Ниже приведён список почтовых доменов, допустимых для редакторов этой вики. Каждая строка обозначает суффикс адреса электронной почты, позволяющего производить правки. На каждой строке должно быть не более одного суффикса. Например: </p> <p style="width: 20%; padding:5px; border: 1px solid grey;">cs.stanford.edu<br /> stanfordalumni.org</p> <p>Подобная настройка позволит править статьи участникам, обладающим электронными адресами whatever@cs.stanford.edu и whatever@stanfordalumni.org</p> <p><b>Введите разрешённые домены в представленное ниже текстовое поле и нажмите «Сохранить».</b>',
 277+);
 278+
 279+/** Serbian Cyrillic ekavian (Српски (ћирилица))
 280+ * @author Verlor
 281+ */
 282+$messages['sr-ec'] = array(
 283+ 'privatedomains-affiliatenamelabel' => 'Име организације:',
 284+);
 285+
 286+/** Telugu (తెలుగు)
 287+ * @author Veeven
 288+ */
 289+$messages['te'] = array(
 290+ 'privatedomains-affiliatenamelabel' => 'సంస్థ యొక్క పేరు:',
 291+);
 292+
 293+/** Tagalog (Tagalog)
 294+ * @author AnakngAraw
 295+ */
 296+$messages['tl'] = array(
 297+ 'privatedomains-nomanageaccess' => "Paumanhin, walang kang sapat na mga karapatang upang pamahalaan ang mga dominyong pribado para sa wiking ito. Tanging mga burokrato at mga kasaping tauhan ng wiki lamang ang makakapunta..</p><p>Kung hindi ka nakalagda, maaaring [[Special:UserLogin|dapat]] kang lumagda.",
 298+ 'privatedomains' => 'Pamahalaan ang mga Dominyong Pribado',
 299+ 'privatedomains-ifemailcontact' => 'O kaya, mangyaring makipag-ugnayan kay [[Special:EmailUser/$1|$1]] kung mayroon kang anumang mga katanungan.',
 300+ 'saveprivatedomains-success' => 'Sinagip ang mga pagbabago sa Mga Dominyong Pribado.',
 301+ 'privatedomains-invalidemail' => 'Paumahin, nakalaan lamang ang pagpasok sa wiking para sa mga kasapi ng $1. Kung mayroon kang adres ng e-liham na may kaugnayan sa $1, maipapasok mo o muling patunayan ang adres mo ng e-liham sa pahina ng mga nais mo sa iyong akawnt [[Special:Preferences|dito]]. Maaari mo pa ring tingnan ang mga pahina sa wiking ito, subalit hindi ka makapamamatnugot.',
 302+ 'privatedomains-affiliatenamelabel' => 'Pangalan ng organisasyon:',
 303+ 'privatedomains-emailadminlabel' => 'Makipag-ugnayan sa pangalan ng tagagamit para sa mga suliranin sa pagpunta o mga tanong:',
 304+ 'privatedomains-instructions' => 'Nasa ibaba ang talaan ng mga dominyo ng e-liham na ipinapahintulot para sa mga patnugot ng wiking ito. Bawat guhit ay nagtatalaga ng isang hulaping makakapunta para sa pamamatnugot. Dapat itong anyuhang may isang hulapi bawat guhit. Bilang halimbawa:</p><p style="width: 20%; padding:5px; border: 1px solid grey;">cs.stanford.edu<br /> stanfordalumni.org</p><p>Magpapahintulot ito ng mga pagbabago mula kaninuman na may adres ng e-liham na anuman@cs.stanford.edu o anuman@stanfordalumni.org</p><p><b>Ipasok ang pinapayagang mga dominyo sa loob ng kahon ng tekstong nasa ibaba, at pindutin ang "sagipin".</b>',
 305+);
\ No newline at end of file
Property changes on: trunk/extensions/PrivateDomains/PrivateDomains.i18n.php
___________________________________________________________________
Added: svn:eol-style
1306 + native
Index: trunk/extensions/PrivateDomains/PrivateDomains.php
@@ -0,0 +1,122 @@
 2+<?php
 3+/**
 4+ * PrivateDomains extension - allows to restrict editing to users with a
 5+ * certain e-mail address
 6+ *
 7+ * @file
 8+ * @ingroup Extensions
 9+ * @version 1.0
 10+ * @author Inez Korczyński <korczynski@gmail.com>
 11+ * @author Jack Phoenix <jack@countervandalism.net>
 12+ * @link http://www.mediawiki.org/wiki/Extension:PrivateDomains Documentation
 13+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
 14+ */
 15+
 16+if ( !defined( 'MEDIAWIKI' ) ) {
 17+ die( "This is not a valid entry point.\n" );
 18+}
 19+
 20+// Extension credits that will show up on Special:Version
 21+$wgExtensionCredits['specialpage'][] = array(
 22+ 'name' => 'PrivateDomains',
 23+ 'version' => '1.0',
 24+ 'author' => array( 'Inez Korczyński', 'Jack Phoenix' ),
 25+ 'description' => 'Allows to restrict editing to users with a certain e-mail address',
 26+ 'url' => 'http://www.mediawiki.org/wiki/Extension:PrivateDomains',
 27+);
 28+
 29+// Set up the new special page
 30+$dir = dirname( __FILE__ ) . '/';
 31+$wgAutoloadClasses['PrivateDomains'] = $dir . 'SpecialPrivateDomains.php';
 32+$wgExtensionMessagesFiles['PrivateDomains'] = $dir . 'PrivateDomains.i18n.php';
 33+$wgSpecialPages['PrivateDomains'] = 'PrivateDomains';
 34+// Special page group for MW 1.13+
 35+$wgSpecialPageGroups['PrivateDomains'] = 'wiki';
 36+
 37+$wgHooks['AlternateEdit'][] = 'pd_AlternateEdit'; // Occurs whenever action=edit is called
 38+$wgHooks['UserLoginComplete'][] = 'pd_UserLoginComplete'; // Occurs after a user has successfully logged in
 39+$wgHooks['ConfirmEmailComplete'][] = 'pd_UserLoginComplete'; // Occurs after a user has successfully confirm email
 40+
 41+# set 'privatedomains' right to users in staff or bureaucrat group
 42+$wgAvailableRights[] = 'privatedomains';
 43+$wgGroupPermissions['staff']['privatedomains'] = true;
 44+$wgGroupPermissions['bureaucrat']['privatedomains'] = true;
 45+
 46+# overwrite standard groups permissions
 47+$wgGroupPermissions['staff']['edit'] = true;
 48+$wgGroupPermissions['bureaucrat']['edit'] = true;
 49+$wgGroupPermissions['user']['edit'] = false;
 50+$wgGroupPermissions['*']['edit'] = false;
 51+$wgGroupPermissions['privatedomains']['edit'] = true;
 52+
 53+$wgGroupPermissions['staff']['upload'] = true;
 54+$wgGroupPermissions['bureaucrat']['upload'] = true;
 55+$wgGroupPermissions['user']['upload'] = false;
 56+$wgGroupPermissions['*']['upload'] = false;
 57+$wgGroupPermissions['privatedomains']['upload'] = true;
 58+
 59+$wgGroupPermissions['staff']['move'] = true;
 60+$wgGroupPermissions['bureaucrat']['move'] = true;
 61+$wgGroupPermissions['user']['move'] = false;
 62+$wgGroupPermissions['*']['move'] = false;
 63+$wgGroupPermissions['privatedomains']['move'] = true;
 64+
 65+$wgGroupPermissions['user']['reupload'] = false;
 66+$wgGroupPermissions['*']['reupload'] = false;
 67+$wgGroupPermissions['privatedomains']['reupload'] = true;
 68+
 69+$wgGroupPermissions['user']['reupload-shared'] = false;
 70+$wgGroupPermissions['*']['reupload-shared'] = false;
 71+$wgGroupPermissions['privatedomains']['reupload-shared'] = true;
 72+
 73+$wgGroupPermissions['user']['minoredit'] = false;
 74+$wgGroupPermissions['*']['minoredit'] = false;
 75+$wgGroupPermissions['privatedomains']['minoredit'] = true;
 76+
 77+/**
 78+ * If user isn't in group privatedomains/staff/bureaucrat then
 79+ * deny access to edit page and show information box.
 80+ */
 81+function pd_AlternateEdit( &$editpage ) {
 82+ global $wgUser;
 83+ $groups = $wgUser->getEffectiveGroups();
 84+ if (
 85+ $wgUser->isLoggedIn() && !in_array( 'privatedomains', $groups ) &&
 86+ !in_array( 'staff', $groups ) && !in_array( 'bureaucrat', $groups )
 87+ )
 88+ {
 89+ global $wgOut;
 90+ $affiliateName = PrivateDomains::getParam( 'privatedomains-affiliatename' );
 91+ $wgOut->addHTML( '<div class="errorbox" style="width:92%;"><strong>' );
 92+ $wgOut->addWikiMsg( 'privatedomains-invalidemail', $affiliateName );
 93+ $wgOut->addHTML( '</strong></div><br /><br /><br />' );
 94+ return false;
 95+ }
 96+ return true;
 97+}
 98+
 99+/**
 100+ * If user has confirmed and allowed address email
 101+ * then add him/her to privatedomains user group.
 102+ */
 103+function pd_UserLoginComplete( $user ) {
 104+ if( $user->isEmailConfirmed() ) {
 105+ $domainsStr = PrivateDomains::getParam( 'privatedomains-domains' );
 106+ if( $domainsStr != '' ) {
 107+ $email = strtolower( $user->mEmail );
 108+ // get suffix domain name
 109+ preg_match( "/([^@]+)@(.+)$/i", $email, $matches );
 110+ $emailDomain = $matches[2];
 111+ $domainsArr = explode( "\n", $domainsStr );
 112+ foreach ( $domainsArr as $allowedDomain ) {
 113+ $allowedDomain = strtolower( $allowedDomain );
 114+ if ( preg_match( "/.*?$allowedDomain$/", $emailDomain ) ) {
 115+ $user->addGroup( 'privatedomains' );
 116+ return true;
 117+ }
 118+ }
 119+ }
 120+ }
 121+ $user->removeGroup( 'privatedomains' );
 122+ return true;
 123+}
\ No newline at end of file
Property changes on: trunk/extensions/PrivateDomains/PrivateDomains.php
___________________________________________________________________
Added: svn:eol-style
1124 + native
Index: trunk/extensions/PrivateDomains/SpecialPrivateDomains.php
@@ -0,0 +1,156 @@
 2+<?php
 3+/**
 4+ * Body file for PrivateDomains extension
 5+ * Defines the new special page, Special:PrivateDomains
 6+ *
 7+ * @file
 8+ * @ingroup Extensions
 9+ */
 10+
 11+/**
 12+ * Main extension class
 13+ */
 14+class PrivateDomains extends SpecialPage {
 15+
 16+ /**
 17+ * Constructor -- set up the new special page
 18+ */
 19+ public function __construct() {
 20+ parent::__construct( 'PrivateDomains'/*class*/, 'privatedomains'/*restriction*/ );
 21+ }
 22+
 23+ /**
 24+ * Saves a message in the MediaWiki: namespace.
 25+ *
 26+ * @param $name String: name of the MediaWiki message
 27+ * @param $value Mixed: value of the message
 28+ */
 29+ function saveParam( $name, $value ) {
 30+ $nameTitle = Title::newFromText( $name, NS_MEDIAWIKI );
 31+ $article = new Article( $nameTitle );
 32+
 33+ if ( $nameTitle->exists() ) {
 34+ $article->quickEdit( $value );
 35+ } else {
 36+ $article->insertNewArticle( $value, '', false, false, false, false );
 37+ }
 38+ }
 39+
 40+ /**
 41+ * Fetches the content of a defined MediaWiki message.
 42+ *
 43+ * @param $name String: name of the MediaWiki message
 44+ * @return string or nothing
 45+ */
 46+ static function getParam( $name ) {
 47+ $nameTitle = Title::newFromText( $name, NS_MEDIAWIKI );
 48+ if ( $nameTitle->exists() ) {
 49+ $article = new Article( $nameTitle );
 50+ return $article->getContent();
 51+ } else {
 52+ return '';
 53+ }
 54+ }
 55+
 56+ /**
 57+ * Show the special page
 58+ *
 59+ * @param $par Mixed: parameter passed to the page or null
 60+ */
 61+ public function execute( $par ) {
 62+ global $wgRequest;
 63+
 64+ $this->setHeaders();
 65+
 66+ $msg = '';
 67+
 68+ if( $wgRequest->wasPosted() ) {
 69+ if ( $wgRequest->getText( 'action' ) == 'submit' ) {
 70+ $this->saveParam( 'privatedomains-domains', $wgRequest->getText( 'listdata' ) );
 71+ $this->saveParam( 'privatedomains-affiliatename', $wgRequest->getText( 'affiliateName' ) );
 72+ $this->saveParam( 'privatedomains-emailadmin', $wgRequest->getText( 'optionalPrivateDomainsEmail' ) );
 73+
 74+ $msg = wfMsgHtml( 'saveprivatedomains-success' );
 75+ }
 76+ }
 77+ $this->mainForm( $msg );
 78+ }
 79+
 80+ /**
 81+ * Shows the main form in Special:PrivateDomains
 82+ */
 83+ private function mainForm( $msg ) {
 84+ global $wgUser, $wgOut;
 85+
 86+ $titleObj = SpecialPage::getTitleFor( 'PrivateDomains' );
 87+ $action = $titleObj->escapeLocalURL( 'action=submit' );
 88+
 89+ // Can the user execute the action?
 90+ if( !$wgUser->isAllowed( 'privatedomains' ) ) {
 91+ $this->displayRestrictionError();
 92+ return;
 93+ }
 94+
 95+ // Is the database in read-only mode?
 96+ if( wfReadOnly() ) {
 97+ $wgOut->readOnlyPage();
 98+ return;
 99+ }
 100+
 101+ // Is the user blocked?
 102+ if( $wgUser->isBlocked() ) {
 103+ $wgOut->blockedPage();
 104+ return;
 105+ }
 106+
 107+ if ( $msg != '' ) {
 108+ $wgOut->addHTML(
 109+ '<div class="errorbox" style="width:92%;"><h2>' . $msg .
 110+ '</h2></div><br /><br /><br />'
 111+ );
 112+ }
 113+
 114+ $wgOut->addHTML(
 115+ '<form name="privatedomains" id="privatedomains" method="post" action="' . $action . '">
 116+ <label for="affiliateName"><br />' . wfMsg( 'privatedomains-affiliatenamelabel' ) . ' </label>
 117+ <input type="text" name="affiliateName" width="30" value="' . $this->getParam( 'privatedomains-affiliatename' ) . '" />
 118+ <label for="optionalEmail"><br />' . wfMsg( 'privatedomains-emailadminlabel' ) . ' </label>
 119+ <input type="text" name="optionalPrivateDomainsEmail" value="' . $this->getParam( 'privatedomains-emailadmin' ) . '" />' );
 120+ $wgOut->addHTML( wfMsg( 'privatedomains-instructions' ) );
 121+ $wgOut->addHTML( '<textarea name="listdata" rows="10" cols="40">' . $this->getParam( 'privatedomains-domains' ) . '</textarea>' );
 122+ $wgOut->addHTML( '<br /><input type="submit" name="saveList" value="' . wfMsgHtml( 'saveprefs' ) . '" />' );
 123+ $wgOut->addHTML( '</form>' );
 124+ }
 125+
 126+ /**
 127+ * Custom version of SpecialPage::displayRestrictionError for PrivateDomains.
 128+ * This is OutputPage::permissionRequired with some modifications.
 129+ * The big change here is that we display 'privatedomains-ifcontact'
 130+ * message if user doesn't have the permission to access the special page.
 131+ */
 132+ function displayRestrictionError() {
 133+ global $wgUser, $wgLang, $wgOut;
 134+
 135+ $wgOut->setPageTitle( wfMsgHtml( 'badaccess' ) );
 136+ $wgOut->setHTMLTitle( wfMsgHtml( 'errorpagetitle' ) );
 137+ $wgOut->setRobotPolicy( 'noindex,nofollow' );
 138+ $wgOut->setArticleRelated( false );
 139+ $wgOut->mBodytext = '';
 140+
 141+ $groups = array_map( array( 'User', 'makeGroupLinkWiki' ),
 142+ User::getGroupsWithPermission( $this->mRestriction ) );
 143+ $privatedomains_emailadmin = PrivateDomains::getParam( 'privatedomains-emailadmin' );
 144+ if( $groups ) {
 145+ $wgOut->addWikiMsg( 'badaccess-groups',
 146+ $wgLang->commaList( $groups ),
 147+ count( $groups ) );
 148+ if( $privatedomains_emailadmin != '' ) {
 149+ $wgOut->addWikiMsg( 'privatedomains-ifemailcontact', $privatedomains_emailadmin );
 150+ }
 151+ } else {
 152+ $wgOut->addWikiMsg( 'badaccess-group0' );
 153+ }
 154+ $wgOut->returnToMain();
 155+ }
 156+
 157+}
\ No newline at end of file
Property changes on: trunk/extensions/PrivateDomains/SpecialPrivateDomains.php
___________________________________________________________________
Added: svn:eol-style
1158 + native

Follow-up revisions

RevisionCommit summaryAuthorDate
r87928PrivateDomains: follow-up to r87884 as per CR -- Article::insertNewArticle() ...ashley20:00, 12 May 2011
r88116r87884: Tweak messages for more consistencies: remove useless <p> etc....raymond19:56, 14 May 2011

Comments

#Comment by Platonides (talk | contribs)   17:47, 11 May 2011

I'm not convinced "Only wiki bureaucrats and staff members have access" should be present as a literal in the message.

#Comment by Siebrand (talk | contribs)   18:13, 11 May 2011

Are you certain it's a good idea to start duplicating extensions for the Wikia repository here? Are you in contact with them about if it's a good idea to fork them, or if maybe they will start maintaining the extension in the wikimedia.org repo?

#Comment by Jack Phoenix (talk | contribs)   18:25, 11 May 2011

I wish! I'd really like to see all major users of MediaWiki use svn.wikimedia.org, but right now it's not possible. Wikia prefers their own SVN and wikiHow doesn't provide direct SVN access to non-developers, only weekly tarballs (see src.wikihow.com). Of course, if you (or someone else) want to contact these major third party users and request them to do their development on svn.wikimedia.org, that'd be cool!

However, while PrivateDomains initially started out as a Wikia extension and it was written for Wikia by one of their developers, it is no longer used by Wikia (see this revision on Wikia's SVN). Usually Wikia extensions require at least some tinkering so that they run on vanilla MediaWikis.

#Comment by Siebrand (talk | contribs)   18:30, 11 May 2011

Right. Thanks for replying in a precise way :). I thought we/twn still supported this extension. Good of you to bring it in :).

#Comment by IAlex (talk | contribs)   19:30, 12 May 2011

Article::insertNewArticle() doesn't exist anymore.

#Comment by Jack Phoenix (talk | contribs)   20:01, 12 May 2011

Good catch, thanks! I've fixed that in r87928.

Status & tagging log