Index: branches/REL1_15/extensions/Lockout/Lockout.i18n.php |
— | — | @@ -0,0 +1,291 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalisation for Lockout extension |
| 5 | + * |
| 6 | + * @file |
| 7 | + * @ingroup Extensions |
| 8 | + */ |
| 9 | + |
| 10 | +$messages = array(); |
| 11 | + |
| 12 | +/** English |
| 13 | + * @author Daniel Kinzler |
| 14 | + */ |
| 15 | +$messages['en'] = array( |
| 16 | + 'lockout-desc' => 'Prevent blocked users from logging in', |
| 17 | +); |
| 18 | + |
| 19 | +/** Message documentation (Message documentation) |
| 20 | + * @author Fryed-peach |
| 21 | + */ |
| 22 | +$messages['qqq'] = array( |
| 23 | + 'lockout-desc' => '{{desc}}', |
| 24 | +); |
| 25 | + |
| 26 | +/** Afrikaans (Afrikaans) |
| 27 | + * @author Naudefj |
| 28 | + */ |
| 29 | +$messages['af'] = array( |
| 30 | + 'lockout-desc' => 'Sorg dat geblokkeerde gebruikers nie kan aanteken nie', |
| 31 | +); |
| 32 | + |
| 33 | +/** Arabic (العربية) |
| 34 | + * @author Meno25 |
| 35 | + */ |
| 36 | +$messages['ar'] = array( |
| 37 | + 'lockout-desc' => 'يمنع المستخدمين الممنوعين من تسجيل الدخول', |
| 38 | +); |
| 39 | + |
| 40 | +/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |
| 41 | + * @author EugeneZelenko |
| 42 | + */ |
| 43 | +$messages['be-tarask'] = array( |
| 44 | + 'lockout-desc' => 'Не дазваляе ўваход ў сыстэму заблякаваным удзельнікам', |
| 45 | +); |
| 46 | + |
| 47 | +/** Breton (Brezhoneg) |
| 48 | + * @author Fulup |
| 49 | + */ |
| 50 | +$messages['br'] = array( |
| 51 | + 'lockout-desc' => "Mirout ouzh an implijerien stanket d'en em lugañ", |
| 52 | +); |
| 53 | + |
| 54 | +/** Bosnian (Bosanski) |
| 55 | + * @author CERminator |
| 56 | + */ |
| 57 | +$messages['bs'] = array( |
| 58 | + 'lockout-desc' => 'Onemogućuje blokiranim korisnicima da se prijave', |
| 59 | +); |
| 60 | + |
| 61 | +/** German (Deutsch) |
| 62 | + * @author PasO |
| 63 | + */ |
| 64 | +$messages['de'] = array( |
| 65 | + 'lockout-desc' => 'Gesperrte Benutzer davon abhalten, sich anzumelden', |
| 66 | +); |
| 67 | + |
| 68 | +/** Lower Sorbian (Dolnoserbski) |
| 69 | + * @author Michawiki |
| 70 | + */ |
| 71 | +$messages['dsb'] = array( |
| 72 | + 'lockout-desc' => 'Blokěrowanym wužywarjam pśizjawjenje zawobaraś', |
| 73 | +); |
| 74 | + |
| 75 | +/** Greek (Ελληνικά) |
| 76 | + * @author Omnipaedista |
| 77 | + */ |
| 78 | +$messages['el'] = array( |
| 79 | + 'lockout-desc' => 'Αποτροπή φραγμένων χρηστών από το να συνδεθούν', |
| 80 | +); |
| 81 | + |
| 82 | +/** Spanish (Español) |
| 83 | + * @author Crazymadlover |
| 84 | + */ |
| 85 | +$messages['es'] = array( |
| 86 | + 'lockout-desc' => 'Prevenir inicio de sesión de usuarios bloqueados', |
| 87 | +); |
| 88 | + |
| 89 | +/** Finnish (Suomi) |
| 90 | + * @author Crt |
| 91 | + */ |
| 92 | +$messages['fi'] = array( |
| 93 | + 'lockout-desc' => 'Estää estettyjä käyttäjiä kirjautumasta sisään.', |
| 94 | +); |
| 95 | + |
| 96 | +/** French (Français) |
| 97 | + * @author Peter17 |
| 98 | + */ |
| 99 | +$messages['fr'] = array( |
| 100 | + 'lockout-desc' => 'Empêcher les utilisateurs bloqués de se connecter', |
| 101 | +); |
| 102 | + |
| 103 | +/** Galician (Galego) |
| 104 | + * @author Toliño |
| 105 | + */ |
| 106 | +$messages['gl'] = array( |
| 107 | + 'lockout-desc' => 'Impedir que os usuarios bloqueados poidan acceder ao sistema', |
| 108 | +); |
| 109 | + |
| 110 | +/** Swiss German (Alemannisch) |
| 111 | + * @author Als-Holder |
| 112 | + */ |
| 113 | +$messages['gsw'] = array( |
| 114 | + 'lockout-desc' => 'Derfir sorge, ass gsperrti Benutzer sich nimi chenne aamälde', |
| 115 | +); |
| 116 | + |
| 117 | +/** Hebrew (עברית) |
| 118 | + * @author Rotemliss |
| 119 | + */ |
| 120 | +$messages['he'] = array( |
| 121 | + 'lockout-desc' => 'מניעת משתמשים חסומים מכניסה לחשבון', |
| 122 | +); |
| 123 | + |
| 124 | +/** Upper Sorbian (Hornjoserbsce) |
| 125 | + * @author Michawiki |
| 126 | + */ |
| 127 | +$messages['hsb'] = array( |
| 128 | + 'lockout-desc' => 'Zablokowanych wužiwarjow při přizjewjenju haćić', |
| 129 | +); |
| 130 | + |
| 131 | +/** Hungarian (Magyar) |
| 132 | + * @author Glanthor Reviol |
| 133 | + */ |
| 134 | +$messages['hu'] = array( |
| 135 | + 'lockout-desc' => 'Megakadályozza a blokkolt felhasználók a bejelentkezését', |
| 136 | +); |
| 137 | + |
| 138 | +/** Interlingua (Interlingua) |
| 139 | + * @author McDutchie |
| 140 | + */ |
| 141 | +$messages['ia'] = array( |
| 142 | + 'lockout-desc' => 'Impedi le usatores blocate de aperir un session', |
| 143 | +); |
| 144 | + |
| 145 | +/** Indonesian (Bahasa Indonesia) |
| 146 | + * @author Bennylin |
| 147 | + */ |
| 148 | +$messages['id'] = array( |
| 149 | + 'lockout-desc' => 'Menghalangi pengguna yang diblokir untuk log masuk', |
| 150 | +); |
| 151 | + |
| 152 | +/** Italian (Italiano) |
| 153 | + * @author OrbiliusMagister |
| 154 | + */ |
| 155 | +$messages['it'] = array( |
| 156 | + 'lockout-desc' => "Impedisce a utenti bloccati di effettuare l'accesso", |
| 157 | +); |
| 158 | + |
| 159 | +/** Japanese (日本語) |
| 160 | + * @author Mizusumashi |
| 161 | + */ |
| 162 | +$messages['ja'] = array( |
| 163 | + 'lockout-desc' => '投稿ブロックされている利用者のログインを防ぐ', |
| 164 | +); |
| 165 | + |
| 166 | +/** Ripoarisch (Ripoarisch) |
| 167 | + * @author Purodha |
| 168 | + */ |
| 169 | +$messages['ksh'] = array( |
| 170 | + 'lockout-desc' => 'Sorsch doför, dat jeshpärte Metmaacher sech nit enlogge künne', |
| 171 | +); |
| 172 | + |
| 173 | +/** Luxembourgish (Lëtzebuergesch) |
| 174 | + * @author Robby |
| 175 | + */ |
| 176 | +$messages['lb'] = array( |
| 177 | + 'lockout-desc' => 'Gespaarte Benotzer dovun ofhale sech anzeloggen', |
| 178 | +); |
| 179 | + |
| 180 | +/** Macedonian (Македонски) |
| 181 | + * @author Bjankuloski06 |
| 182 | + */ |
| 183 | +$messages['mk'] = array( |
| 184 | + 'lockout-desc' => 'Не им дозолува на блокираните корисници да се најавуваат', |
| 185 | +); |
| 186 | + |
| 187 | +/** Dutch (Nederlands) |
| 188 | + * @author Siebrand |
| 189 | + */ |
| 190 | +$messages['nl'] = array( |
| 191 | + 'lockout-desc' => 'Zorgt ervoor dat geblokkeerde gebruikers niet kunnen aanmelden', |
| 192 | +); |
| 193 | + |
| 194 | +/** Norwegian (bokmål) (Norsk (bokmål)) |
| 195 | + * @author Nghtwlkr |
| 196 | + */ |
| 197 | +$messages['no'] = array( |
| 198 | + 'lockout-desc' => 'Forhindre blokkerte brukere fra å logge inn', |
| 199 | +); |
| 200 | + |
| 201 | +/** Occitan (Occitan) |
| 202 | + * @author Cedric31 |
| 203 | + */ |
| 204 | +$messages['oc'] = array( |
| 205 | + 'lockout-desc' => 'Empachar los utilizaires blocats de se connectar', |
| 206 | +); |
| 207 | + |
| 208 | +/** Polish (Polski) |
| 209 | + * @author Sp5uhe |
| 210 | + */ |
| 211 | +$messages['pl'] = array( |
| 212 | + 'lockout-desc' => 'Zapobiega zalogowaniu się przez zablokowanych użytkowników', |
| 213 | +); |
| 214 | + |
| 215 | +/** Piedmontese (Piemontèis) |
| 216 | + * @author Dragonòt |
| 217 | + */ |
| 218 | +$messages['pms'] = array( |
| 219 | + 'lockout-desc' => "A lassa pa intré j'utent blocà", |
| 220 | +); |
| 221 | + |
| 222 | +/** Portuguese (Português) |
| 223 | + * @author Hamilton Abreu |
| 224 | + * @author Indech |
| 225 | + */ |
| 226 | +$messages['pt'] = array( |
| 227 | + 'lockout-desc' => 'Impedir a autenticação de utilizadores bloqueados', |
| 228 | +); |
| 229 | + |
| 230 | +/** Brazilian Portuguese (Português do Brasil) |
| 231 | + * @author Hamilton Abreu |
| 232 | + */ |
| 233 | +$messages['pt-br'] = array( |
| 234 | + 'lockout-desc' => 'Prevenir que usuários bloqueados façam login', |
| 235 | +); |
| 236 | + |
| 237 | +/** Tarandíne (Tarandíne) |
| 238 | + * @author Joetaras |
| 239 | + */ |
| 240 | +$messages['roa-tara'] = array( |
| 241 | + 'lockout-desc' => 'Prevene le utinde bloccate da collegarse', |
| 242 | +); |
| 243 | + |
| 244 | +/** Russian (Русский) |
| 245 | + * @author Александр Сигачёв |
| 246 | + */ |
| 247 | +$messages['ru'] = array( |
| 248 | + 'lockout-desc' => 'Не позволяет заблокированным участникам представляться системе', |
| 249 | +); |
| 250 | + |
| 251 | +/** Slovak (Slovenčina) |
| 252 | + * @author Helix84 |
| 253 | + */ |
| 254 | +$messages['sk'] = array( |
| 255 | + 'lockout-desc' => 'Zabrániť prihlásenie zablokovaným používateľom', |
| 256 | +); |
| 257 | + |
| 258 | +/** Serbian Cyrillic ekavian (Српски (ћирилица)) |
| 259 | + * @author Михајло Анђелковић |
| 260 | + */ |
| 261 | +$messages['sr-ec'] = array( |
| 262 | + 'lockout-desc' => 'Онемогућава блокиране кориснике да се пријаве', |
| 263 | +); |
| 264 | + |
| 265 | +/** Serbian Latin ekavian (Srpski (latinica)) |
| 266 | + * @author Liangent |
| 267 | + */ |
| 268 | +$messages['sr-el'] = array( |
| 269 | + 'lockout-desc' => 'Onemogućava blokirane korisnike da se prijave', |
| 270 | +); |
| 271 | + |
| 272 | +/** Swedish (Svenska) |
| 273 | + * @author Per |
| 274 | + */ |
| 275 | +$messages['sv'] = array( |
| 276 | + 'lockout-desc' => 'Hindra blockerade användare från att logga in', |
| 277 | +); |
| 278 | + |
| 279 | +/** Turkish (Türkçe) |
| 280 | + * @author Joseph |
| 281 | + */ |
| 282 | +$messages['tr'] = array( |
| 283 | + 'lockout-desc' => 'Engellenmiş kullanıcıların giriş yapmalarını önle', |
| 284 | +); |
| 285 | + |
| 286 | +/** Ukrainian (Українська) |
| 287 | + * @author Prima klasy4na |
| 288 | + */ |
| 289 | +$messages['uk'] = array( |
| 290 | + 'lockout-desc' => 'Не дозволяє заблокованим користувачам входити в систему', |
| 291 | +); |
| 292 | + |
Property changes on: branches/REL1_15/extensions/Lockout/Lockout.i18n.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 293 | + native |
Index: branches/REL1_15/extensions/Lockout/Lockout.php |
— | — | @@ -0,0 +1,72 @@ |
| 2 | +<?php |
| 3 | +/* |
| 4 | + Copyright (c) 2009, Wikimedia Deutschland (Daniel Kinzler) |
| 5 | + All rights reserved. |
| 6 | + |
| 7 | + Redistribution and use in source and binary forms, with or without |
| 8 | + modification, are permitted provided that the following conditions are met: |
| 9 | + * Redistributions of source code must retain the above copyright |
| 10 | + notice, this list of conditions and the following disclaimer. |
| 11 | + * Redistributions in binary form must reproduce the above copyright |
| 12 | + notice, this list of conditions and the following disclaimer in the |
| 13 | + documentation and/or other materials provided with the distribution. |
| 14 | + * Neither the name of Wikimedia Deutschland nor the |
| 15 | + names of its contributors may be used to endorse or promote products |
| 16 | + derived from this software without specific prior written permission. |
| 17 | + |
| 18 | + THIS SOFTWARE IS PROVIDED BY WIKIMEDIA DEUTSCHLAND ''AS IS'' AND ANY |
| 19 | + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 20 | + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 21 | + DISCLAIMED. IN NO EVENT SHALL WIKIMEDIA DEUTSCHLAND BE LIABLE FOR ANY |
| 22 | + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 23 | + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 24 | + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 25 | + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 26 | + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 27 | + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 | + |
| 29 | + NOTE: This software is not released as a product. It was written primarily for |
| 30 | + Wikimedia Deutschland's own use, and is made public as is, in the hope it may |
| 31 | + be useful. Wikimedia Deutschland may at any time discontinue developing or |
| 32 | + supporting this software. There is no guarantee any new versions or even fixes |
| 33 | + for security issues will be released. |
| 34 | +*/ |
| 35 | + |
| 36 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 37 | + echo( "Lockout.\n" ); |
| 38 | + die( 1 ); |
| 39 | +} |
| 40 | + |
| 41 | +$wgExtensionCredits['other'][] = array( |
| 42 | + 'path' => __FILE__, |
| 43 | + 'name' => 'Lockout', |
| 44 | + 'author' => 'Daniel Kinzler for Wikimedia Deutschland', |
| 45 | + 'url' => 'http://mediawiki.org/wiki/Extension:Lockout', |
| 46 | + 'description' => 'Prevent blocked users from logging in.', |
| 47 | + 'descriptionmsg' => 'lockout-desc', |
| 48 | +); |
| 49 | + |
| 50 | +$root = dirname( __FILE__ ); |
| 51 | +$wgExtensionMessagesFiles['Lockout'] = $root . '/Lockout.i18n.php'; |
| 52 | +$wgHooks['UserLoadAfterLoadFromSession'][] = 'lockoutUserLoadAfterLoadFromSession'; |
| 53 | +$wgHooks['AbortLogin'][] = 'lockoutAbortLogin'; |
| 54 | + |
| 55 | + |
| 56 | +function lockoutUserLoadAfterLoadFromSession( $user ) { |
| 57 | + if ( $user->isBlocked() && $user->isLoggedIn() ) { |
| 58 | + $user->logout(); |
| 59 | + $user->loadDefaults(); |
| 60 | + return false; |
| 61 | + } |
| 62 | + |
| 63 | + return true; |
| 64 | +} |
| 65 | + |
| 66 | +function lockoutAbortLogin( $user, $pw, &$result ) { |
| 67 | + if ( $user->isBlocked() ) { |
| 68 | + $result = LoginForm::CREATE_BLOCKED; // TODO: a better code, triggering a better message. |
| 69 | + return false; |
| 70 | + } |
| 71 | + |
| 72 | + return true; |
| 73 | +} |
Property changes on: branches/REL1_15/extensions/Lockout/Lockout.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 74 | + native |