summaryrefslogtreecommitdiff
path: root/extensions/TitleBlacklist
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/TitleBlacklist')
-rw-r--r--extensions/TitleBlacklist/.gitreview5
-rw-r--r--extensions/TitleBlacklist/COPYING339
-rw-r--r--extensions/TitleBlacklist/TitleBlacklist.i18n.php78
-rw-r--r--extensions/TitleBlacklist/TitleBlacklist.library.php33
-rw-r--r--extensions/TitleBlacklist/TitleBlacklist.list.php53
-rw-r--r--extensions/TitleBlacklist/TitleBlacklist.php11
-rw-r--r--extensions/TitleBlacklist/mw.ext.TitleBlacklist.lua22
-rw-r--r--extensions/TitleBlacklist/tests/ApiQueryTitleBlacklistTest.php132
-rw-r--r--extensions/TitleBlacklist/tests/testSource5
9 files changed, 44 insertions, 634 deletions
diff --git a/extensions/TitleBlacklist/.gitreview b/extensions/TitleBlacklist/.gitreview
deleted file mode 100644
index 964229c3..00000000
--- a/extensions/TitleBlacklist/.gitreview
+++ /dev/null
@@ -1,5 +0,0 @@
-[gerrit]
-host=gerrit.wikimedia.org
-port=29418
-project=mediawiki/extensions/TitleBlacklist.git
-defaultbranch=master
diff --git a/extensions/TitleBlacklist/COPYING b/extensions/TitleBlacklist/COPYING
deleted file mode 100644
index d159169d..00000000
--- a/extensions/TitleBlacklist/COPYING
+++ /dev/null
@@ -1,339 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
diff --git a/extensions/TitleBlacklist/TitleBlacklist.i18n.php b/extensions/TitleBlacklist/TitleBlacklist.i18n.php
index 39ce9d24..ca05a33d 100644
--- a/extensions/TitleBlacklist/TitleBlacklist.i18n.php
+++ b/extensions/TitleBlacklist/TitleBlacklist.i18n.php
@@ -127,7 +127,7 @@ $messages['ar'] = array(
هو يطابق مدخلة القائمة السوداء التالية: <code>$1</code>',
'titleblacklist-invalid' => '{{PLURAL:$1||السطر التالي|السطران التاليان|السطور التالية}} في قائمة العناوين السوداء {{PLURAL:$1||غير صحيح|غير صحيحان|غير صحيحة}}؛ من فضلك {{PLURAL:$1||صححه|صححهما|صححهم}} قبل الحفظ:',
'titleblacklist-override' => 'تجاهل القائمة السوداء',
- 'right-tboverride' => 'تجاوز قائمتي العناوين أو أسماء المستخدمين السوداوين',
+ 'right-tboverride' => 'تجاوز قائمة العناوين السوداء', # Fuzzy
'right-tboverride-account' => 'تجاوز قائمة اسم المستخدم السوداء.',
);
@@ -227,8 +227,8 @@ $messages['ba'] = array(
Ул түбәндәге ҡара исемлек яҙмаһы менән тап килә: <code>$1</code>',
'titleblacklist-forbidden-new-account' => '"$2" исемле ҡатнашыусы булдырыла алмай.
Ул түбәндәге ҡара исемлек яҙмаһы менән тап килә: <code>$1</code>',
- 'titleblacklist-invalid' => 'Ҡара исемлектә түбәндәге {{PLURAL:$1|1=юл|юлдар}} дөрөҫ түгел;
-зинһар, һаҡлар алдынан {{PLURAL:$1|1=уны|уларҙы}} төҙәтегеҙ:', # Fuzzy
+ 'titleblacklist-invalid' => 'Ҡара исемлектә түбәндәге {{PLURAL:$1|юл|юлдар}} дөрөҫ түгел;
+зинһар, һаҡлар алдынан {{PLURAL:$1|уны|уларҙы}} төҙәтегеҙ:',
'titleblacklist-override' => 'Ҡара исемлекте иғтибарға алмаҫҡа',
'right-tboverride' => 'Исемдәр ҡара исемлеген иғтибарға алмау', # Fuzzy
'right-tboverride-account' => 'Ҡатнашыусы исемдәре ҡара исемлеген иғтибарға алмау',
@@ -296,8 +296,8 @@ $messages['be-tarask'] = array(
Яна адпавядае наступнаму элемэнту чорнага сьпісу: <code>$1</code>',
'titleblacklist-forbidden-new-account' => 'Імя ўдзельніка «$2» было забаронена для стварэньня.
Яно адпавядае наступнаму элемэнту чорнага сьпісу: <code>$1</code>',
- 'titleblacklist-invalid' => '{{PLURAL:$1|1=Наступны радок у|Наступныя радкі ў}} сьпісе забароненых назваў — {{PLURAL:$1|1=няслушны|няслушныя}};
-калі ласка, выпраўце {{PLURAL:$1|1=яго|іх}} перад захаваньнем:', # Fuzzy
+ 'titleblacklist-invalid' => '{{PLURAL:$1|Наступны радок у|Наступныя радкі ў}} сьпісе забароненых назваў — {{PLURAL:$1|няслушны|няслушныя}};
+калі ласка, выпраўце {{PLURAL:$1|яго|іх}} перад захаваньнем:',
'titleblacklist-override' => 'Ігнараваць чорны сьпіс',
'right-tboverride' => 'Ігнараваньне чорнага сьпісу назваў і імёнаў удзельнікаў',
'right-tboverride-account' => 'ігнараваньне чорнага сьпісу ўдзельнікаў',
@@ -404,7 +404,6 @@ molimo da {{PLURAL:$1|ga|ih}} ispravite prije spremanja:',
* @author Aleator
* @author El libre
* @author Jordi Roqué
- * @author Papapep
* @author Pitort
* @author SMP
* @author Vriullop
@@ -418,7 +417,7 @@ $messages['ca'] = array(
# Per defecte, no distingeix majúscules de minúscules',
'titleblacklist-forbidden-edit' => 'El títol «$2» està prohibit i no es pot crear. Concorda amb la següent entrada de la llista negra: <code>$1</code>',
'titleblacklist-forbidden-move' => "No es pot moure «$2» a «$3», perquè el títol «$3» està prohibit. Concorda amb l'entrada de la llista negra següent: <code>$1</code>",
- 'titleblacklist-forbidden-upload' => "S'ha prohibit el nom de fitxer «$2» i se n'impedeix la creació. Concorda amb la següent línia de la llista negra: <code>$1</code>",
+ 'titleblacklist-forbidden-upload' => "El nom de fitxer «$2» ha estat prohibit i se n'impedeix la creació. Concorda amb la següent línia de la llista negra: <code>$1</code>",
'titleblacklist-forbidden-new-account' => "No es pot crear el nom d'usuari «$2». Coincideix amb la següent entrada de la llista negra: <code>$1</code>",
'titleblacklist-invalid' => '{{PLURAL:$1|La línia següent|Les línies següents}} de la llista negra no {{PLURAL:$1|és vàlida|són vàlides}}; heu de corregir-{{PLURAL:$1|la|les}} abans de guardar:',
'titleblacklist-override' => 'Ignora la llista negra',
@@ -430,7 +429,6 @@ $messages['ca'] = array(
* @author Умар
*/
$messages['ce'] = array(
- 'titleblacklist-desc' => '[[MediaWiki:Titleblacklist|Ӏаьржа]] а [[MediaWiki:Titlewhitelist|къайн]] а могӀанийн гӀоьнца куьйгалхошна таро хуьлуьйту декъашхойн дӀаяздарш ца кхоллийта.',
'right-tboverride' => 'Ӏаьржачу могӀанийн чура агӀонийн цӀераш тергалцаяр я декъашхой тергалцабар',
'right-tboverride-account' => 'Ӏаьржачу могӀанийн чура декъашхойн цӀераш тергалцаяр',
);
@@ -443,7 +441,7 @@ $messages['ckb'] = array(
'right-tboverride' => 'تێپەڕاندنی تاوتوێی پێرستی ڕەشی سەردێڕ یان ناوی بەکارھێنەری',
);
-/** Czech (čeština)
+/** Czech (česky)
* @author Danny B.
* @author Li-sung
* @author Matěj Grabovský
@@ -559,7 +557,6 @@ $messages['de-formal'] = array(
/** Zazaki (Zazaki)
* @author Aspar
* @author Erdemaslancan
- * @author Marmase
*/
$messages['diq'] = array(
'titleblacklist-desc' => 'serkaran re desturê vıraştışê pel u hesabê karberan dano, qey qedexekerdışi re yew [[MediaWiki:Titleblacklist|listeya risiyayan]] u [[MediaWiki:Titlewhitelist|listeya risıpiyan]] dano.',
@@ -576,8 +573,8 @@ malumatê ey na listeyasiya de zepê ya: <code>$1</code>',
malumatê ey na listeyasiya de zêpê ya: <code>$1</code>',
'titleblacklist-forbidden-new-account' => 'vıraştışê nameyê karberê"$2" i qedexe bı.
malumatê ey na listeyasiya de zêpê ya: <code>$1</code>',
- 'titleblacklist-invalid' => 'Na ğırab lista dı {{PLURAL:$1|en asatır|ené satıri}} néravérené;
-Verdé qeyd kerdışi timar keré:',
+ 'titleblacklist-invalid' => 'nê {{PLURAL:$1|satır o ke|satır ê ke}} listeyasiyayi de qedexe yê;
+kerem kerê verqeydkerdışi de raşt kerê:',
'titleblacklist-override' => 'Tenilisti mehesebne',
'right-tboverride' => 'Siya listeya sernuşti nêravêrde ke',
'right-tboverride-account' => 'Tenilisteya naman dê karberan mehesebnê',
@@ -699,14 +696,14 @@ $messages['et'] = array(
'titlewhitelist' => '# See pealkiri on valges nimekirjas. Kommentaariks kasuta märki "#".
# Vaikimisi on see tõstutundetu',
'titleblacklist-forbidden-edit' => 'Lehekülje pealkirjaga "$2" loomine on keelatud.
-See vastab järgmisele musta nimekirja sissekandele: <code>$1</code>',
- 'titleblacklist-forbidden-move' => 'Lehekülge "$2" ei saa teisaldada pealkirja "$3" alla, sest lehekülje loomine pealkirjaga "$3" on keelatud.
-See vastab järgmisele musta nimekirja sissekandele: <code>$1</code>',
- 'titleblacklist-forbidden-upload' => 'Faili pealkirjaga "$2" on keelatud üles laadida.
-See vastab järgmisele musta nimekirja sissekandele: <code>$1</code>',
- 'titleblacklist-forbidden-new-account' => 'Kasutajat nimega "$2" on keelatud luua.
-See vastab järgmisele musta nimekirja sissekandele: <code>$1</code>',
- 'titleblacklist-invalid' => '{{PLURAL:$1|Järgmine|Järgmised}} musta nimekirja {{PLURAL:$1|rida on vigane|read on vigased}}.
+See vastab järgnevale musta nimekirja sissekandele: <code>$1</code>',
+ 'titleblacklist-forbidden-move' => 'Lehekülge "$2" ei saa teisaldada pealkirja "$3" alla, sest lehekülgede pealkirjaga "$3" loomine on keelatud.
+See vastab järgnevale musta nimekirja sissekandele: <code>$1</code>',
+ 'titleblacklist-forbidden-upload' => 'Pealkirjaga "$2" on keelatud faili üles laadida.
+See vastab järgnevale musta nimekirja sissekandele: <code>$1</code>',
+ 'titleblacklist-forbidden-new-account' => 'Kasutaja nimega "$2" loomine on keelatud.
+See vastab järgnevale musta nimekirja sissekandele: <code>$1</code>',
+ 'titleblacklist-invalid' => '{{PLURAL:$1|Järgnev|Järgnevad}} musta nimekirja {{PLURAL:$1|rida on vigane|read on vigased}}.
Palun paranda {{PLURAL:$1|see|need}} enne salvestamist:',
'titleblacklist-override' => 'Eira musta nimekirja',
'right-tboverride' => 'Eirata pealkirjade või kasutajanimede musta nimekirja',
@@ -918,12 +915,10 @@ $messages['gu'] = array(
/** Hebrew (עברית)
* @author Amire80
- * @author Guycn2
* @author Rotem Liss
- * @author Rotemliss
*/
$messages['he'] = array(
- 'titleblacklist-desc' => 'אפשרות למפעילי המערכת לאסור יצירת דפים וחשבונות משתמש לפי [[MediaWiki:Titleblacklist|רשימה שחורה]] ו[[MediaWiki:Titlewhitelist|רשימה לבנה]]',
+ 'titleblacklist-desc' => 'אפשרות למנהלים לאסור על יצירת דפים וחשבונות משתמש לפי [[MediaWiki:Titleblacklist|רשימה שחורה]] ו[[MediaWiki:Titlewhitelist|רשימה לבנה]]',
'titleblacklist' => '# זוהי רשימת הכותרות האסורות. לא ניתן ליצור כותרות וחשבונות משתמש שמתאימים לביטוי רגולרי המופיע כאן.
# השתמשו בסימן "#" להערות.
#רשימה זו אינה תלויה ברישיות כברירת מחדל.',
@@ -941,7 +936,7 @@ $messages['he'] = array(
אנא תקנו {{PLURAL:$1|אותה|אותן}} לפני השמירה:',
'titleblacklist-override' => 'התעלם מהרשימה השחורה',
'right-tboverride' => 'עקיפת רשימת שמות המשתמשים האסורים',
- 'right-tboverride-account' => 'עקיפת הרשימה השחורה של שמות המשתמשים',
+ 'right-tboverride-account' => 'לעקוף את הרשימה השחורה של שמות המשתמשים',
);
/** Hindi (हिन्दी)
@@ -1379,15 +1374,14 @@ Hic titulus congruit cum expressione regulari: <code>$1</code>',
/** Luxembourgish (Lëtzebuergesch)
* @author Robby
- * @author Soued031
*/
$messages['lb'] = array(
'titleblacklist-desc' => "Erlaabt den Administrateuren et d'Uleeë vu Säiten a Benotzerkonte mat spezifeschen Titelen iwwer eng [[MediaWiki:Titleblacklist|schwaarz Lëscht]] an eng [[MediaWiki:Titlewhitelist|wäiss Lëscht]] ze verbidden",
'titleblacklist' => '# Dëst ass een Titel deen op enger schwaarzer Lëscht steet. Titelen a Benotzernimm op déi dës Ausdréck passe kann net ugeluecht ginn
# Benotzt "#" fir Bemierkungen
-# Et gëtt tëscht groussen a klenge Buchstawen ënnerscheet',
+# Et gëtt tëschent groussen a klenge Buchstawen ënnerscheed',
'titlewhitelist' => "# Dëst ass d'''Whitelist'' vun den Titelen. Benotzt \"#\" fir Bemierkungen.
-# Et gëtt een Ënnerscheed tëscht groussen a klenge Buchstawe gemaach",
+# Et gëtt een Ënnerscheed tëschent groussen a klenge Buchstawe gemaach",
'titleblacklist-forbidden-edit' => 'Den Titel "$2" dàerf net ugeluecht ginn.
En ass op der schwaarzer Lëscht wéint folgendem Begrëff: <code>$1</code>',
'titleblacklist-forbidden-move' => '"$2" kann net op "$3" geréckelt ginn, well den Titel "$3" net däerf ugeluecht ginn.
@@ -1395,7 +1389,7 @@ En entsprécht dëser Rubrik vun der schwaarzr Lëscht: <code>$1</code>',
'titleblacklist-forbidden-upload' => 'De Fichiersnumm "$2" kann net benotzt ginn.
Hien ass identesch mat dësem Numm vun der schwaarzer Lëscht (black list): <code>$1</code>',
'titleblacklist-forbidden-new-account' => 'De Benotzermumm "$2" gouf gespaart fir benotzt ze ginn.
-En ass sou op der \'\'schwaarzer Lëscht\'\': <code>$1</code>',
+En ass esou op der \'\'schwaarzer Lëscht\'\': <code>$1</code>',
'titleblacklist-invalid' => 'Dës {{PLURAL:$1|Linn|Linnen}} op der schwaarzer Lëscht vun den {{PLURAL:$1|Titelen ass|Titele sinn}} net valabel;
verbessert se virum späicheren:',
'titleblacklist-override' => 'Schwaarz Lëscht ignoréieren',
@@ -1504,10 +1498,9 @@ $messages['ml'] = array(
* @author Kaustubh
* @author Mahitgar
* @author Rahuldeshmukh101
- * @author V.narsikar
*/
$messages['mr'] = array(
- 'titleblacklist-desc' => '[[MediaWiki:Titleblacklist|ब्लॅकलीस्ट]] व [[MediaWiki:Titlewhitelist|व्हाईट लीस्ट]] ला अनुसरून पाने आणि सदस्य खात्यांना प्रतिबंधित करण्याची प्रचालकांना परवानगी द्या',
+ 'titleblacklist-desc' => '[[MediaWiki:Titleblacklist|ब्लॅकलीस्ट]] व [[MediaWiki:Titlewhitelist|व्हाईट लीस्ट]] ला अनुसरून पाने आणि सदस्य खात्यांना प्रतिबंधतीअ करण्याची प्रचालकांना परवानगी द्या',
'titleblacklist' => '# ही ब्लॉक केलेल्या शीर्षकांची यादी आहे. या यादीत असलेल्या शीर्षकांचे लेख लिहिता येणार नाहीत.
# शेरा देण्यासाठी "#" वापरा.',
'titlewhitelist' => '# ही वापरू शकत असलेल्या शीर्षकांची यादी आहे. शेरा देण्यासाठी "#" वापरा',
@@ -1705,17 +1698,15 @@ $messages['or'] = array(
/** Polish (polski)
* @author Beau
* @author BeginaFelicysym
- * @author Chrumps
* @author Derbeth
- * @author Peter Bowman
* @author Sp5uhe
*/
$messages['pl'] = array(
'titleblacklist-desc' => 'Pozwala na blokowanie tworzenia stron i kont użytkowników o określonych nazwach wykorzystując [[MediaWiki:Titleblacklist|czarną]] oraz [[MediaWiki:Titlewhitelist|białą]] listę',
- 'titleblacklist' => '# Lista zabronionych nazw. Strony i konta o nazwach odpowiadających poniższym wyrażeniom regularnym nie będą mogły zostać utworzone.
-# Użyj znaku „#”, aby utworzyć komentarz.
+ 'titleblacklist' => '# Lista zabronionych nazw. Strony i konta o nazwach odpowiadających poniższym wyrażeniom regularnym, nie będą mogły zostać utworzone.
+# Użyj znaku „#”, by utworzyć komentarz.
# Domyślnie we wpisach ma znaczenie wielkość znaków.',
- 'titlewhitelist' => '# To jest lista dopuszczalnych nazw artykułów. Użyj znaku „#”, aby utworzyć komentarz.
+ 'titlewhitelist' => '# To jest lista dopuszczalnych nazw artykułów. Użyj znaku „#” by utworzyć komentarz.
# Domyślnie we wpisach ma znaczenie wielkość znaków.',
'titleblacklist-forbidden-edit' => 'Utworzenie strony o nazwie „$2” nie jest możliwe.
Nazwa ta pasuje do wpisu z czarnej listy: <code>$1</code>',
@@ -1727,7 +1718,7 @@ Nazwa ta pasuje do wpisu z czarnej listy: <code>$1</code>',
Nazwa ta pasuje do wpisu z czarnej listy: <code>$1</code>',
'titleblacklist-invalid' => '{{PLURAL:$1|Następująca linia|Następujące linie}} na liście zabronionych tytułów stron {{PLURAL:$1|jest nieprawidłowa|są nieprawidłowe}}. Popraw {{PLURAL:$1|ją|je}} przed zapisaniem:',
'titleblacklist-override' => 'Ignoruj czarną listę',
- 'right-tboverride' => 'Ignorowanie czarnej listy tytułów lub nazw użytkowników',
+ 'right-tboverride' => 'Zastąp czarną listę zabronionych tytułów stron lub nazw użytkowników',
'right-tboverride-account' => 'Ignorowanie czarnej listy użytkowników',
);
@@ -1929,7 +1920,7 @@ $messages['ru'] = array(
'titleblacklist-forbidden-upload' => 'Файл с названием «$2» был запрещён к созданию. Он попадает под следующую запись списка запрещенных названий: <code>$1</code>',
'titleblacklist-forbidden-new-account' => 'Запрещено использовать имя участника «$2».
Имя соответствует следующей записи из чёрного списка: <code>$1</code>',
- 'titleblacklist-invalid' => '{{PLURAL:$1|1=Следующая строка|Следующие строки}} в списке запрещённых названий {{PLURAL:$1|1=не является правильным регулярным выражением|не являются правильными регулярными выражениями}}. Пожалуйста, исправьте {{PLURAL:$1|1=её|их}} перед сохранением:',
+ 'titleblacklist-invalid' => '{{PLURAL:$1|Следующая строка|Следующие строки}} в списке запрещённых названий {{PLURAL:$1|не является правильным регулярным выражением|не являются правильными регулярными выражениями}}. Пожалуйста, исправьте {{PLURAL:$1|её|их}} перед сохранением:',
'titleblacklist-override' => 'Игнорировать чёрный список',
'right-tboverride' => 'игнорирование чёрного списка имён страниц или участников',
'right-tboverride-account' => 'игнорирование чёрного списка имён участников',
@@ -2007,14 +1998,6 @@ $messages['sah'] = array(
'right-tboverride-account' => 'кыттааччылар ааттарын "хара тиһигин" туттума',
);
-/** Serbo-Croatian (srpskohrvatski / српскохрватски)
- * @author Kolega2357
- */
-$messages['sh'] = array(
- 'right-tboverride' => 'Zaobilaženje spiska zabranjenih naslova',
- 'right-tboverride-account' => 'Zaobilaženje spiska zabranjenih korisničkih imena',
-);
-
/** Sinhala (සිංහල)
* @author Budhajeewa
* @author පසිඳු කාවින්ද
@@ -2341,7 +2324,6 @@ lütfen kaydetmeden önce düzeltin:',
/** Ukrainian (українська)
* @author AS
* @author Ahonc
- * @author Andriykopanytsia
* @author Base
* @author JenVan
* @author Prima klasy4na
@@ -2360,8 +2342,8 @@ $messages['uk'] = array(
Вона підпадає під наступний запис із списку заборонених назв: <code>$1</code>',
'titleblacklist-forbidden-new-account' => "Заборонено використовувати ім'я користувача «$2».
Ім'я відповідає наступному запису з чорного списку: <code>$1</code>",
- 'titleblacklist-invalid' => '{{PLURAL:$1|1=Наступний рядок|Наступні рядки}} списку заборонених назв є {{PLURAL:$1|1=помилковим|помилковими}};
-будь ласка, виправте {{PLURAL:$1|1=його|їх}} перед збереженням:',
+ 'titleblacklist-invalid' => '{{PLURAL:$1|Наступнинй рядок|Наступні рядки}} списку заборонених назв є {{PLURAL:$1|помилковим|помилковими}};
+будь ласка, виправіть {{PLURAL:$1|його|їх}} перед збереженням:',
'titleblacklist-override' => 'Ігнорувати чорний список',
'right-tboverride' => 'ігнорування чорного списку назв сторінок або користувачів',
'right-tboverride-account' => 'ігнорування чорного списку імен користувачів',
diff --git a/extensions/TitleBlacklist/TitleBlacklist.library.php b/extensions/TitleBlacklist/TitleBlacklist.library.php
deleted file mode 100644
index 0c2a599c..00000000
--- a/extensions/TitleBlacklist/TitleBlacklist.library.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-
-class Scribunto_LuaTitleBlacklistLibrary extends Scribunto_LuaLibraryBase {
- public function register() {
- $lib = array(
- 'test' => array( $this, 'test' ),
- );
-
- $this->getEngine()->registerInterface( __DIR__ . '/mw.ext.TitleBlacklist.lua', $lib, array() );
- }
-
- public function test( $action = null, $title = null ) {
- $this->checkType( 'mw.ext.TitleBlacklist.test', 1, $action, 'string' );
- $this->checkTypeOptional( 'mw.ext.TitleBlacklist.test', 2, $title, 'string', '' );
- $this->incrementExpensiveFunctionCount();
- if ( $title == '' ) {
- $title = $this->getParser()->mTitle->getPrefixedText();
- }
- $entry = TitleBlacklist::singleton()->isBlacklisted( $title, $action );
- if ( $entry ) {
- return array( array(
- 'params' => $entry->getParams(),
- 'regex' => $entry->getRegex(),
- 'raw' => $entry->getRaw(),
- 'version' => $entry->getFormatVersion(),
- 'message' => $entry->getErrorMessage( $action ),
- 'custommessage' => $entry->getCustomMessage()
- ) );
- }
- return array( null );
- }
-
-}
diff --git a/extensions/TitleBlacklist/TitleBlacklist.list.php b/extensions/TitleBlacklist/TitleBlacklist.list.php
index 3947e8ae..d197a9c5 100644
--- a/extensions/TitleBlacklist/TitleBlacklist.list.php
+++ b/extensions/TitleBlacklist/TitleBlacklist.list.php
@@ -156,12 +156,7 @@ class TitleBlacklist {
if ( $override && self::userCanOverride( $user, $action ) ) {
return false;
} else {
- $entry = $this->isBlacklisted( $title, $action );
- if ( !$entry ) {
- return false;
- }
- $params = $entry->getParams();
- return isset( $params['autoconfirmed'] ) && $user->isAllowed( 'autoconfirmed' ) ? false : $entry;
+ return $this->isBlacklisted( $title, $action );
}
}
@@ -177,29 +172,17 @@ class TitleBlacklist {
public function isBlacklisted( $title, $action = 'edit' ) {
if ( !( $title instanceof Title ) ) {
$title = Title::newFromText( $title );
- if ( !( $title instanceof Title ) ) {
- // The fact that the page name is invalid will stop whatever
- // action is going through. No sense in doing more work here.
- return false;
- }
}
$blacklist = $this->getBlacklist();
- $autoconfirmedItem = false;
foreach ( $blacklist as $item ) {
- if ( $item->matches( $title->getFullText(), $action ) ) {
+ if ( $item->matches( $title, $action ) ) {
if ( $this->isWhitelisted( $title, $action ) ) {
return false;
}
- $params = $item->getParams();
- if ( !isset( $params['autoconfirmed'] ) ) {
- return $item;
- }
- if ( !$autoconfirmedItem ) {
- $autoconfirmedItem = $item;
- }
+ return $item; // "returning true"
}
}
- return $autoconfirmedItem;
+ return false;
}
/**
@@ -216,7 +199,7 @@ class TitleBlacklist {
}
$whitelist = $this->getWhitelist();
foreach ( $whitelist as $item ) {
- if ( $item->matches( $title->getFullText(), $action ) ) {
+ if ( $item->matches( $title, $action ) ) {
return true;
}
}
@@ -360,7 +343,7 @@ class TitleBlacklistEntry {
* Check whether a user can perform the specified action
* on the specified Title
*
- * @param $title string to check
+ * @param $title Title to check
* @param $action %Action to check
* @return bool TRUE if the the regex matches the title, and is not overridden
* else false if it doesn't match (or was overridden)
@@ -374,20 +357,15 @@ class TitleBlacklistEntry {
return false;
}
- if ( isset( $this->mParams['antispoof'] ) && is_callable( 'AntiSpoof::checkUnicodeString' ) ) {
- list( $ok, $norm ) = AntiSpoof::checkUnicodeString( $title );
- if ( $ok == "OK" ) {
- list( $ver, $title ) = explode( ':', $norm, 2 );
- } else {
- wfDebugLog( 'TitleBlacklist', 'AntiSpoof could not normalize "' . $title . '".' );
- }
- }
-
wfSuppressWarnings();
- $match = preg_match( "/^(?:{$this->mRegex})$/us" . ( isset( $this->mParams['casesensitive'] ) ? '' : 'i' ), $title );
+ $match = preg_match( "/^(?:{$this->mRegex})$/us" . ( isset( $this->mParams['casesensitive'] ) ? '' : 'i' ), $title->getFullText() );
wfRestoreWarnings();
+ global $wgUser;
if ( $match ) {
+ if ( isset( $this->mParams['autoconfirmed'] ) && $wgUser->isAllowed( 'autoconfirmed' ) ) {
+ return false;
+ }
if ( isset( $this->mParams['moveonly'] ) && $action != 'move' ) {
return false;
}
@@ -449,9 +427,6 @@ class TitleBlacklistEntry {
if ( preg_match( '/errmsg\s*=\s*(.+)/i', $opt, $matches ) ) {
$options['errmsg'] = $matches[1];
}
- if ( $opt2 == 'antispoof' ) {
- $options['antispoof'] = true;
- }
}
// Process magic words
preg_match_all( '/{{\s*([a-z]+)\s*:\s*(.+?)\s*}}/', $regex, $magicwords, PREG_SET_ORDER );
@@ -494,10 +469,10 @@ class TitleBlacklistEntry {
}
/**
- * @return array This entry's parameters
+ * @return array This entry's options
*/
- public function getParams() {
- return $this->mParams;
+ public function getOptions() {
+ return $this->mOptions;
}
/**
diff --git a/extensions/TitleBlacklist/TitleBlacklist.php b/extensions/TitleBlacklist/TitleBlacklist.php
index acd946d6..68fb6778 100644
--- a/extensions/TitleBlacklist/TitleBlacklist.php
+++ b/extensions/TitleBlacklist/TitleBlacklist.php
@@ -22,7 +22,6 @@ $dir = __DIR__;
$wgExtensionMessagesFiles['TitleBlacklist'] = $dir . '/TitleBlacklist.i18n.php';
$wgAutoloadClasses['TitleBlacklist'] = $dir . '/TitleBlacklist.list.php';
$wgAutoloadClasses['TitleBlacklistHooks'] = $dir . '/TitleBlacklist.hooks.php';
-$wgAutoloadClasses['Scribunto_LuaTitleBlacklistLibrary'] = $dir . '/TitleBlacklist.library.php';
/** @defgroup Title blacklist source types
* @{
@@ -77,16 +76,6 @@ $wgHooks['CentralAuthAutoCreate'][] = 'TitleBlacklistHooks::centralAuthAutoCreat
$wgHooks['EditFilter'][] = 'TitleBlacklistHooks::validateBlacklist';
$wgHooks['ArticleSaveComplete'][] = 'TitleBlacklistHooks::clearBlacklist';
$wgHooks['UserCreateForm'][] = 'TitleBlacklistHooks::addOverrideCheckbox';
-$wgHooks['UnitTestsList'][] = function( &$files ) {
- $files += glob( __DIR__ . '/tests/*Test.php' );
- return true;
-};
-$wgHooks['ScribuntoExternalLibraries'][] = function( $engine, array &$extraLibraries ) {
- if( $engine == 'lua' ) {
- $extraLibraries['mw.ext.TitleBlacklist'] = 'Scribunto_LuaTitleBlacklistLibrary';
- }
- return true;
-};
$wgResourceModules['mediawiki.api.titleblacklist'] = array(
'scripts' => 'mediawiki.api.titleblacklist.js',
diff --git a/extensions/TitleBlacklist/mw.ext.TitleBlacklist.lua b/extensions/TitleBlacklist/mw.ext.TitleBlacklist.lua
deleted file mode 100644
index 1b48eed1..00000000
--- a/extensions/TitleBlacklist/mw.ext.TitleBlacklist.lua
+++ /dev/null
@@ -1,22 +0,0 @@
-local TitleBlacklist = {}
-local php
-
-function TitleBlacklist.test( action, title )
- return php.test( action, title )
-end
-
-function TitleBlacklist.setupInterface( options )
- -- Boilerplate
- TitleBlacklist.setupInterface = nil
- php = mw_interface
- mw_interface = nil
-
- -- Register this library in the "mw" global
- mw = mw or {}
- mw.ext = mw.ext or {}
- mw.ext.TitleBlacklist = TitleBlacklist
-
- package.loaded['mw.ext.TitleBlacklist'] = TitleBlacklist
-end
-
-return TitleBlacklist
diff --git a/extensions/TitleBlacklist/tests/ApiQueryTitleBlacklistTest.php b/extensions/TitleBlacklist/tests/ApiQueryTitleBlacklistTest.php
deleted file mode 100644
index 344e9996..00000000
--- a/extensions/TitleBlacklist/tests/ApiQueryTitleBlacklistTest.php
+++ /dev/null
@@ -1,132 +0,0 @@
-<?php
-/**
- * Test the TitleBlacklist API.
- *
- * This wants to run with phpunit.php, like so:
- * cd $IP/tests/phpunit
- * php phpunit.php ../../extensions/TitleBlacklist/tests/ApiQueryTitleBlacklistTest.php
- *
- * The blacklist file is `testSource` and shared by all tests.
- *
- * Ian Baker <ian@wikimedia.org>
- */
-
-ini_set( 'include_path', ini_get( 'include_path' ) . ':' . __DIR__ . '/../../../tests/phpunit/includes/api' );
-
-/**
- * @group medium
- **/
-class ApiQueryTitleBlacklistTest extends ApiTestCase {
-
- function setUp() {
- global $wgTitleBlacklistSources;
- parent::setUp();
- $this->doLogin();
-
- $wgTitleBlacklistSources = array(
- array(
- 'type' => TBLSRC_FILE,
- 'src' => __DIR__ . '/testSource',
- ),
- );
- }
-
- /**
- * Verify we allow a title which is not blacklisted
- */
- function testCheckingUnlistedTitle() {
- $unlisted = $this->doApiRequest( array(
- 'action' => 'titleblacklist',
- // evil_acc is blacklisted as <newaccountonly>
- 'tbtitle' => 'evil_acc',
- 'tbaction' => 'create',
- 'tbnooverride' => true,
- ) );
-
- $this->assertEquals(
- 'ok',
- $unlisted[0]['titleblacklist']['result'],
- 'Not blacklisted title returns ok'
- );
- }
-
- /**
- * Verify tboverride works
- */
- function testTboverride() {
- global $wgGroupPermissions;
-
- // Allow all users to override the titleblacklist
- $wgGroupPermissions['*']['tboverride'] = true;
-
- $unlisted = $this->doApiRequest( array(
- 'action' => 'titleblacklist',
- 'tbtitle' => 'bar',
- 'tbaction' => 'create',
- ) );
-
- $this->assertEquals(
- 'ok',
- $unlisted[0]['titleblacklist']['result'],
- 'Blacklisted title returns ok if the user is allowd to tboverride'
- );
- }
-
- /**
- * Verify a blacklisted title gives out an error.
- */
- function testCheckingBlackListedTitle() {
- $listed = $this->doApiRequest( array(
- 'action' => 'titleblacklist',
- 'tbtitle' => 'bar',
- 'tbaction' => 'create',
- 'tbnooverride' => true,
- ) );
-
- $this->assertEquals(
- 'blacklisted',
- $listed[0]['titleblacklist']['result'],
- 'Listed title returns error'
- );
- $this->assertEquals(
- "The title \"bar\" has been banned from creation.\nIt matches the following blacklist entry: <code>[Bb]ar #example blacklist entry</code>",
- $listed[0]['titleblacklist']['reason'],
- 'Listed title error text is as expected'
- );
-
- $this->assertEquals(
- "titleblacklist-forbidden-edit",
- $listed[0]['titleblacklist']['message'],
- 'Correct blacklist message name is returned'
- );
-
- $this->assertEquals(
- "[Bb]ar #example blacklist entry",
- $listed[0]['titleblacklist']['line'],
- 'Correct blacklist line is returned'
- );
- }
-
- /**
- * Tests integration with the AntiSpoof extension
- */
- function testAntiSpoofIntegration() {
- if ( !class_exists( 'AntiSpoof') ) {
- $this->markTestSkipped( "This test requires the AntiSpoof extension" );
- }
-
- $listed = $this->doApiRequest( array(
- 'action' => 'titleblacklist',
- 'tbtitle' => 'AVVVV',
- 'tbaction' => 'create',
- 'tbnooverride' => true,
- ) );
-
- $this->assertEquals(
- 'blacklisted',
- $listed[0]['titleblacklist']['result'],
- 'Spoofed title is blacklisted'
- );
-
- }
-}
diff --git a/extensions/TitleBlacklist/tests/testSource b/extensions/TitleBlacklist/tests/testSource
deleted file mode 100644
index 235cc671..00000000
--- a/extensions/TitleBlacklist/tests/testSource
+++ /dev/null
@@ -1,5 +0,0 @@
-[Bb]ar #example blacklist entry
-.*[Ff]ail.*
-.*[Nn]yancat.* <errmsg=blacklisted-nyancat>
-.*evil_acc.* <newaccountonly>
-AW{1,10} <antispoof>