CVE-2021-41118 (PHP, published 2021-10-04T19:15Z)
Description: value: The DynamicPageList3 extension is a reporting tool for MediaWiki, listing category members and intersections with various formats and details. In affected versions unsanitised input of regular expression date within the parameters of the DPL parser function, allowed for the possibility of ReDoS (Regex Denial of Service). This has been resolved in version 3.3.6. If you are unable to update you may also set `$wgDplSettings['functionalRichness'] = 0;` or disable DynamicPageList3 to mitigate.
Severity: MEDIUM (CVSS v3 base score: 7.5)
Weakness: CWE-400 \u2014 Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.
Repository: https://github.com/Universal-Omega/DynamicPageList3
Files changed:
.gitattributes
.github/dependabot.yml
.github/workflows/dependencies
.github/workflows/mediawiki-tests.yml
.gitignore
.phan/config.php
.phpcs.xml
CHANGELOG.md
COPYING
README.md
composer.json
extension.json
i18n/en.json
includes/Article.php
includes/Config.php
includes/DynamicPageListHooks.php
includes/DynamicPageListMagic.php
includes/LST.php
includes/Logger.php
includes/Parameters.php
includes/ParametersData.php
includes/Parse.php
includes/Query.php
includes/RevisionJoinBuilder.php
includes/UpdateArticle.php
includes/UserQueryBuilder.php
includes/Variables.php
includes/heading/DefinitionHeading.php
includes/heading/Heading.php
includes/heading/OrderedHeading.php
includes/heading/TieredHeading.php
includes/heading/UnorderedHeading.php
includes/lister/CategoryList.php
includes/lister/DefinitionList.php
includes/lister/GalleryList.php
includes/lister/InlineList.php
includes/lister/Lister.php
includes/lister/OrderedList.php
includes/lister/SubPageList.php
includes/lister/UnorderedList.php
includes/lister/UserFormatList.php
maintenance/createTemplate.php
tests/phpunit/DPLIntegrationTestCase.php
tests/phpunit/DPLQueryIntegrationTest.php
tests/seed-data.xml
Commit message: Major cleanup (#57)



Vulnerable code:
/node_modules
/vendor
/.eslintcache
*.kate-swp
*~
.*.swp
.DS_Store
.svn
.idea
$cfg['suppress_issue_types'] = array_merge( $cfg['suppress_issue_types'], [
	'PhanUndeclaredInterface',
	'PhanUndeclaredTypeParameter',
	'PhanUndeclaredClassMethod',
	'PhanUndeclaredFunction',
	'PhanUndeclaredConstant',
	'PhanUndeclaredTypeReturnType',
	'PhanPossiblyUndeclaredVariable',
	'PhanTypePossiblyInvalidDimOffset',
	'PhanTypeInvalidDimOffset',
	'PhanUndeclaredConstantOfClass',
	'PhanUndeclaredExtendedClass',
	'PhanTypeMismatchReturnNullable',
	'PhanUndeclaredExtendedClass',
	'PhanUndeclaredMethod',
	'PhanUndeclaredProperty',
	'PhanPluginDuplicateAdjacentStatement',
	'PhanImpossibleCondition',
	'PhanUndeclaredClassInstanceof',
	'PhanTypeArraySuspiciousNullable',
	'PhanParamTooMany',
	'PhanPluginDuplicateConditionalNullCoalescing',
	'PhanRedundantCondition',
	'PhanPluginDuplicateConditionalTernaryDuplication',
	'PhanTypeMismatchReturnProbablyReal',
	'PhanUndeclaredVariableDim',
	'PhanUndeclaredClass',
	'PhanUnextractableAnnotation',
	'PhanTypeSuspiciousStringExpression',
	'PhanImpossibleTypeComparison',
	'PhanTypeMismatchArgument'
] );
$cfg['scalar_implicit_cast'] = true;
    <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
		<exclude name="Generic.Files.LineLength" />
		<exclude name="MediaWiki.NamingConventions.LowerCamelFunctionsName" />
		<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment" />
	<rule ref="Generic.NamingConventions.ConstructorName">
		<severity>3</severity>
	</rule>
    <file>.</file>
    <arg name="extensions" value="php,php5,inc"/>
    <arg name="encoding" value="UTF-8"/>
                       Version 2, June 1991
 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  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
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.
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.
                    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
  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
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
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.
convey the exclusion of warranty; and each file should have at least
    This program is free software; you can redistribute it and/or modify
    the Free Software Foundation; either version 2 of the License, or
    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.
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'.
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.
* Licensing: DynamicPageList3 is released under [GNU General Public License, version 2](https://opensource.org/licenses/GPL-2.0).
	"license": "GPL-2.0-or-later",
		"mediawiki/mediawiki-codesniffer": "35.0.0",
		"mediawiki/mediawiki-phan-config": "0.10.6",
		"php-parallel-lint/php-parallel-lint": "1.2.0"
		"test": [
			"parallel-lint . --exclude vendor --exclude node_modules",
			"minus-x check .",
			"phpcs -p -s"
		],
			"phpcbf"
		"phan": "phan -d . --long-progress-bar"
	"version": "3.3.5",
	"license-name": "GPL-2.0-or-later",
		"MediaWiki": ">= 1.35.0"
		"DynamicPageListMagic": "DynamicPageList.i18n.magic.php"
		"DynamicPageListHooks": "DynamicPageListHooks.php"
			"DynamicPageListHooks::onParserFirstCallInit"
			"DynamicPageListHooks::onLoadExtensionSchemaUpdates"
	"callback": "DynamicPageListHooks::onRegistration",
{
    "@metadata": {
        "authors": [
            "Naudefj"
        ]
    },
    "intersection_toomanycats": "Fout: Te veel kategorieë!",
    "intersection_toofewcats": "Fout: Te min kategorieë!",
    "intersection_noresults": "Fout: Geen resultate!"
}
{
    "@metadata": {
        "authors": [
            "Juanpabl"
        ]
    },
    "intersection-desc": "Preduz una lista d'os elementos más rezients que bi ha en una categoría u a unión de barios categorías",
    "intersection_toomanycats": "Error: Masiadas categorías!",
    "intersection_toofewcats": "Error: numero insufizient de categorías!",
    "intersection_noresults": "Error: No bi ha garra resultau!",
    "intersection_noincludecats": "Error: Ha d'encluyir á lo menos una categoría u endicar un espazio de nombres!"
}
{
    "@metadata": {
        "authors": [
            "Meno25"
        ]
    },
    "intersection-desc": "يخرج قائمة معلمة بأحدث المدخلات الساكنة في تصنيف، أو اتحاد عدة تصنيفات",
    "intersection_toomanycats": "خطأ: تصنيفات كثيرة جدا!",
    "intersection_toofewcats": "خطأ: تصنيفات قليلة جدا!",
    "intersection_noresults": "خطأ: لا نتائج!",
    "intersection_noincludecats": "خطأ: ينبغي أن تضمن تصنيفا واحدا على الأقل، أو تحدد نطاقا!"
}
{
    "@metadata": {
        "authors": [
            "Meno25",
            "Ramsis II"
        ]
    },
    "intersection-desc": "بيطلع لستة مترقمة لاحدث الحاجات الموجودة فى تصنيف,او اتحاد اكتر من تصنيف",
    "intersection_toomanycats": "غلط:تصانيف كتيرة خالص!",
    "intersection_toofewcats": "غلط:تصانيف قليلة خالص!",
    "intersection_noresults": "غلط:مافيش نتايج!",
    "intersection_noincludecats": "غلط: لازم تحط تصنيف واحد على الأقل، أو تحدد نطاق!"
}
{
    "@metadata": {
        "authors": [
            "Esbardu"
        ]
    },
    "intersection-desc": "Amuesa una llista de los elementos más recién que tenga una categoría o una xuntanza de varies categoríes",
    "intersection_toomanycats": "Error: ¡Demasiaes categoríes!",
    "intersection_toofewcats": "Error: ¡Demasiaes poques categoríes!",
    "intersection_noresults": "Error: ¡Nun hai resultaos!",
    "intersection_noincludecats": "Error: ¡Necesites amiestar a lo menos una categoría, o especificar un espaciu de nomes!"
}
{
    "@metadata": {
        "authors": [
            "Mostafadaneshvar"
        ]
    },
    "intersection_toomanycats": "DynamicPageList: بازگین دسته جات!",
    "intersection_toofewcats": "DynamicPageList: باز کمین دسته جات!",
    "intersection_noresults": "DynamicPageList: هچ نتیجه ای",
    "intersection_noincludecats": "لیست صفحات دینامیکی: شما لازمنت حداقل یک دسته هور کنیت یا یک نام فضایی مشخص کنیت!"
}
{
    "@metadata": {
        "authors": [
            "EugeneZelenko",
            "Jim-by"
        ]
    },
    "intersection-desc": "Выводзіць у маркіраваны сьпіс апошнія дабаўленьні да катэгорыі альбо аб'ядноўвае некалькі катэгорыяў",
    "intersection_toomanycats": "Памылка: Зашмат катэгорыяў!",
    "intersection_toofewcats": "Памылка: Занадта мала катэгорыяў!",
    "intersection_noresults": "Памылка: Няма вынікаў!",
    "intersection_noincludecats": "Памылка: Вам неабходна ўключыць хаця б адну катэгорыю альбо ўказаць прастору назваў!"
}
{
    "@metadata": {
        "authors": [
            "DCLXVI",
            "Spiritia"
        ]
    },
    "intersection-desc": "Извежда списък на най-скорошните записи в дадена категория или сечение на няколко категории",
    "intersection_toomanycats": "Error: Твърде много категории!",
    "intersection_toofewcats": "Error: Твърде малко категории!",
    "intersection_noresults": "Error: Няма резултати!",
    "intersection_noincludecats": "Error: Необходимо е да се включи поне една категория или да се посочи именно пространство!"
}
{
    "@metadata": {
        "authors": [
            "Bellayet"
        ]
    },
    "intersection_toomanycats": "Error: অনেক বেশি বিষয়শ্রেণী!",
    "intersection_toofewcats": "Error: অনেক কম বিষয়শ্রেণী!",
    "intersection_noresults": "Error: ফলাফল নাই!",
    "intersection_noincludecats": "ত্রুটি:আপনার অন্তত একটি বিষয়শ্রেণী যুক্ত করতে, অথবা একটি নেমস্পেস দিতে হবে!"
}
{
    "@metadata": {
        "authors": [
            "Fulup"
        ]
    },
    "intersection_toomanycats": "Error: Re a rummadoù !",
    "intersection_toofewcats": "Error: Re nebeut a rummadoù !",
    "intersection_noresults": "Error: Disoc'h ebet !"
}
{
    "@metadata": {
        "authors": [
            "CERminator",
            "Seha"
        ]
    },
    "intersection-desc": "Izbacuje listu najčešćih tačaka koje se nalaze u kategoriji ili u sekciji nekoliko kategorija.",
    "intersection_toomanycats": "Greška: Previše kategorija!",
    "intersection_toofewcats": "Greška: Premalo kategorija!",
    "intersection_noresults": "Greška: Nema rezultata!",
    "intersection_noincludecats": "Greška: Potrebno je da uključite najmanje jednu kategoriju ili odredite imenski prostor!"
}
{
    "@metadata": {
        "authors": [
            "Paucabot",
            "SMP"
        ]
    },
    "intersection-desc": "Genera una llista d'elements recents en una categoria o en la intersecció de diverses.",
    "intersection_toomanycats": "Error: Massa categories!",
    "intersection_toofewcats": "Error: Massa poques categories!",
    "intersection_noresults": "Error: Cap resultat!",
    "intersection_noincludecats": "Error: Heu d'incloure almenys una categoria o especificar un espai de noms!"
}
{
    "@metadata": {
        "authors": [
            "Li-sung",
            "Matěj Grabovský"
        ]
    },
    "intersection-desc": "Vypíše seznam nejnovějších položek v kategorii nebo sjednotí několik kategorií",
    "intersection_toomanycats": "Error: Příliš mnoho kategorií!",
    "intersection_toofewcats": "Error: Málo kategorií!",
    "intersection_noresults": "Error: Žádné výsledky!",
    "intersection_noincludecats": "Error: Musíte zahrnout alespoň jednu kategorii nebo určit jmenný prostor!"
}
{
    "@metadata": {
        "authors": [
            "Gero Scholz",
            "MarkusRost"
        ]
    },
    "intersection-desc": "Ausgabe einer Liste der aktuellsten Einträge in einer Kategorie, oder der Schnittmenge mehrerer Kategorien",
    "intersection_toomanycats": "Fehler: Zu viele Kategorien!",
    "intersection_toofewcats": "Fehler: Zu wenige Kategorien!",
    "intersection_noresults": "Fehler: Kein Ergebnis!",
    "intersection_noincludecats": "Fehler: Es muss mindestens eine Kategorie eingebunden werden oder ein Namensraum angegeben sein!",
    "dpl_log_1": "Fehler: bei „$1“ Parameter: „$2“! Hilfe:  <code>$1= <i>(leer)</i> (Hauptnamensraum)$3</code>.",
    "dpl_log_2": "Fehler: bei „$1“ Parameter: „$2“! Hilfe:  <code>$1= <i>vollständiger Seitenname</i></code>.",
    "dpl_log_3": "Fehler: Zu viele Kategorien! Maximum: $1.",
    "dpl_log_4": "Fehler: Zu wenige Kategorien! Minimum: $1.",
    "dpl_log_5": "Fehler: Keine Auswahlkriterien angegeben! Mindestens einer der folgenden Parameter ist erforderlich: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby oder die „not“-Varianten davon.",
    "dpl_log_6": "Fehler: Sie müssen mindestens eine Kategorie angeben, wenn Sie „addfirstcategorydate=true“ oder „ordermethod=categoryadd“ benutzen.",
    "dpl_log_7": "Fehler: Wenn Sie mehr als eine Kategorie angeben, können Sie „addfirstcategorydate=true“ oder „ordermethod=categoryadd“ nicht benutzen.",
    "dpl_log_8": "Fehler: Es ist nur eine einzige Art der Datumsangabe gleichzeitig möglich.",
    "dpl_log_9": "Fehler: Der Parameter „$1“ muss in Verbindung mit „ordermethod=[ $2 ]“ benutzt werden.",
    "dpl_log_10": "Fehler: Die Indexangabe bei „dominantsection“ muss zwischen 1 und  der Anzahl der Argumente von „includepage“ liegen ($0 in diesem Fall).",
    "dpl_log_11": "Fehler: Kann keine logischen Operationen an nicht kategorisierten Seiten ausführen (z.&nbsp;B. mit dem „category“ Parameter) weil die „$0“-Ansicht nicht in der Datenbank vorhanden ist!",
    "dpl_log_12": "Fehler: Die Angabe von „openreferences“ ist nicht vereinbar mit anderen angegegeben Optionen. Entferne die anderen Optionen oder „openreferences“. Details dazu stehen im DPL-Manual.",
    "dpl_log_13": "Warnung: Der unbekannte Parameter „$1“ wurde ignoriert. Hilfe: Verfügbare Parameter: <code>$2</code>.",
    "dpl_log_14": "Warnung: Überspringe die ungültige Option „$2“ für den Parameter „$1“.",
    "dpl_log_15": "Warnung: Falscher „$1“-Parameter: „$2“! Standardwert wird verwendet: „$3“ (unbegrenzt). Hilfe: <code>$1= <i>(leer)</i> (unbegrenzt) | n</code>, wobei <code>n</code> eine positive Ganzzahl sein muss.",
    "dpl_log_16": "Warnung: Keine Ergebnisse.",
    "dpl_log_17": "Warnung: Add* Parameter („adduser“, „addeditdate“, usw.) und „includepage“ haben keinen Effekt in Verbindung mit „mode=category“. Es kann nur der Seitentitel und Namensraum angezeigt werden.",
    "dpl_log_18": "Warnung: „headingmode=$1“ hat keinen Effekt, wenn „ordermethod“ sich auf eine einzelne Komponente bezieht. Es wird „$2“ verwendet. Hilfe: Sie können not-$1 „headingmode“ Werte in Verbindung mit „ordermethod“ für mehrfache Komponenten verwenden. Die erste Konponente wird für Gruppen verwendet. Z.&nbsp;B. „ordermethod=category,<i>comp</i>“ (<i>comp</i> ist eine andere Komponente) für Kategorie-Gruppen.",
    "dpl_log_19": "Warnung: „debug=$1“ steht nicht an erster Stelle in der DPL-Anweisung. Die Einstellung wird erst wirksam, nachdem die vorausgehenden Parameter geprüft und verarbeitet sind.",
    "dpl_log_20": "Warnung: Endlosschleife beim Einbinden von Inhalten der Seite „$0“.",
    "dpl_log_21": "Datenbank-Abfrage: <code>$0</code>",
    "dpl_log_22": "Warnung: Keine Parameter-Option angegeben für „$1“. („=“ fehlt)",
    "dpl_articlecount": "Diese Gruppe enthält {{PLURAL:$1|einen|$1}} Artikel.",
    "action-dpl_param_update_rules": "um den Parameter „updaterules“ zu nutzen",
    "action-dpl_param_delete_rules": "um den Parameter „deleterules“ zu nutzen",
    "dpl_query_error": "Die DPL-Erweiterung (Version $1) produzierte ein SQL-Statement, was zu einem Datenbank-Fehler führte.<br/>Der Grund könnte ein interner Fehler von DPL sein oder ein Fehler deinerseits; besonders beim Nutzen von Parametern wie „categoryregexp“ oder „titleregexp“.  Die Verwendung von non-greedy *? matching patterns werden nicht unterstützt.<br/>Fehlermeldung:<br/><code>$2</code>",
    "dpl-tag-tracking-category": "Seiten, die DynamicPageList parser tag nutzen",
    "dpl-intersection-tracking-category": "Seiten, die DynamicPageList Intersection parser tag nutzen",
    "dpl-parserfunc-tracking-category": "Seiten, die DynamicPageList parser function nutzen",
    "dplnum-parserfunc-tracking-category": "Seiten, die DynamicPageList dplnum parser function nutzen",
    "dplvar-parserfunc-tracking-category": "Seiten, die DynamicPageList dplvar parser function nutzen",
    "dplreplace-parserfunc-tracking-category": "Seiten, die DynamicPageList dplreplace parser function nutzen",
    "dplchapter-parserfunc-tracking-category": "Seiten, die DynamicPageList dplchapter parser function nutzen",
    "dplmatrix-parserfunc-tracking-category": "Seiten, die DynamicPageList dplmatrix parser function nutzen",
    "right-dpl_param_delete_rules": "Massenlöschungen von Seiten, die DPL nutzen",
    "right-dpl_param_update_rules": "Massenänderungen von Seiten, die DPL nutzen"
}
{
    "@metadata": {
        "authors": [
            "Michawiki"
        ]
    },
    "intersection-desc": "Wudawa lisćina nejaktualnjejšych zapiskow w kategoriji abo zgromadneje młogosći někotarych kategorijow",
    "intersection_toomanycats": "Zmólka: Pśewjele kategorijow!",
    "intersection_toofewcats": "Zmólka: Pśemało kategorijow!",
    "intersection_noresults": "Zmólka: Žedne wuslědki!",
    "intersection_noincludecats": "Zmólka: Musyš nanejmjenjej jadnu kategoriju zapśěgnuś abo mjenjowy rum pódaś!"
}
{
    "@metadata": {
        "authors": [
            "Dead3y3"
        ]
    },
    "intersection-desc": "Έχει ως έξοδο μια μη αριθμημένη λίστα των πιο πρόσφατων στοιχείων σε μια κατηγορία, ή μια τομή μερικών κατηγοριών",
    "intersection_toomanycats": "Σφάλμα: Πάρα πολλές κατηγορίες!",
    "intersection_toofewcats": "Σφάλμα: Πολύ λίγες κατηγορίες!",
    "intersection_noresults": "Σφάλμα: Δεν υπάρχουν αποτελέσματα!",
    "intersection_noincludecats": "Σφάλμα: Πρέπει να περιλάβετε τουλάχιστον μία κατηγορία, ή να ορίσετε μια περιοχή ονομάτων!"
}
    "@metadata": {
        "authors": [
            "m:User:Dangerman <cyril.dangerville@gmail.com>"
        ]
    },
    "intersection-desc": "Outputs a bulleted list of the most recent items residing in a category, or an intersection of several categories",
    "intersection_toomanycats": "Error: Too many categories!",
    "intersection_toofewcats": "Error: Too few categories!",
    "intersection_noresults": "Error: No results!",
    "intersection_noincludecats": "Error: You need to include at least one category, or specify a namespace!",
    "dpl-desc": "A highly flexible report generator for MediaWikis",
    "dpl_log_1": "Error: Wrong '$1' parameter: '$2'! Help:  <code>$1= <i>empty string</i> (Main)$3</code>.",
    "dpl_log_2": "Error: Wrong '$1' parameter: '$2'! Help:  <code>$1= <i>full pagename</i></code>.",
    "dpl_log_3": "Error: Too many categories! Maximum: $1. Help: increase <code>$wgDplSettings['maxCategoryCount']</code> to specify more categories or set <code>$wgDplSettings['allowUnlimitedCategories'] = true;</code> for no limitation. (Set the variable in the wiki's <code>LocalSettings.php</code> configuration file.)",
    "dpl_log_4": "Error: Too few categories! Minimum: $1. Help: decrease <code>$wgDplSettings['minCategoryCount']</code> to specify fewer categories. (Set the variable in the wiki's <code>LocalSettings.php</code> configuration file.)",
    "dpl_log_5": "Error: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants",
    "dpl_log_6": "Error: At least one category must be chosen if to use 'addfirstcategorydate=true' or 'ordermethod=categoryadd'.",
    "dpl_log_7": "Error: If you include more than one category, you cannot use 'addfirstcategorydate=true' or 'ordermethod=categoryadd'.",
    "dpl_log_8": "Error: Only one date type can be added at a time.",
    "dpl_log_9": "Error: The paramater '$1' must be used with 'ordermethod=[ $2 ]'",
    "dpl_log_10": "Error: the index for the dominant section must be between 1 and the number of arguments of includepage ($0 in this case)",
    "dpl_log_11": "Error: Cannot perform logical operations on the Uncategorized pages (f.e. with the 'category' parameter) because the $0 view does not exist on the database! Help: have the database administrator execute this query: <code>$1</code>.",
    "dpl_log_12": "Error: specifying \"openreferences\" is incompatible with another option specified.  Please remove that other option or \"openreferences\".  See the manual for details.",
    "dpl_log_13": "Warning: Unknown parameter '$1' was ignored. Help: available parameters: <code>$2</code>.",
    "dpl_log_14": "Warning: Skipping bad option '$2' for parameter '$1'.",
    "dpl_log_15": "Warning: Wrong '$1' parameter: '$2'! Using default: '$3' (no limit). Help: <code>$1= <i>empty string</i> (no limit) | n</code>, with <code>n</code> a positive integer.",
    "dpl_log_16": "Warning: No results.",
    "dpl_log_17": "Warning: Add* parameters ('adduser', 'addeditdate', etc.)' and 'includepage' have no effect with 'mode=category'. Only the page namespace/title can be viewed in this mode.",
    "dpl_log_18": "Warning: 'headingmode=$1' has no effect with 'ordermethod' on a single component. Using: '$2'. Help: you can use not-$2 'headingmode' values with 'ordermethod' on multiple components. The first component is used for headings. E.g. 'ordermethod=category,<i>comp</i>' (<i>comp</i> is another component) for category headings.",
    "dpl_log_19": "Warning: 'debug=$1' is not in first position in the DPL element. The new debug settings are not applied before all previous parameters have been parsed and checked.",
    "dpl_log_20": "Warning: An infinite transclusion loop is created by page '$0'.",
    "dpl_log_21": "Query: <code>$0</code>",
    "dpl_log_22": "Warning: No parameter option supplied for '$1'. (Missing '=')",
    "dpl_articlecount": "There {{PLURAL:$1|is one article|are $1 articles}} in this heading.",
    "dpl_description": "A flexible report generator for MediaWiki. See [http://semeb.com/dpldemo] for the manual and examples",
    "action-dpl_param_update_rules": "to use the parameter 'updaterules'",
    "action-dpl_param_delete_rules": "to use the parameter 'deleterules'",
    "dpl_query_error": "The DPL extension (version $1) produced a SQL statement which led to a Database error.<br/>The reason may be an internal error of DPL or an error which you made; especially when using parameters like 'categoryregexp' or 'titleregexp'.  Usage of non-greedy *? matching patterns are not supported.<br/>Error message was:<br/><tt>$2</tt>",
    "dpl-tag-tracking-category": "Pages using DynamicPageList parser tag",
    "dpl-intersection-tracking-category": "Pages using DynamicPageList Intersection parser tag",
    "dpl-parserfunc-tracking-category": "Pages using DynamicPageList parser function",
    "dplnum-parserfunc-tracking-category": "Pages using DynamicPageList dplnum parser function",
    "dplvar-parserfunc-tracking-category": "Pages using DynamicPageList dplvar parser function",
    "dplreplace-parserfunc-tracking-category": "Pages using DynamicPageList dplreplace parser function",
    "dplchapter-parserfunc-tracking-category": "Pages using DynamicPageList dplchapter parser function",
    "dplmatrix-parserfunc-tracking-category": "Pages using DynamicPageList dplmatrix parser function",
    "right-dpl_param_delete_rules": "Mass deletion of pages using DPL",
    "right-dpl_param_update_rules": "Mass update of pages using DPL"
}
{
    "@metadata": {
        "authors": [
            "Yekrats"
        ]
    },
    "intersection-desc": "Eligas bulpunktitan liston de la plej lastaj kategorianoj, aŭ unuigo de pluraj kategorioj",
    "intersection_toomanycats": "Eraro: Tro da kategorioj!",
    "intersection_toofewcats": "Error: Tro malmultaj da kategorioj!",
    "intersection_noresults": "Error: Neniom da rezultoj!",
    "intersection_noincludecats": "Error: Vi devas inkluzivi almenaŭ unu kategorion, aŭ specifigu nomspacon!"
}
{
    "@metadata": {
        "authors": [
            "Aleator",
            "Remember the dot",
            "Sanbec"
        ]
    },
    "intersection-desc": "Devuelve una lista de los elementos más recientes que están en una categoría o en una intersección de varias categorías",
    "intersection_toomanycats": "¡Error: Demasiadas categorías!",
    "intersection_toofewcats": "Error: ¡Muy pocas categorías!",
    "intersection_noresults": "Error: ¡Sin resultados!",
    "intersection_noincludecats": "Error: ¡Necesita incluir al menos una categoría, o especificar un espacio de nombres!"
}
{
    "@metadata": {
        "authors": [
            "An13sa"
        ]
    },
    "intersection_toomanycats": "Errorea: Kategoria gehiegi!",
    "intersection_toofewcats": "Errorea: Kategoria gutxiegi!",
    "intersection_noresults": "Errorea: Emaitzarik ez!",
    "intersection_noincludecats": "Errorea: Gutxienez kategoria bat gehitu edo izen bat zehaztu behar duzu!"
}
{
    "@metadata": {
        "authors": [
            "Huji"
        ]
    },
    "intersection-desc": "فهرست گلوله‌ای از صفحه‌هایی به نمایش در می‌آورد که به تازگی در یک یا چند رده وارد شده‌اند",
    "intersection_toomanycats": "DynamicPageList: تعداد رده‌ها زیاد است!",
    "intersection_toofewcats": "DynamicPageList: تعداد رده‌ها کم است!",
    "intersection_noresults": "DynamicPageList: نتیجه‌ای وجود ندارد!",
    "intersection_noincludecats": "DynamicPageList: شما حداقل باید یک رده را وارد کنید، یا یک فضای نام را مشخص کنید!"
}
{
    "@metadata": {
        "authors": [
            "Nike"
        ]
    },
    "intersection-desc": "Tulostaa listan luokassa tai useamman luokan yhdisteessä olevista sivuista.",
    "intersection_toomanycats": "Error: Liian monta luokkaa.",
    "intersection_toofewcats": "Error: Liian vähän luokkia.",
    "intersection_noresults": "Error: Ei tuloksia.",
    "intersection_noincludecats": "Error: Lisää vähintään yksi luokka tai määritä nimiavaruus."
}
{
    "@metadata": {
        "authors": [
            "Grondin",
            "Urhixidur",
            "Verdy p"
        ]
    },
    "intersection-desc": "Affiche une liste, à puces, des articles les plus récents dans une catégorie, ou à partir d’une combinaison de plusieurs catégories.",
    "intersection_toomanycats": "DynamicPageList : trop de catégories !",
    "intersection_toofewcats": "DynamicPageList : pas assez de catégories !",
    "intersection_noresults": "DynamicPageList : aucun résultat !",
    "intersection_noincludecats": "Error : vous devez inclure au moins une catégorie, ou préciser un nom d’espace !",
    "dpl_log_1": "ERREUR : Mauvais paramètre '$0' : '$1'! Aide :  <code>$0= <i>chaîne vide</i> (Principal)$3</code>. (Les équivalents avec des mots magiques sont aussi autorisés.)",
    "dpl_log_2": "ERREUR : Mauvais paramètre '$0' : '$1'! Aide :  <code>$0= <i>Nom complet de la page</i></code>. (Les mots magiques sont autorisés.)",
    "dpl_log_3": "ERREUR : Trop de catégories ! Maximum : $0. Aide : accroître <code>DynamicPageListHooks::$maxCategoryCount</code> pour autoriser plus de catégories ou régler <code>DynamicPageListHooks::$allowUnlimitedCategories=true</code> pour aucune limite. (À régler dans <code>LocalSettings.php</code>, après avoir inclus <code>DynamicPageList.php</code>.)",
    "dpl_log_4": "ERREUR : Pas assez de catégories ! Minimum : $0. Aide : décroître <code>DynamicPageListHooks::$minCategoryCount</code> pour autoriser moins de catégories. (À régler dans <code>LocalSettings.php</code> de préférence, après avoir inclus <code>DynamicPageList.php</code>.)",
    "dpl_log_5": "ERROR: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants",
    "dpl_log_6": "ERREUR : Vous devez inclure au moins une catégorie si vous voulez utiliser 'addfirstcategorydate=true' ou 'ordermethod=categoryadd' !",
    "dpl_log_7": "ERREUR : Si vous incluez plus d’une catégorie, vous ne pouvez pas utiliser 'addfirstcategorydate=true' ou 'ordermethod=categoryadd' !",
    "dpl_log_8": "ERREUR : Vous ne pouvez pas utiliser plus d’un type de date à la fois !",
    "dpl_log_9": "ERREUR : Vous ne pouvez utiliser '$0' qu’avec 'ordermethod=[...,]$1' !",
    "dpl_log_10": "ERROR: the index for the dominant section must be between 1 and the number of arguments of includepage ($0 in this case)",
    "dpl_log_11": "ERREUR : Ne peut pas effectuer d’opérations logiques sur les pages sans catégories (avec la paramètre 'category') car la vue $0 n’existe pas dans la base de données ! Aide : demander à un administrateur de la base de données d'effectuer : <code>$1</code>.",
    "dpl_log_12": "ERROR: specifying \"openreferences\" is incompatible with some other option you specified. See the manual for details.",
    "dpl_log_13": "AVERTISSEMENT : Le paramètre inconnu '$1' est ignoré. Aide : paramètres disponibles : <code>$2</code>.",
    "dpl_log_14": "AVERTISSEMENT : Mauvais paramètre '$0' : '$1'! Utilisation de la valeur par défaut : '$2'. Aide : <code>$0= $3</code>.",
    "dpl_log_15": "AVERTISSEMENT : Mauvais paramètre '$0' : '$1'! Utilisattion de la valeur par défaut : '$2' (aucune limite). Aide : <code>$0= <i>chaîne vide</i> (aucune limite) | n</code>, avec <code>n</code> un entier positif.",
    "dpl_log_16": "AVERTISSEMENT : Aucun résultat !",
    "dpl_log_17": "AVERTISSEMENT : Les paramètres Add* ('adduser', 'addeditdate', etc.)' et 'includepage' n’ont aucun effet avec 'mode=category'. Seuls l’espace de nom et le titre de la page peuvent être vus dans ce mode..",
    "dpl_log_18": "AVERTISSEMENT : 'headingmode=$0' n'a aucun effet avec 'ordermethod' sur une simple composante. Utiliser : '$1'. Aide : vous pouvez utiliser not-$1  sur les valeurs de 'headingmode' avec 'ordermethod' sur plusieurs composantes.  La première composante est utilisée pour les en-têtes. Exemple : 'ordermethod=category,<i>comp</i>' (<i>comp</i> est une autre composante) pour les en-têtes de catégorie.",
    "dpl_log_19": "AVERTISSEMENT : 'debug=$0' n’est pas en première position dans l’élément DPL. Les nouveaux réglages de débogage ne seront appliqués qu’après que les paramètres précédents aient été vérifiés.",
    "dpl_log_20": "AVERTISSEMENT : Une boucle d’inclusion infinie est créée par la page '$0'.",
    "dpl_log_21": "REQUÊTE : <code>$0</code>",
    "dpl_articlecount": "Il y a {{PLURAL:$1|un article|$1 articles}} dans cette section."
}
{
    "@metadata": {
        "authors": [
            "ChrisPtDe"
        ]
    },
    "intersection-desc": "Afiche una lista de puges des articllos los ples novéls dens una catègorie, ou ben dês una combinèson de plusiors catègories.",
    "intersection_toomanycats": "Error : trop de catègories !",
    "intersection_toofewcats": "Error : pas prod de catègories !",
    "intersection_noresults": "Error : nion rèsultat !",
    "intersection_noincludecats": "Error : vos avéd fôta d’encllure u muens yona catègorie, ou ben de spècefiar un èspâço de nom !"
}
{
    "@metadata": {
        "authors": [
            "Toliño",
            "Xosé"
        ]
    },
    "intersection-desc": "Devolve unha lista punteada dos elementos máis recentes que están nunha categoría ou nunha unión de varias categorías",
    "intersection_toomanycats": "Erro: demasiadas categorías!",
    "intersection_toofewcats": "Erro: moi poucas categorías!",
    "intersection_noresults": "Erro: ningún resultado!",
    "intersection_noincludecats": "Erro: ten que incluír unha categoría polo menos ou especificar un espazo de nomes!"
}
{
    "@metadata": {
        "authors": [
            "Omnipaedista"
        ]
    },
    "intersection_noresults": "Σφάλμα: οὐδὲν ἀποτέλεσμα",
    "intersection_noincludecats": "Σφάλμα: Ἔξεστί σοι περιλαμβάνειν μίαν τοὐλάχιστον κατηγορίαν, ἢ καθορίζειν ὀνοματεῖον τι!"
}
{
    "@metadata": {
        "authors": [
            "Als-Holder"
        ]
    },
    "intersection-desc": "Usgabe vun ere Lischt vu dr aktuällschte Yyträg in ere Kategorii, oder vu dr Schnittmängi vu mehrere Kategorie",
    "intersection_toomanycats": "Fähler: Zvyyl Kategorie!",
    "intersection_toofewcats": "Fähler: Zwenig Kategorie!",
    "intersection_noresults": "Fähler: Kei Ergebnis!",
    "intersection_noincludecats": "Fähler: S muess zmindescht ei Kategorii yybunde wäre oder gib e Namensruum aa!"
}
{
    "@metadata": {
        "authors": [
            "Rotem Liss"
        ]
    },
    "intersection-desc": "רשימה עם תבליטים של הפריטים האחרונים המצויים בקטגוריה, או במספר קטגוריות",
    "intersection_toomanycats": "DynamicPageList: קטגוריות רבות מדי!",
    "intersection_toofewcats": "DynamicPageList: קטגוריות מעטות מדי!",
    "intersection_noresults": "DynamicPageList: אין תוצאות!",
    "intersection_noincludecats": "DynamicPageList: עליכם לכלול לפחות קטגוריה אחת, או לציין מרחב שם!",
    "dpl_log_1": "שגיאה: פרמטר '$0' שגוי: '$1'! עזרה: <code>$0= <i>מחרוזת ריקה</i> (ראשי)$3</code>. (ניתן להשתמש גם בשווי ערך באמצעות מילות קסם.)",
    "dpl_log_2": "שגיאה: פרמטר '$0' שגוי: '$1'! עזרה: <code>$0= <i>שם הדף המלא</i></code>. (ניתן להשתמש במילות קסם.)",
    "dpl_log_3": "שגיאה: קטגוריות רבות מדי! מקסימום: $0. עזרה: העלו את <code>DynamicPageListHooks::$maxCategoryCount</code> כדי לציין עוד קטגוריות או הגדירו <code>DynamicPageListHooks::$allowUnlimitedCategories=true</code> כדי לבטל את ההגבלה. (הגידרו את המשתנה בקובץ <code>LocalSettings.php</code>, לאחר הכללת <code>DynamicPageList.php</code>.)",
    "dpl_log_4": "שגיאה: קטגוריות מעטות מדי! מינימום: $0. עזרה: הורידו את <code>DynamicPageListHooks::$minCategoryCount</code> כדי לציין פחות קטגוריות. (הגידרו את המשתנה בקובץ <code>LocalSettings.php</code>, לאחר הכללת <code>DynamicPageList.php</code>.)",
    "dpl_log_5": "ERROR: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants",
    "dpl_log_6": "שגיאה: עליכם להכליל לפחות קטגוריה אחת אם ברצונכם להשתמש ב־'addfirstcategorydate=true' או ב־'ordermethod=categoryadd'!",
    "dpl_log_7": "שגיאה: אם אתם מכלילים יותר מקטגוריה אחת, אינכם יכולים להשתמש ב־'addfirstcategorydate=true' או ב־'ordermethod=categoryadd'!",
    "dpl_log_8": "שגיאה: אינכם יכולים להוסיף יותר מסוג אחד של תאריך בו זמנית!",
    "dpl_log_9": "?????: ????????? ?????? ??'$0' ?? 'ordermethod=[...,]$1' ????!",
    "dpl_log_10": "ERROR: the index for the dominant section must be between 1 and the number of arguments of includepage ($0 in this case)",
    "dpl_log_11": "שגיאה: לא ניתן לבצע פעולות לוגיות על דפים ללא קטגוריות (למשל, עם הפרמטר 'קטגוריה') כיוון שתצוגת $0 אינה קיימת במסד הנתונים! עזרה: מנהל מסד הנתונים צריך להריץ את השאילתה: <code>$1</code>.",
    "dpl_log_12": "ERROR: specifying \"openreferences\" is incompatible with some other option you specified. See the manual for details.",
    "dpl_log_13": "אזהרה: בוצעה התעלמות מהפרמטר הלא ידוע '$1'. עזרה: פרמטרים זמינים: <code>$2</code>.",
    "dpl_log_14": "אזהרה: פרמטר '$0' שגוי: '$1'! משתמש בברירת המחדל: '$2'. עזרה: <code>$0= $3</code>.",
    "dpl_log_15": "אזהרה: פרמטר '$0' שגוי: '$1'! משתמש בברירת המחדל: '$2' (ללא הגבלה). עזרה: <code>$0= <i>מחרוזת ריקה</i> (ללא הגבלה) | n</code>, עם <code>n</code> כמספר שלם וחיובי.",
    "dpl_log_16": "?????: ??? ??????!",
    "dpl_log_17": "אזהרה: להוספת* הפרמטרים ('adduser',‏ 'addeditdate' וכדומה) וכן ל־'includepage' אין השפעה עם 'mode=category'. ניתן לצפות רק במרחב השם או בכותרת הדף במצב זה.",
    "dpl_log_18": "אזהרה: ל־'headingmode=$0' אין השפעה עם 'ordermethod' על פריט יחיד. משתמש ב: '$1'. עזרה: באפשרותכם להשתמש בערכים של 'headingmode' שאינם $1 עם 'ordermethod' על פריטים מרובים. משתמשים בפריט הראשון לכותרת. למשל, 'ordermethod=category,<i>comp</i>' (<i>comp</i> הוא פריט אחר) לכותרות הקטגוריה.",
    "dpl_log_19": "אזהרה: 'debug=$0w הוא לא במקום הראשון ברכיב ה־DPL. הגדרות ניפוי השגיאות החדשות לא יחולו לפני שכל הפרמטרים הקודמים ינותחו וייבדקו.",
    "dpl_log_20": "אזהרה: לולאת הכללה אינסופית נוצרה בדף '$0'.",
    "dpl_log_21": "שאילתה: <code>$0</code>",
    "dpl_articlecount": "{{PLURAL:$1|ישנם $1 דפים|ישנו דף אחד}} תחת כותרת זו."
}
{
    "@metadata": {
        "authors": [
            "Kaustubh"
        ]
    },
    "intersection-desc": "एक श्रेणी या श्रेणीसमूहमें उपलब्ध नवीनतम लेख दर्शायें।",
    "intersection_toomanycats": "Error: बहुत ज्यादा श्रेणीयां!",
    "intersection_toofewcats": "Error: बहुत कम श्रेणीयां!",
    "intersection_noresults": "Error: रिज़ल्ट नहीं!",
    "intersection_noincludecats": "Error: कमसे कम एक श्रेणी या नामस्थान देना अनिवार्य हैं!"
}
{
    "@metadata": {
        "authors": [
            "Dalibor Bosits",
            "Dnik"
        ]
    },
    "intersection-desc": "Omogućava popis najnovijih stranica ili datoteka iz kategorije, ili presjeka nekoliko kategorija",
    "intersection_toomanycats": "Error: Previše kategorija!",
    "intersection_toofewcats": "Error: Premalo kategorija!",
    "intersection_noresults": "Error: Nema rezultata!",
    "intersection_noincludecats": "Error: Morate uključiti bar jednu kategoriju, ili odabrati imenski prostor!"
}
{
    "@metadata": {
        "authors": [
            "Michawiki"
        ]
    },
    "intersection-desc": "Wudaće lisćiny najaktualnišich zapiskow w jednej kategoriji abo w skupinje kategorijow",
    "intersection_toomanycats": "Error: Přewjele kategorijow!",
    "intersection_toofewcats": "Error: Přemało kategorijow!",
    "intersection_noresults": "Error: Žane wuslědki!",
    "intersection_noincludecats": "Error: Dyrbiš znajmjeńša kednu kategoriju zapřijeć abo mjenowy rum podać!"
}
{
    "@metadata": {
        "authors": [
            "Dani",
            "Gondnok",
            "KossuthRad"
        ]
    },
    "intersection-desc": "Megjeleníti egy adott kategóriában, vagy kategóriák uniójában lévő legújabb szócikkek listáját",
    "intersection_toomanycats": "Hiba: Túl sok kategória!",
    "intersection_toofewcats": "Hiba: Túl kevés kategória!",
    "intersection_noresults": "Hiba: Nincs eredmény!",
    "intersection_noincludecats": "Hiba: Legalább egy listázandó kategóriát meg kell adnod, vagy pedig egy névteret!"
}
{
    "@metadata": {
        "authors": [
            "McDutchie"
        ]
    },
    "intersection-desc": "Face un lista a punctos del elementos le plus recente in un categoria, o un union de plure categorias",
    "intersection_toomanycats": "Error: Troppo de categorias!",
    "intersection_toofewcats": "Error: Non bastante categorias!",
    "intersection_noresults": "Error: Nulle resultatos!",
    "intersection_noincludecats": "Error: Tu debe includer al minus un categoria, o specificar un spatio de nomines!"
}
{
    "@metadata": {
        "authors": [
            "IvanLanin"
        ]
    },
    "intersection-desc": "Menghasilkan suatu daftar item terbaru pada suatu kategori atau gabungan beberapa kategori",
    "intersection_toomanycats": "DynamicPageList: Terlalu banyak kategori!",
    "intersection_toofewcats": "DynamicPageList: Terlalu sedikit kategori!",
    "intersection_noresults": "DynamicPageList: Tak ada hasil yang sesuai!",
    "intersection_noincludecats": "DynamicPageList: Anda perlu mencantumkan paling tidak satu kategori, atau menyebutkan satu ruang nama!",
    "dpl_log_1": "KESALAHAN: Parameter '$0' salah: '$1'! Bantuan: <code>$0= <i>string kosong</i> (Utama)$3</code>. (Ekivalen kata kunci juga diizinkan.)",
    "dpl_log_2": "KESALAHAN: Parameter '$0' salah: '$1'! Bantuan:  <code>$0= <i>nama lengkap halaman</i></code>. (Kata kunci diizinkan.)",
    "dpl_log_3": "KESALAHAN: Kategori terlalu banyak! Maksimum: $0. Bantuan: perbesar <code>DynamicPageListHooks::$maxCategoryCount</code> untuk memberikan lebih banyak kategori atau atur  <code>DynamicPageListHooks::$allowUnlimitedCategories=true</code> untuk menghapus batasan. (Atur variabel tersebut di <code>LocalSettings.php</code>, setelah mencantumkan <code>DynamicPageList.php</code>.)",
    "dpl_log_4": "KESALAHAN: Kategori terlalu sedikit! Minimum: $0. Bantuan: kurangi <code>DynamicPageListHooks::$minCategoryCount</code> untuk mengurangi kategori. (Atur variabel tersebut di <code>LocalSettings.php</code>, setelah mencantumkan <code>DynamicPageList.php</code>.)",
    "dpl_log_5": "ERROR: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants",
    "dpl_log_6": "KESALAHAN: Anda harus memberikan paling tidak satu kategori jika menggunakan 'addfirstcategorydate=true' atau 'ordermethod=categoryadd'!",
    "dpl_log_7": "KESALAHAN: Jika Anda memberikan lebih dari satu kategori, Anda tidak dapat menggunakan 'addfirstcategorydate=true' atau 'ordermethod=categoryadd'!",
    "dpl_log_8": "KESALAHAN: Anda tidak dapat memberikan lebih dari satu jenis tanggal dalam satu waktu!",
    "dpl_log_9": "KESALAHAN: Anda dapat menggunakan '$0' hanya dengan 'ordermethod=[...,]$1'!",
    "dpl_log_10": "ERROR: the index for the dominant section must be between 1 and the number of arguments of includepage ($0 in this case)",
    "dpl_log_11": "KESALAHAN: Tidak dapat melakukan operasi logika pada halaman yang tak terkategori (misalnya dengan parameter 'kategori') karena view $0 tidak ada di basis data! Bantuan: mintalah admin basis data untuk menjalankan kueri berikut: <code>$1</code>.",
    "dpl_log_12": "ERROR: specifying \"openreferences\" is incompatible with some other option you specified. See the manual for details.",
    "dpl_log_13": "KESALAHAN: Paramater yang tak dikenal '$1' diabaikan. Bantuan: parameter yang tersedia: <code>$2</code>.",
    "dpl_log_14": "KESALAHAN: Parameter '$0' salah: '$1'! Menggunakan konfigurasi baku: '$2'. Bantuan: <code>$0= $3</code>.",
    "dpl_log_15": "KESALAHAN: Parameter '$0' salah: '$1'! Menggunakan konfigurasi baku: '$2' (tanpa limitasi). Bantuan: <code>$0= <i>string kosong</i> (tanpa limitasi) | n</code>, dengan <code>n</code> suatu bilangan positif.",
    "dpl_log_16": "KESALAHAN: Hasil tak ditemukan!",
    "dpl_log_17": "KESALAHAN: Menambahkan * parameter ('adduser', 'addeditdate', dll.)' dan 'includepage' tidak berpengaruh pada 'mode=category'. Hanya ruang nama/judul halaman yang dapat ditampilkan dengan mode ini.",
    "dpl_log_18": "KESALAHAN: 'headingmode=$0' tidak berpengaruh dengan 'ordermethod' pada suatu komponen tunggal. Menggunakan: '$1'. Bantuan: Anda dapat menggunakan nilai not-$1 'headingmode' dengan 'ordermethod' terhadap beberapa komponen. Komponen pertama digunakan sebagai judul. Misalnya 'ordermethod=category,<i>comp</i>' (<i>comp</i> adalah komponen lain) untuk judul kategori.",
    "dpl_log_19": "KESALAHAN: 'debug=$0' tidak pada posisi pertama pada elemen DPL. Aturan debug tidak diterapkan sebelum semua variabel sebelumnya telah diparsing dan dicek.",
    "dpl_log_20": "KESALAHAN: Suatu lingkaran transklusi tak hingga ditimbulkan oleh halaman '$0'.",
    "dpl_log_21": "KUERI: <code>$0</code>",
    "dpl_articlecount": "Terdapat {{PLURAL:$1|artikel|artikel}} dalam judul ini."
}
{
    "@metadata": {
        "authors": [
            "Malafaya"
        ]
    },
    "intersection_toomanycats": "Eroro: Tro multa kategorii!",
    "intersection_toofewcats": "Eroro: Tro poka kategorii!",
    "intersection_noresults": "Eroro: Nula rezultaji!",
    "intersection_noincludecats": "Eroro: Vu mustas inkluzar adminime un kategorio, o specigez nomaro!"
}
{
    "@metadata": {
        "authors": [
            "BrokenArrow",
            "Darth Kule"
        ]
    },
    "intersection-desc": "Visualizza un elenco puntato con gli elementi più recenti inseriti in una categoria o nell'unione di più categorie",
    "intersection_toomanycats": "Errore: Numero di categorie eccessivo.",
    "intersection_toofewcats": "Errore: Numero di categorie insufficiente.",
    "intersection_noresults": "Errore: Nessun risultato.",
    "intersection_noincludecats": "Errore: È necessario includere almeno una categoria oppure specificare un namespace.",
    "dpl_log_1": "ERRORE nel parametro '$0': '$1'. Suggerimento:  <code>$0= <i>stringa vuota</i> (Principale)$3</code>.",
    "dpl_log_2": "ERRORE nel parametro '$0': '$1'. Suggerimento:  <code>$0= <i>nome completo della pagina</i></code>.",
    "dpl_log_3": "ERRORE: Categorie sovrabbondanti (massimo $0). Suggerimento: aumentare il valore di <code>DynamicPageListHooks::$maxCategoryCount</code> per indicare un numero maggiore di categorie, oppure impostare <code>DynamicPageListHooks::$allowUnlimitedCategories=true</code> per non avere alcun limite. (Impostare le variabili nel file <code>LocalSettings.php</code>, dopo l'inclusione di <code>DynamicPageList.php</code>.)",
    "dpl_log_4": "ERRORE: Categorie insufficienti (minimo $0). Suggerimento: diminuire il valore di <code>DynamicPageListHooks::$minCategoryCount</code> per indicare un numero minore di categorie. (Impostare la variabile nel file <code>LocalSettings.php</code>, dopo l'inclusione di <code>DynamicPageList.php</code>.)",
    "dpl_log_5": "ERROR: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants",
    "dpl_log_6": "ERRORE: L'uso dei parametri 'addfirstcategorydate=true' e 'ordermethod=categoryadd' richiede l'inserimento di una o più categorie.",
    "dpl_log_7": "ERRORE: L'inserimento di più categorie impedisce l'uso dei parametri 'addfirstcategorydate=true' e 'ordermethod=categoryadd'.",
    "dpl_log_8": "ERRORE: Non è consentito l'uso contemporaneo di più tipi di data.",
    "dpl_log_9": "ERRORE: L'uso del parametro '$0' è consentito unicamente con 'ordermethod=[...,]$1'.",
    "dpl_log_10": "ERROR: the index for the dominant section must be between 1 and the number of arguments of includepage ($0 in this case)",
    "dpl_log_11": "ERRORE: Impossibile effettuare operazioni logiche sulle pagine prive di categoria (ad es. con il parametro 'category') in quanto il database non contiene la vista $0. Suggerimento: chiedere all'amministratore del database di eseguire la seguente query: <code>$1</code>.",
    "dpl_log_12": "ERROR: specifying \"openreferences\" is incompatible with some other option you specified. See the manual for details.",
    "dpl_log_13": "ATTENZIONE: Il parametro non riconosciuto '$1' è stato ignorato. Suggerimento: i parametri disponibili sono: <code>$2</code>.",
    "dpl_log_14": "ATTENZIONE: Errore nel parametro '$0': '$1'. È stato usato il valore predefinito '$2'. Suggerimento: <code>$0= $3</code>.",
    "dpl_log_15": "ATTENZIONE: errore nel parametro '$0': '$1'. È stato usato il valore predefinito '$2' (nessun limite). Suggerimento: <code>$0= <i>stringa vuota</i> (nessun limite) | n</code>, con <code>n</code> intero positivo.",
    "dpl_log_16": "ATTENZIONE: Nessun risultato.",
    "dpl_log_17": "ATTENZIONE: I parametri add* ('adduser', 'addeditdate', ecc.)' non hanno alcun effetto quando è specificato 'mode=category'. In tale modalità vengono visualizzati unicamente il namespace e il titolo della pagina.",
    "dpl_log_18": "ATTENZIONE: Il parametro 'headingmode=$0' non ha alcun effetto quando è specificato 'ordermethod' su un solo componente. Verrà utilizzato il valore '$1'. Suggerimento: è posibile utilizzare i valori diversi da $1 per il parametro 'headingmode' nel caso di 'ordermethod' su più componenti. Il primo componente viene usato per generare i titoli di sezione. Ad es. 'ordermethod=category,<i>comp</i>' (dove <i>comp</i> è un altro componente) per avere titoli di sezione basati sulla categoria.",
    "dpl_log_19": "ATTENZIONE: Il parametro 'debug=$0' non è il primo elemento della sezione DPL. Le nuove impostazioni di debug non verranno applicate prima di aver completato il parsing e la verifica di tutti i parametri che lo precedono.",
    "dpl_log_21": "QUERY: <code>$0</code>",
    "dpl_articlecount": "Questa sezione contiene {{PLURAL:$1|una voce|$1 voci}}."
}
{
    "@metadata": {
        "authors": [
            "Fryed-peach",
            "JtFuruhata"
        ]
    },
    "intersection-desc": "単一カテゴリ内または複数カテゴリ内において最近更新された項目を箇条書きで表示する",
    "intersection_toomanycats": "エラー: カテゴリ指定が多すぎます！",
    "intersection_toofewcats": "エラー: カテゴリ指定が少なすぎます！",
    "intersection_noresults": "エラー: 最近更新された項目はありません！",
    "intersection_noincludecats": "エラー: 1つ以上のカテゴリ、または名前空間を指定する必要があります！"
}
{
    "@metadata": {
        "authors": [
            "Huslåke"
        ]
    },
    "intersection-desc": "Outputs en bulleted liste der senestste itemer ræsidende i en klynge, æller æ unje der severæl klynger",
    "intersection_toomanycats": "Error: Åverføl klynger!",
    "intersection_toofewcats": "Error: Åverwæneg klynger!",
    "intersection_noresults": "Error: Ekke ræsultåter!",
    "intersection_noincludecats": "Error: Du nødst til inkludær til mendst en klynge, æller spæsifiær en navnerum!"
}
{
    "@metadata": {
        "authors": [
            "Meursault2004"
        ]
    },
    "intersection-desc": "Ngasilaké sawijining daftar item paling anyar ing sawijining kategori utawa gabungan sawetara kategori",
    "intersection_toomanycats": "Error: Kakèhan kategori!",
    "intersection_toofewcats": "Error: Kesithikan kategori!",
    "intersection_noresults": "Error: Ora ana pituwasé (kasilé)!",
    "intersection_noincludecats": "Error: Panjenengan perlu minimal mènèhi kategori sawiji, utawa spésifikasi bilik nama sawiji!"
}
{
    "@metadata": {
        "authors": [
            "Chhorran",
            "Thearith"
        ]
    },
    "intersection_toomanycats": "កំហុស​៖ ចំណាត់ថ្នាក់ក្រុម​ច្រើនពេក​!",
    "intersection_toofewcats": "កំហុស​៖ ចំណាត់ថ្នាក់ក្រុម​តិចពេក​!",
    "intersection_noresults": "កំហុស​៖ គ្មាន​លទ្ធផល​!",
    "intersection_noincludecats": "កំហុស​៖ អ្នក​ត្រូវតែ​មាន​ចំណាត់ថ្នាក់ក្រុម​មួយយ៉ាងតិច ឬ សំដៅ​មួយ​លំហឈ្មោះ​!"
}
{
    "@metadata": {
        "authors": [
            "Kwj2772",
            "Yknok29"
        ]
    },
    "intersection_toomanycats": "에러: 분류가 너무 많습니다!",
    "intersection_toofewcats": "에러: 분류가 너무 적습니다!",
    "intersection_noresults": "오류: 결과가 없습니다!",
    "intersection_noincludecats": "에러: 최소한 하나의 분류에 포함시켜 주시거나 이름공간을 명확히 적어 주세요!"
}
{
    "@metadata": {
        "authors": [
            "Purodha"
        ]
    },
    "intersection-desc": "Zeij_en Liß met de neuste Enndrääsch en en Saachjrupp, udder de neuste Enndrääsch, die en alle Jruppe uss_enem Knubbel fun Saachjrupp dren sin.",
    "intersection_toomanycats": "<i lang=\"en\">DynamicPageList</i> hät ene Fääler jefonge: Dat sinn_er zo vill Saachjroppe!",
    "intersection_toofewcats": "<i lang=\"en\">DynamicPageList</i> hät ene Fääler jefonge: Dat sin ze winnisch Saachjruppe!",
    "intersection_noresults": "<i lang=\"en\">DynamicPageList</i> hät ene Fääler jefonge: Do kohm nix bei erus!",
    "intersection_noincludecats": "<i lang=\"en\">DynamicPageList</i> hät ene Fääler jefonge: Mer bruch winnischßdens ein Saachjrupp. Söns jivv e Appachtemang aan!"
}
{
    "@metadata": {
        "authors": [
            "Robby"
        ]
    },
    "intersection-desc": "Generéiert eng Lëscht mat de rezentesten Androungen an eng Kategorie, oder an eng Intersektioun vu méi Kategorien",
    "intersection_toomanycats": "Dynamesch Säite-Lëscht: Zevill Kategorien!",
    "intersection_toofewcats": "Dynamesch Säite-Lëscht: Ze wéineg Kategorien!",
    "intersection_noresults": "Dynamesch Säite-Lëscht: Kee Resultat!",
    "intersection_noincludecats": "Dynamesch Säite-Lëscht: Dir musst mindestens eng Kategorie abannen, oder de Nummraum uginn!"
}
{
    "@metadata": {
        "authors": [
            "Matthias"
        ]
    },
    "intersection-desc": "Geeft als uitvoer een ongenummerde lijst met de meest recent toegevoegde items in een categorie, of een combinatie van categorieë",
    "intersection_toomanycats": "Error: Te veel categorieë!",
    "intersection_toofewcats": "Error: Te weinig categorieë!",
    "intersection_noresults": "Error: Gein resultate!",
    "intersection_noincludecats": "Error: U moet tenminste een categorie of een naamruimte opgeve!"
}
{
    "@metadata": {
        "authors": [
            "Matasg"
        ]
    },
    "intersection_toomanycats": "Error: Per daug kategorijų!",
    "intersection_toofewcats": "Error: Per mažai kategorijų!",
    "intersection_noresults": "Error: Nėra rezultatų!",
    "intersection_noincludecats": "Error: Jums reikia įtraukti bent vieną kategoriją, arba nurodyti vardų sritį!"
}
{
    "@metadata": {
        "authors": [
            "Xil"
        ]
    },
    "intersection_toomanycats": "Kļūda: pārāk daudz kategoriju!",
    "intersection_toofewcats": "Kļūda: pārāk maz kategoriju!"
}
{
    "@metadata": {
        "authors": [
            "Jagwar"
        ]
    },
    "intersection_toomanycats": "DynamicPageList : Be laotra ny sokajy"
}
{
    "@metadata": {
        "authors": [
            "Shijualex"
        ]
    },
    "intersection-desc": "ഒരു കാറ്റഗറിയില്‍ പുതിയതായി വന്ന ഇനങ്ങളുടെ ബുള്ളറ്റ് പട്ടികയോ, അല്ലെങ്കില്‍ നിരവധി കാറ്റഗറികളുടെ കൂട്ടത്തെയോ ഔട്ട് പുട്ടായി കിട്ടുന്നു.",
    "intersection_toomanycats": "Error: വളരെയധികം കാറ്റഗറികള്‍!",
    "intersection_toofewcats": "Error: വളരെ കുറച്ച് കാറ്റഗറികള്‍!",
    "intersection_noresults": "Error: ഫലങ്ങള്‍ ഒന്നുമില്ല!",
    "intersection_noincludecats": "Error: ചുരുങ്ങിയത് ഒരു കാറ്റഗറിയെങ്കിലും ഉള്‍പ്പെടുത്തുകയോ അല്ലെങ്കില്‍ ഒരു നേംസ്പേസ് എങ്കിലും നിഷ്കര്‍ഷിച്ചിരിക്കുകയോ വേണം!"
}
{
    "@metadata": {
        "authors": [
            "Kaustubh"
        ]
    },
    "intersection-desc": "एखाद्या वर्गातील अथवा वर्गसमूहातील नवीनतम लेख दर्शवितो.",
    "intersection_toomanycats": "Error: खूप जास्त वर्ग!",
    "intersection_toofewcats": "Error: खूप कमी वर्ग!",
    "intersection_noresults": "Error: निकाल नाहीत!",
    "intersection_noincludecats": "Error: कमीतकमी एक वर्ग अथवा नामविश्व देणे गरजेचे आहे!"
}
{
    "@metadata": {
        "authors": [
            "Aviator"
        ]
    },
    "intersection-desc": "Mengoutput senarai item terkini dalam sesebuah kategori atau kesatuan beberapa buah kategori",
    "intersection_toomanycats": "Error: Kategori terlalu banyak!",
    "intersection_toofewcats": "Error: Kategori terlalu sedikit!",
    "intersection_noresults": "Error: Tiada hasil!",
    "intersection_noincludecats": "Error: Anda hendaklah memasukkan sekurang-kurangnya sebuah kategori atau menyatakan sebuah ruang nama!"
}
{
    "@metadata": {
        "authors": [
            "Jon Harald Søby"
        ]
    },
    "intersection-desc": "Gir en punktliste over de nyeste elementene i en kategori, eller elementer som er felles i flere kategorier",
    "intersection_toomanycats": "Dynamisk sideliste: For mange kategorier!",
    "intersection_toofewcats": "Dynamisk sidelist: For få kategorier!",
    "intersection_noresults": "Dynamisk sideliste: Ingen resultater!",
    "intersection_noincludecats": "Dynamisk sideliste: Du må inkludere minst én kategori, eller oppgi et navnerom!"
}
{
    "@metadata": {
        "authors": [
            "Slomox"
        ]
    },
    "intersection-desc": "Wiest en List mit de aktuellsten Indrääg in en Kategorie, oder de Snittmengd vun mehr Kategorien",
    "intersection_toomanycats": "Fehler: Toveel Kategorien!",
    "intersection_toofewcats": "Fehler: To wenig Kategorien!",
    "intersection_noresults": "Fehler: Nix funnen!",
    "intersection_noincludecats": "Fehler: Dor mutt opminnst een Kategorie angeven warrn! ODer geev en Naamruum an."
}
{
    "@metadata": {
        "authors": [
            "SPQRobin",
            "Siebrand"
        ]
    },
    "intersection-desc": "Geeft als uitvoer een ongenummerde lijst met de meest recent toegevoegde items in een categorie, of een combinatie van categorieën",
    "intersection_toomanycats": "Fout: Te veel categorieën!",
    "intersection_toofewcats": "Fout: Te weinig categorieën!",
    "intersection_noresults": "Fout: Geen resultaten!",
    "intersection_noincludecats": "Fout: U moet tenminste een categorie of een naamruimte opgeven!",
    "dpl_log_1": "FOUT: Verkeerde parameter '$0': '$1'! Hulp:  <code>$0= <i>lege string</i> (Main)$3</code>.",
    "dpl_log_2": "FOUT: Te veel categoriën! Maximum: $0. Hulp: verhoog <code>DynamicPageListHooks::$maxCategoryCount</code> om meer categorieën op te kunnen geven of stel geen limiet in met <code>DynamicPageListHooks::$allowUnlimitedCategories=true</code>. (Neem deze variabele op in <code>LocalSettings.php</code>, na het toevoegen van <code>DynamicPageList.php</code>.)",
    "dpl_log_3": "FOUT: Te weinig categorieën! Minimum: $0. Hulp: verlaag <code>DynamicPageListHooks::$minCategoryCount</code> om minder categorieën aan te hoeven geven. (Stel de variabele bij voorkeur in via <code>LocalSettings.php</code>, na het toevoegen van <code>DynamicPageList.php</code>.)",
    "dpl_log_4": "ERROR: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants",
    "dpl_log_5": "FOUT: U dient tenminste één categorie op te nemen als u 'addfirstcategorydate=true' of 'ordermethod=categoryadd' wilt gebruiken!",
    "dpl_log_6": "FOUT: Als u meer dan één categorie opneemt, kunt u 'addfirstcategorydate=true' of 'ordermethod=categoryadd' niet gebruiken!",
    "dpl_log_8": "FOUT: U kunt niet meer dan één type of datum tegelijk gebruiken!",
    "dpl_log_9": "FOUT: U kunt '$0' alleen met 'ordermethod=[...,]$1' gebruiken!",
    "dpl_log_10": "ERROR: the index for the dominant section must be between 1 and the number of arguments of includepage ($0 in this case)",
    "dpl_log_12": "ERROR: specifying \"openreferences\" is incompatible with some other option you specified. See the manual for details.",
    "dpl_log_14": "WAARSCHUWING: Verkeerde parameter '$0': '$1'! Nu wordt de standaard gebruikt: '$2'. Hulp: <code>$0= $3</code>.",
    "dpl_log_16": "WAARSCHUWING: Geen resultaten!",
    "dpl_log_17": "WAARSCHUWING: Add* parameters ('adduser', 'addeditdate', etc.)' heeft geen effect bij 'mode=category'. Alleen de paginanaamruimte/titel is in deze modus te bekijken.",
    "dpl_log_18": "WAARSCHUWING: 'headingmode=$0' heeft geen effect met 'ordermethod' op een enkele component. Nu wordt gebruikt: '$1'. Hulp: u kunt een niet-$1 'headingmode'-waarde gebruiken met 'ordermethod' op meerdere componenten. De eerste component wordt gebruikt als kop. Bijvoorbeeld 'ordermethod=category,<i>comp</i>' (<i>comp</i> is een ander component) voor categoriekoppen.",
    "dpl_log_19": "WAARSCHUWING: 'debug=$0' is niet de eerste positie in het DPL-element. De nieuwe debuginstellingen zijn niet toegepast voor alle voorgaande parameters zijn verwerkt en gecontroleerd.",
    "dpl_log_21": "QUERY: <code>$0</code>",
    "dpl_articlecount": "Er {{PLURAL:$1|is één pagina|zijn $1 pagina's}} onder deze kop."
}
{
    "@metadata": {
        "authors": [
            "Harald Khan"
        ]
    },
    "intersection-desc": "Gjev ei punktlista over dei nyaste elementa i ein kategori, eller element som er felles i fleire kategoriar",
    "intersection_toomanycats": "Feil: For mange kategoriar!",
    "intersection_toofewcats": "Feil: For få kategoriar!",
    "intersection_noresults": "Feil: Ingen resultat!",
    "intersection_noincludecats": "Feil: Du må inkludera minst éin kategori, eller oppgje eit namnerom!"
}
{
    "@metadata": {
        "authors": [
            "Cedric31"
        ]
    },
    "intersection-desc": "Aficha una lista, amb de piuses, dels articles mai recents dins una categoria, o a partir d’una combinason de mantuna categoria.",
    "intersection_toomanycats": "Error : Tròp de categorias !",
    "intersection_toofewcats": "Error : Pas pro de categorias !",
    "intersection_noresults": "Error : Pas cap de resultat !",
    "intersection_noincludecats": "Error : avètz besonh d’inclure almens una categoria, o de precisar un nom d’espaci !"
}
{
    "@metadata": {
        "authors": [
            "Amikeco"
        ]
    },
    "intersection_toomanycats": "Рæдыд: æгæр бирæ категоритæ!"
}
{
    "@metadata": {
        "authors": [
            "Sp5uhe",
            "Rail",
            "Frisk"
        ]
    },
    "intersection-desc": "Zwraca listę wypunktowaną najnowszych elementów w kategorii lub grupie kilku kategorii",
    "intersection_toomanycats": "Błąd – zbyt wiele kategorii!",
    "intersection_toofewcats": "Błąd – zbyt mało kategorii!",
    "intersection_noresults": "Błąd – brak wyników!",
    "intersection_noincludecats": "Błąd – musisz załączyć co najmniej jedną kategorię lub określić przestrzeń nazw!",
    "dpl-desc": "Wysoce elastyczny generator raportów w MediaWiki",
    "dpl_log_1": "Błąd – Błędny parametr „$1”: „$2”! Pomoc: <code>$1= <i>empty string</i> (Main)$3</code>.",
    "dpl_log_2": "Błąd – Błędny parametr „$1”: „$2”! Pomoc: <code>$1= <i>full pagename</i></code>.",
    "dpl_log_3": "Błąd – zbyt wiele kategorii! Maksymalnie $1. Pomoc: zwiększ wartość <code>$wgDplSettings['maxCategoryCount']</code> aby określić więcej kategorii lub ustaw <code>$wgDplSettings['allowUnlimitedCategories'] = true;</code> w celu wyłączeniu limitu (ustaw zmienną w pliku konfiguracyjnym <code>LocalSettings.php</code> wiki).",
    "dpl_log_4": "Błąd – zbyt mało kategorii! Minimalnie $1. Pomoc: zmniejsz wartość decrease <code>$wgDplSettings['minCategoryCount']</code> aby określić mniej kategorii (ustaw zmienną w pliku konfiguracyjnym <code>LocalSettings.php</code> wiki).",
    "dpl_log_5": "Błąd – nie odnaleziono kryteriów wyboru! Musisz użyć przynajmniej jednego z poniższych parametrów: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby lub ich wariantów „not”.",
    "dpl_log_6": "Błąd – musisz wybrać przynajmniej jedną kategorię aby użyć „addfirstcategorydate=true” lub „ordermethod=categoryadd”.",
    "dpl_log_7": "Błąd – nie możesz użyć „addfirstcategorydate=true” lub „ordermethod=categoryadd” jeśli podasz więcej niż jedną kategorię.",
    "dpl_log_8": "Błąd – można dodać tylko jeden typ daty na raz.",
    "dpl_log_9": "Błąd – parametr „$1” musi być używany wraz z „ordermethod=[ $2 ]”.",
    "dpl_log_10": "Błąd – indeksem dominującej sekcji musi być liczba pomiędzy 1 a liczbą argumentów parametru „includepage” ($0 w tym przypadku).",
    "dpl_log_11": "Błąd – nie można wykonywać logicznych operacji na nieskategoryzowanych stronach (np. z parametrem „category”), ponieważ podgląd $0 nie istnieje w bazie danych! Pomoc: administrator bazy danych musi wykonać to zapytanie: <code>$1</code>.",
    "dpl_log_12": "Błąd – podawanie parametru „openreferences” jest niekompatybilne z inną podaną opcją. Usuń proszę tę inną opcję lub „openreferences”. Zobacz poradnik aby dowiedzieć się więcej.",
    "dpl_log_13": "Ostrzeżenie – nieznany parametr „$1” został zignorowany. Pomoc: dostępne parametry – <code>$2</code>.",
    "dpl_log_14": "Ostrzeżenie – pominięto złą opcję „$2” dla parametru „$1”.",
    "dpl_log_15": "Ostrzeżenie – zły parametr „$1”: „$2”! Użyto domyślnego – „$3” (brak limitu). Pomoc: <code>$1= <i>empty string</i> (no limit) | n</code> z <code>n</code> jako liczbą dodatnią.",
    "dpl_log_16": "Ostrzeżenie – brak wyników.",
    "dpl_log_17": "Ostrzeżenie – podane parametry („adduser”, „addeditdate”, itd.) oraz „includepage” nie przyniosą zamierzonego efektu wraz z „mode=category”. W tym trybie widać tylko tytuł oraz przestrzeń nazw strony.",
    "dpl_log_18": "Ostrzeżenie – „headingmode=$1” nie przyniesie zamierzonego efektu z „ordermethod” na pojedynczym komponencie. Użyto „$2”. Pomoc: możesz użyć wartości innych niż $2 dla „headingmode” na wielu komponentach. Pierwszy komponent jest używany w nagłówkach. Np. „ordermethod=category,<i>comp</i>” (gdzie <i>comp</i> jest kolejnym komponentem) dla nagłówków kategorii.",
    "dpl_log_19": "Ostrzeżenie – „debug=$1” nie jest w pierwszej pozycji w elemencie DPL. Nowe ustawienia debugowania nie są aplikowane przed sprawdzeniem i sparsowaniem wszystkich poprzednich parametrów.",
    "dpl_log_20": "Ostrzeżenie – strona „$0” tworzy nieskończoną pętlę transkluzji.",
    "dpl_log_21": "Zapytanie – <code>$0</code>",
    "dpl_log_22": "Ostrzeżenie – nie podano opcji parametru dla „$1” (brakujący znak „=”).",
    "dpl_articlecount": "W tym nagłówku {{PLURAL:$1|znajduje się jeden artykuł|znajdują się $1 artykuły|znajduje się $1 artykułów}}.",
    "dpl_description": "Wysoce elastyczny generator raportów w MediaWiki. Zobacz http://semeb.com/dpldemo po poradnik i przykłady",
    "action-dpl_param_update_rules": "używania parametru „updaterules”",
    "action-dpl_param_delete_rules": "używania parametru „deleterules”",
    "dpl_query_error": "Rozszerzenie DPL (wersja $1) wyprodukowało wyrażenie SQL które doprowadziło do błędu bazy danych.<br />Powodem może być wewnętrzny błąd DPL lub problem spowodowany przez Ciebie; szczególnie podczas używania takich parametrów jak „categoryregexp” lub „titleregexp”. Używanie wzorców dopasowywania takich jak *? nie jest wspierane.<br />Komunikat błędu:<br /><code>$2</code>",
    "dpl-tag-tracking-category": "Strony używające znacznika parsera DynamicPageList",
    "dpl-intersection-tracking-category": "Strony używające znacznika parsera DynamicPageList Intersection",
    "dpl-parserfunc-tracking-category": "Strony używające funkcji parsera DynamicPageList",
    "dplnum-parserfunc-tracking-category": "Strony używające funkcji parsera DynamicPageList dplnum",
    "dplvar-parserfunc-tracking-category": "Strony używające funkcji parsera DynamicPageList dplvar",
    "dplreplace-parserfunc-tracking-category": "Strony używające funkcji parsera DynamicPageList dplreplace",
    "dplchapter-parserfunc-tracking-category": "Strony używające funkcji parsera DynamicPageList dplchapter",
    "dplmatrix-parserfunc-tracking-category": "Strony używające funkcji parsera DynamicPageList dplmatrix",
    "right-dpl_param_delete_rules": "Masowe usuwanie stron używających DPL",
    "right-dpl_param_update_rules": "Masowe aktualizowanie stron używających DPL"
}
{
    "@metadata": {
        "authors": [
            "Eduardo.mps"
        ]
    },
    "intersection-desc": "Exibe uma lista pontuada dos itens mais recentes presentes numa categoria, ou uma intersecção de várias categorias",
    "intersection_toomanycats": "Erro: Categorias demais!",
    "intersection_toofewcats": "Erro: Poucas categorias!",
    "intersection_noresults": "Erro: Sem resultados!",
    "intersection_noincludecats": "Erro: É necessário incluir no mínimo uma categoria ou especificar um espaço nominal!"
}
{
    "@metadata": {
        "authors": [
            "555",
            "Malafaya"
        ]
    },
    "intersection-desc": "constrói uma lista pontuada dos itens mais recentes presentes numa categoria, ou uma união de várias categorias",
    "intersection_toomanycats": "Error: Categorias em excesso!",
    "intersection_toofewcats": "Error: Poucas categorias!",
    "intersection_noresults": "Error: Sem resultados!",
    "intersection_noincludecats": "Error: É necessário incluir no mínimo uma categoria ou especificar um espaço nominal!"
}
{
    "@metadata": {
        "authors": [
            "Purodha"
        ]
    },
    "intersection-desc": "{{desc}}"
}
{
    "@metadata": {
        "authors": [
            "Mihai"
        ]
    },
    "intersection-desc": "Întoarce o lista celor mai recenţi itemi care fac parte dintr-o categorie, sau intersecţia a mai multor categorii",
    "intersection_toomanycats": "Eroare: Prea multe categorii!",
    "intersection_toofewcats": "Eroare: Prea puţine categorii!",
    "intersection_noresults": "Eroare: Niciun rezultat!",
    "intersection_noincludecats": "Eroare: Trebuie să incluzi cel puţin o categorie, sau să specifici un spaţiu de nume!"
}
{
    "@metadata": {
        "authors": [
            "Joetaras"
        ]
    },
    "intersection-desc": "Fa assè 'na liste cu le palle de le urteme urteme artichele ca stonne jndr'à 'na categorije, o 'n'interseziona de cchiù categorije",
    "intersection_toomanycats": "Errore: Troppe categorije!",
    "intersection_toofewcats": "Errore: Troppe picche categorije!",
    "intersection_noresults": "Errore: Nisciune resultete!",
    "intersection_noincludecats": "Errore: Tu è abbesogne de 'ngludere ninde ninde 'na categorije, o specificà 'nu namespace!"
}
{
    "@metadata": {
        "authors": [
            "Александр Сигачёв"
        ]
    },
    "intersection-desc": "Выводит в маркированный список последние добавления в категорию или объединение нескольких категорий",
    "intersection_toomanycats": "Error: слишком много категорий!",
    "intersection_toofewcats": "Error: слишком мало категорий!",
    "intersection_noresults": "Error: нет результатов!",
    "intersection_noincludecats": "Error: вы должны включить хотя бы одну категорию или указать пространство имён!",
    "dpl_log_1": "ОШИБКА: неправильный «$0»-параметр: «$1»! Подсказка:  <code>$0= <i>пустая строка</i> (Основное)$3</code>.",
    "dpl_log_3": "ОШИБКА: слишком много категорий! Максимум: $0. Подсказка: увеличте <code>DynamicPageListHooks::$maxCategoryCount</code> чтобы разрешить больше категорий или установите <code>DynamicPageListHooks::$allowUnlimitedCategories=true</code> для снятия ограничения. (Устанавливайте переменные в <code>LocalSettings.php</code>, после подключения <code>DynamicPageList.php</code>.)",
    "dpl_log_4": "ОШИБКА: слишком мало категорий! Минимум: $0. Подсказка: уменьшите <code>DynamicPageListHooks::$minCategoryCount</code> чтобы разрешить меньше категорий. (Устанавливайте переменную в <code>LocalSettings.php</code>, после подключения <code>DynamicPageList.php</code>.)",
    "dpl_log_5": "ERROR: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants",
    "dpl_log_6": "ОШИБКА: вы должны включить хотя бы одну категорию, если вы хотите использовать «addfirstcategorydate=true» или «ordermethod=categoryadd»!",
    "dpl_log_7": "ОШИБКА: если вы включаете больше одной категории, то вы не можете использовать «addfirstcategorydate=true» или «ordermethod=categoryadd»!",
    "dpl_log_8": "ОШИБКА: вы не можете добавить более одного типа данных за раз!",
    "dpl_log_9": "ОШИБКА: вы можете использовать «$0» только с «ordermethod=[...,]$1»!",
    "dpl_log_10": "ERROR: the index for the dominant section must be between 1 and the number of arguments of includepage ($0 in this case)",
    "dpl_log_12": "ERROR: specifying \"openreferences\" is incompatible with some other option you specified. See the manual for details.",
    "dpl_log_13": "ПРЕДУПРЕЖДЕНИЕ: неизвестный параметр «$1» проигнорирован. Подсказка: доступные параметры: <code>$2</code>.",
    "dpl_log_14": "ПРЕДУПРЕЖДЕНИЕ: неправильный параметр «$0»: «$1»! Использование параметра по умолчанию: «$2». Подсказка: <code>$0= $3</code>.",
    "dpl_log_15": "ПРЕДУПРЕЖДЕНИЕ: неправильный параметр «$0»: «$1»! Использование параметра по умолчанию: «$2» (без ограничений). Подсказка: <code>$0= <i>пустая строка</i> (без ограничений) | n</code>, с <code>n</code> равным положительному целому числу.",
    "dpl_log_16": "ПРЕДУПРЕЖДЕНИЕ: не найдено!",
    "dpl_log_17": "ПРЕДУПРЕЖДЕНИЕ: Добавление* параметров («adduser», «addeditdate», и др.) не действительны с «mode=category». Только пространства имён или названия могут просматриваться в этом режиме.",
    "dpl_log_18": "ПРЕДУПРЕЖДЕНИЕ: «headingmode=$0» не действителен с «ordermethod» в одном компоненте. Использование: «$1». Подсказка: вы можете использоватьe не-$1 «headingmode» значения с «ordermethod» во множестве компонентов. Первый компонент используется для заголовков. Например, «ordermethod=category,<i>comp</i>» (<i>comp</i> является другим компонентом) для заголовков категорий.",
    "dpl_log_19": "ПРЕДУПРЕЖДЕНИЕ: «debug=$0» не находится на первом месте в DPL-элементе. Новые настройки отладки не будут применены пока все предыдущие параметры не будут разобраны и проверены.",
    "dpl_log_21": "ЗАПРОС: <code>$0</code>",
    "dpl_articlecount": "В этом заголовке $1 {{PLURAL:$1|статья|статьи|статей}}."
}
{
    "@metadata": {
        "authors": [
            "HalanTul"
        ]
    },
    "intersection-desc": "Категорияларга бүтэһик эбиилэри эбэтэр категориялар холбонууларын бэлиэлээх (маркированнай) испииһэк курдук таһаарар",
    "intersection_toomanycats": "Error: категорийата наһаа элбэх!",
    "intersection_toofewcats": "Error: Категорията наһаа аҕыйах",
    "intersection_noresults": "Error: Түмүк суох!",
    "intersection_noincludecats": "Error: Биир эмит категорияны эбэтэр ааты (пространство имен) талыахтааххын!"
}
{
    "@metadata": {
        "authors": [
            "Helix84"
        ]
    },
    "intersection-desc": "Vypíše zoznam najnovších položiek v kategórii alebo zjednotení niekoľkých kategórií",
    "intersection_toomanycats": "Error: Príliš veľa kategórií!",
    "intersection_toofewcats": "Error: Príliš málo kategórií!",
    "intersection_noresults": "Error: Žiadne výsledky!",
    "intersection_noincludecats": "Error: Musíte uviesť aspoň jednu kategóriu alebo menný priestor!",
    "dpl_log_1": "CHYBA: nesprávny parameter '$0': '$1'! Pomocník <code>$0= <i>prázdny retazec</i> (Hlavný)$3<code>.",
    "dpl_log_2": "CHYBA: Zlý parameter '$0': '$1'! Pomocník <code>$0= <i>plný názov stránky</i></code>.",
    "dpl_log_3": "CHYBA: Príli vela kategórií! Maximum: $0. Pomocník: zväcite <code>DynamicPageListHooks::$maxCategoryCount</code>, aby ste mohli pecifikovat viac kategórií alebo nastavte <code>DynamicPageListHooks::$allowUnlimitedCategories=true</code> pre vypnutie limitu. (Premennú nastatavte v <code>LocalSettings.php</code>, potom ako bol includovaný <code>DynamicPageList.php</code>.)",
    "dpl_log_4": "CHYBA: Príli málo kategórií! Minimum: $0. Pomocník: zníte <code>DynamicPageListHooks::$minCategoryCount</code>, aby ste mohli pecifikovat menej kategórií. (Premennú nastavte najlepie v <code>LocalSettings.php</code> potom, ako v nom bol includovaný <code>DynamicPageList.php</code>.)",
    "dpl_log_5": "ERROR: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants",
    "dpl_log_6": "CHYBA: Musíte uviest aspon jednu kategóriu ak chcete pouit 'addfirstcategorydate=true' alebo 'ordermethod=categoryadd'!",
    "dpl_log_7": "CHYBA: Ak zahrniete viac ako jednu kategóriu, nemôete pouit 'addfirstcategorydate=true' alebo 'ordermethod=categoryadd'!",
    "dpl_log_8": "CHYBA: Nemôete naraz pridat viac ako jeden typ dátumu!",
    "dpl_log_9": "CHYBA: '$0' môete pouit iba s 'ordermethod=[...,]$1'!",
    "dpl_log_10": "ERROR: the index for the dominant section must be between 1 and the number of arguments of includepage ($0 in this case)",
    "dpl_log_11": "CHYBA: Nie je momoné vykonávat logické operácie na nekategorizovaných kategóriách (napr. s parametrom 'Kategória') lebo neexistuje na databázu pohlad $0! Pomocník: nech admin databázy vykoná tento dotaz: <code>$1</code>.",
    "dpl_log_12": "ERROR: specifying \"openreferences\" is incompatible with some other option you specified. See the manual for details.",
    "dpl_log_13": "VAROVANIE: Neznámy parameter '$1' ignorovaný. Pomocník: dostupné parametre: <code>$2</code>.",
    "dpl_log_14": "VAROVANIE: Nesprávny '$0' parameter: '$1'! Pouívam tandardný '$2'. Pomocník: <code>$0= $3</code>.",
    "dpl_log_15": "VAROVANIE: Nesprávny parameter  '$0': '$1'! Pouívam tandardný: '$2' (bez obmedzenia). Pomocník: <code>$0= <i>prázdny retazec</i> (bez obmedzenia) | n</code>, s kladným celým císlom <code>n</code>.",
    "dpl_log_16": "VAROVANIE: No results!",
    "dpl_log_17": "VAROVANIE: Parametre Add* ('adduser', 'addeditdate', atd' nepracujú s mode=category'. V tomto reime je moné prehliadat iba menná priestor/titulok stránky.",
    "dpl_log_18": "VAROVANIE: 'headingmode=$0' nepracuje s 'ordermethod' na jednom komponente. Pouitie: '$1'. Pomocník: môete pouit not-$1 hodnoty 'headingmode' s 'ordermethod' na viaceré komponenty. Prvý komponent sa pouíva na nadpisy. Napr. 'ordermethod=category,<i>comp</i>' (<i>comp</i> je iný komponent) pre nadpisy kategórií.",
    "dpl_log_19": "VAROVANIE: 'debug=$0' nie je na prvej pozícii v prvku DPL. Nové ladiacie nastavenia nebudú pouíté skôr ne budú parsované a skontrolované vetky predchádzajúce.",
    "dpl_log_21": "DOTAZ: <code>$0</code>",
    "dpl_articlecount": "V tomto nadpise {{PLURAL:$1|je jeden clánok|sú $1 clánky|je $1 clánkov}}."
}
{
    "@metadata": {
        "authors": [
            "Millosh"
        ]
    },
    "intersection-desc": "Даје редни списак најскорије додатих чланака у једну или више категорија.",
    "intersection_toomanycats": "Грешка: Превише категорија!",
    "intersection_toofewcats": "Грешка:Премало категорија!",
    "intersection_noresults": "Грешка: Нема резулатата!",
    "intersection_noincludecats": "Грешка: Потребно је укључити бар једну категорију или одредити именски простор!",
    "dpl_log_1": "ГРЕШКА: Погреан '$0' параметар: '$1'! Помоћ:  <code>$0= <i>погрешан стринг</i> (Главно)$3</code>. (Еквиваленти са магичним речима су такође дозвољени.)",
    "dpl_log_2": "ГРЕШКА: Погрешан '$0' параметар: '$1'! Помоћ:  <code>$0= <i>пуно име странице</i></code>. (Магичне речи су дозвољене.)",
    "dpl_log_3": "ГРЕШКА: Превише категорија! Максимум је: $0. Помоћ: повећајте <code>DynamicPageListHooks::$maxCategoryCount</code> како бисте поставили више категорија или промените <code>DynamicPageListHooks::$allowUnlimitedCategories=true</code> за без граница. (Подесите варијаблу у <code>LocalSettings.php</code>, након укључивања <code>DynamicPageList.php</code>.)",
    "dpl_log_4": "ГРЕШКА: Премало категорија! Минимум је: $0. Помоћ: повећајте <code>DynamicPageListHooks::$minCategoryCount</code> како бисте поставили мање категорија. (Подесите варијаблу у <code>LocalSettings.php</code>, након укључивања <code>DynamicPageList.php</code>.)",
    "dpl_log_5": "ERROR: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants",
    "dpl_log_6": "ГРЕШКА: Морате укључити бар једну категорију уколико желите да користите 'addfirstcategorydate=true' или 'ordermethod=categoryadd'!",
    "dpl_log_7": "ГРЕШКА: Уколико укључујете више од једне категорије, не можете користити 'addfirstcategorydate=true' или 'ordermethod=categoryadd'!",
    "dpl_log_8": "ГРЕШКА: Не можете додати више од једног типа датума!",
    "dpl_log_9": "ГРЕШКА: Можете користити '$0' са 'ordermethod=[...,]$1' искључиво!",
    "dpl_log_10": "ГРЕШКА: Немогуће извршити операцију на некатегоризованим страницама (нпр. са 'category' параметром) зато што $0 преглед не постоји у бази података! Помоћ: нека администратор базе изврши овај упит: <code>$1</code>.",
    "dpl_log_11": "ERROR: Cannot perform logical operations on the Uncategorized pages (f.e. with the 'category' parameter) because the $0 view does not exist on the database! Help: have the database administrator execute this query: <code>$1</code>.",
    "dpl_log_12": "ERROR: specifying \"openreferences\" is incompatible with some other option you specified. See the manual for details.",
    "dpl_log_13": "ПАЖЊА: Непознат параметар '$1' је игнорисан. Помоћ: доступни параметри су: <code>$2</code>.",
    "dpl_log_14": "ПАЖЊА: Погрешан '$0' параметар: '$1'! Користи се основни: '$2'. Помоћ: <code>$0= $3</code>.",
    "dpl_log_15": "ПАЖЊА: Погрешан '$0' параметар: '$1'! Користи се основни: '$2' (без границе). Помоћ: <code>$0= <i>празан стринг</i> (без границе) | n</code>, с <code>n</code> је позитиван интегер.",
    "dpl_log_16": "ПАЖЊА: Нема резултата!",
    "dpl_log_17": "ПАЖЊА: Додавање* параметара ('adduser', 'addeditdate', итд.)' и 'includepage' нема ефекта са 'mode=category'. Искључиво име странице/именски простор могу да се виде у овом моду.",
    "dpl_log_18": "ПАЖЊА: 'headingmode=$0' нема ефекта са 'ordermethod' на једној компоненти. Користи се: '$1'. Помоћ: не морате користити-$1 'headingmode' податке 'ordermethod' на више компоненти. Прва компонента се користи за наслов. Нпр. 'ordermethod=category,<i>компонента</i>' (<i>компонента</i> је друга компонента) за наслове категорија.",
    "dpl_log_29": "ПАЖЊА: 'debug=$0' није на првом месту у DPL елементу. Нова дебаг подешавања нису примењена пре свих параметара који су проверени",
    "dpl_log_20": "ПАЖЊА: Бесконачна петљаса странице '$0'.",
    "dpl_log_21": "УПИТ: <code>$0</code>",
    "dpl_articlecount": "У овом наслову се тренутно налази {{PLURAL:$1|један чланак|$1 чланка|$1 чланака}}."
}
{
    "@metadata": {
        "authors": [
            "Millosh"
        ]
    },
    "dpl_log_1": "GREŠKA: Pogrean '$0' parametar: '$1'! Pomoć:  <code>$0= <i>pogrešan string</i> (Glavno)$3</code>. (Ekvivalenti sa magičnim rečima su takođe dozvoljeni.)",
    "dpl_log_2": "GREŠKA: Pogrešan '$0' parametar: '$1'! Pomoć:  <code>$0= <i>puno ime stranice</i></code>. (Magične reči su dozvoljene.)",
    "dpl_log_3": "GREŠKA: Previše kategorija! Maksimum je: $0. Pomoć: povećajte <code>DynamicPageListHooks::$maxCategoryCount</code> kako biste postavili više kategorija ili promenite <code>DynamicPageListHooks::$allowUnlimitedCategories=true</code> za bez granica. (Podesite varijablu u <code>LocalSettings.php</code>, nakon uključivanja <code>DynamicPageList.php</code>.)",
    "dpl_log_4": "GREŠKA: Premalo kategorija! Minimum je: $0. Pomoć: povećajte <code>DynamicPageListHooks::$minCategoryCount</code> kako biste postavili manje kategorija. (Podesite varijablu u <code>LocalSettings.php</code>, nakon uključivanja <code>DynamicPageList.php</code>.)",
    "dpl_log_5": "ERROR: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants",
    "dpl_log_6": "GREŠKA: Morate uključiti bar jednu kategoriju ukoliko želite da koristite 'addfirstcategorydate=true' ili 'ordermethod=categoryadd'!",
    "dpl_log_7": "GREŠKA: Ukoliko uključujete više od jedne kategorije, ne možete koristiti 'addfirstcategorydate=true' ili 'ordermethod=categoryadd'!",
    "dpl_log_8": "GREŠKA: Ne možete dodati više od jednog tipa datuma!",
    "dpl_log_9": "GREŠKA: Možete koristiti '$0' sa 'ordermethod=[...,]$1' isključivo!",
    "dpl_log_10": "ERROR: the index for the dominant section must be between 1 and the number of arguments of includepage ($0 in this case)",
    "dpl_log_11": "GREŠKA: Nemoguće izvršiti operaciju na nekategorizovanim stranicama (npr. sa 'category' parametrom) zato što $0 pregled ne postoji u bazi podataka! Pomoć: neka administrator baze izvrši ovaj upit: <code>$1</code>.",
    "dpl_log_12": "ERROR: specifying \"openreferences\" is incompatible with some other option you specified. See the manual for details.",
    "dpl_log_13": "PAŽNJA: Nepoznat parametar '$1' je ignorisan. Pomoć: dostupni parametri su: <code>$2</code>.",
    "dpl_log_14": "PAŽNJA: Pogrešan '$0' parametar: '$1'! Koristi se osnovni: '$2'. Pomoć: <code>$0= $3</code>.",
    "dpl_log_15": "PAŽNJA: Pogrešan '$0' parametar: '$1'! Koristi se osnovni: '$2' (bez granice). Pomoć: <code>$0= <i>prazan string</i> (bez granice) | n</code>, s <code>n</code> je pozitivan integer.",
    "dpl_log_16": "PAŽNJA: Nema rezultata!",
    "dpl_log_17": "PAŽNJA: Dodavanje* parametara ('adduser', 'addeditdate', itd.)' i 'includepage' nema efekta sa 'mode=category'. Isključivo ime stranice/imenski prostor mogu da se vide u ovom modu.",
    "dpl_log_18": "PAŽNJA: 'headingmode=$0' nema efekta sa 'ordermethod' na jednoj komponenti. Koristi se: '$1'. Pomoć: ne morate koristiti-$1 'headingmode' podatke 'ordermethod' na više komponenti. Prva komponenta se koristi za naslov. Npr. 'ordermethod=category,<i>komponenta</i>' (<i>komponenta</i> je druga komponenta) za naslove kategorija.",
    "dpl_log_19": "PAŽNJA: 'debug=$0' nije na prvom mestu u DPL elementu. Nova debag podešavanja nisu primenjena pre svih parametara koji su provereni",
    "dpl_log_20": "PAŽNJA: Beskonačna petljasa stranice '$0'.",
    "dpl_log_21": "UPIT: <code>$0</code>",
    "dpl_articlecount": "U ovom naslovu se trenutno nalazi {{PLURAL:$1|jedan članak|$1 članka|$1 članaka}}"
}
{
    "@metadata": {
        "authors": [
            "Millosh"
        ]
    },
    "intersection-desc": "Даје редни списак најскорије додатих чланака у једну или више категорија.",
    "intersection_toomanycats": "Грешка: Превише категорија!",
    "intersection_toofewcats": "Грешка:Премало категорија!",
    "intersection_noresults": "Грешка: Нема резулатата!",
    "intersection_noincludecats": "Грешка: Потребно је укључити бар једну категорију или одредити именски простор!",
    "dpl_log_1": "ГРЕШКА: Погреан '$0' параметар: '$1'! Помоћ:  <code>$0= <i>погрешан стринг</i> (Главно)$3</code>. (Еквиваленти са магичним речима су такође дозвољени.)",
    "dpl_log_2": "ГРЕШКА: Погрешан '$0' параметар: '$1'! Помоћ:  <code>$0= <i>пуно име странице</i></code>. (Магичне речи су дозвољене.)",
    "dpl_log_3": "ГРЕШКА: Превише категорија! Максимум је: $0. Помоћ: повећајте <code>DynamicPageListHooks::$maxCategoryCount</code> како бисте поставили више категорија или промените <code>DynamicPageListHooks::$allowUnlimitedCategories=true</code> за без граница. (Подесите варијаблу у <code>LocalSettings.php</code>, након укључивања <code>DynamicPageList.php</code>.)",
    "dpl_log_4": "ГРЕШКА: Премало категорија! Минимум је: $0. Помоћ: повећајте <code>DynamicPageListHooks::$minCategoryCount</code> како бисте поставили мање категорија. (Подесите варијаблу у <code>LocalSettings.php</code>, након укључивања <code>DynamicPageList.php</code>.)",
    "dpl_log_5": "ERROR: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants",
    "dpl_log_6": "ГРЕШКА: Морате укључити бар једну категорију уколико желите да користите 'addfirstcategorydate=true' или 'ordermethod=categoryadd'!",
    "dpl_log_7": "ГРЕШКА: Уколико укључујете више од једне категорије, не можете користити 'addfirstcategorydate=true' или 'ordermethod=categoryadd'!",
    "dpl_log_8": "ГРЕШКА: Не можете додати више од једног типа датума!",
    "dpl_log_9": "ГРЕШКА: Можете користити '$0' са 'ordermethod=[...,]$1' искључиво!",
    "dpl_log_10": "ГРЕШКА: Немогуће извршити операцију на некатегоризованим страницама (нпр. са 'category' параметром) зато што $0 преглед не постоји у бази података! Помоћ: нека администратор базе изврши овај упит: <code>$1</code>.",
    "dpl_log_11": "ERROR: Cannot perform logical operations on the Uncategorized pages (f.e. with the 'category' parameter) because the $0 view does not exist on the database! Help: have the database administrator execute this query: <code>$1</code>.",
    "dpl_log_12": "ERROR: specifying \"openreferences\" is incompatible with some other option you specified. See the manual for details.",
    "dpl_log_13": "ПАЖЊА: Непознат параметар '$1' је игнорисан. Помоћ: доступни параметри су: <code>$2</code>.",
    "dpl_log_14": "ПАЖЊА: Погрешан '$0' параметар: '$1'! Користи се основни: '$2'. Помоћ: <code>$0= $3</code>.",
    "dpl_log_15": "ПАЖЊА: Погрешан '$0' параметар: '$1'! Користи се основни: '$2' (без границе). Помоћ: <code>$0= <i>празан стринг</i> (без границе) | n</code>, с <code>n</code> је позитиван интегер.",
    "dpl_log_16": "ПАЖЊА: Нема резултата!",
    "dpl_log_17": "ПАЖЊА: Додавање* параметара ('adduser', 'addeditdate', итд.)' и 'includepage' нема ефекта са 'mode=category'. Искључиво име странице/именски простор могу да се виде у овом моду.",
    "dpl_log_18": "ПАЖЊА: 'headingmode=$0' нема ефекта са 'ordermethod' на једној компоненти. Користи се: '$1'. Помоћ: не морате користити-$1 'headingmode' податке 'ordermethod' на више компоненти. Прва компонента се користи за наслов. Нпр. 'ordermethod=category,<i>компонента</i>' (<i>компонента</i> је друга компонента) за наслове категорија.",
    "dpl_log_29": "ПАЖЊА: 'debug=$0' није на првом месту у DPL елементу. Нова дебаг подешавања нису примењена пре свих параметара који су проверени",
    "dpl_log_20": "ПАЖЊА: Бесконачна петљаса странице '$0'.",
    "dpl_log_21": "УПИТ: <code>$0</code>",
    "dpl_articlecount": "У овом наслову се тренутно налази {{PLURAL:$1|један чланак|$1 чланка|$1 чланака}}."
}
{
    "@metadata": {
        "authors": [
            "Pyt"
        ]
    },
    "intersection-desc": "Uutgoawe fon ne Lieste fon do aktuälste Iendraage in ne Kategorie, of n Truchsnit fon moorere Kategorien.",
    "intersection_toomanycats": "Error: Toufuul Kategorien!",
    "intersection_toofewcats": "Error: Toumin Kategorien!",
    "intersection_noresults": "Error: Neen Resultoat!",
    "intersection_noincludecats": "Error: Der mout mindestens een Kategorie ienbuunen weese of reek n Noomensruum oun!"
}
{
    "@metadata": {
        "authors": [
            "Lejonel"
        ]
    },
    "intersection-desc": "Skapar punktlistor över de nyaste sidorna i en eller flera kategorier",
    "intersection_toomanycats": "Fel: För många kategorier!",
    "intersection_toofewcats": "Fel: För få kategorier!",
    "intersection_noresults": "Fel: Inga resultat!",
    "intersection_noincludecats": "Fel: Du måste inkludera minst en kategori eller ange en namnrymd!"
}
{
    "@metadata": {
        "authors": [
            "Veeven"
        ]
    },
    "intersection_toomanycats": "Error: చాలా ఎక్కువ వర్గాలు!",
    "intersection_toofewcats": "Error: మరీ తక్కువ వర్గాలు!",
    "intersection_noresults": "Error: ఫలితాలు లేవు!",
    "intersection_noincludecats": "Error: మీరు కనీసం ఒక్క వర్గాన్నైనా చేర్చాలి, లేదా ఓ నేమ్&zwnj;స్పేసునైనా ఇవ్వాలి!"
}
{
    "@metadata": {
        "authors": [
            "Ibrahim"
        ]
    },
    "intersection-desc": "Феҳристи гулулае аз саҳифаҳое ба намоиш дар меояд, ки ба тозагӣ дар як ё чанд гурӯҳ ворид шудаанд",
    "intersection_toomanycats": "Error: Теъдоди гурӯҳҳо зиёд аст!",
    "intersection_toofewcats": "Error: Теъдоди гурӯҳҳо кам аст!",
    "intersection_noresults": "Error: Натиҷае вуҷуд надорад!",
    "intersection_noincludecats": "Error: Шумо ҳадди ақал бояд як гурӯҳро ворид кунед, ё як фазои номро мушаххас кунед!"
}
{
    "@metadata": {
        "authors": [
            "AnakngAraw"
        ]
    },
    "intersection-desc": "Naglalabas ng isang tinuldukang talaan ng pinakakamakailang mga bagay-bagay na naninirahan sa loob ng isang kaurian, o isang pinagsangahang daanan ng ilang mga kaurian",
    "intersection_toomanycats": "Kamalian: Napakaraming mga kaurian!",
    "intersection_toofewcats": "Kamalian: Napakakaunti ng mga kaurian!",
    "intersection_noresults": "Kaurian: Walang mga kinalabasan/resulta!",
    "intersection_noincludecats": "Kamalian: Kinakailangan mong magsama ng kahit na isang kaurian, o tumukoy ng isang espasyo ng pangalan!"
}
{
    "@metadata": {
        "authors": [
            "Joseph"
        ]
    },
    "intersection-desc": "Bir kategoride, yada birçok kategorinin kesişiminde bulunan en son öğelerin, madde işaretli listesini üretir",
    "intersection_toomanycats": "Hata: Çok fazla kategori!",
    "intersection_toofewcats": "Hata: Çok az kategori!",
    "intersection_noresults": "Hata: Sonuç yok!",
    "intersection_noincludecats": "Hata: En az bir kategori eklemeli, ya da bir ad alanı belirtmelisiniz!"
}
{
    "@metadata": {
        "authors": [
            "Ahonc"
        ]
    },
    "intersection-desc": "Виводить у маркований список останні додавання до категорії або об'єднання кількох категорій",
    "intersection_toomanycats": "Error: дуже багато категорій!",
    "intersection_toofewcats": "Error: дуже мало категорій!",
    "intersection_noresults": "Error: нема результатів!",
    "intersection_noincludecats": "Error: ви повинні включити хоча б одну категорію або зазначити простір назв!"
}
{
    "@metadata": {
        "authors": [
            "Candalua"
        ]
    },
    "intersection-desc": "Mostra un elenco puntato coi elementi piassè reçenti inserìi in te na categoria o ne l'union de più categorie",
    "intersection_toomanycats": "Error: Ghe xe massa categorie!",
    "intersection_toofewcats": "Error: Ghe xe massa póche categorie!",
    "intersection_noresults": "Error: Nissun risultato!",
    "intersection_noincludecats": "Error: Te ghè da inclùdar almanco na categoria opure specificar un namespace."
}
{
    "@metadata": {
        "authors": [
            "Игорь Бродский"
        ]
    },
    "intersection_toomanycats": "Error: äjahk kategorijoid!",
    "intersection_toofewcats": "Error: Vähähk kategorijoid!",
    "intersection_noresults": "Error: Ei ole rezul'tatoid!"
}
{
    "@metadata": {
        "authors": [
            "Minh Nguyen"
        ]
    },
    "intersection-desc": "Cho ra danh sách những khoản gần đây nhất được xếp vào một thể loại hay hợp của hơn một thể loại",
    "intersection_toomanycats": "Error: Nhiều thể loại quá!",
    "intersection_toofewcats": "Error: Ít thể loại quá!",
    "intersection_noresults": "Error: Không tìm thấy trang nào!",
    "intersection_noincludecats": "Error: Cần phải bao gồm ít nhất một thể loại hay định rõ một không gian tên!"
}
{
    "@metadata": {
        "authors": [
            "Smeira"
        ]
    },
    "intersection_toomanycats": "Error: Klads tu mödiks!",
    "intersection_toofewcats": "Error: Klads tu nemödiks!",
    "intersection_noresults": "Error: Seks nonik!",
    "intersection_noincludecats": "Error: Nedol välön kladi pu bali, u nemaspadi!"
}
{
    "@metadata": {
        "authors": [
            "Shinjiman"
        ]
    },
    "intersection-desc": "輸出一個點列最近響分類嘅項目，或者係幾個分類嘅一個聯繫",
    "intersection_toomanycats": "DynamicPageList: 太多分類!",
    "intersection_toofewcats": "DynamicPageList: 太少分類!",
    "intersection_noresults": "DynamicPageList: 無結果!",
    "intersection_noincludecats": "DynamicPageList: 你需要去包含最少一個分類，或者指定一個空間名!",
    "dpl-desc": "一個畀MediaWiki嘅高彈性報告產生器",
    "dpl_log_1": "錯誤: 錯嘅 '$0' 參數: '$1'! 幫助:  <code>$0= <i>空字串</i> (主)$3</code>。",
    "dpl_log_3": "錯誤: 太多分類! 最大值: $0。 幫助: 增加 <code>DynamicPageListHooks::$maxCategoryCount</code> 嘅值去指定更多嘅分類或者設定 <code>DynamicPageListHooks::$allowUnlimitedCategories=true</code> 以解除限制。 (當加上 <code>DynamicPageList.php</code>之後，響<code>LocalSettings.php</code>度設定變數。)",
    "dpl_log_4": "錯誤: 太少分類! 最小值: $0. 幫助: 減少 <code>DynamicPageListHooks::$minCategoryCount</code> 嘅值去指定更少嘅分類。 (當加上 <code>DynamicPageList.php</code>之後，響<code>LocalSettings.php</code>度設定一個合適嘅變數。)",
    "dpl_log_5": "ERROR: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants",
    "dpl_log_6": "錯誤: 如果你想去用 'addfirstcategorydate=true' 或者 'ordermethod=categoryadd' ，你需要包含最少一個分類!",
    "dpl_log_7": "錯誤: 如果你包含多過一個分類，你唔可以用 'addfirstcategorydate=true' 或者 'ordermethod=categoryadd'!",
    "dpl_log_8": "錯誤: 你唔可以響一個時間度加入多個一種嘅日期!",
    "dpl_log_9": "錯誤: 你只可以用 'ordermethod=[...,]$1' 響 '$0' 上!",
    "dpl_log_10": "ERROR: the index for the dominant section must be between 1 and the number of arguments of includepage ($0 in this case)",
    "dpl_log_12": "ERROR: specifying \"openreferences\" is incompatible with some other option you specified. See the manual for details.",
    "dpl_log_13": "警告: 不明嘅參數 '$1' 被忽略。 幫助: 可用嘅參數: <code>$2</code>。",
    "dpl_log_14": "警告: 錯誤嘅 '$0' 參數: '$1'! 用緊預設嘅: '$2'。 幫助: <code>$0= $3</code>。",
    "dpl_log_15": "警告: 錯誤嘅 '$0' 參數: '$1'! 用緊預設嘅: '$2' (冇上限)。 幫助: <code>$0= <i>空字串</i> (冇上限) | n</code>, <code>n</code>係一個正整數。",
    "dpl_log_16": "警告: 無結果!",
    "dpl_log_17": "警告: 加入* 參數 ('adduser', 'addeditdate', 等)' 係對 'mode=category' 冇作用嘅。只有頁空間名／標題至可以響呢個模式度睇到。",
    "dpl_log_18": "警告: 響單一部件中， 'ordermethod' 度用 'headingmode=$0' 係冇作用嘅。 用緊: '$1'。 幫助: 你可以用非$1 'headingmode' 數值，響多個部件中用 'ordermethod' 。第一個部件係用嚟做標題。例如響分類標題度用 'ordermethod=category,<i>comp</i>' (<i>comp</i>係另外一個部件) 。",
    "dpl_log_19": "警告: 'debug=$0' 唔係第一個響DPL元素嘅第一位。新嘅除錯設定響所有參數都能夠處理同檢查之前都唔會應用。",
    "dpl_log_21": "查訽: <code>$0</code>",
    "dpl_articlecount": "響呢個標題度有$1篇文。"
}
{
    "@metadata": {
        "authors": [
            "Shinjiman"
        ]
    },
    "intersection-desc": "输出一个点列最近在分类中的项目，或者系数个分类的一个联系",
    "intersection_toomanycats": "DynamicPageList: 太多分类!",
    "intersection_toofewcats": "DynamicPageList: 太少分类!",
    "intersection_noresults": "DynamicPageList: 没有结果!",
    "intersection_noincludecats": "DynamicPageList: 您需要去包含最少一个分类，或者指定一个空间名!",
    "dpl-desc": "一个给MediaWiki的高弹性报告产生器",
    "dpl_log_1": "错误: 错误的 '$0' 参数: '$1'! 帮助:  <code>$0= <i>空白字符串</i> (主)$3</code>。",
    "dpl_log_3": "错误: 过多分类! 最大值: $0。 帮助: 增加 <code>DynamicPageListHooks::$maxCategoryCount</code> 的值去指定更多的分类或设定 <code>DynamicPageListHooks::$allowUnlimitedCategories=true</code> 以解除限制。 (当加上 <code>DynamicPageList.php</code>后，在<code>LocalSettings.php</code>中设定变量。)",
    "dpl_log_4": "错误: 过少分类! 最小值: $0。 帮助: 减少 <code>DynamicPageListHooks::$minCategoryCount</code> 的值去指定更少的分类。 (当加上 <code>DynamicPageList.php</code>后，在<code>LocalSettings.php</code>中设定一个合适的变量。)",
    "dpl_log_5": "ERROR: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants",
    "dpl_log_6": "错误: 如果您想用 'addfirstcategorydate=true' 或 'ordermethod=categoryadd' ，您需要包含最少一个分类!",
    "dpl_log_7": "错误: 如果您包含多一个分类，您不可以用 'addfirstcategorydate=true' 或 'ordermethod=categoryadd'!",
    "dpl_log_8": "错误: 您不可以在一个时间里加入多于一种的日期!",
    "dpl_log_9": "错误: 你只可以用 'ordermethod=[...,]$1' 在 '$0' 上!",
    "dpl_log_10": "ERROR: the index for the dominant section must be between 1 and the number of arguments of includepage ($0 in this case)",
    "dpl_log_12": "ERROR: specifying \"openreferences\" is incompatible with some other option you specified. See the manual for details.",
    "dpl_log_13": "警告: 不明的参数 '$1' 被忽略。 帮助: 可用的参数: <code>$2</code>。",
    "dpl_log_14": "警告: 错误的 '$0' 参数: '$1'! 正在使用默认值: '$2'。 帮助: <code>$0= $3</code>。",
    "dpl_log_15": "警告: 错误的 '$0' 参数: '$1'! 正在使用默认值: '$2' (没有上限)。 帮助: <code>$0= <i>空白字符串</i> (没有上限) | n</code>, <code>n</code>是一个正整数。",
    "dpl_log_16": "警告: 无结果!",
    "dpl_log_17": "警告: 加入* 参数 ('adduser', 'addeditdate', 等)' 是对 'mode=category' 没有作用。只有页面空间名／标题才可以在这个模式度看到。",
    "dpl_log_18": "警告: 在单一部件中， 'ordermethod' 用 'headingmode=$0' 是没有作用的。 正在使用: '$1'。 帮助: 你可以用非$1 'headingmode' 数值，在多个部件中用 'ordermethod' 。第一个部是用来作标题。例如在分类标题中用 'ordermethod=category,<i>comp</i>' (<i>comp</i>是另外一个部件) 。",
    "dpl_log_19": "警告: 'debug=$0' 不是第一个在DPL元素嘅第一位置。新的除错设定在所有参数都能处理和检查前都不会应用。",
    "dpl_log_21": "查訽: <code>$0</code>",
    "dpl_articlecount": "在这个标题中有$1篇条目。"
}
{
    "@metadata": {
        "authors": [
            "Shinjiman"
        ]
    },
    "intersection-desc": "輸出一個點列最近在分類中的項目，或者係數個分類的一個聯繫",
    "intersection_toomanycats": "DynamicPageList: 太多分類!",
    "intersection_toofewcats": "DynamicPageList: 太少分類!",
    "intersection_noresults": "DynamicPageList: 沒有結果!",
    "intersection_noincludecats": "DynamicPageList: 您需要去包含最少一個分類，或者指定一個空間名!",
    "dpl-desc": "一個給MediaWiki的高彈性報告產生器",
    "dpl_log_1": "錯誤: 錯誤的 '$0' 參數: '$1'! 說明:  <code>$0= <i>空白字串</i> (主)$3</code>。",
    "dpl_log_3": "錯誤: 過多分類! 最大值: $0。 說明: 增加 <code>DynamicPageListHooks::$maxCategoryCount</code> 的值去指定更多的分類或設定 <code>DynamicPageListHooks::$allowUnlimitedCategories=true</code> 以解除限制。 (當加上 <code>DynamicPageList.php</code>後，在<code>LocalSettings.php</code>中設定變數。)",
    "dpl_log_4": "錯誤: 過少分類! 最小值: $0。 說明: 減少 <code>DynamicPageListHooks::$minCategoryCount</code> 的值去指定更少的分類。 (當加上 <code>DynamicPageList.php</code>後，在<code>LocalSettings.php</code>中設定一個合適的變數。)",
    "dpl_log_5": "ERROR: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants",
    "dpl_log_6": "錯誤: 如果您想用 'addfirstcategorydate=true' 或 'ordermethod=categoryadd' ，您需要包含最少一個分類!",
    "dpl_log_7": "錯誤: 如果您包含多一個分類，您不可以用 'addfirstcategorydate=true' 或 'ordermethod=categoryadd'!",
    "dpl_log_8": "錯誤: 您不可以在一個時間裡加入多於一種的日期!",
    "dpl_log_9": "錯誤: 你只可以用 'ordermethod=[...,]$1' 在 '$0' 上!",
    "dpl_log_10": "ERROR: the index for the dominant section must be between 1 and the number of arguments of includepage ($0 in this case)",
    "dpl_log_12": "ERROR: specifying \"openreferences\" is incompatible with some other option you specified. See the manual for details.",
    "dpl_log_13": "警告: 不明的參數 '$1' 被忽略。 說明: 可用的參數: <code>$2</code>。",
    "dpl_log_14": "警告: 錯誤的 '$0' 參數: '$1'! 正在使用預設值: '$2'。 說明: <code>$0= $3</code>。",
    "dpl_log_15": "警告: 錯誤的 '$0' 參數: '$1'! 正在使用預設值: '$2' (沒有上限)。 說明: <code>$0= <i>空白字串</i> (沒有上限) | n</code>, <code>n</code>是一個正整數。",
    "dpl_log_16": "警告: 無結果!",
    "dpl_log_17": "警告: 加入* 參數 ('adduser', 'addeditdate', 等)' 是對 'mode=category' 沒有作用。只有頁面空間名／標題才可以在這個模式度看到。",
    "dpl_log_18": "警告: 在單一部件中， 'ordermethod' 用 'headingmode=$0' 是沒有作用的。 正在使用: '$1'。 說明: 你可以用非$1 'headingmode' 數值，在多個部件中用 'ordermethod' 。第一個部是用來作標題。例如在分類標題中用 'ordermethod=category,<i>comp</i>' (<i>comp</i>是另外一個部件) 。",
    "dpl_log_19": "警告: 'debug=$0' 不是第一個在DPL元素嘅第一位置。新的除錯設定在所有參數都能處理和檢查前都不會應用。",
    "dpl_log_21": "查訽: <code>$0</code>",
    "dpl_articlecount": "在這個標題中有$1篇條目。"
}
/**
 * DynamicPageList3
 * DPL Article Class
 *
 * @author		IlyaHaykinson, Unendlich, Dangerville, Algorithmix, Theaitetos, Alexia E. Smith, Universal Omega
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
use User;
	 * @var object
	public $mTitle = null;
	 * @var string
	 * @var string
	 * @var string
	 * Main Constructor
	 *
	 * @access	public
	 * @param	string	Title
	 * @param	integer	Namespace
	 * @return	void
	public function __construct( $title, $namespace ) {
		$this->mTitle     = $title;
	 * @access	public
	 * @param	array	Database Row
	 * @param	object	\DPL\Parameters Object
	 * @param	object	Mediawiki Title Object
	 * @param	integer	Page Namespace ID
	 * @param	string	Page Title as Selected from Query
	 * @return	object	\DPL\Article Object
	public static function newFromRow( $row, Parameters $parameters, \Title $title, $pageNamespace, $pageTitle ) {
		$article = new Article( $title, $pageNamespace );
		$revActorName = null;
		if ( isset( $row['revactor_actor'] ) ) {
			$revActorName = User::newFromActorId( $row['revactor_actor'] )->getName();
		}
		//Chop off title if longer than the 'titlemaxlen' parameter.
		$contLang = MediaWikiServices::getInstance()->getContentLanguage();
		//get first char used for category-style output
			$article->mStartChar = $contLang->convert( $contLang->firstChar( $row['sortkey'] ) );
			$article->mStartChar = $contLang->convert( $contLang->firstChar( $pageTitle ) );
		//External link
		//SHOW PAGE_COUNTER
		//SHOW PAGE_SIZE
		//STORE initially selected PAGE
				$article->mSelTitle     = 'unknown page';
				$article->mSelTitle     = $row['sel_title'];
		//STORE selected image
			//REVISION SPECIFIED
				$article->mRevision = $row['revactor_rev'];
				$article->mUser     = $revActorName;
				$article->mDate     = $row['revactor_timestamp'];
			//SHOW "PAGE_TOUCHED" DATE, "FIRSTCATEGORYDATE" OR (FIRST/LAST) EDIT DATE
			} elseif ( $parameters->getParameter( 'addeditdate' ) && isset( $row['revactor_timestamp'] ) ) {
				$article->mDate = $row['revactor_timestamp'];
			//Time zone adjustment
				//Apply the userdateformat
				$article->myDate = gmdate( $parameters->getParameter( 'userdateformat' ), wfTimeStamp( TS_UNIX, $article->mDate ) );
				$article->mContributor  = User::newFromActorId( $row['contributor'] )->getName();
				$article->mContrib      = substr( '*****************', 0, (int)round( log( $row['contribution'] ) ) );
			//USER/AUTHOR(S)
				$article->mUserLink = '[[User:' . $revActorName . '|' . $revActorName . ']]';
				$article->mUser     = $revActorName;
			//CATEGORY LINKS FROM CURRENT PAGE
						//Count one more page in this heading
							//uncategorized page (used if ordermethod=category,...)
						self::$headings[$revActorName] = ( isset( self::$headings[$revActorName] ) ? self::$headings[$revActorName] + 1 : 1 );
						if ( $row['revactor_actor'] == 0 ) { //anonymous user
							$article->mParentHLink = '[[User:' . $revActorName . '|' . $revActorName . ']]';
						} else {
							$article->mParentHLink = '[[User:' . $revActorName . '|' . $revActorName . ']]';
						}
	 * @access	public
	 * @return	array	Headings
	 *
	 * @access	public
	 * @return	void
	 * @access	public
	 * @return	mixed	Formatted string or null for none set.
			return $wgLang->timeanddate( $article->mDate, true );
/**
 * DynamicPageList3
 * DPL Config Class
 *
 * @author		IlyaHaykinson, Unendlich, Dangerville, Algorithmix, Theaitetos, Alexia E. Smith
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
	 * @access	public
	 * @param	array	Settings to initialize for DPL.
	 * @return	void
			$settings = $wgDplSettings;
	 * @access	public
	 * @param	string	Setting Key
	 * @return	mixed	The setting's actual setting or null if it does not exist.
		return ( array_key_exists( $setting, self::$settings ) ? self::$settings[$setting] : null );
	 * @access	public
	 * @return	array	All settings
	 * @access	public
	 * @param	string	Setting Key
	 * @param	mixed	[Optional] Appropriate value for the setting key.
	 * @return	void
/**
 *
 * @file
 * @ingroup Extensions
 * @link http://www.mediawiki.org/wiki/Extension:DynamicPageList3 Documentation
 * @author n:en:User:IlyaHaykinson
 * @author n:en:User:Amgine
 * @author w:de:Benutzer:Unendlich
 * @author m:User:Dangerman <cyril.dangerville@gmail.com>
 * @author m:User:Algorithmix <gero.scholz@gmx.de>
 * @license GPL-2.0-or-later
 *
 */
class DynamicPageListHooks {
	// FATAL
	const FATAL_WRONGNS = 1001;	// $1: 'namespace' or 'notnamespace'
															// $2: wrong parameter given by user
															// $3: list of possible titles of namespaces (except pseudo-namespaces: Media, Special)

	const FATAL_WRONGLINKSTO = 1002;	// $1: linksto'
															// $2: the wrong parameter given by user

	const FATAL_TOOMANYCATS = 1003;	// $1: max number of categories that can be included
	const FATAL_TOOFEWCATS = 1004;	// $1: min number of categories that have to be included
	const FATAL_NOSELECTION = 1005;
	const FATAL_CATDATEBUTNOINCLUDEDCATS = 1006;
	const FATAL_CATDATEBUTMORETHAN1CAT = 1007;
	const FATAL_MORETHAN1TYPEOFDATE = 1008;
	const FATAL_WRONGORDERMETHOD = 1009;	// $1: param=val that is possible only with $1 as last 'ordermethod' parameter
															// $2: last 'ordermethod' parameter required for $0
	const FATAL_DOMINANTSECTIONRANGE = 1010;	// $1: the number of arguments in includepage
	const FATAL_OPENREFERENCES = 1012;
	const FATAL_MISSINGPARAMFUNCTION = 1022;
	const FATAL_NOTPROTECTED = 1023;
	const FATAL_SQLBUILDERROR = 1024;
	// ERROR
	// WARN
	const WARN_UNKNOWNPARAM = 2013;	// $1: unknown parameter given by user
															// $2: list of DPL available parameters separated by ', '
	const WARN_PARAMNOOPTION = 2022;	// $1: Parameter given by user
	const WARN_WRONGPARAM = 2014;	// $3: list of valid param values separated by ' | '
	const WARN_WRONGPARAM_INT = 2015;	// $1: param name
															// $2: wrong param value given by user
															// $3: default param value used instead by program
	const WARN_NORESULTS = 2016;
	const WARN_CATOUTPUTBUTWRONGPARAMS = 2017;
	const WARN_HEADINGBUTSIMPLEORDERMETHOD = 2018;	// $1: 'headingmode' value given by user
															// $2: value used instead by program (which means no heading)
	const WARN_DEBUGPARAMNOTFIRST = 2019;	// $1: 'log' value
	const WARN_TRANSCLUSIONLOOP = 2020;	// $1: title of page that creates an infinite transclusion loop
	// INFO
	// DEBUG
	const DEBUG_QUERY = 3021;	// $1: SQL query executed to generate the dynamic page list
	// TRACE
															// Output formatting
															// $1: number of articles
	public static $createdLinks; // the links created by DPL are collected here;
								 // they can be removed during the final ouput
								 // phase of the MediaWiki parser
	/**
	 * DPL acting like Extension:Intersection
	 *
	 * @var bool
	 */
	/**
	 * Debugging Level
	 *
	 * @var int
	 */
	 * Handle special on extension registration bits.
	 *
	 * @return void
	public static function onRegistration() {
		if ( !defined( 'DPL_VERSION' ) ) {
			define( 'DPL_VERSION', '3.3.5' );
	 * @param object Parser object passed as a reference.
	 * @return bool	true
	public static function onParserFirstCallInit( Parser &$parser ) {
		//DPL offers the same functionality as Intersection.  So we register the <DynamicPageList> tag in case LabeledSection Extension is not installed so that the section markers are removed.
		if ( \DPL\Config::getSetting( 'handleSectionTag' ) ) {

		return true;
	 * @param object Parser object passed as a reference.
	 * @returnbool true
	public static function setupMigration( Parser &$parser ) {

		return true;
	 *
	 * @private
	 * @return void
		\DPL\Config::init();
	 * @private
	 * @param bool	Behave Like Intersection
	 * @return void
	 * @return bool	Behaving Like Intersection
	 * @param string Raw User Input
	 * @param array Arguments on the tag.
	 * @param object Parser object.
	 * @param object PPFrame object.
	 * @return string HTML
	 * @param string Raw User Input
	 * @param array Arguments on the tag.
	 * @param object Parser object.
	 * @param object PPFrame object.
	 * @return string HTML
	 * @param string Raw User Input
	 * @param array Arguments on the tag.(While not used, it is left here for future compatibility.)
	 * @param object Parser object.
	 * @param object PPFrame object.
	 * @return string HTML
		// entry point for user tag <dpl>  or  <DynamicPageList>
		$parse = new \DPL\Parse();
		if ( \DPL\Config::getSetting( 'recursiveTagParse' ) ) {
		if ( isset( $reset['templates'] ) && $reset['templates'] ) {	// we can remove the templates by save/restore
		if ( isset( $reset['categories'] ) && $reset['categories'] ) {	// we can remove the categories by save/restore
		if ( isset( $reset['images'] ) && $reset['images'] ) {	// we can remove the images by save/restore
		if ( isset( $reset['templates'] ) && $reset['templates'] ) {
			$parser->getOutput()->mTemplates = $saveTemplates;
		if ( isset( $reset['categories'] ) && $reset['categories'] ) {
			$parser->getOutput()->mCategories = $saveCategories;
		if ( isset( $reset['images'] ) && $reset['images'] ) {
			$parser->getOutput()->mImages = $saveImages;
	 * @param object Parser object passed as a reference.
	 * @return string Wiki Text
	public static function dplParserFunction( &$parser ) {
		// callback for the parser function {{#dpl:	  or   {{DynamicPageList::
		$parse = new \DPL\Parse();
		return [ // parser needs to be coaxed to do further recursive processing
			$parser->getPreprocessor()->preprocessToObj( $dplresult, Parser::PTD_FOR_INCLUSION ),
	 * From the old documentation: "Tries to guess a number that is buried in the text.  Uses a set of heuristic rules which may work or not.  The idea is to extract the number so that it can be used as a sorting value in the column of a DPL table output."
	 * @param object Parser object passed as a reference.
	 * @return string Wiki Text
	public static function dplNumParserFunction( &$parser, $text = '' ) {
			return \DPL\Variables::setVar( $args );
			return \DPL\Variables::setVarDefault( $args );
		return \DPL\Variables::getVar( $cmd );
		# convert \n to a real newline character
		$output = \DPL\LST::extractHeadingFromText( $parser, $page, '?title?', $text, $heading, '', $sectionHeading, true, $maxLength, $link, $trim );
		$lines   = explode( "\n", $matrix );
		$m       = [];
		$from    = '';
		$to      = '';
		if ( $flip == '' | $flip == 'normal' ) {
		// if (!preg_match("/Query Q/",$parser->mTitle->getText())) return '';
	 * @access	public
	 * @param	integer	Debug Level
	 * @return	void
	 * @access	public
	 * @return	void
	// reset everything; some categories may have been fixed, however via  fixcategory=
	public static function endReset( &$parser, $text ) {
			// $text .= self::dumpParsedRefs($parser,"before final reset");
			// $text .= self::dumpParsedRefs( $parser, 'after final reset' );
		return true;
	public static function endEliminate( &$parser, &$text ) {
			// self::dumpParsedRefs($parser,"before final eliminate");
					// echo ("<pre> elim: created Links [$nsp] = ". count(DynamicPageListHooks::$createdLinks[0][$nsp])."</pre>\n");
					// echo ("<pre> elim: parser  Links [$nsp] = ". count($parser->getOutput()->mLinks[$nsp])			 ."</pre>\n");
					// echo ("<pre> elim: parser  Links [$nsp] nachher = ". count($parser->getOutput()->mLinks[$nsp])	  ."</pre>\n");
					// echo ("<pre> elim: created Tpls [$nsp] = ". count(DynamicPageListHooks::$createdLinks[1][$nsp])."</pre>\n");
					// echo ("<pre> elim: parser  Tpls [$nsp] = ". count($parser->getOutput()->mTemplates[$nsp])			."</pre>\n");
					// echo ("<pre> elim: parser  Tpls [$nsp] nachher = ". count($parser->getOutput()->mTemplates[$nsp])	 ."</pre>\n");
			// $text .= self::dumpParsedRefs($parser,"after final eliminate".$parser->mTitle->getText());

		/* self::$createdLinks = [
				'resetLinks'=> false, 'resetTemplates' => false,
				'resetCategories' => false, 'resetImages' => false, 'resetdone' => false
		]; */
		return true;
/**
 * DynamicPageList3
 * Magic Words
 *
 * @author Alexia E. Smith
 * @license GPL-2.0-or-later
 * @package DynamicPageList3
 *
 */
	##############################################################
	 * @param $parser Parser
	 * @param $parser Parser
	 * @return bool
	private static function parse( $parser, $title, $text, $part1, $skiphead = 0, $recursionCheck = true, $maxLength = -1, $link = '', $trim = false, $skipPattern = [] ) {
			//Handle recursion here, so we can break cycles.
				$text = $parser->preprocess( $text, $parser->mTitle, $parser->mOptions );
			return "[[" . $title->getPrefixedText() . "]]" . "<!-- WARNING: LST loop detected -->";
	##############################################################
	 * @return string HTML output
	///Generate a regex to match the section(s) we're interested in.
		$any    = false;
		$ws = "(?:\s+[^>]+)?"; //was like $ws="\s*"
	 * Count skipped headings, so parser (as of r18218) can skip them, to
	 * prevent wrong heading links (see bug 6563).
	 * @param int $limit Cutoff point in the text to stop searching
	 * @return int Number of matches
	 * @private
		$title = \Title::newFromText( $page );
		//if article doesn't exist, return a red link.
	///section inclusion - include all matching sections
			$piece = self::parse( $parser, $title, $piece, "#lst:${page}|${sec}", 0, $recursionCheck, $trim, $skipPattern );
	 * @param  $lim     limit of character count for the result
	 * @param  $text    the wikitext to be truncated
	 * @param  $link    an optional link which will be appended to the text if it was truncatedt
	 * @return the truncated text;
		$brackets  = 0;
		$n0        = -1;
		$nb        = 0;
			$matches   = [];
			$tags      = [
		/* throw away comments */
	//section inclusion - include all matching sections (return array)
		$n              = 0;
		$output[$n]     = '';
		$nr             = 0;
			$sec     = substr( $sec, 1 );
			//Generate a regex to match the === classical heading section(s) === we're
				$begin_off = 0;
				$head_len  = 6;
					$mata           = [];
					$begin_off      = $m[$no_parenthesis][1];
					$head_len       = strlen( $m[1][0] );
					$headLine       = trim( $m[0][0], "\n =\t" );
				$piece     = substr( $text, 0, $m[1][1] - 1 );
				$output[0] = self::parse( $parser, $title, $piece, "#lsth:${page}|${sec}", 0, $recursionCheck, $maxLength, $link, $trim, $skipPattern );
				//if $to is supplied, try and match it.  If we don't match, just ignore it.
				$piece          = substr( $text, $begin_off );
				//$sectionHeading[$n]=preg_replace("/^=+\s*/","",$m[0][0]);
				//$sectionHeading[$n]=preg_replace("/\s*=+\s*$/","",$sectionHeading[$n]);
				// $sectionHeading[$n] = '';
				$output[0] = self::parse( $parser, $title, $piece, "#lsth:${page}|${sec}", $nhead, $recursionCheck, $maxLength, $link, $trim, $skipPattern );
					$output[0] = self::parse( $parser, $title, $piece, "#lsth:${page}|${sec}", $nhead, $recursionCheck, $maxLength, $link, $trim, $skipPattern );
				$output[$n++] = self::parse( $parser, $title, $piece, "#lsth:${page}|${sec}", $nhead, $recursionCheck, $maxLength, $link, $trim, $skipPattern );
		$page  = $article->mTitle->getPrefixedText();
		$date  = $article->myDate;
		$user  = $article->mUserLink;
		$title = \Title::newFromText( $page );
		/* get text and throw away html comments */
			$template1       = substr( $template1, 1 );
			$template2       = substr( $template2, 1 );
			$text2           = preg_replace( "/\{\{\s*#(" . $template1 . ')(\s*[:}])/i', '°³²|%PFUNC%=\1\2|', $text );
			$tCalls          = preg_split( '/°³²/', ' ' . $text2 );
			$template1       = substr( $template1, 1 );
			$template2       = substr( $template2, 1 );
			$text2           = preg_replace( '/\<\s*(' . $template1 . ')\s*\>/i', '°³²|%TAG%=\1|%TAGBODY%=', $text );
			$tCalls          = preg_split( '/°³²/', ' ' . $text2 );
			$tCalls  = preg_split( '/\{\{\s*(Template:|' . $nsNames[10] . ':)?' . self::spaceOrUnderscore( preg_quote( $template1, '/' ) ) . '\s*[|}]/i', ' ' . $text );
		$output      = [];
				$output[0] = $parser->preprocess( '{{' . $defaultTemplate . '|%PAGE%=' . $page . '|%TITLE%=' . $title->getText() . '|%DATE%=' . $date . '|%USER%=' . $user . '}}', $parser->mTitle, $parser->mOptions );
		$n         = -2;
				$cbrackets    = 0;
				$size         = strlen( $templateCall );
							$argChain   = $invocation . '|%PAGE%=' . $page . '|%TITLE%=' . $title->getText();
							$output[++$n] = $parser->preprocess( $argChain, $parser->mTitle, $parser->mOptions );
				$cbrackets    = 2;
				$size         = strlen( $templateCall );
				$parms        = [];
				$parm         = '';
				$hasParm      = false;
						$parm    = '';
						array_splice( $parms, 0, 1 ); // remove artifact;
							$second       = false;
/**
 * DynamicPageList3
 * DPL Logger Class
 *
 * @author		IlyaHaykinson, Unendlich, Dangerville, Algorithmix, Theaitetos, Alexia E. Smith
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
	/**
	 * Function Documentation
	 *
	 * @access	public
	 * @return	void
	 */
	public function addMessage( $errorId ) {
		return call_user_func_array( [ $this, 'msg' ], $args );
	 * @access	public
	 * @param	boolean	[Optional] Clear the message buffer.
	 * @return	array	Messages in the order added.
	 *
	 * @access	public
	 * @param	integer	Message ID
	 * @return	string
		if ( \DynamicPageListHooks::getDebugLevel() >= $errorLevel ) {
			if ( \DynamicPageListHooks::isLikeIntersection() ) {
				if ( $errorId == \DynamicPageListHooks::FATAL_TOOMANYCATS ) {
				} elseif ( $errorId == \DynamicPageListHooks::FATAL_TOOFEWCATS ) {
				} elseif ( $errorId == \DynamicPageListHooks::WARN_NORESULTS ) {
				} elseif ( $errorId == \DynamicPageListHooks::FATAL_NOSELECTION ) {
			$this->buffer[] = '<p>Extension:DynamicPageList (DPL), version ' . DPL_VERSION . ': ' . $text . '</p>';
		return false;
/**
 * DynamicPageList3
 * DPL Variables Class
 *
 * @author IlyaHaykinson, Unendlich, Dangerville, Algorithmix, Theaitetos, Alexia E. Smith
 * @license GPL-2.0-or-later
 * @package DynamicPageList3
 *
 */
	/**
	 * Main Constructor
	 *
	 * @return void
	 */
	 * @param string $parameter Function(Parameter) Called
	 * @param string $arguments Function Arguments
			global $wgUser;
			if ( !$wgUser->isAllowed( $parameterData['permission'] ) ) {
				throw new \PermissionsError( $parameterData['permission'] );
				return;
		// Subvert to the real function if it exists.  This keeps code elsewhere clean from needed to check if it exists first.
		$function = "_" . $parameter;
					//Nuke the total pattern match off the beginning of the array.
			if ( $success === true ) {
				//Set that criteria was found for a selection.
				//Set open references conflict possibility.
	 * Users can not be told to put the parameters into a specific order each time.  Some parameters are dependent on each other coming in a certain order due to some procedural legacy issues.
			throw new \MWException( __METHOD__ . ': A non-array was passed.' );
		//'category' to get category headings first for ordermethod.
		//'include'/'includepage' to make sure section labels are ready for 'table'.
			'distinct'			=> 1,
			'openreferences'	=> 2,
			'ignorecase'		=> 3,
			'category'			=> 4,
			'title'				=> 5,
			'goal'				=> 6,
			'ordercollation'	=> 7,
			'ordermethod'		=> 8,
			'includepage'		=> 9,
			'include'			=> 10
	 * @param bool $found|true
	 *
	 * @private
	 * @return void
					\DynamicPageListHooks::setDebugLevel( $this->getData( $parameter )['default'] );
	 * @return void
	 * @return array Parameter => Options
	 * @param mixed	Integer or string to evaluated through filter_var().
	 * @private
	 * @param string $text Dirty Text
	 * @return string $text Clean Text
	 * @private
	 * @param string Raw Text of Pages
	 * @param bool [Optional] Each Title MUST Exist
	 * @return mixed List of page titles or false on error.
			$page = rtrim( $page, '\\' ); //This was fixed from the original code, but I am not sure what its intended purpose was.
				$title = \Title::newFromText( $page );
	 * @private
	 * @param mixed	Regular Expression(s) in an array or a single expression in a string.
	 * @param bool Is this a database REGEXP?
			//Purposely silencing the errors here since we are testing if preg_match would throw an error due to a bad regex from user input.
	 * @param string Options passed to parameter.
	 * @return bool Success
		$heading    = false;
		//We expand html entities because they contain an '& 'which would be interpreted as an AND condition
						$title = \Title::newFromText( $subCategory );
							//The * helper is just like listing "Category1|SubCategory1".  This gets hard coded here for this purpose.
					$title = \Title::newFromText( $parameter );
			//Do a bunch of data integrity checks to avoid E_NOTICE.
	 * @param string Options passed to parameter.
	 * @return bool Success
		//REGEXP input only supports AND operator.
		$data['REGEXP']['AND'][] = [ $option ]; //Wrapped in an array since the category Query handler expects an array.
	 * @param string Options passed to parameter.
	 * @return bool Success
	 * @param string Options passed to parameter.
	 * @return bool	Success
		$title = \Title::newFromText( $option );
	 * @param string Options passed to parameter.
	 * @return bool	Success
	 * @param string Options passed to parameter.
	 * @return bool	Success
		if ( !isset( $data['like'] ) || !is_array( $data['like'] ) ) {
	 * @param string Options passed to parameter.
	 * @return bool	Success
	 * @param string Option passed to parameter.
	 * @return bool	Success
				//Let the user know this namespace is not allowed or does not exist.
	 * @param string Options passed to parameter.
	 * @return bool	Success
				//Let the user know this namespace is not allowed or does not exist.
	 * @param string Options passed to parameter.
	 * @return bool	Success
		//Force 'ordermethod' back to none.
	 * @param string Options passed to parameter.
	 * @return bool	Success
	 * @param string Options passed to parameter.
	 * @return bool	Success
			//'none' mode is implemented as a specific submode of 'inline' with <br/> as inline text
	 * @param string Options passed to parameter.
	 * @return bool	Success
	 * @param string Options passed to parameter.
	 * @return bool	Success
	 * @param string Options passed to parameter.
	 * @return bool	Success
		//Parsing of wikitext will happen at the end of the output phase.  Replace '\n' in the input by linefeed because wiki syntax depends on linefeeds.
		//Set the 'mode' parameter to userformat automatically.
	 * @param string Options passed to parameter.
	 * @return bool	Success
		$title = \Title::newFromText( $option );
			$this->setParameter( 'namespace', $data );
	 * @param string Options passed to parameter.
	 * @return bool	Success
		if ( !isset( $data['regexp'] ) || !is_array( $data['regexp'] ) ) {
	 * @param string Options passed to parameter.
	 * @return bool	Success
		if ( !isset( $data['like'] ) || !is_array( $data['like'] ) ) {
	 * @param string Options passed to parameter.
	 * @return bool	Success
	 * @param string Options passed to parameter.
	 * @return bool	Success
		if ( !isset( $data['like'] ) || !is_array( $data['like'] ) ) {
	 * @param string Options passed to parameter.
	 * @return bool	Success
		//If scrolling is active we adjust the values for certain other parameters based on URL arguments
			//The 'findTitle' option has argument over the 'fromTitle' argument.
			//Lets get the 'toTitle' argument.
			//Make sure the 'scrollDir' arugment is captured.  This is mainly used for the Variables extension and in the header/footer replacements.
			//Also set count limit from URL if not otherwise set.
		//We do not return false since they could have just left it out.  Who knows why they put the parameter in the list in the first place.
	 * @param string Options passed to parameter.
	 * @return bool	Success
		//We offer a possibility to replace some part of the title
	 * @param string Options passed to parameter.
	 * @return bool	Success
			\DynamicPageListHooks::setDebugLevel( $option );
	 * @param string Options passed to parameter.
	 * @return bool	Success
	 * @param string Options passed to parameter.
	 * @return bool	Success
	 * @param string Options passed to parameter.
	 * @return bool	Success
	 * @param string Options passed to parameter.
	 * @return bool	Success
	 * @param string Options passed to parameter.
	 * @return bool	Success
	 * @param string Options passed to parameter.
	 * @return bool	Success
		//We replace '\n' by newline to support wiki syntax within the section separators
	 * @param string Options passed to parameter.
	 * @return bool	Success
		//We replace '\n' by newline to support wiki syntax within the section separators
	 * @param string Options passed to parameter.
	 * @return bool	Success
		if ( !array_key_exists( 2, $listSeparators ) ) {
			$listSeparators[2] = '';
		}
		//Overwrite 'listseparators'.
				$sectionSeparators[0]		= "\n|-\n|" . $withHLink; //."\n";
				$sectionSeparators[1]		= '';
				$multiSectionSeparators[0]	= "\n|-\n|" . $withHLink; // ."\n";
				$sectionSeparators[2 * $i]		= "\n|"; // ."\n";
				$sectionSeparators[2 * $i + 1]	= '';
		//Overwrite 'secseparators' and 'multisecseparators'.
	 * @param string Options passed to parameter.
	 * @return bool	Success
	 * @param string Options passed to parameter.
	 * @return bool	Success
		//If execAndExit was previously set (i.e. if it is not empty) we will ignore all cache settings which are placed AFTER the execandexit statement thus we make sure that the cache will only become invalid if the query is really executed.
	 * @param string Options passed to parameter.
	 * @return bool	Success
		\DynamicPageListHooks::fixCategory( $option );
	 * @param string Options passed to parameter.
	 * @return bool	Success
					$boolean = ( $argument == 'all' ? true : false );
	 * @param string Options passed to parameter.
	 * @return bool	Success
					$boolean = ( $argument == 'all' ? true : false );
/**
 * DynamicPageList3
 * DPL ParametersData Class
 *
 * @author		IlyaHaykinson, Unendlich, Dangerville, Algorithmix, Theaitetos, Alexia E. Smith
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
			'default'			=> false,
			'boolean'			=> true,
			'open_ref_conflict'	=> true
			'default'			=> false,
			'boolean'			=> true,
			'open_ref_conflict'	=> true
			'default'			=> false,
			'boolean'			=> true,
			'open_ref_conflict'	=> true
			'default'			=> false,
			'boolean'			=> true,
			'open_ref_conflict'	=> true
			'default'			=> false,
			'boolean'			=> true,
			'open_ref_conflict'	=> true
			'default'			=> false,
			'boolean'			=> true,
			'open_ref_conflict'	=> true
			'default'			=> false,
			'boolean'			=> true,
			'open_ref_conflict'	=> true
			'default'			=> false,
			'boolean'			=> true,
			'open_ref_conflict'	=> true
			'default'			=> false,
			'boolean'			=> true,
			'open_ref_conflict'	=> true
			'default'			=> false,
			'boolean'			=> true,
			'open_ref_conflict'	=> true
			'default'			=> false,
			'boolean'			=> true,
			'open_ref_conflict'	=> true
			'default'			=> true,
			'boolean'			=> true
			'default'			=> null,
			'db_format'			=> true
			'default'	=> null,
			'default'	=> null,
			'default'	=> null,
			'default'	=> 'include',
			'values'	=> [ 'include', 'exclude', 'only' ]
			'default'	=> null
			'default'	=> 0,
			'integer'	=> true
			'default'	=> 500,
			'integer'	=> true
			'default'	=> null,
			'integer'	=> true
			'default'	=> true,
			'values'	=> [ 'strict' ]
			'default'	=> 3600, // Number of seconds, default one day at 86400 seconds.
			'integer'	=> true
			'default'	=> 1,
			'integer'	=> true
			'default'	=> 1,
			'values'	=> [ 0, 1, 2, 3, 4, 5 ]
			'default'	=> [],
			'values'	=> [
			'default'	=> null,
			'default'	=> 'pages',
			'values'	=> [
			'open_ref_conflict'	=> true
		//Include the lowercase variants of header tiers for ease of use.
			'default'	=> 'none',
			'values'	=> [
				//'header',
			'open_ref_conflict'	=> true
			'default'			=> false,
			'boolean'			=> true,
			'open_ref_conflict'	=> true
			'default'	=> null
			'default'	=> null
			'default'	=> null
			'default'	=> false,
			'boolean'	=> true
		'include'			   => [
			'default'	=> null
			'default'	=> true,
			'boolean'	=> true
			'default'	=> null
			'default'	=> false,
			'boolean'	=> true
			'default'	=> null
			'default'	=> false,
			'boolean'	=> true
			'default'	=> false,
			'boolean'	=> true
			'default'		=> '&#160;-&#160;',
			'strip_html'	=> true
			'default'	=> null,
			'integer'	=> true
			'default'	=> null
			'default'	=> []
			'default'	=> null
			'default'				=> null,
			'page_name_list'		=> true,
			'page_name_must_exist'	=> true,
			'set_criteria_found'	=> true
			'default'				=> null,
			'page_name_list'		=> true,
			'page_name_must_exist'	=> true,
			'set_criteria_found'	=> true
			'default'				=> null,
			'open_ref_conflict'		=> true,
			'page_name_list'		=> true,
			'page_name_must_exist'	=> true,
			'set_criteria_found'	=> true
			'default'				=> null,
			'open_ref_conflict'		=> true,
			'page_name_list'		=> true,
			'page_name_must_exist'	=> true,
			'set_criteria_found'	=> true
			'default'				=> null,
			'open_ref_conflict'		=> true,
			'page_name_list'		=> true,
			'page_name_must_exist'	=> false,
			'set_criteria_found'	=> true
			'default'				=> null,
			'open_ref_conflict'		=> true,
			'page_name_list'		=> true,
			'page_name_must_exist'	=> true,
			'set_criteria_found'	=> true
			'default'				=> null,
			'open_ref_conflict'		=> false,
			'page_name_list'		=> true,
			'page_name_must_exist'	=> true,
			'set_criteria_found'	=> true
			'default'				=> null,
			'open_ref_conflict'		=> true,
			'page_name_list'		=> true,
			'page_name_must_exist'	=> true,
			'set_criteria_found'	=> true
			'default'				=> null,
			'open_ref_conflict'		=> true,
			'page_name_list'		=> true,
			'page_name_must_exist'	=> true,
			'set_criteria_found'	=> true
			'default'				=> null,
			'open_ref_conflict'		=> true,
			'page_name_list'		=> true,
			'page_name_must_exist'	=> true,
			'set_criteria_found'	=> true
		'createdby'	=> [
			'default'				=> null,
			'set_criteria_found'	=> true,
			'open_ref_conflict'		=> true,
			'preserve_case'			=> true
		'notcreatedby'	=> [
			'default'				=> null,
			'set_criteria_found'	=> true,
			'open_ref_conflict'		=> true,
			'preserve_case'			=> true
		'modifiedby'	=> [
			'default'				=> null,
			'set_criteria_found'	=> true,
			'open_ref_conflict'		=> true,
			'preserve_case'			=> true
		'notmodifiedby'	=> [
			'default'				=> null,
			'set_criteria_found'	=> true,
			'open_ref_conflict'		=> true,
			'preserve_case'			=> true
			'default'				=> null,
			'set_criteria_found'	=> true,
			'open_ref_conflict'		=> true,
			'preserve_case'			=> true
		'notlastmodifiedby'	=> [
			'default'				=> null,
			'set_criteria_found'	=> true,
			'open_ref_conflict'		=> true,
			'preserve_case'			=> true
			'default'	=> 'unordered',
			'values'	=> [
			'default'	=> true,
			'boolean'	=> true
			'default'	=> true,
			'boolean'	=> true
			'default'	=> null,
			'default'	=> null,
			'default'	=> null,
			'default'	=> null,
			'default'	=> null,
			'default'	=> null,
			'default'				=> null,
			'db_format'				=> true,
			'set_criteria_found'	=> true
			'default'				=> null,
			'db_format'				=> true,
			'set_criteria_found'	=> true
			'default'	=> false,
			'boolean'	=> true
			'default'	=> null
			'default'	=> null
			'default'		=> 'Y-m-d H:i:s',
			'strip_html'	=> true
			'default'		=> null,
			'permission'	=> 'dpl_param_update_rules'
			'default'		=> null,
			'permission'	=> 'dpl_param_delete_rules'
			'default'	=> null
			'default'	=> null
			'default'	=> 'ascending',
			'values'	=> [ 'ascending', 'descending', 'asc', 'desc' ]
			'default'	=> [ 'none' ],
			'values'	=> [
			'default'			=> null,
			'values'			=> [ 'include', 'exclude' ],
			'open_ref_conflict'	=> true
			'default'			=> null,
			'timestamp'			=> true,
			'open_ref_conflict'	=> true
			'default'			=> null,
			'timestamp'			=> true,
			'open_ref_conflict'	=> true
			'default'			=> null,
			'timestamp'			=> true,
			'open_ref_conflict'	=> true
			'default'			=> null,
			'timestamp'			=> true,
			'open_ref_conflict'	=> true
			'default'	=> null,
			'integer'	=> true
			'default'	=> null,
			'integer'	=> true
			'default'	=> false,
			'boolean'	=> true
			'default'		=> null,
			'strip_html'	=> true,
			'preserve_case'	=> true
			'default'		=> null,
			'strip_html'	=> true,
			'preserve_case'	=> true
			'default'		=> null,
			'strip_html'	=> true,
			'preserve_case'	=> true
			'default'		=> null,
			'strip_html'	=> true,
			'preserve_case'	=> true
			'default'	=> false,
			'boolean'	=> true
			'default'	=> 'exclude',
			'values'	=> [ 'include', 'exclude', 'only' ]
			'default'	=> null,
			'values'	=> [ 'exclude', 'only' ]
			'default'	=> null,
			'values'	=> [ 'exclude', 'only' ]
			'default'		=> null,
			'strip_html'	=> true,
			'preserve_case'	=> true
			'default'		=> null,
			'strip_html'	=> true,
			'preserve_case'	=> true
			'values'	=> [
			'default'	=> 1,
			'integer'	=> true
			'default'	=> 0,
			'integer'	=> true
			'default'		=> null,
			'strip_html'	=> true
			'default'	=> 0,
			'integer'	=> true
			'default'			=> false,
			'boolean'			=> true,
			'open_ref_conflict'	=> true
			'default'	=> true,
			'boolean'	=> true
			'default'	=> null
			'default'	=> null
			'default'	=> []
			'default'	=> null,
			'integer'	=> true
			'default'	=> null,
			'values'	=> ['standard', 'natural']
			'default'	=> null,
			'integer'	=> true
	/**
	 * Main Constructor
	 *
	 * @access	public
	 * @return	void
	 */
		if ( \DynamicPageListHooks::isLikeIntersection() ) {
				'default'	=> 'categoryadd',
				'values'	=> [
				'default'	=> 'descending',
				'values'	=> [
				'default'	=> 'unordered',
				'values'	=> [
	 * @access	public
	 * @param	string	Parameter name.
	 * @return	boolean	Exists
	 * @access	public
	 * @param	string	Parameter name.
	 * @return	mixed	Parameter array or false if it does not exist.
	 * @access	public
	 * @param	integer	Integer level.
	 * @return	void
	 * @access	public
	 * @return	integer
	 * @access	public
	 * @param	string	Function to test.
	 * @return	boolean	Valid for this functional richness level.
	 * @access	public
	 * @param	integer	[Optional] Maximum richness level
	 * @return	array	The functional richness parameters list.
	 * @access	public
	 * @param	string	Parameter Name
	 * @return	mixed
	 * @access	public
	 * @param	string	Parameter Name
	 * @return	mixed	Array of allowed values or false that the parameter allows any.
	 * @access	public
	 * @param	string	Parameter Name
	 * @return	bool
	 * @access	public
	 * @param	string	Parameter Name
	 * @return	bool
	 * @access	public
	 * @param	string	Parameter Name
	 * @return	bool
	 * @access	public
	 * @param	string	Parameter Name
	 * @return	bool
	 * @access	public
	 * @param	string	Parameter Name
	 * @return	bool
	 * @access	public
	 * @param	string	Parameter Name
	 * @return	bool
/**
 * DynamicPageList3
 * DPL Parse Class
 *
 * @author		IlyaHaykinson, Unendlich, Dangerville, Algorithmix, Theaitetos, Alexia E. Smith, Universal Omega
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
	 * @var object
	 * Mediawiki Parser Object
	 *
	 * @var object
	 */
	private $parser = null;

	/**
	 * \DPL\Parameters Object
	 * @var object
	 * \DPL\Logger Object
	 * @var object
	 * @var array
	/**
	 * Main Constructor
	 *
	 * @access	public
	 * @return	void
	 */
		$this->DB			= wfGetDB( DB_REPLICA, 'dpl' );
		$this->parameters	= new Parameters();
		$this->logger		= new Logger( $this->parameters->getData( 'debug' )['default'] );
		$this->tableNames	= Query::getTableNames();
		$this->wgRequest	= $wgRequest;
	 * @access	public
	 * @param	string	Raw User Input
	 * @param	object	Mediawiki Parser object.
	 * @param	array	End Reset Booleans
	 * @param	array	End Eliminate Booleans
	 * @param	boolean	[Optional] Called as a parser tag
	 * @return	string	Wiki/HTML Output
	public function parse( $input, \Parser $parser, &$reset, &$eliminate, $isParserTag = false ) {
		$this->parser = $parser;
		//Reset headings when being ran more than once in the same page load.
		//Check that we are not in an infinite transclusion loop
		if ( isset( $this->parser->mTemplatePath[$this->parser->mTitle->getPrefixedText()] ) ) {
			$this->logger->addMessage( \DynamicPageListHooks::WARN_TRANSCLUSIONLOOP, $this->parser->mTitle->getPrefixedText() );
		//Check if DPL shall only be executed from protected pages.
		if ( Config::getSetting( 'runFromProtectedPagesOnly' ) === true && !$this->parser->mTitle->isProtected( 'edit' ) ) {
			//Ideally we would like to allow using a DPL query if the query istelf is coded on a template page which is protected. Then there would be no need for the article to be protected.  However, how can one find out from which wiki source an extension has been invoked???
			$this->logger->addMessage( \DynamicPageListHooks::FATAL_NOTPROTECTED, $this->parser->mTitle->getPrefixedText() );
		$this->getUrlArgs( $this->parser );
		$this->parameters->setParameter( 'offset', $this->wgRequest->getInt( 'DPL_offset', $this->parameters->getData( 'offset' )['default'] ) );
			//Short circuit for dumb things.
			$this->logger->addMessage( \DynamicPageListHooks::FATAL_NOSELECTION );
				//Parameter functions return true or false.  The full parameter data will be passed into the Query object later.
					//Do not build this into the output just yet.  It will be collected at the end.
					$this->logger->addMessage( \DynamicPageListHooks::WARN_WRONGPARAM, $parameter, $_option );
			//The keyword "geturlargs" is used to return the Url arguments and do nothing else.
				return;
			//In all other cases we return the value of the argument which may contain parser function calls.
		//Construct internal keys for TableRow according to the structure of "include".  This will be needed in the output phase.
			//WHAT HAS HAPPENED OH NOOOOOOOOOOOOO.
			$this->query = new Query( $this->parameters );
			$result = $this->query->buildAndSelect( $calcRows );
			$this->logger->addMessage( \DynamicPageListHooks::FATAL_SQLBUILDERROR, $e->getMessage() );
		$articles = $this->processQueryResults( $result );
		if ( \DynamicPageListHooks::getDebugLevel() >= 4 && $wgDebugDumpSql ) {
			$this->addOutput( $this->query->getSqlQuery() . "\n" );
		//Preset these to defaults.
		$this->setVariable( 'TOTALPAGES', 0 );
		$this->setVariable( 'PAGES', 0 );
		$this->setVariable( 'VERSION', DPL_VERSION );
			//Shortcut out since there is no processing to do.
			$foundRows = $this->query->getFoundRows();
		//Backward scrolling: If the user specified only titlelt with descending reverse the output order.
		//Special sort for card suits (Bridge)
		$lister = Lister::newFromStyle( $this->parameters->getParameter( 'mode' ), $this->parameters, $this->parser );
		//$this->addOutput($lister->format($articles));
			$foundRows = $lister->getRowCount(); //Get row count after calling format() otherwise the count will be inaccurate.
		$this->setVariable( 'TOTALPAGES', $foundRows ); //Guaranteed to be an accurate count if SQL_CALC_FOUND_ROWS was used.  Otherwise only accurate if results are less than the SQL LIMIT.
		$this->setVariable( 'PAGES', $lister->getRowCount() ); //This could be different than TOTALPAGES.  PAGES represents the total results within the constraints of SQL LIMIT.
		$nowTimeStamp   = date( 'Y/m/d H:i:s' );
		//Replace %LASTTITLE% / %LASTNAMESPACE% by the last title found in header and footer
		if ( ( $n = count( $articles ) ) > 0 ) {
			$firstTitleFound     = str_replace( ' ', '_', $articles[0]->mTitle->getText() );
			$lastNamespaceFound  = str_replace( ' ', '_', $articles[$n - 1]->mTitle->getNamespace() );
			$lastTitleFound      = str_replace( ' ', '_', $articles[$n - 1]->mTitle->getText() );
			'DPL_firstNamespace'	=> $firstNamespaceFound,
			'DPL_firstTitle'		=> $firstTitleFound,
			'DPL_lastNamespace'		=> $lastNamespaceFound,
			'DPL_lastTitle'			=> $lastTitleFound,
			'DPL_scrollDir'			=> $this->parameters->getParameter( 'scrolldir' ),
			'DPL_time'				=> $dplTime,
			'DPL_count'				=> $this->parameters->getParameter( 'count' ),
			'DPL_totalPages'		=> $foundRows,
			'DPL_pages'				=> $lister->getRowCount()
		$this->defineScrollVariables( $scrollVariables );
			$this->parser->getOutput()->updateCacheExpiry( $this->parameters->getParameter( 'cacheperiod' ) ?? 3600 );
			$this->parser->getOutput()->updateCacheExpiry( 0 );
		$this->triggerEndResets( $finalOutput, $reset, $eliminate, $isParserTag );
	 * @private
	 * @param	object	Mediawiki Result Object
	 * @return	array	Array of Article objects.
	private function processQueryResults( $result ) {
			//mt_srand() seeding was removed due to PHP 5.2.1 and above no longer generating the same sequence for the same seed.
			//This is 50% to 150% faster than the old while (true) version that could keep rechecking the same random key over and over again.
			//Generate pick numbers for results.
			//Shuffle the pick numbers.
			//Select pick numbers from the beginning to the maximum of $randomCount.
			//In random mode skip articles which were not chosen.
			if ( $randomCount > 0 && !in_array( $i, $pick ) ) {
				$pageTitle     = $row['cl_to'];
					$pageTitle     = $row['il_to'];
					//Maybe non-existing title
					$pageTitle     = $row['pl_title'];
				//Existing PAGE TITLE
				$pageTitle     = $row['page_title'];
			$title     = \Title::makeTitle( $pageNamespace, $pageTitle );
			$thisTitle = $this->parser->getTitle();
			//Block recursion from happening by seeing if this result row is the page the DPL query was ran from.
	 * @private
	 * @param	string	Raw User Input
	 * @return	array	Array of raw text parameter => option.
		//We replace double angle brackets with single angle brackets to avoid premature tag expansion in the input.
		//The ¦ symbol is an alias for |.
		//The combination '²{' and '}²'will be translated to double curly braces; this allows postponed template execution which is crucial for DPL queries which call other DPL queries.
		//Standard new lines into the standard \n and clean up any hanging new lines.
		$parameters = false;
				//Softly ignore blank lines.
				$this->logger->addMessage( \DynamicPageListHooks::WARN_PARAMNOOPTION, $parameterOption );
			list( $parameter, $option ) = explode( '=', $parameterOption, 2 );
			$option  = trim( $option );
				//Having the actual less than and greater than symbols is nasty for programatic look up.  The old parameter is still supported along with the new, but we just fix it here before calling it.
			$parameter = strtolower( $parameter ); //Force lower case for ease of use.
				$this->logger->addMessage( \DynamicPageListHooks::WARN_UNKNOWNPARAM, $parameter, implode( ', ', $this->parameters->getParametersForRichness() ) );
			//Ignore parameter settings without argument (except namespace and category).
	 * @private
	 * @param	string	Output to add
	 * @return	void
	 * @private
	 * @return	string	Output Text
		//@TODO: 2015-08-28 Consider calling $this->replaceVariables() here.  Might cause issues with text returned in the results.
	 * @private
	 * @param	boolean	[Optional] Total results.
	 * @param	boolean	[Optional] Skip adding the header and footer.
	 * @return	string	Output
			//Only override header and footers if specified.
			$_headerType = $this->getHeaderFooterType( 'header', $totalResults );
			$_footerType = $this->getHeaderFooterType( 'footer', $totalResults );
			$this->logger->addMessage( \DynamicPageListHooks::WARN_NORESULTS );
	 * @private
	 * @param	string	Header Text
	 * @return	void
		if ( \DynamicPageListHooks::getDebugLevel() == 5 ) {
	 * @private
	 * @return	string	Header Text
	 * @private
	 * @param	string	Footer Text
	 * @return	void
		if ( \DynamicPageListHooks::getDebugLevel() == 5 ) {
	 * @private
	 * @return	string	Footer Text
	 * @private
	 * @param	string	Page position to check: 'header' or 'footer'.
	 * @param	integer	Count of pages.
	 * @return	mixed	Type to use: 'results', 'oneresult', or 'noresults'.  False if invalid or none should be used.
	 * @private
	 * @param	string	Variable name, will be transformed to uppercase and have leading and trailing percent signs added.
	 * @param	string	Text to replace the variable with.
	 * @return	void
	 * @private
	 * @param	string	Text to perform replacements on.
	 * @return	string	Replaced Text
	 * @private
	 * @param	string	Text
	 * @return	string	New Lined Text
	 * @private
	 * @return	void
		//Too many categories.
			$this->logger->addMessage( \DynamicPageListHooks::FATAL_TOOMANYCATS, Config::getSetting( 'maxCategoryCount' ) );
		//Not enough categories.(Really?)
			$this->logger->addMessage( \DynamicPageListHooks::FATAL_TOOFEWCATS, Config::getSetting( 'minCategoryCount' ) );
		//Selection criteria needs to be found.
			$this->logger->addMessage( \DynamicPageListHooks::FATAL_NOSELECTION );
		//ordermethod=sortkey requires ordermethod=category
		//Delayed to the construction of the SQL query, see near line 2211, gs
		//if (in_array('sortkey',$aOrderMethods) && ! in_array('category',$aOrderMethods)) $aOrderMethods[] = 'category';
		//Throw an error in no categories were selected when using category sorting modes or requesting category information.
			$this->logger->addMessage( \DynamicPageListHooks::FATAL_CATDATEBUTNOINCLUDEDCATS );
		//No more than one type of date at a time!
		//@TODO: Can this be fixed to allow all three later after fixing the article class?
			$this->logger->addMessage( \DynamicPageListHooks::FATAL_MORETHAN1TYPEOFDATE );
			$this->logger->addMessage( \DynamicPageListHooks::FATAL_DOMINANTSECTIONRANGE, count( $this->parameters->getParameter( 'seclabels' ) ) );
			$this->logger->addMessage( \DynamicPageListHooks::FATAL_WRONGORDERMETHOD, 'mode=category', 'sortkey | title | titlewithoutnamespace' );
			$this->logger->addMessage( \DynamicPageListHooks::FATAL_WRONGORDERMETHOD, 'addpagetoucheddate=true', 'pagetouched | title' );
		//firstedit (resp. lastedit) -> add date of first (resp. last) revision
			$this->logger->addMessage( \DynamicPageListHooks::FATAL_WRONGORDERMETHOD, 'addeditdate=true', 'firstedit | lastedit' );
			$this->logger->addMessage( \DynamicPageListHooks::FATAL_WRONGORDERMETHOD, 'adduser=true', 'firstedit | lastedit' );
			$this->logger->addMessage( \DynamicPageListHooks::FATAL_WRONGORDERMETHOD, 'minoredits', 'firstedit | lastedit' );
		//add*** parameters have no effect with 'mode=category' (only namespace/title can be viewed in this mode)
			$this->logger->addMessage( \DynamicPageListHooks::WARN_CATOUTPUTBUTWRONGPARAMS );
		//headingmode has effects with ordermethod on multiple components only
			$this->logger->addMessage( \DynamicPageListHooks::WARN_HEADINGBUTSIMPLEORDERMETHOD, $this->parameters->getParameter( 'headingmode' ), 'none' );
		//The 'openreferences' parameter is incompatible with many other options.
			$this->logger->addMessage( \DynamicPageListHooks::FATAL_OPENREFERENCES );
	 * @access	public
	 * @param	array	Array of 'tablerow' parameter data.
	 * @param	array	Array of 'include' parameter data.
	 * @return	array	Updated 'tablerow' parameter.
		$_tableRow	= (array)$tableRow;
		$tableRow	= [];
		$groupNr	= -1;
		$t			= -1;
				$n     = count( explode( ':', $cols[1] ) );
	 * @access	public
	 * @param	string	Raw Uncleaned User Input
	 * @param	array	Array of URL arguments to resolve.  Non-arrays will be casted to an array.
	 * @return	string	Raw input with variables replaced
			$dplArg = $this->wgRequest->getVal( $arg, '' );
	 * @access	public
	 * @return	void
	private function getUrlArgs() {
		$args = $this->wgRequest->getValues();
				\ExtVariables::get( $this->parser )->setVarValue( $argName, $argValue );
	 * This function uses the Variables extension to provide navigation aids such as DPL_firstTitle, DPL_lastTitle, or DPL_findTitle.  These variables can be accessed as {{#var:DPL_firstTitle}} if Extension:Variables is installed.
	 * @access	public
	 * @param	array	Array of scroll variables with the key as the variable name and the value as the value.  Non-arrays will be casted to arrays.
	 * @return	void
	private function defineScrollVariables( $scrollVariables ) {
				\ExtVariables::get( $this->parser )->setVarValue( $variable, $value );
	 * @private
	 * @param	string	Full output including header, footer, and any warnings.
	 * @param	array	End Reset Booleans
	 * @param	array	End Eliminate Booleans
	 * @param	boolean	Call as a parser tag
	 * @return	void
	private function triggerEndResets( $output, &$reset, &$eliminate, $isParserTag ) {
		$localParser = \MediaWiki\MediaWikiServices::getInstance()->getParserFactory()->create();
		$parserOutput = $localParser->parse( $output, $this->parser->mTitle, $this->parser->mOptions );
			//In tag mode 'eliminate' is the same as 'reset' for templates, categories, and images.
				\DynamicPageListHooks::$createdLinks['resetTemplates'] = true;
				\DynamicPageListHooks::$createdLinks['resetCategories'] = true;
				\DynamicPageListHooks::$createdLinks['resetImages'] = true;
				\DynamicPageListHooks::$createdLinks['resetLinks'] = true;
			//Register a hook to reset links which were produced during parsing DPL output.
			//Register a hook to reset links which were produced during parsing DPL output
				//Trigger the mediawiki parser to find links, images, categories etc. which are contained in the DPL output.  This allows us to remove these links from the link list later.  If the article containing the DPL statement itself uses one of these links they will be thrown away!
				\DynamicPageListHooks::$createdLinks[0] = [];
					\DynamicPageListHooks::$createdLinks[0][$nsp] = $link;
				\DynamicPageListHooks::$createdLinks[1] = [];
					\DynamicPageListHooks::$createdLinks[1][$nsp] = $tpl;
				\DynamicPageListHooks::$createdLinks[2] = $parserOutput->mCategories;
				\DynamicPageListHooks::$createdLinks[3] = $parserOutput->mImages;
	 * @private
	 * @param	array	Article objects in an array.
	 * @return	array	Sorted objects
			$title  = preg_replace( '/.*:/', '', $article->mTitle );
			$tokens  = preg_split( '/ - */', $title );
/**
 * DynamicPageList3
 * DPL Variables Class
 *
 * @author		IlyaHaykinson, Unendlich, Dangerville, Algorithmix, Theaitetos, Alexia E. Smith, Universal Omega
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
	 * @var object
	 * @var object
	 * @var int
	 * @var int
	 * @var string
	 * Main Constructor
	 *
	 * @access	public
	 * @param	\DPL\Parameters	$parameters
	 * @return	void
	public function __construct( Parameters $parameters ) {
	 * @access	public
	 * @param	boolean	Calculate Found Rows
	 * @return	mixed	Mediawiki Result Object or False
			//Some parameters do not modifiy the query so we check if the function to modify the query exists first.
				throw new \MWException( __METHOD__ . ": SQL Build Error returned from {$function} for " . serialize( $option ) . "." );
			//Add things that are always part of the query.
		//Always add nonincludeable namespaces.
		} elseif ( $this->offset !== false && $this->limit === false ) {
				//$sSqlSelectFrom = $sSqlCl_to.'ic.il_to, '.$sSqlSelPage."ic.il_to AS sortkey".' FROM '.$this->tableNames['imagelinks'].' AS ic';
				//$sSqlSelectFrom = "SELECT $sSqlCalcFoundRows $sSqlDistinct ".$sSqlCl_to.'pl_namespace, pl_title'.$sSqlSelPage.$sSqlSortkey.' FROM '.$this->tableNames['pagelinks'];
						'clgoal'	=> 'categorylinks'
						'clgoal.cl_from'	=> $pageIds
						'ORDER BY'	=> 'clgoal.cl_to ' . $this->direction
		if ( $queryError == true || $result === false ) {
			throw new \MWException( __METHOD__ . ": " . wfMessage( 'dpl_query_error', DPL_VERSION, $this->DB->lastError() )->text() );
	 * @access	public
	 * @return	integer	Number of Found Rows
	 * @access	public
	 * @return	string	SQL Query
	 * @access	public
	 * @return	array	Prepared table names.
			'revision_actor_temp',
	 * @access	public
	 * @param	string	Raw Table Name - Will be ran through tableName().
	 * @param	string	Table Alias
	 * @return	boolean	Success - Added, false if the table alias already exists.
			throw new \MWException( __METHOD__ . ': An empty table name was passed.' );
			throw new \MWException( __METHOD__ . ': An empty or numeric table alias was passed.' );
	 * Where clauses get imploded together with AND at the end.	 Any custom where clauses should be preformed before placed into here.
	 * @access	public
	 * @param	string	Where clause
	 * @return	boolean	Success
			throw new \MWException( __METHOD__ . ': An empty where clause was passed.' );
			throw new \MWException( __METHOD__ . ': An invalid where clause was passed.' );
			return false;
	 * @access	public
	 * @param	array	Field => Value(s)
	 * @return	boolean	Success
			throw new \MWException( __METHOD__ . ': An empty not where clause was passed.' );
			return false;
			throw new \MWException( __METHOD__ . ': An invalid not where clause was passed.' );
			return false;
	 * @access	public
	 * @param	array	Array of fields with the array key being the field alias.  Leave the array key as a numeric index to not specify an alias.
	 * @return	boolean	Success
			throw new \MWException( __METHOD__ . ': A non-array was passed.' );
				//In case of a code bug that is overwriting an existing field alias throw an exception.
				throw new \MWException( __METHOD__ . ": Attempted to overwrite existing field alias `{$this->select[$alias]}` AS `{$alias}` with `{$field}` AS `{$alias}`." );
			//String alias and does not exist already.
			//Speed up by not using in_array() or array_key_exists().  Toss the field names into their own array as keys => true to exploit a speedy look up with isset().
	 * @access	public
	 * @param	string	Group By Clause
	 * @return	boolean	Success
			throw new \MWException( __METHOD__ . ': An empty group by clause was passed.' );
	 * @access	public
	 * @param	string	Order By Clause
	 * @return	boolean	Success
			throw new \MWException( __METHOD__ . ': An empty order by clause was passed.' );
	 * @access	public
	 * @param	string	Table Alias
	 * @param	array	Join Conditions in the format of the join type to the on where condition.  Example: ['JOIN TYPE' => 'this = that']
	 * @return	boolean	Success
			throw new \MWException( __METHOD__ . ': An empty join clause was passed.' );
			throw new \MWException( __METHOD__ . ': Attempted to overwrite existing join clause.' );
	 * @access	public
	 * @param	mixed	Integer limit or false to unset.
	 * @return	boolean	Success
	 * @access	public
	 * @param	mixed	Integer offset or false to unset.
	 * @return	boolean	Success
	 * @access	public
	 * @param	string	SQL direction key word.
	 * @return	boolean	Success
	 * @access	public
	 * @param	string	Collation
	 * @return	void
	 * @access	public
	 * @return	string	SQL Collation
	 * @access	public
	 * @param	string	Category Name
	 * @param	integer	[Optional] Maximum Depth
	 * @return	array	Subcategories
			//Hard constrain depth because lots of recursion is bad.
	 * @private
	 * @param	mixed	Integer or string
	 * @return	integer
				$date = new \DateTime();
				$date->sub( new \DateInterval( 'P1H' ) );
				$date = new \DateTime();
				$date->sub( new \DateInterval( 'P1D' ) );
				$date = new \DateTime();
				$date->sub( new \DateInterval( 'P7D' ) );
				$date = new \DateTime();
				$date->sub( new \DateInterval( 'P1M' ) );
				$date = new \DateTime();
				$date->sub( new \DateInterval( 'P1Y' ) );
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		//Addauthor can not be used with addlasteditor.
			$this->addTable( 'revision_actor_temp', 'rev' );
			$this->addWhere(
				[
					$this->tableNames['page'] . '.page_id = rev.revactor_page',
					'rev.revactor_timestamp = (SELECT MIN(rev_aux_min.revactor_timestamp) FROM ' . $this->tableNames['revision_actor_temp'] . ' AS rev_aux_min WHERE rev_aux_min.revactor_page = rev.revactor_page)'
				]
			$this->_adduser( null, 'rev' );
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		$this->addTable( 'recentchanges', 'rc' );
		$field = 'rc.rc_actor';
		$this->addSelect(
			[
				'contribution'	=> 'SUM(ABS(rc.rc_new_len - rc.rc_old_len))',
				'contributor'	=> $field
			]
		);
		$this->addWhere(
			[
				$this->tableNames['page'] . '.page_id = rc.rc_cur_id'
			]
		);
		$this->addGroupBy( 'rc.rc_cur_id' );
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		$this->addTable( 'revision_actor_temp', 'rev' );
		$this->addSelect( [ 'rev.revactor_timestamp' ] );
				$this->tableNames['page'] . '.page_id = rev.revactor_page',
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		//@TODO: This should be programmatically determining which categorylink table to use instead of assuming the first one.
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		//Addlasteditor can not be used with addauthor.
			$this->addTable( 'revision_actor_temp', 'rev' );
			$this->addWhere(
				[
					$this->tableNames['page'] . '.page_id = rev.revactor_page',
					'rev.revactor_timestamp = (SELECT MAX(rev_aux_max.revactor_timestamp) FROM ' . $this->tableNames['revision_actor_temp'] . ' AS rev_aux_max WHERE rev_aux_max.revactor_page = rev.revactor_page)'
				]
			);
			$this->_adduser( null, 'rev' );
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	/**
	 * Set SQL for 'adduser' parameter.
	 *
	 * @private
	 * @param	mixed	Parameter Option
	 * @param	string	[Optional] Table Alias
	 * @return	void
	 */
	private function _adduser( $option, $tableAlias = '' ) {
		$tableAlias = ( !empty( $tableAlias ) ? $tableAlias . '.' : '' );
		$this->addSelect(
			[
				$tableAlias . 'revactor_actor',
			]
		);
	}

	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		$this->addTable( 'revision_actor_temp', 'rev' );
				'rev.revactor_rev',
				'rev.revactor_timestamp'
		$this->addOrderBy( 'rev.revactor_rev' );
				$this->tableNames['page'] . '.page_id = rev.revactor_page',
				'rev.revactor_timestamp < ' . $this->convertTimestamp( $option )
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		$this->addTable( 'revision_actor_temp', 'rev' );
				'rev.revactor_rev',
				'rev.revactor_timestamp'
		$this->addOrderBy( 'rev.revactor_rev' );
				$this->tableNames['page'] . '.page_id = rev.revactor_page',
				'rev.revactor_timestamp >= ' . $this->convertTimestamp( $option )
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		if ( is_numeric( $option[1] ) ) {
	 * Set SQL for 'category' parameter.  This includes 'category', 'categorymatch', and 'categoryregexp'.
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		$this->addTable( 'revision', 'creation_rev' );
		$this->addTable( 'revision_actor_temp', 'creation_rev_actor' );
		$this->_adduser( null, 'creation_rev_actor' );
		$user = new \User;

		$this->addWhere(
			[
				$this->DB->addQuotes( $user->newFromName( $option )->getActorId() ) . ' = creation_rev_actor.revactor_actor',
				'creation_rev_actor.revactor_page = page_id',
				'creation_rev.rev_parent_id = 0'
			]
		);
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		$this->addTable( 'revision_actor_temp', 'rev' );
				'rev.revactor_rev',
				'rev.revactor_timestamp'
				$this->tableNames['page'] . '.page_id = rev.revactor_page',
				'rev.revactor_timestamp >= ' . $this->DB->addQuotes( $option )
				$this->tableNames['page'] . '.page_id = rev.revactor_page',
				'rev.revactor_timestamp = (SELECT MIN(rev_aux_snc.revactor_timestamp) FROM ' . $this->tableNames['revision_actor_temp'] . ' AS rev_aux_snc WHERE rev_aux_snc.revactor_page=rev.revactor_page AND rev_aux_snc.revactor_timestamp >= ' . $this->convertTimestamp( $option ) . ')'
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		//@TODO: Unfinished functionality!  Never implemented by original author.
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	   $user = new \User;

	   $this->addWhere( $this->DB->addQuotes( $user->newFromName( $option )->getActorId() ) . ' = (SELECT revactor_actor FROM ' . $this->tableNames['revision_actor_temp'] . ' WHERE ' . $this->tableNames['revision_actor_temp'] . '.revactor_page=page_id ORDER BY ' . $this->tableNames['revision_actor_temp'] . '.revactor_timestamp DESC LIMIT 1)' );
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		$this->addTable( 'revision_actor_temp', 'rev' );
		$this->addSelect( [ 'rev.revactor_rev', 'rev.revactor_timestamp' ] );
				$this->tableNames['page'] . '.page_id = rev.revactor_page',
				'rev.revactor_timestamp < ' . $this->convertTimestamp( $option )
				$this->tableNames['page'] . '.page_id = rev.revactor_page',
				'rev.revactor_timestamp = (SELECT MAX(rev_aux_bef.revactor_timestamp) FROM ' . $this->tableNames['revision_actor_temp'] . ' AS rev_aux_bef WHERE rev_aux_bef.revactor_page=rev.revactor_page AND rev_aux_bef.revactor_timestamp < ' . $this->convertTimestamp( $option ) . ')'
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		$this->addWhere( $where );
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		$this->addWhere( "((SELECT count(rev_aux3.revactor_page) FROM {$this->tableNames['revision_actor_temp']} AS rev_aux3 WHERE rev_aux3.revactor_page = {$this->tableNames['page']}.page_id) <= {$option})" );
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
			$this->addTable( 'revision', 'revision' );
			$this->addWhere( 'revision.rev_minor_edit = 0' );
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		$this->addWhere( "((SELECT count(rev_aux2.revactor_page) FROM {$this->tableNames['revision_actor_temp']} AS rev_aux2 WHERE rev_aux2.revactor_page = {$this->tableNames['page']}.page_id) >= {$option})" );
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		$this->addTable( 'revision_actor_temp', 'change_rev' );
		$user = new \User;

		$this->addWhere( $this->DB->addQuotes( $user->newFromName( $option )->getActorId() ) . ' = change_rev.revactor_actor AND change_rev.revactor_page = page_id' );
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		$option === 0 ?? $option = '0';
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		$this->addTable( 'revision', 'no_creation_rev' );
		$this->addTable( 'revision_actor_temp', 'no_creation_rev_actor' );
		$user = new \User;

		$this->addWhere( $this->DB->addQuotes( $user->newFromName( $option )->getActorId() ) . ' != no_creation_rev_actor.revactor_actor AND no_creation_rev_actor.revactor_page = page_id AND no_creation_rev.rev_parent_id = 0' );
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		$user = new \User;
		$this->addWhere( $this->DB->addQuotes( $user->newFromName( $option )->getActorId() ) . ' != (SELECT revactor_actor FROM ' . $this->tableNames['revision_actor_temp'] . ' WHERE ' . $this->tableNames['revision_actor_temp'] . '.revactor_page=page_id ORDER BY ' . $this->tableNames['revision_actor_temp'] . '.revactor_timestamp DESC LIMIT 1)' );
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		$user = new \User;
		$this->addWhere( 'NOT EXISTS (SELECT 1 FROM ' . $this->tableNames['revision_actor_temp'] . ' WHERE ' . $this->tableNames['revision_actor_temp'] . '.revactor_page=page_id AND ' . $this->tableNames['revision_actor_temp'] . '.revactor_actor = ' . $this->DB->addQuotes( $user->newFromName( $option )->getActorId() ) . ' LIMIT 1)' );
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		$contLang = MediaWikiServices::getInstance()->getContentLanguage();

			//No order methods for returning categories.
		$namespaces = $contLang->getNamespaces();
		//$aStrictNs = array_slice((array) Config::getSetting('allowedNamespaces'), 1, count(Config::getSetting('allowedNamespaces')), true);
					$this->addSelect( [ 'cl_head.cl_to' ] ); //Gives category headings in the result.
					//@TODO: See TODO in __addfirstcategorydate().
						//If the "addpagecounter" parameter was not used the table and join need to be added now.
					$this->addOrderBy( 'rev.revactor_timestamp' );
					$this->addTable( 'revision_actor_temp', 'rev' );
					$this->addSelect(
						[
							'rev.revactor_timestamp'
						]
					);
					if ( !$this->revisionAuxWhereAdded ) {
						$this->addWhere(
							[
								"{$this->tableNames['page']}.page_id = rev.revactor_page",
								"rev.revactor_timestamp = (SELECT MIN(rev_aux.revactor_timestamp) FROM {$this->tableNames['revision_actor_temp']} AS rev_aux WHERE rev_aux.revactor_page=rev.revactor_page)"
							]
						);
					}
					$this->revisionAuxWhereAdded = true;
					if ( \DynamicPageListHooks::isLikeIntersection() ) {
						$this->addOrderBy( 'rev.revactor_timestamp' );
						$this->addTable( 'revision_actor_temp', 'rev' );
						$this->addSelect( [ 'rev.revactor_timestamp' ] );
						if ( !$this->revisionAuxWhereAdded ) {
							$this->addWhere(
								[
									"{$this->tableNames['page']}.page_id = rev.revactor_page",
									"rev.revactor_timestamp = (SELECT MAX(rev_aux.revactor_timestamp) FROM {$this->tableNames['revision_actor_temp']} AS rev_aux WHERE rev_aux.revactor_page = rev.revactor_page)"
								]
							);
						}
						$this->revisionAuxWhereAdded = true;
							//This runs on the assumption that at least one category parameter was used and that numbering starts at 1.
								'sortkey' => "REPLACE(CONCAT(IF(pl_namespace  =0, '', CONCAT(" . $_namespaceIdToText . ", ':')), pl_title), '_', ' ') " . $this->getCollateSQL()
						//Generate sortkey like for category links. UTF-8 created problems with non-utf-8 MySQL databases.
					$user = new \User;
					$this->addOrderBy( $user->newFromName( 'rev.revactor_actor' )->getActorId() );
					$this->addTable( 'revision_actor_temp', 'rev' );
					$this->_adduser( null, 'rev' );
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
			//Do not add this again if 'qualitypages' has already added it.
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
			//Do not add this again if 'stablepages' has already added it.
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
				$where .= 'pl_title >= ' . $this->DB->addQuotes( substr( $sTitleGE, 2 ) );
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
	 * @private
	 * @param	mixed	Parameter Option
	 * @return	void
		$this->addWhere( $where );
/**
 * DynamicPageList3
 * DPL UpdateArticle Class
 *
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
	 * (2) set template parameters to  values specified in the query (exec=set)v
		$rulesText       = str_replace( ";", '°', $rulesText );
		$rulesText       = str_replace( '\°', ';', $rulesText );
		$rulesText       = str_replace( "\\n", "\n", $rulesText );
		$rules           = explode( '°', $rulesText );
		$exec            = 'edit';
		$replaceThis     = '';
		$replacement     = '';
		$after           = '';
		$insertionAfter  = '';
		$before          = '';
		$template        = '';
		$parameter       = [];
		$value           = [];
		$afterparm       = [];
		$format          = [];
		$preview         = [];
		$save            = [];
		$tooltip         = [];
		$optional        = [];

		$lastCmd         = '';
		$message         = '';
		$summary         = '';
		$editForm        = false;
		$action          = '';
		$hidden          = [];
		$legendPage      = '';
		$table           = '';
		$fieldFormat     = '';
		// $message .= 'updaterules=<pre><nowiki>';
				continue; // # is comment symbol
			$rule = preg_replace( '/^[\s]*/', '', $rule ); // strip leading white space
			$cmd  = preg_split( "/ +/", $rule, 2 );
			// after ... insert ...     ,   before ... insert ...
				$before  = $arg;
				$after   = $arg;
					$n              = $nr - 1;
				$summary .= "\n before  $before\n insertionBefore";
				$summary .= "\n after   $after\n insertionAfter";
		// $message.= '</nowiki></pre>';

		global $wgRequest, $wgUser;
		if ( $template != '' ) {
				$tpv        = self::getTemplateParmValues( $text, $template );
					global $wgParser, $wgUser;
					$parser = clone $wgParser;
				$instructions    = [];
					global $wgParser, $wgUser;
					$parser = clone $wgParser;
						$myType        = '';
				$form .= "<input type='hidden' name='wpEditToken' value='{$wgUser->getEditToken()}'/>";
						$myOptional  = array_key_exists( $nr, $optional );
						$text = self::updateTemplateCall( $matchCount, $text, $template, $call, $parm, $myValue, $myAfterParm, $myOptional );
						break; // values taken from dpl text only populate the first invocation
			return self::updateArticle( $title, $text, $summary );
			$titleX   = \Title::newFromText( $title );
			$articleX = new \Article( $titleX );
			$form     = '<html>
		<input type="hidden" value="' . $articleX->getTimestamp() . '" name="wpEdittime" />
		<textarea tabindex="1" accesskey="," name="wpTextbox1" id="wpTextbox1" rows="' . $wgUser->getIntOption( 'rows' ) . '" cols="' . $wgUser->getIntOption( 'cols' ) . '" >' . htmlspecialchars( $text ) . '</textarea>
	private static function updateArticle( $title, $text, $summary ) {
		global $wgUser, $wgRequest, $wgOut;
		if ( !$wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) ) ) {
		$titleX = \Title::newFromText( $title );
		$permission_errors = $titleX->getUserPermissionsErrors( 'edit', $wgUser );
			$articleX = \WikiPage::factory( $titleX );
			$articleXContent = \ContentHandler::makeContent( $text, $titleX );
			$articleX->doEditContent( $articleXContent, $summary, EDIT_UPDATE | EDIT_DEFER_UPDATES | EDIT_AUTOSUMMARY );
			$wgOut->redirect( $titleX->getFullUrl( $articleX->isRedirect() ? 'redirect=no' : '' ) );
		$matches   = [];
		$tval    = []; // the result array of template values
		$call    = -1; // index for tval
				$match         = $matchB[0];
				$start         = $matchB[1];
				$nr            = 0; // number of parameter if no name given
				$parmValue     = '';
				$parmName      = '';
				$parm          = '';
					break; // template was called without parameters, continue with next invocation
						$cbrackets++; // we count both types of brackets
						$parmName  = '';
						$parm      = '';
						break; // end of parameter list
		$matches   = [];
		$beginSubst  = -1;
		$endSubst    = -1;
		$apNrLast    = 1000; // last (optional) predecessor
					$beginSubst   = $i;
					$endSubst     = $i;
					$parm      = '';
					$pos       = $start + strlen( $match ) - 1;
					$textLen   = strlen( $text );
									$endSubst   = $i;
											$apNrLast    = $apNr;
							$pos  = $i;
		return substr( $text, 0, $beginSubst ) . $substitution . substr( $text, $endSubst );
	public function deleteArticleByRule( $title, $text, $rulesText ) {
		global $wgUser, $wgOut;
		$rules     = explode( '°', $rulesText );
		$exec      = false;
		$message   = '';
		$reason    = '';
			$rule = preg_replace( '/^[\s]*/', '', $rule ); // strip leading white space
			$cmd  = preg_split( "/ +/", $rule, 2 );
		$titleX = \Title::newFromText( $title );
			$permission_errors = $titleX->getUserPermissionsErrors( 'delete', $wgUser );
			} elseif ( wfReadOnly() ) {
				$wgOut->readOnlyPage();
				return 'DPL: read only mode';
				$articleX = new \Article( $titleX );
		$message .= "<pre><nowiki>\n{$text}</nowiki></pre>"; // <pre><nowiki>\n"; // .$text."\n</nowiki></pre>\n";
/**
 * DynamicPageList3
 * DPL Variables Class
 *
 * @author		IlyaHaykinson, Unendlich, Dangerville, Algorithmix, Theaitetos, Alexia E. Smith
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
		$var       = trim( $arg[2] );
		$value     = $arg[3];
		if ( 0 !== strpos( $delimiter, '/' ) || ( strlen( $delimiter ) - 1 ) !== strrpos( $delimiter, '/' ) ) {
		$var  = trim( $arg[2] );
		$n    = 0;
		$values          = self::$memoryArray[$var];
			'noparse'	=> false,
			'isHTML'	=> false
/**
 * DynamicPageList3
 * DPL DefinitionHeading Class
 *
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
	 * @access	public
	 * @param	integer	Article start index for this heading.
	 * @param	integer	Article count for this heading.
	 * @param	string	Heading link/text display.
	 * @param	array	List of \DPL\Article.
	 * @param	object	List of \DPL\Lister\Lister
	 * @return	string	Heading HTML
/**
 * DynamicPageList3
 * DPL List Class
 *
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
	 * @var constant
	 * Use %s for attribute placement.  Example: <div%s>
	 * Use %s for attribute placement.  Example: <div%s>
	 * @var array
	 * @var array
	 * \DPL\Parameters
	 * @var object
	protected $parameters = null;
	 * Main Constructor
	 *
	 * @access	public
	 * @param	object	\DPL\Parameters
	 * @return	void
	 * @access	public
	 * @param	string	Heading style.
	 * @param	object	\DPL\Parameters
	 * @param	object	MediaWiki \Parser
	 * @return	mixed	Heading subclass or null for a bad style.
	public static function newFromStyle( $style, \DPL\Parameters $parameters ) {
				$class = 'DefinitionHeading';
				$class = 'TieredHeading';
				$class = 'OrderedHeading';
				$class = 'UnorderedHeading';
				break;
		$class = '\DPL\Heading\\' . $class;
	 * Get the \DPL\Parameters object this object was constructed with.
	 * @access	public
	 * @return	object	\DPL\Parameters
	 * @access	public
	 * @param	string	Tag soup attributes, example: this="that" thing="no"
	 * @return	void
		$this->listAttributes = \Sanitizer::fixTagAttributes( $attributes, 'ul' );
	 * @access	public
	 * @param	string	Tag soup attributes, example: this="that" thing="no"
	 * @return	void
		$this->itemAttributes = \Sanitizer::fixTagAttributes( $attributes, 'li' );
	 * @access	public
	 * @param	boolean	[Optional] Show Heading Count
	 * @return	void
	 * @access	public
	 * @return	integer	List style constant.
	 * @access	public
	 * @param	array	List of \DPL\Article
	 * @param	object	List of \DPL\Lister\Lister
	 * @return	string	Formatted list.
				$hspace = 2; // the extra space for headings
				$rest  = $count - ( floor( $nsize ) * floor( $iGroup ) );
					$nsize = $hspace + 1; // correction for result sets with one entry
				$greml  = $nsize; // remaining lines in current group
				$g      = 0;
						// $output .= "nsize=$nsize, portion=$portion, greml=$greml";
							// if ($rest != 0 && $g==$rest) $nsize -= 1;
			$count  = count( $articles );
			$rest  = $count - ( floor( $nsize ) * floor( $iGroup ) );
				$output .= $lister->formatList( $articles, $nstart, $nsize );
				$nstart = $nstart + $nsize;
				// if ($rest != 0 && $g+1==$rest) $nsize -= 1;
			$nsize  = $rowSize;
			$count  = count( $articles );
				$output .= $lister->formatList( $articles, $nstart, $nsize );
				$nstart = $nstart + $nsize;
			//Even though the headingmode is not none there were no headings, but still results.  Output them anyway.
	 * @access	public
	 * @param	integer	Article start index for this heading.
	 * @param	integer	Article count for this heading.
	 * @param	string	Heading link/text display.
	 * @param	array	List of \DPL\Article.
	 * @param	object	List of \DPL\Lister\Lister
	 * @return	string	Heading HTML
	 * @access	public
	 * @return	string	List Start
	 * @access	public
	 * @return	string	Item Start
	 * @access	public
	 * @return	string	Item End
	 * @access	public
	 * @param	integer	Count
	 * @return	string	Message
/**
 * DynamicPageList3
 * DPL OrderedHeading Class
 *
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
/**
 * DynamicPageList3
 * DPL TieredHeading Class
 *
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
	 * Main Constructor
	 *
	 * @access	public
	 * @param	object	\DPL\Parameters
	 * @return	void
	 * @access	public
	 * @param	integer	Article start index for this heading.
	 * @param	integer	Article count for this heading.
	 * @param	string	Heading link/text display.
	 * @param	array	List of \DPL\Article.
	 * @param	object	List of \DPL\Lister\Lister
	 * @return	string	Heading HTML
	 * @access	public
	 * @return	string	List Start
	 * @access	public
	 * @return	string	Item Start
	 * @access	public
	 * @return	string	Item End
/**
 * DynamicPageList3
 * DPL UnorderedHeading Class
 *
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
/**
 * DynamicPageList3
 * DPL CategoryList Class
 *
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
	 * @var constant
	 * @access	public
	 * @param	array	List of \DPL\Article
	 * @param	integer	Start position of the array to process.
	 * @param	integer	Total objects from the array to process.
	 * @return	string	Formatted list.
			$filteredCount = $filteredCount + 1;
			return "__NOTOC____NOEDITSECTION__" . \CategoryViewer::columnList( $articleLinks, $articleStartChars );
			return "__NOTOC____NOEDITSECTION__" . \CategoryViewer::shortList( $articleLinks, $articleStartChars );
	 * @access	public
	 * @param	object	DPL\Article
	 * @param	string	[Optional] Page text to include.
	 * @return	string	Item HTML
/**
 * DynamicPageList3
 * DPL DefinitionList Class
 *
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
	 * @var constant
/**
 * DynamicPageList3
 * DPL GalleryList Class
 *
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
	 * @var constant
	public $itemEnd = "|";
	 * @access	public
	 * @param	object	DPL\Article
	 * @param	string	[Optional] Page text to include.include.
	 * @return	string	Item HTML
			//Include parsed/processed wiki markup content after each item before the closing tag.
/**
 * DynamicPageList3
 * DPL InlineList Class
 *
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
	 * @var constant
	 * Main Constructor
	 *
	 * @access	public
	 * @param	object	\DPL\Parameters
	 * @param	object	MediaWiki \Parser
	 * @return	void
	public function __construct( \DPL\Parameters $parameters, \Parser $parser ) {
	 * @access	public
	 * @param	array	Items as formatted by formatItem().
	 * @return	string	Imploded items.
/**
 * DynamicPageList3
 * DPL List Class
 *
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
	const LIST_DEFINITION = 1;
	const LIST_GALLERY = 2;
	const LIST_HEADING = 3;
	const LIST_INLINE = 4;
	const LIST_ORDERED = 5;
	const LIST_UNORDERED = 6;
	const LIST_CATEGORY = 7;
	const LIST_USERFORMAT = 8;
	 * @var constant
	 * Use %s for attribute placement.  Example: <div%s>
	 * Use %s for attribute placement.  Example: <div%s>
	 * Use %s for attribute placement.  Example: <div%s>
	 * Use %s for attribute placement.  Example: <div%s>
	 * @var array
	 * @var array
	 * @var array
	 * @var array
	 * @var int
	 * @var int
	 * @var int
	protected $pageTextMatch = null;
	protected $pageTextMatchRegex = null;
	protected $pageTextMatchNotRegex = null;
	 * \DPL\Parameters
	 * @var object
	protected $parameters = null;
	 * @var object
	protected $parser = null;
	 * Main Constructor
	 *
	 * @access	public
	 * @param	object	\DPL\Parameters
	 * @param	object	MediaWiki \Parser
	 * @return	void
	public function __construct( \DPL\Parameters $parameters, \Parser $parser ) {
		$this->setTableSortMethod($parameters->getParameter('tablesortmethod'));
	 * @access	public
	 * @param	string	List style.
	 * @param	object	\DPL\Parameters
	 * @param	object	MediaWiki \Parser
	 * @return	object	Lister subclass.
	public static function newFromStyle( $style, \DPL\Parameters $parameters, \Parser $parser ) {
				$class = 'CategoryList';
				$class = 'DefinitionList';
				$class = 'GalleryList';
				$class = 'InlineList';
				$class = 'OrderedList';
				$class = 'SubPageList';
				$class = 'UnorderedList';
				$class = 'UserFormatList';
		$class = '\DPL\Lister\\' . $class;
	 * Get the \DPL\Parameters object this object was constructed with.
	 * @access	public
	 * @return	object	\DPL\Parameters
	 * @access	public
	 * @param	string	Tag soup attributes, example: this="that" thing="no"
	 * @return	void
		$this->headListAttributes = \Sanitizer::fixTagAttributes( $attributes, 'ul' );
	 * @access	public
	 * @param	string	Tag soup attributes, example: this="that" thing="no"
	 * @return	void
		$this->headItemAttributes = \Sanitizer::fixTagAttributes( $attributes, 'li' );
	 * @access	public
	 * @param	string	Tag soup attributes, example: this="that" thing="no"
	 * @return	void
		$this->listAttributes = \Sanitizer::fixTagAttributes( $attributes, 'ul' );
	 * @access	public
	 * @param	string	Tag soup attributes, example: this="that" thing="no"
	 * @return	void
		$this->itemAttributes = \Sanitizer::fixTagAttributes( $attributes, 'li' );
	 * @access	public
	 * @param	integer	Count
	 * @return	void
	 * @access	public
	 * @return	integer	Count
	 * @access	public
	 * @return	integer	List style constant.
	 * @access	public
	 * @param	string	Template Suffix
	 * @return	void
	 * @access	public
	 * @return	string
	 * @access	public
	 * @param	boolean	[Optional] Trim
	 * @return	void
	 * @access	public
	 * @return	boolean	Trim
	 * @access	public
	 * @param	boolean	[Optional] Escape
	 * @return	void
	 * @access	public
	 * @return	boolean	Escape
	 * @access	public
	 * @param	mixed	[Optional] Integer index or null to disable.
	 * @return	void
	 * @access	public
	 * @return	mixed	Integer index or null to disable.
	 * @access	public
	 * @param	string	Algorithm name
	 * @return	void
	public function setTableSortMethod($method = null) {
	 * @access	public
	 * @return	string	Algorithm name
	 * @access	public
	 * @param	mixed	[Optional] Integer length or null to disable.
	 * @return	void
	 * @access	public
	 * @return	mixed	Integer length or null to disable.
	 * @access	public
	 * @param	array	[Optional] Array of section separators.
	 * @return	void
		$this->sectionSeparators = (array)$separators ?? [];
	 * @access	public
	 * @param	array	[Optional] Array of section separators.
	 * @return	void
		$this->multiSectionSeparators = (array)$separators ?? [];
	 * @access	public
	 * @param	boolean	[Optional] Parse
	 * @return	void
	 * @access	public
	 * @param	mixed	[Optional] Integer length or null to disable.
	 * @return	void
	 * @access	public
	 * @param	array	[Optional] Array of plain string matches.
	 * @return	void
		$this->pageTextMatch = (array)$pageTextMatch;
	 * @access	public
	 * @param	array	[Optional] Array of regexes.
	 * @return	void
		$this->pageTextMatchRegex = (array)$pageTextMatchRegex;
	 * @access	public
	 * @param	array	[Optional] Array of regexes.
	 * @return	void
		$this->pageTextMatchNotRegex = (array)$pageTextMatchNotRegex;
	 * @access	public
	 * @param	boolean	[Optional] Parse
	 * @return	void
	 * @access	public
	 * @param	array	List of \DPL\Article
	 * @return	string	Formatted list.
	 * @access	public
	 * @param	array	List of \DPL\Article
	 * @param	integer	Start position of the array to process.
	 * @param	integer	Total objects from the array to process.
	 * @return	string	Formatted list.
	 * @access	public
	 * @param	object	DPL\Article
	 * @param	string	[Optional] Page text to include.
	 * @return	string	Item HTML
		// DPL Article, not MediaWiki.
			//Include parsed/processed wiki markup content after each item before the closing tag.
	 * @access	public
	 * @return	string	Head List Start
	 * @access	public
	 * @return	string	Head Item Start
	 * @access	public
	 * @return	string	Head Item End
	 * @access	public
	 * @return	string	List Start
	 * @access	public
	 * @return	string	Item Start
	 * @access	public
	 * @return	string	Item End
	 * @protected
	 * @param	array	Items as formatted by formatItem().
	 * @return	string	Imploded items.
	 * @protected
	 * @param	string	Text to perform replacements on.
	 * @param	object	\DPL\Article
	 * @return	string	Text with replacements performed.
		$tag = str_replace( '%PAGEID%', $article->mID, $tag );
		$tag = str_replace( '%COUNT%', $article->mCounter, $tag );
		$tag = str_replace( '%COUNTFS%', floor( log( $article->mCounter ) * 0.7 ), $tag );
		$tag = str_replace( '%COUNTFS2%', floor( sqrt( log( $article->mCounter ) ) ), $tag );
		$tag = str_replace( '%SIZE%', $article->mSize, $tag );
		$tag = str_replace( '%SIZEFS%', floor( sqrt( log( $article->mSize ) ) * 2.5 - 5 ), $tag );
		$tag = str_replace( '%REVISION%', $article->mRevision, $tag );
		$tag = str_replace( '%CONTRIBUTION%', $article->mContribution, $tag );
	 * @protected
	 * @param	string	Text to perform replacements on.
	 * @param	object	\DPL\Article
	 * @return	string	Text with replacements performed.
	 * @protected
	 * @param	string	Text to perform replacements on.
	 * @param	integer	The current article sequence number (starting from 1).
	 * @return	string	Text with replacements performed.
		return str_replace( '%NR%', $nr, $tag );
	//

	 * @todo I am not exactly sure how this function differs from replaceTagParameters().  It has something to do with table row formatting.  --Alexia
	 * @private
	 * @param	array	String pieces to perform replacements on.
	 * @param	mixed	Index of the table row position.
	 * @param	object	\DPL\Article
	 * @return	void
	 * Format one single template argument of one occurence of one item from the include parameter.  This is called via a backlink from LST::includeTemplate().
	 * @todo Again, another poorly documented function with vague functionality.  --Alexia
	 * @access	public
	 * @param	string	Argument to parse and replace.
	 * @param	mixed	Index of the table row position.
	 * @param	mixed	Other part of the index of the table row position?
	 * @param	boolean	Is this the first time this function was called in this context?
	 * @param	integer	Maximum text length allowed.
	 * @param	object	\DPL\Article
	 * @return	strig	Formatted text.
			$result = str_replace( '%IMAGE%', $this->parseImageUrlWithPath( $arg ), $result ); //@TODO: This just blindly passes the argument through hoping it is an image.  --Alexia
	 * @private
	 * @param  $lim     limit of character count for the result
	 * @param  $text    the wikitext to be truncated
	 * @return the truncated text; note that in some cases it may be slightly longer than the given limit
	 *         if the text is alread shorter than the limit or if the limit is negative, the text
	 *         will be returned without any checks for balance of tags
	 * @protected
	 * @param 	mixed	\DPL\Article or string image name of the image (may start with Image: or File:).
	 * @return	string	Image URL
		if ( $article instanceof \DPL\Article ) {
				// $img = Image::newFromName($article->mTitle->getText());
				$img = wfFindFile( \Title::makeTitle( NS_FILE, $article->mTitle->getText() ) );
					$fileTitle = \Title::makeTitleSafe( NS_FILE, $article->mTitle->getDBKey() );
					$imageUrl = \RepoGroup::singleton()->getLocalRepo()->newFile( $fileTitle )->getPath();
			$title = \Title::newfromText( 'File:' . $article );
				$fileTitle   = \Title::makeTitleSafe( 6, $title->getDBKey() );
				$imageUrl = \RepoGroup::singleton()->getLocalRepo()->newFile( $fileTitle )->getPath();
		//@TODO: Check this preg_replace.  Probably only works for stock file repositories.  --Alexia
	 * @access	public
	 * @param	object	\DPL\Article
	 * @param	integer	Filtered Article Count
	 * @return	string	Page Text
			$text = $this->parser->fetchTemplate( \Title::newFromText( $title ) );
			if ( ( count( $this->pageTextMatchRegex ) <= 0 || $this->pageTextMatchRegex[0] == '' || !preg_match( $this->pageTextMatchRegex[0], $text ) == false ) && ( count( $this->pageTextMatchNotRegex ) <= 0 || $this->pageTextMatchNotRegex[0] == '' || preg_match( $this->pageTextMatchNotRegex[0], $text ) == false ) ) {
				$filteredCount = $filteredCount + 1;
			$secPiece       = [];
					$limpos      = strpos( $sSecLabel, '[' );
					$cutLink     = 'default';
						$cutInfo = explode( " ", $fmtSec[count( $fmtSec ) - 1], 2 );
						$maxLength = -1; // without valid limit include whole section
					$secPieces = LST::includeHeading( $this->parser, $article->mTitle->getPrefixedText(), substr( $sSecLabel, 1 ), '', $sectionHeading, false, $maxLength, $cutLink, $this->getTrimIncluded(), $skipPattern );
						$offset       = 0;
							$secPiece[$s] .= str_replace( '%SECTION%', $sectionHeading[$sp], $this->replaceTagCount( $this->multiSectionSeparators[$s], $filteredCount ) );
						$matchFailed = true; // NOTHING MATCHED
					//Why the hell was defaultTemplateSuffix be passed all over the place for just fucking here?  --Alexia
					$secPieces    = LST::includeTemplate( $this->parser, $this, $s, $article, $template1, $template2, $template2 . $this->getTemplateSuffix(), $mustMatch, $mustNotMatch, $this->includePageParsed, implode( ', ', $article->mCategoryLinks ) );
						$matchFailed = true; // NOTHING MATCHED
					$secPieces    = LST::includeSection( $this->parser, $article->mTitle->getPrefixedText(), $sSecLabel, '', false, $this->getTrimIncluded(), $skipPattern );
			$filteredCount = $filteredCount + 1;
	 * @protected
	 * @param	string	Piece to be wrapped.
	 * @param	string	Text to prepend.
	 * @param	string	Text to append.
	 * @return	string	Wrapped text.
	 * @access	public
	 * @return	integer	Row Count
/**
 * DynamicPageList3
 * DPL OrderedList Class
 *
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
	 * @var constant
	 * @access	public
	 * @param	array	List of \DPL\Article
	 * @param	integer	Start position of the array to process.
	 * @param	integer	Total objects from the array to process.
	 * @return	string	Formatted list.
	 * @access	public
	 * @return	string	List Start
		//The offset that comes from the URL parameter is zero based, but has to be +1'ed for display.
			//@TODO: So this adds the total count of articles to the offset.  I have not found a case where this does not mess up the displayed count.  I am commenting this out for now.
			//$offset += $this->offsetCount;
/**
 * DynamicPageList3
 * DPL SubPageList Class
 *
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
	 * @var constant
	 * @access	public
	 * @param	array	List of \DPL\Article
	 * @param	integer	Start position of the array to process.
	 * @param	integer	Total objects from the array to process.
	 * @return	string	Formatted list.
	 * @private
	 * @param	array	Part levels to nest down to.
	 * @param	array	Items holder to nest the item into.
	 * @param	string	Formatted Item
	 * @return	array	Nest Items
	 * @protected
	 * @param	array	Items as formatted by formatItem().
	 * @return	string	Imploded items.
/**
 * DynamicPageList3
 * DPL UnorderedList Class
 *
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
	 * @var constant
/**
 * DynamicPageList3
 * DPL UserFormatList Class
 *
 * @license		GPL-2.0-or-later
 * @package		DynamicPageList3
 *
 */
	 * @var constant
	 * Main Constructor
	 *
	 * @access	public
	 * @param	object	\DPL\Parameters
	 * @param	object	MediaWiki \Parser
	 * @return	void
	public function __construct( \DPL\Parameters $parameters, \Parser $parser ) {
	 * @access	public
	 * @param	array	List of \DPL\Article
	 * @param	integer	Start position of the array to process.
	 * @param	integer	Total objects from the array to process.
	 * @return	string	Formatted list.
		$sortColumn	= $this->getTableSortColumn();
			$this->sort($rowsKey, $sortColumn);
	 * @access	public
	 * @param	array	Table column data
	 * @param	int		Index of the column to sort
	 * @return	void
	protected function sort(&$rowsKey, $sortColumn) {
	
		if ($sortColumn < 0) {
			switch ($sortMethod) {
                    uasort($rowsKey, function($first, $second) {
                    	return strnatcmp($second, $first);
					});
					arsort($rowsKey);
			switch ($sortMethod) {
				natsort($rowsKey);
				break;
			case 'standard':
			default:
				asort($rowsKey);
				break;
	 * @access	public
	 * @param	object	DPL\Article
	 * @param	string	[Optional] Page text to include.
	 * @return	string	Item HTML
			//Include parsed/processed wiki markup content after each item before the closing tag.
	 * @access	public
	 * @return	string	Item Start
	 * @access	public
	 * @return	string	Item End
	 * @access	public
	 * @param	array	Items as formatted by formatItem().
	 * @return	string	Imploded items.
/**
 * DynamicPageList3
 * CreateTemplate
 *
 * @license GPL-2.0-or-later
 * @package DynamicPageList3
 *
 */
use WikiPage;
			$wikipage = WikiPage::factory( $title );
			$updater = $wikipage->newPageUpdater( User::newSystemUser( 'DynamicPageList3 extension' ) );
			$content = $wikipage->getContentHandler()->makeContent( '<noinclude>This page was automatically created.  It serves as an anchor page for all \'\'\'[[Special:WhatLinksHere/Template:Extension_DPL|invocations]]\'\'\' of [https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:DynamicPageList3 Extension:DynamicPageList3].</noinclude>', $title );

Fixed code:
dependencies linguist-language=yaml
version: 2
updates:
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "daily"
  - package-ecosystem: "composer"
    directory: "/"
    schedule:
      interval: "daily"
Variables:
  branch: auto
  repo: auto
name: Quibble and Phan

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  test:
    name: "${{ matrix.mw }} | PHP ${{ matrix.php }} (${{ matrix.stage }})"

    strategy:
      matrix:
        include:
          # Latest stable MediaWiki - PHP 7.3 (phan)
          - mw: 'REL1_36'
            php: 7.3
            php-docker: 73
            experimental: false
            stage: phan

          # Latest stable MediaWiki - PHP 7.4 (phan)
          - mw: 'REL1_36'
            php: 7.4
            php-docker: 74
            experimental: false
            stage: phan

          # Latest MediaWiki release branch - PHP 7.3 (phan)
          - mw: 'REL1_37'
            php: 7.3
            php-docker: 73
            experimental: true
            stage: phan

          # Latest MediaWiki release branch - PHP 7.4 (phan)
          - mw: 'REL1_37'
            php: 7.4
            php-docker: 74
            experimental: true
            stage: phan

          # Latest MediaWiki master - PHP 7.3 (phan)
          - mw: 'master'
            php: 7.3
            php-docker: 73
            experimental: true
            stage: phan

          # Latest MediaWiki master - PHP 7.4 (phan)
          - mw: 'master'
            php: 7.4
            php-docker: 74
            experimental: true
            stage: phan

          # Latest stable MediaWiki - PHP 7.3 (coverage)
          - mw: 'REL1_36'
            php: 7.3
            php-docker: 73
            experimental: false
            stage: coverage

          # Latest MediaWiki release branch - PHP 7.3 (coverage)
          - mw: 'REL1_37'
            php: 7.3
            php-docker: 73
            experimental: false
            stage: coverage

          # Latest MediaWiki master - PHP 7.3 (coverage)
          - mw: 'master'
            php: 7.3
            php-docker: 73
            experimental: false
            stage: coverage

          # Latest stable MediaWiki - PHP 7.3 (phpunit-unit)
          - mw: 'REL1_36'
            php: 7.3
            php-docker: 73
            experimental: false
            stage: phpunit-unit

          # Latest stable MediaWiki - PHP 7.4 (phpunit-unit)
          - mw: 'REL1_36'
            php: 7.4
            php-docker: 74
            experimental: false
            stage: phpunit-unit

          # Latest MediaWiki release branch - PHP 7.3 (phpunit-unit)
          - mw: 'REL1_37'
            php: 7.3
            php-docker: 73
            experimental: false
            stage: phpunit-unit

          # Latest MediaWiki release branch - PHP 7.4 (phpunit-unit)
          - mw: 'REL1_37'
            php: 7.4
            php-docker: 74
            experimental: false
            stage: phpunit-unit

          # Latest MediaWiki master - PHP 7.3 (phpunit-unit)
          - mw: 'master'
            php: 7.3
            php-docker: 73
            experimental: false
            stage: phpunit-unit

          # Latest MediaWiki master - PHP 7.4 (phpunit-unit)
          - mw: 'master'
            php: 7.4
            php-docker: 74
            experimental: false
            stage: phpunit-unit

          # Latest stable MediaWiki - PHP 7.3 (phpunit)
          - mw: 'REL1_36'
            php: 7.3
            php-docker: 73
            experimental: false
            stage: phpunit

          # Latest stable MediaWiki - PHP 7.4 (phpunit)
          - mw: 'REL1_36'
            php: 7.4
            php-docker: 74
            experimental: false
            stage: phpunit

          # Latest MediaWiki release branch - PHP 7.3 (phpunit)
          - mw: 'REL1_37'
            php: 7.3
            php-docker: 73
            experimental: false
            stage: phpunit

          # Latest MediaWiki release branch - PHP 7.4 (phpunit)
          - mw: 'REL1_37'
            php: 7.4
            php-docker: 74
            experimental: false
            stage: phpunit

          # Latest MediaWiki master - PHP 7.3 (phpunit)
          - mw: 'master'
            php: 7.3
            php-docker: 73
            experimental: false
            stage: phpunit

          # Latest MediaWiki master - PHP 7.4 (phpunit)
          - mw: 'master'
            php: 7.4
            php-docker: 74
            experimental: false
            stage: phpunit

          # Latest stable MediaWiki - PHP 7.3 (selenium)
          - mw: 'REL1_36'
            php: 7.3
            php-docker: 73
            experimental: false
            stage: selenium

          # Latest MediaWiki release branch - PHP 7.3 (selenium)
          - mw: 'REL1_37'
            php: 7.3
            php-docker: 73
            experimental: false
            stage: selenium

          # Latest MediaWiki master - PHP 7.3 (selenium)
          - mw: 'master'
            php: 7.3
            php-docker: 73
            experimental: false
            stage: selenium

          # Latest stable MediaWiki - PHP 7.3 (qunit)
          - mw: 'REL1_36'
            php: 7.3
            php-docker: 73
            experimental: false
            stage: qunit

          # Latest MediaWiki release branch - PHP 7.3 (qunit)
          - mw: 'REL1_37'
            php: 7.3
            php-docker: 73
            experimental: false
            stage: qunit

          # Latest MediaWiki master - PHP 7.3 (qunit)
          - mw: 'master'
            php: 7.3
            php-docker: 73
            experimental: false
            stage: qunit

          # Latest stable MediaWiki - PHP 7.3 (composer-test)
          - mw: 'REL1_36'
            php: 7.3
            php-docker: 73
            experimental: false
            stage: composer-test

    runs-on: ubuntu-latest

    env:
      DOCKER_REGISTRY: docker-registry.wikimedia.org
      DOCKER_ORG: releng
      QUIBBLE_DOCKER_IMAGE: quibble-buster-php${{ matrix.php-docker }}
      COVERAGE_DOCKER_IMAGE: quibble-buster-php${{ matrix.php-docker }}-coverage
      PHAN_DOCKER_IMAGE: mediawiki-phan-php${{ matrix.php-docker }}

    steps:
      - name: Cancel Previous Runs
        uses: styfle/cancel-workflow-action@0.9.1
        with:
          access_token: ${{ github.token }}

      - uses: actions/checkout@v2

      # /home/runner/cache/                               Cache
      # /home/runner/src/                                 Mediawiki installation
      # /home/runner/src/extensions/EXTENSION_NAME/       Clone of the extension repository
      # /home/runner/docker-images/                       Docker images which exported with docker-save command
      # $GITHUB_WORKSPACE/.github/workflows/dependencies  Necessary dependencies - YAML syntax
      # $GITHUB_WORKSPACE/.github/workflows/globals.php   Add global configuration options for MediaWiki
      - name: Set up
        run: |
          echo MEDIAWIKI_VERSION="${{ matrix.mw }}" >> $GITHUB_ENV

          if [ "${{ matrix.stage }}" == 'phan' ]; then
            export DOCKER_IMAGE="${PHAN_DOCKER_IMAGE}"
          elif [ "${{ matrix.stage }}" == coverage ]; then
            export DOCKER_IMAGE="${COVERAGE_DOCKER_IMAGE}"
          else
            export DOCKER_IMAGE="${QUIBBLE_DOCKER_IMAGE}"
          fi
          echo "DOCKER_IMAGE=${DOCKER_IMAGE}" >> $GITHUB_ENV

          # Get the latest docker tag (Ref: https://github.com/thcipriani/dockerregistry)
          DOCKER_LATEST_TAG="$(curl -sL "https://${DOCKER_REGISTRY}/v2/${DOCKER_ORG}/${DOCKER_IMAGE}/tags/list" |
            python3 -c 'import json;print("\n".join(json.loads(input())["tags"]))' |
            grep -v latest | sort -Vr | head -1)"
          echo "DOCKER_LATEST_TAG=${DOCKER_LATEST_TAG}" >> $GITHUB_ENV
          if [ "${{ matrix.stage }}" == 'phan' ] || [ "${{ matrix.stage }}" == 'coverage' ]; then
            echo "QUIBBLE_DOCKER_LATEST_TAG=$(curl -sL "https://${DOCKER_REGISTRY}/v2/${DOCKER_ORG}/${QUIBBLE_DOCKER_IMAGE}/tags/list" |
              python3 -c 'import json;print("\n".join(json.loads(input())["tags"]))' |
              grep -v latest | sort -Vr | head -1)" >> $GITHUB_ENV
          fi

          # Resolve dependencies
          if [ -e .github/workflows/dependencies ] && [ "${{ matrix.stage }}" == 'phan' ]; then
            cd .github/workflows
            curl -sL https://raw.githubusercontent.com/wikimedia/integration-config/master/zuul/parameter_functions.py -o pf.py
            curl -sL https://raw.githubusercontent.com/Universal-Omega/scripts/master/mediawiki/resolve_dependencies.py -o rd.py
            echo "DEPENDENCIES=$(python3 rd.py)" >> $GITHUB_ENV
          fi

      - name: Cache docker image
        uses: actions/cache@v2
        with:
          path: /home/runner/docker-images/${{ env.DOCKER_IMAGE }}
          key: ${{ env.DOCKER_IMAGE }}:${{ env.DOCKER_LATEST_TAG }}

      - name: Load or pull docker image
        run: |
          docker load -i /home/runner/docker-images/"${DOCKER_IMAGE}" || \
            docker pull "${DOCKER_REGISTRY}/${DOCKER_ORG}/${DOCKER_IMAGE}:${DOCKER_LATEST_TAG}"

      - name: Cache quibble docker image
        if: ${{ matrix.stage == 'coverage' || matrix.stage == 'phan' }}
        uses: actions/cache@v2
        with:
          path: /home/runner/docker-images/${{ env.QUIBBLE_DOCKER_IMAGE }}
          key: ${{ env.QUIBBLE_DOCKER_IMAGE }}:${{ env.QUIBBLE_DOCKER_LATEST_TAG }}
      - name: Load or pull quibble docker image
        if: ${{ matrix.stage == 'coverage' || matrix.stage == 'phan' }}
        run: |
          docker load -i /home/runner/docker-images/"${QUIBBLE_DOCKER_IMAGE}" || \
            docker pull "${DOCKER_REGISTRY}/${DOCKER_ORG}/${QUIBBLE_DOCKER_IMAGE}:${QUIBBLE_DOCKER_LATEST_TAG}"

      - name: Download MediaWiki and extensions
        run: |
          cd /home/runner
          if [ ! -d src ]; then
            git clone -b "${MEDIAWIKI_VERSION}" --depth 1 https://gerrit.wikimedia.org/r/mediawiki/core src
            git clone --recurse-submodules -b "${MEDIAWIKI_VERSION}" --depth 1 https://gerrit.wikimedia.org/r/mediawiki/skins/Vector src/skins/Vector
            for dep in $DEPENDENCIES; do
              dependency=$(echo $dep | cut -d'|' -f1)
              repository=$(echo $dep | cut -sd'|' -f2)
              branch=$(echo $dep | rev | cut -sd'|' -f1 | rev)

              if [ $repository == $branch ]; then
                repository=""
              fi

              git clone --recurse-submodules -b "${branch:-${MEDIAWIKI_VERSION}}" --depth 1 "${repository:-https://gerrit.wikimedia.org/r/${dependency}}" src/"$(echo $dependency | cut -d'/' -f2,3)"
            done
          fi

          # REPLACE SETUP.PHP FOR CREATEWIKI DEPENDANT EXTENSIONS ON REL1_36.
          # FIXES A BUG PRESENT ON REL1_36, WHEN DOING DATABASE STUFF BEFORE THIS WAS DONE, REQUEST INFO WAS ALREADY SET FOR DBLoadBalancerFactory,
          # RESULTING IN "LogicException: ChronologyProtector already initialized". THIS HACK REMOVES
          # MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->setRequestInfo(). THIS IS ALREADY FIXED FOR REL1_37 AND LATER.
          # WITH https://github.com/wikimedia/mediawiki/commit/29827d

          if [ -d src/extensions/CreateWiki ] || [ "${{ github.event.repository.name }}" == 'CreateWiki' ] && [ "${MEDIAWIKI_VERSION}" == 'REL1_36' ]; then
            curl -sL https://raw.githubusercontent.com/Universal-Omega/scripts/master/mediawiki/hacks/Setup-REL1_36.php > src/includes/Setup.php
          fi

          if [ -e "$GITHUB_WORKSPACE"/.github/workflows/globals.php ]; then
            echo 'require_once __DIR__ . "/../extensions/${{ github.event.repository.name }}/.github/workflows/globals.php";' >> src/includes/DevelopmentSettings.php
          fi

          git -C src/ log -n 1 --format="%H"

      - name: Cache dependencies (composer and npm)
        uses: actions/cache@v2
        with:
          path: /home/runner/cache
          key: ${{ runner.os }}-${{ env.MEDIAWIKI_VERSION }}-${{ hashFiles('**/*.lock') }}

      - name: Setup PHP Action
        if: ${{ matrix.stage == 'phan' }}
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
          tools: composer:v2

      - name: Composer install
        if: ${{ matrix.stage == 'phan' }}
        run: |
          if [ -e composer.json ]; then
            composer install --prefer-dist --no-progress --no-interaction
          fi

      - name: Fix PHPCS violations
        continue-on-error: true
        if: ${{ github.event_name == 'pull_request' && matrix.stage == 'composer-test' }}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          if [ -e composer.json ]; then
            composer install --prefer-dist --no-progress --no-interaction
            composer fix

            rm composer.lock

            git config --global user.name "github-actions"
            git config --global user.email "github-actions@users.noreply.github.com"
            git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
            git checkout -b ${GITHUB_HEAD_REF}
            git add .
            git commit -am "CI: lint code to MediaWiki standards" -m "Check commit and GitHub actions for more details" || echo "No changes to commit"
            git pull origin ${GITHUB_HEAD_REF} --rebase
            git push --set-upstream origin ${GITHUB_HEAD_REF}
          fi

      - name: Main Test
        continue-on-error: ${{ matrix.experimental }}
        run: |
          cd /home/runner
          # Move our extension
          sudo cp -r "${GITHUB_WORKSPACE}" src/extensions/
          mkdir -p cache cover
          chmod 777 src cache cover
          sudo chown -R nobody:nogroup src cache
          sudo chown $(id -u):$(id -g) src cache
          # Composer install
          if [ "${{ matrix.stage }}" == 'phan' ] || [ "${{ matrix.stage }}" == 'coverage' ]; then
            docker run \
              -e ZUUL_PROJECT=mediawiki/extensions/"${{ github.event.repository.name }}" \
              -v "$(pwd)"/cache:/cache \
              -v "$(pwd)"/src:/workspace/src \
              "${DOCKER_REGISTRY}/${DOCKER_ORG}/${QUIBBLE_DOCKER_IMAGE}:${QUIBBLE_DOCKER_LATEST_TAG}" \
              --skip-zuul \
              --packages-source composer \
              --skip-install \
              --skip all \
              $DEPENDENCIES
          fi

          if [ "${{ matrix.stage }}" == 'phan' ]; then
            docker run \
              -e THING_SUBNAME=extensions/"${{ github.event.repository.name }}" \
              -v "$(pwd)"/src:/mediawiki \
              "${DOCKER_REGISTRY}/${DOCKER_ORG}/${DOCKER_IMAGE}:${DOCKER_LATEST_TAG}" \
              --color
          elif [ "${{ matrix.stage }}" == 'coverage' ] && [ -d src/extensions/"${{ github.event.repository.name }}"/tests/phpunit ]; then
            docker run \
              -e ZUUL_PROJECT=mediawiki/extensions/"${{ github.event.repository.name }}" \
              -v "$(pwd)"/cache:/cache \
              -v "$(pwd)"/src:/workspace/src \
              -v "$(pwd)"/cover:/workspace/cover \
              "${DOCKER_REGISTRY}/${DOCKER_ORG}/${DOCKER_IMAGE}:${DOCKER_LATEST_TAG}" \
              --skip-zuul \
              --skip-deps \
              -c mwext-phpunit-coverage
          elif [ "${{ matrix.stage }}" != 'coverage' ]; then
            docker run \
              -e ZUUL_PROJECT=mediawiki/extensions/"${{ github.event.repository.name }}" \
              -v "$(pwd)"/cache:/cache \
              -v "$(pwd)"/src:/workspace/src \
              "${DOCKER_REGISTRY}/${DOCKER_ORG}/${DOCKER_IMAGE}:${DOCKER_LATEST_TAG}" \
              --skip-zuul \
              --packages-source composer \
              --run "${{ matrix.stage }}" \
              $DEPENDENCIES
            fi

      - name: Upload coverage to Codecov
        if: ${{ matrix.stage == 'coverage' }}
        uses: codecov/codecov-action@v2
        with:
          directory: /home/runner/cover

      - name: Tear down
        run: |
          cd /home/runner
          sudo rm -rf src/extensions/"${{ github.event.repository.name }}"
          # See https://doc.wikimedia.org/quibble/index.html#remove-localsettings-php-between-runs
          rm "$(pwd)"/src/LocalSettings.php || true
          mkdir -p docker-images
          docker save -o "$(pwd)/docker-images/${DOCKER_IMAGE}" \
            "${DOCKER_REGISTRY}/${DOCKER_ORG}/${DOCKER_IMAGE}:${DOCKER_LATEST_TAG}"
/vendor
.github/*
$cfg['directory_list'] = array_merge(
	$cfg['directory_list'], [
		'../../extensions/Variables',
	]
);
$cfg['exclude_analysis_directory_list'] = array_merge(
	$cfg['exclude_analysis_directory_list'], [
		'../../extensions/Variables',
	]
);

$cfg['suppress_issue_types'] = [
	'SecurityCheck-ReDoS',
	'SecurityCheck-LikelyFalsePositive',
	'PhanAccessMethodInternal',
];
	<file>.</file>
	<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
		<exclude name="Generic.Files.LineLength.TooLong" />
		<exclude name="MediaWiki.Commenting.MissingCovers.MissingCovers" />
		<exclude name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" />
		<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
		<exclude name="MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures" />
		<exclude name="PEAR.Functions.ValidDefaultValue.NotAtEnd" />
	<arg name="bootstrap" value="./vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php"/>
	<arg name="extensions" value="php"/>
	<arg name="encoding" value="UTF-8"/>

# Version 3.3.6
* Major code cleanup
* Numerous bug fixes
* Now requires MediaWiki 1.36.0 or later
* 1.37.0 support
                       Version 3, 29 June 2007
 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
  The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
them 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 prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  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.

  Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

  For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

  Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

  Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey 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;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Use with the GNU Affero General Public License.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time.  Such new versions will
  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  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.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
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.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
state the exclusion of warranty; and each file should have at least
    This program is free software: you can redistribute it and/or modify
    the Free Software Foundation, either version 3 of the License, or
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
  If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
    <program>  Copyright (C) <year>  <name of author>
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
parts of the General Public License.  Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.

  The GNU 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.  But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
* Licensing: DynamicPageList3 is released under [GNU General Public License, version 3](https://opensource.org/licenses/GPL-3.0).
	"license": "GPL-3.0-or-later",
		"mediawiki/mediawiki-codesniffer": "37.0.0",
		"mediawiki/mediawiki-phan-config": "0.11.0",
		"php-parallel-lint/php-parallel-lint": "1.3.1"
			"phpcbf; if [ $? -eq 1 ]; then exit 0; fi"
		],
		"test": [
			"parallel-lint . --exclude node_modules --exclude vendor",
			"minus-x check .",
			"@phpcs"
		"phan": "phan -d . --long-progress-bar",
		"phpcs": "phpcs -sp --cache"
	"version": "3.3.6",
	"license-name": "GPL-3.0-or-later",
		"MediaWiki": ">= 1.36.0"
		"DynamicPageListMagic": "includes/DynamicPageListMagic.php"
		"DPL\\RevisionJoinBuilder": "includes/RevisionJoinBuilder.php",
		"DPL\\UserQueryBuilder": "includes/UserQueryBuilder.php",
		"DPL\\DynamicPageListHooks": "includes/DynamicPageListHooks.php",
		"DPL\\DPLIntegrationTestCase": "tests/phpunit/DPLIntegrationTestCase.php"
			"DPL\\DynamicPageListHooks::onParserFirstCallInit"
			"DPL\\DynamicPageListHooks::onLoadExtensionSchemaUpdates"
	"@metadata": {
		"authors": [
			"Dangerman",
			"Universal Omega"
		]
	},
	"intersection-desc": "Outputs a bulleted list of the most recent items residing in a category, or an intersection of several categories",
	"intersection_toomanycats": "Error: Too many categories!",
	"intersection_toofewcats": "Error: Too few categories!",
	"intersection_noresults": "Error: No results!",
	"intersection_noincludecats": "Error: You need to include at least one category, or specify a namespace!",
	"dpl-desc": "A highly flexible report generator for MediaWikis",
	"dpl_log_1": "Error: Wrong '$1' parameter: '$2'! Help: <code>$1= <i>empty string</i> (Main)$3</code>.",
	"dpl_log_2": "Error: Wrong '$1' parameter: '$2'! Help: <code>$1= <i>full pagename</i></code>.",
	"dpl_log_3": "Error: Too many categories! Maximum: $1. Help: increase <code>$wgDplSettings['maxCategoryCount']</code> to specify more categories or set <code>$wgDplSettings['allowUnlimitedCategories'] = true;</code> for no limitation. (Set the variable in the wiki's <code>LocalSettings.php</code> configuration file.)",
	"dpl_log_4": "Error: Too few categories! Minimum: $1. Help: decrease <code>$wgDplSettings['minCategoryCount']</code> to specify fewer categories. (Set the variable in the wiki's <code>LocalSettings.php</code> configuration file.)",
	"dpl_log_5": "Error: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants",
	"dpl_log_6": "Error: At least one category must be chosen if to use 'addfirstcategorydate=true' or 'ordermethod=categoryadd'.",
	"dpl_log_7": "Error: If you include more than one category, you cannot use 'addfirstcategorydate=true' or 'ordermethod=categoryadd'.",
	"dpl_log_8": "Error: Only one date type can be added at a time.",
	"dpl_log_9": "Error: The paramater '$1' must be used with 'ordermethod=[ $2 ]'",
	"dpl_log_10": "Error: the index for the dominant section must be between 1 and the number of arguments of includepage ($0 in this case)",
	"dpl_log_11": "Error: Cannot perform logical operations on the Uncategorized pages (f.e. with the 'category' parameter) because the $0 view does not exist on the database! Help: have the database administrator execute this query: <code>$1</code>.",
	"dpl_log_12": "Error: specifying \"openreferences\" is incompatible with another option specified. Please remove that other option or \"openreferences\". See the manual for details.",
	"dpl_log_13": "Warning: Unknown parameter '$1' was ignored. Help: available parameters: <code>$2</code>.",
	"dpl_log_14": "Warning: Skipping bad option '$2' for parameter '$1'.",
	"dpl_log_15": "Warning: Wrong '$1' parameter: '$2'! Using default: '$3' (no limit). Help: <code>$1= <i>empty string</i> (no limit) | n</code>, with <code>n</code> a positive integer.",
	"dpl_log_16": "Warning: No results.",
	"dpl_log_17": "Warning: Add* parameters ('adduser', 'addeditdate', etc.)' and 'includepage' have no effect with 'mode=category'. Only the page namespace/title can be viewed in this mode.",
	"dpl_log_18": "Warning: 'headingmode=$1' has no effect with 'ordermethod' on a single component. Using: '$2'. Help: you can use not-$2 'headingmode' values with 'ordermethod' on multiple components. The first component is used for headings. E.g. 'ordermethod=category,<i>comp</i>' (<i>comp</i> is another component) for category headings.",
	"dpl_log_19": "Warning: 'debug=$1' is not in first position in the DPL element. The new debug settings are not applied before all previous parameters have been parsed and checked.",
	"dpl_log_20": "Warning: An infinite transclusion loop is created by page '$0'.",
	"dpl_log_21": "Query: <code>$0</code>",
	"dpl_log_22": "Warning: No parameter option supplied for '$1'. (Missing '=')",
	"dpl_articlecount": "There {{PLURAL:$1|is one article|are $1 articles}} in this heading.",
	"dpl_description": "A flexible report generator for MediaWiki. See [http://semeb.com/dpldemo] for the manual and examples",
	"action-dpl_param_update_rules": "to use the parameter 'updaterules'",
	"action-dpl_param_delete_rules": "to use the parameter 'deleterules'",
	"dpl_query_error": "The DPL extension (version $1) produced a SQL statement which led to a Database error.<br/>The reason may be an internal error of DPL or an error which you made; especially when using parameters like 'categoryregexp' or 'titleregexp'. Usage of non-greedy *? matching patterns are not supported.<br/>Error message was:<br/><tt>$2</tt>",
	"dpl-tag-tracking-category": "Pages using DynamicPageList parser tag",
	"dpl-intersection-tracking-category": "Pages using DynamicPageList Intersection parser tag",
	"dpl-parserfunc-tracking-category": "Pages using DynamicPageList parser function",
	"dplnum-parserfunc-tracking-category": "Pages using DynamicPageList dplnum parser function",
	"dplvar-parserfunc-tracking-category": "Pages using DynamicPageList dplvar parser function",
	"dplreplace-parserfunc-tracking-category": "Pages using DynamicPageList dplreplace parser function",
	"dplchapter-parserfunc-tracking-category": "Pages using DynamicPageList dplchapter parser function",
	"dplmatrix-parserfunc-tracking-category": "Pages using DynamicPageList dplmatrix parser function",
	"right-dpl_param_delete_rules": "Mass deletion of pages using DPL",
	"right-dpl_param_update_rules": "Mass update of pages using DPL"
}
use Title;
	 * @var Title
	public $mTitle;
	 * @var int
	 * @var int
	 * @var string|int
	 * @param Title $title
	 * @param int $namespace
	public function __construct( Title $title, $namespace ) {
		$this->mTitle = $title;
	 * @param array	$row
	 * @param Parameters $parameters
	 * @param Title	$title
	 * @param int $pageNamespace
	 * @param string $pageTitle
	 * @return Article
	public static function newFromRow( $row, Parameters $parameters, Title $title, $pageNamespace, $pageTitle ) {
		$contentLanguage = MediaWikiServices::getInstance()->getContentLanguage();
		$article = new Article( $title, $pageNamespace );

		// Chop off title if longer than the 'titlemaxlen' parameter.

		$languageConverter = MediaWikiServices::getInstance()
			->getLanguageConverterFactory()
			->getLanguageConverter();

		// get first char used for category-style output
			$article->mStartChar = $languageConverter->convert( $contentLanguage->firstChar( $row['sortkey'] ) );
			$article->mStartChar = $languageConverter->convert( $contentLanguage->firstChar( $pageTitle ) );
		// External link
		// SHOW PAGE_COUNTER
		// SHOW PAGE_SIZE

		// STORE initially selected PAGE
				$article->mSelTitle = 'unknown page';
				$article->mSelTitle = $row['sel_title'];
		// STORE selected image
			// REVISION SPECIFIED
				$article->mRevision = $row['rev_id'];
				$article->mUser = $row['rev_user_text'];
				$article->mDate = $row['rev_timestamp'];
				$article->mComment = $row['rev_comment'];
			// SHOW "PAGE_TOUCHED" DATE, "FIRSTCATEGORYDATE" OR (FIRST/LAST) EDIT DATE
			} elseif ( $parameters->getParameter( 'addeditdate' ) && isset( $row['rev_timestamp'] ) ) {
				$article->mDate = $row['rev_timestamp'];
			// Time zone adjustment
				// Apply the userdateformat
				$article->myDate = gmdate( $parameters->getParameter( 'userdateformat' ), (int)wfTimestamp( TS_UNIX, $article->mDate ) );

				$article->mContributor = $row['contributor'];
				$article->mContrib = substr( '*****************', 0, (int)round( log( $row['contribution'] ) ) );
			// USER/AUTHOR(S)
				$article->mUserLink = '[[User:' . $row['rev_user_text'] . '|' . $row['rev_user_text'] . ']]';
				$article->mUser = $row['rev_user_text'];
			// CATEGORY LINKS FROM CURRENT PAGE

						// Count one more page in this heading
							// uncategorized page (used if ordermethod=category,...)
						self::$headings[$row['rev_user_text']] = ( isset( self::$headings[$row['rev_user_text']] ) ? self::$headings[$row['rev_user_text']] + 1 : 1 );

						$article->mParentHLink = '[[User:' . $row['rev_user_text'] . '|' . $row['rev_user_text'] . ']]';
	 * @return array
	 * @return mixed Formatted string or null for none set.

			return $wgLang->timeanddate( $this->mDate, true );


use MWException;

	 * @param array|false $settings
			$settings = $wgDplSettings ?? false;
	 * @param string $setting
	 * @return mixed|null
		return ( self::$settings[$setting] ?? null );
	 * @return array
	 * @param string $setting
	 * @param mixed|null $value

namespace DPL;
use DatabaseUpdater;
use Parser;
use PPFrame;
class DynamicPageListHooks {
	public const FATAL_WRONGNS = 1001;
	public const FATAL_WRONGLINKSTO = 1002;
	public const FATAL_TOOMANYCATS = 1003;
	public const FATAL_TOOFEWCATS = 1004;
	public const FATAL_NOSELECTION = 1005;
	public const FATAL_CATDATEBUTNOINCLUDEDCATS = 1006;
	public const FATAL_CATDATEBUTMORETHAN1CAT = 1007;
	public const FATAL_MORETHAN1TYPEOFDATE = 1008;
	public const FATAL_WRONGORDERMETHOD = 1009;
	public const FATAL_DOMINANTSECTIONRANGE = 1010;
	public const FATAL_OPENREFERENCES = 1012;
	public const FATAL_MISSINGPARAMFUNCTION = 1022;
	public const FATAL_NOTPROTECTED = 1023;
	public const FATAL_SQLBUILDERROR = 1024;
	public const WARN_UNKNOWNPARAM = 2013;
	public const WARN_PARAMNOOPTION = 2022;
	public const WARN_WRONGPARAM = 2014;
	public const WARN_WRONGPARAM_INT = 2015;
	public const WARN_NORESULTS = 2016;
	public const WARN_CATOUTPUTBUTWRONGPARAMS = 2017;
	public const WARN_HEADINGBUTSIMPLEORDERMETHOD = 2018;
	public const WARN_DEBUGPARAMNOTFIRST = 2019;
	public const WARN_TRANSCLUSIONLOOP = 2020;
	public const DEBUG_QUERY = 3021;
	/** @var array */
	/** @var array */
	public static $createdLinks;
	/** @var bool */
	/** @var int */
	 * @return string
	public static function getVersion(): string {
		static $version = null;

		if ( $version === null ) {
			$version = json_decode( file_get_contents( __DIR__ . '/../extension.json' ) )->version;

		return $version;
	 * @param Parser $parser
	public static function onParserFirstCallInit( Parser $parser ) {
		// DPL offers the same functionality as Intersection. So we register the <DynamicPageList> tag in case LabeledSection Extension is not installed so that the section markers are removed.
		if ( Config::getSetting( 'handleSectionTag' ) ) {
	 * @param Parser $parser
	public static function setupMigration( Parser $parser ) {
		Config::init();
	 * @param bool $mode
	 * @return bool
	 * @param string $input
	 * @param array $args
	 * @param Parser $parser
	 * @param PPFrame $frame
	 * @return string

	 * @param string $input
	 * @param array $args
	 * @param Parser $parser
	 * @param PPFrame $frame
	 * @return string

	 * @param string $input
	 * @param array $args
	 * @param Parser $parser
	 * @param PPFrame $frame
	 * @return string
		// entry point for user tag <dpl> or <DynamicPageList>
		$parse = new Parse();
		if ( Config::getSetting( 'recursiveTagParse' ) ) {
		if ( $reset['templates'] ?? false ) { // we can remove the templates by save/restore

		if ( $reset['categories'] ?? false ) { // we can remove the categories by save/restore

		if ( $reset['images'] ?? false ) { // we can remove the images by save/restore

		if ( $reset['templates'] ?? false ) {
			$parser->getOutput()->mTemplates = $saveTemplates ?? [];

		if ( $reset['categories'] ?? false ) {
			$parser->getOutput()->mCategories = $saveCategories ?? [];

		if ( $reset['images'] ?? false ) {
			$parser->getOutput()->mImages = $saveImages ?? [];
	 * @param Parser $parser
	 * @return array|string
	public static function dplParserFunction( $parser ) {
		// callback for the parser function {{#dpl: or {{DynamicPageList::


		$parse = new Parse();

		return [
			// @phan-suppress-next-line PhanPluginMixedKeyNoKey
			$parser->getPreprocessor()->preprocessToObj( $dplresult, 1 ),
	 * From the old documentation: "Tries to guess a number that is buried in the text. Uses a set of heuristic rules which may work or not. The idea is to extract the number so that it can be used as a sorting value in the column of a DPL table output."
	 * @param Parser $parser
	 * @param string $text
	 * @return string
	public static function dplNumParserFunction( $parser, $text = '' ) {



			return Variables::setVar( $args );
			return Variables::setVarDefault( $args );

		return Variables::getVar( $cmd );





		// convert \n to a real newline character
		// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
		$output = LST::extractHeadingFromText( $parser, $page, '?title?', $text, $heading, '', $sectionHeading, true, $maxLength, $link, $trim );
		$lines = explode( "\n", $matrix );
		$m = [];
		$from = '';
		$to = '';

		if ( $flip == '' || $flip == 'normal' ) {








				// @phan-suppress-next-line PhanTypeInvalidDimOffset









	 * @param int|string $level
	 * @return int
	// reset everything; some categories may have been fixed, however via fixcategory=
	public static function endReset( $parser, $text ) {






	public static function endEliminate( $parser, &$text ) {







use Parser;
use Title;
	# #############################################################
	 *
	 * @param Parser $parser
	 *
	 * @suppress PhanUndeclaredProperty Use of Parser::mTemplatePath


	 *
	 * @param Parser $parser
	 *
	 * @suppress PhanUndeclaredProperty Use of Parser::mTemplatePath
	private static function parse( $parser, $text, $part1, $skiphead = 0, $recursionCheck = true, $maxLength = -1, $link = '', $trim = false, $skipPattern = [] ) {
			// Handle recursion here, so we can break cycles.
				$text = $parser->preprocess( $text, $parser->getTitle(), $parser->getOptions() );
			return "[[" . $parser->getTitle()->getPrefixedText() . "]]" . "<!-- WARNING: LST loop detected -->";
	# #############################################################
	 * @return string
	// Generate a regex to match the section(s) we're interested in.
		$any = false;



		$ws = "(?:\s+[^>]+)?";

	 * Count skipped headings, so parser can skip them, to
	 * prevent wrong heading links.
	 * @param int $limit
	 * @return int

		$title = Title::newFromText( $page );
		// if article doesn't exist, return a red link.
	// section inclusion - include all matching sections


			$piece = self::parse( $parser, $piece, "#lst:${page}|${sec}", 0, $recursionCheck, $trim, $skipPattern );


	 *
	 * @param $text the wikitext to be truncated
	 * @param $limit limit of character count for the result
	 * @param $link an optional link which will be appended to the text if it was truncated
	 *
	 * @return string the truncated text;
		$brackets = 0;
		$n0 = -1;
		$nb = 0;





			// @phan-suppress-next-line PhanSuspiciousValueComparison

			$matches = [];
			$tags = [

					// @phan-suppress-next-line PhanPluginLoopVariableReuse


		// @phan-suppress-previous-line PhanParamReqAfterOpt




		// throw away comments

	// section inclusion - include all matching sections (return array)
		// @phan-suppress-previous-line PhanParamReqAfterOpt

		$output = [];

		$n = 0;
		$output[$n] = '';
		$nr = 0;



			$sec = substr( $sec, 1 );

			// Generate a regex to match the === classical heading section(s) === we're
			$begin_off = 0;
				$head_len = 6;

					$mata = [];
					$begin_off = $m[$no_parenthesis][1];
					$head_len = strlen( $m[1][0] );
					$headLine = trim( $m[0][0], "\n =\t" );


				$piece = substr( $text, 0, $m[1][1] - 1 );
				$output[0] = self::parse( $parser, $piece, "#lsth:${page}|${sec}", 0, $recursionCheck, $maxLength, $link, $trim, $skipPattern );


				// if $to is supplied, try and match it. If we don't match, just ignore it.


					// @phan-suppress-next-line PhanPossiblyUndeclaredVariable



				$piece = substr( $text, $begin_off );
				$output[0] = self::parse( $parser, $piece, "#lsth:${page}|${sec}", $nhead, $recursionCheck, $maxLength, $link, $trim, $skipPattern );

					$output[0] = self::parse( $parser, $piece, "#lsth:${page}|${sec}", $nhead, $recursionCheck, $maxLength, $link, $trim, $skipPattern );
				$output[$n++] = self::parse( $parser, $piece, "#lsth:${page}|${sec}", $nhead, $recursionCheck, $maxLength, $link, $trim, $skipPattern );
		// @phan-suppress-previous-line PhanParamReqAfterOpt

		$page = $article->mTitle->getPrefixedText();
		$date = $article->myDate;
		$user = $article->mUserLink;
		$title = Title::newFromText( $page );

		// get text and throw away html comments
			$template1 = substr( $template1, 1 );
			$template2 = substr( $template2, 1 );

			$text2 = preg_replace( "/\{\{\s*#(" . $template1 . ')(\s*[:}])/i', '°³²|%PFUNC%=\1\2|', $text );
			$tCalls = preg_split( '/°³²/', ' ' . $text2 );

			$template1 = substr( $template1, 1 );
			$template2 = substr( $template2, 1 );

			$text2 = preg_replace( '/\<\s*(' . $template1 . ')\s*\>/i', '°³²|%TAG%=\1|%TAGBODY%=', $text );
			$tCalls = preg_split( '/°³²/', ' ' . $text2 );

			$tCalls = preg_split( '/\{\{\s*(Template:|' . $nsNames[10] . ':)?' . self::spaceOrUnderscore( preg_quote( $template1, '/' ) ) . '\s*[|}]/i', ' ' . $text );

		$output = [];

				$output[0] = $parser->preprocess( '{{' . $defaultTemplate . '|%PAGE%=' . $page . '|%TITLE%=' . $title->getText() . '|%DATE%=' . $date . '|%USER%=' . $user . '}}', $parser->getTitle(), $parser->getOptions() );


		$n = -2;



				$cbrackets = 0;
				$size = strlen( $templateCall );


							$argChain = $invocation . '|%PAGE%=' . $page . '|%TITLE%=' . $title->getText();


							$output[++$n] = $parser->preprocess( $argChain, $parser->getTitle(), $parser->getOptions() );
				$cbrackets = 2;
				$size = strlen( $templateCall );
				$parms = [];
				$parm = '';
				$hasParm = false;



						$parm = '';


						array_splice( $parms, 0, 1 );

							$second = false;


									// @phan-suppress-next-line PhanTypeInvalidDimOffset














	public function addMessage() {

		call_user_func_array( [ $this, 'msg' ], $args );
	 * @param bool $clearBuffer
	 * @return array



		if ( DynamicPageListHooks::getDebugLevel() >= $errorLevel ) {
			if ( DynamicPageListHooks::isLikeIntersection() ) {
				if ( $errorId == DynamicPageListHooks::FATAL_TOOMANYCATS ) {
				} elseif ( $errorId == DynamicPageListHooks::FATAL_TOOFEWCATS ) {
				} elseif ( $errorId == DynamicPageListHooks::WARN_NORESULTS ) {
				} elseif ( $errorId == DynamicPageListHooks::FATAL_NOSELECTION ) {


			$this->buffer[] = '<p>Extension:DynamicPageList (DPL), version ' . DynamicPageListHooks::getVersion() . ': ' . $text . '</p>';
use MWException;
use PermissionsError;
use RequestContext;
use Title;

	 * @param string $parameter
	 * @param mixed $arguments
			$user = RequestContext::getMain()->getUser();

			if ( !$user->isAllowed( $parameterData['permission'] ) ) {
				throw new PermissionsError( $parameterData['permission'] );
		// Subvert to the real function if it exists. This keeps code elsewhere clean from needed to check if it exists first.
		$function = '_' . $parameter;






					// Nuke the total pattern match off the beginning of the array.
			if ( $success ) {
				// Set that criteria was found for a selection.
				// Set open references conflict possibility.
	 * Users can not be told to put the parameters into a specific order each time. Some parameters are dependent on each other coming in a certain order due to some procedural legacy issues.
			throw new MWException( __METHOD__ . ': A non-array was passed.' );

		// 'category' to get category headings first for ordermethod.
		// 'include'/'includepage' to make sure section labels are ready for 'table'.
			'distinct' => 1,
			'openreferences' => 2,
			'ignorecase' => 3,
			'category' => 4,
			'title' => 5,
			'goal' => 6,
			'ordercollation' => 7,
			'ordermethod' => 8,
			'includepage' => 9,
			'include' => 10
	 * @param bool $found
					DynamicPageListHooks::setDebugLevel( $this->getData( $parameter )['default'] );

	 * @return array
	 * @param int|string|bool $boolean
	 * @param string $text
	 * @return string
	 * @param string $text
	 * @param bool $mustExist
	 * @return array|bool

			$page = rtrim( $page, '\\' );


				$title = Title::newFromText( $page );


	 * @param array|string $regexes
	 * @param bool $forDb


			// Purposely silencing the errors here since we are testing if preg_match
			// would throw an error due to a bad regex from user input.

			// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
				// @phan-suppress-previous-line PhanParamSuspiciousOrder, PhanTypeMismatchArgumentInternalProbablyReal
	 * @param string $option
	 * @return bool

		$heading = false;


		// We expand html entities because they contain an '& 'which would be interpreted as an AND condition




						$title = Title::newFromText( $subCategory );

							// The * helper is just like listing "Category1|SubCategory1". This gets hard coded here for this purpose.
					$title = Title::newFromText( $parameter );



			// Do a bunch of data integrity checks to avoid E_NOTICE.








	 * @param string $option
	 * @return bool

		// REGEXP input only supports AND operator.
		$data['REGEXP']['AND'][] = [ $option ];


	 * @param string $option
	 * @return bool


	 * @param string $option
	 * @return bool
		$title = Title::newFromText( $option );




	 * @param string $option
	 * @return bool


	 * @param string $option
	 * @return bool

		if ( !is_array( $data['like'] ?? false ) ) {



	 * @param string|int $option
	 * @return bool


	 * @param string $option
	 * @return bool

				// Let the user know this namespace is not allowed or does not exist.



	 * @param string $option
	 * @return bool

				// Let the user know this namespace is not allowed or does not exist.



	 * @param string $option
	 * @return bool

		// Force 'ordermethod' back to none.
	 * @param string $option
	 * @return bool

	 * @param string $option
	 * @return bool
			// 'none' mode is implemented as a specific submode of 'inline' with <br/> as inline text

	 * @param string $option
	 * @return bool


	 * @param string $option
	 * @return bool

	 * @param string $option
	 * @return bool
		// Parsing of wikitext will happen at the end of the output phase. Replace '\n' in the input by linefeed because wiki syntax depends on linefeeds.


		// Set the 'mode' parameter to userformat automatically.

	 * @param string $option
	 * @return bool
		$title = Title::newFromText( $option );

			$this->setParameter( 'namespace', $data );



	 * @param string $option
	 * @return bool

		if ( !is_array( $data['regexp'] ?? false ) ) {



	 * @param string $option
	 * @return bool
		if ( !is_array( $data['like'] ?? false ) ) {

	 * @param string $option
	 * @return bool



	 * @param string $option
	 * @return bool
		if ( !is_array( $data['like'] ?? false ) ) {

	 * @param string $option
	 * @return bool

		// If scrolling is active we adjust the values for certain other parameters based on URL arguments
			// The 'findTitle' option has argument over the 'fromTitle' argument.


			// Lets get the 'toTitle' argument.

			// Make sure the 'scrollDir' arugment is captured. This is mainly used for the Variables extension and in the header/footer replacements.
			// Also set count limit from URL if not otherwise set.

		// We do not return false since they could have just left it out. Who knows why they put the parameter in the list in the first place.
	 * @param string $option
	 * @return bool
		// We offer a possibility to replace some part of the title

	 * @param string $option
	 * @return bool
			DynamicPageListHooks::setDebugLevel( $option );
	 * @param string $option
	 * @return bool

	 * @param string $option
	 * @return bool

	 * @param string $option
	 * @return bool

	 * @param string $option
	 * @return bool

	 * @param string $option
	 * @return bool

	 * @param string $option
	 * @return bool
		// We replace '\n' by newline to support wiki syntax within the section separators

	 * @param string $option
	 * @return bool
		// We replace '\n' by newline to support wiki syntax within the section separators

	 * @param string $option
	 * @return bool

		$listSeparators = [];





		$listSeparators[2] = '';


		// Overwrite 'listseparators'.

				$sectionSeparators[0] = "\n|-\n|" . $withHLink; // ."\n";
				$sectionSeparators[1] = '';
				$multiSectionSeparators[0] = "\n|-\n|" . $withHLink; // ."\n";
				$sectionSeparators[2 * $i] = "\n|"; // ."\n";
				$sectionSeparators[2 * $i + 1] = '';


		// Overwrite 'secseparators' and 'multisecseparators'.

	 * @param string $option
	 * @return bool


	 * @param string $option
	 * @return bool|int|string
		// If execAndExit was previously set (i.e. if it is not empty) we will ignore all cache settings which are placed AFTER the execandexit statement thus we make sure that the cache will only become invalid if the query is really executed.



	 * @param string $option
	 * @return bool
		DynamicPageListHooks::fixCategory( $option );

	 * @param string $option
	 * @return bool


					$boolean = ( $argument == 'all' );




	 * @param string $option
	 * @return bool



					$boolean = ( $argument == 'all' );




use MWException;

			'default' => false,
			'boolean' => true,
			'open_ref_conflict' => true
			'default' => false,
			'boolean' => true,
			'open_ref_conflict' => true
			'default' => false,
			'boolean' => true,
			'open_ref_conflict' => true
			'default' => false,
			'boolean' => true,
			'open_ref_conflict' => true
			'default' => false,
			'boolean' => true,
			'open_ref_conflict' => true
			'default' => false,
			'boolean' => true,
			'open_ref_conflict' => true
			'default' => false,
			'boolean' => true,
			'open_ref_conflict' => true
			'default' => false,
			'boolean' => true,
			'open_ref_conflict' => true
			'default' => false,
			'boolean' => true,
			'open_ref_conflict' => true
			'default' => false,
			'boolean' => true,
			'open_ref_conflict' => true
			'default' => false,
			'boolean' => true,
			'open_ref_conflict' => true
			'default' => true,
			'boolean' => true
			'default' => null,
			'db_format' => true
			'default' => null,
			'default' => null,
			'default' => null,
			'default' => 'include',
			'values' => [ 'include', 'exclude', 'only' ]
			'default' => null
			'default' => 0,
			'integer' => true
			'default' => 500,
			'integer' => true
			'default' => null,
			'integer' => true
			'default' => true,
			'values' => [ 'strict' ]
			'default' => 3600,
			'integer' => true
			'default' => 1,
			'integer' => true
			'default' => 1,
			'values' => [ 0, 1, 2, 3, 4, 5 ]
			'default' => [],
			'values' => [
			'default' => null,
			'default' => 'pages',
			'values' => [
			'open_ref_conflict' => true
		// Include the lowercase variants of header tiers for ease of use.
			'default' => 'none',
			'values' => [
				// 'header',
			'open_ref_conflict' => true
			'default' => false,
			'boolean' => true,
			'open_ref_conflict' => true
			'default' => null
			'default' => null
			'default' => null
			'default' => false,
			'boolean' => true
		'include' => [
			'default' => null
			'default' => true,
			'boolean' => true
			'default' => null
			'default' => false,
			'boolean' => true
			'default' => null
			'default' => false,
			'boolean' => true
			'default' => false,
			'boolean' => true
			'default' => '&#160;-&#160;',
			'strip_html' => true
			'default' => null,
			'integer' => true
			'default' => null
			'default' => []
			'default' => null
			'default' => null,
			'page_name_list' => true,
			'page_name_must_exist' => true,
			'set_criteria_found' => true
			'default' => null,
			'page_name_list' => true,
			'page_name_must_exist' => true,
			'set_criteria_found' => true
			'default' => null,
			'open_ref_conflict' => true,
			'page_name_list' => true,
			'page_name_must_exist' => true,
			'set_criteria_found' => true
			'default' => null,
			'open_ref_conflict' => true,
			'page_name_list' => true,
			'page_name_must_exist' => true,
			'set_criteria_found' => true
			'default' => null,
			'open_ref_conflict' => true,
			'page_name_list' => true,
			'page_name_must_exist' => false,
			'set_criteria_found' => true
			'default' => null,
			'open_ref_conflict' => true,
			'page_name_list' => true,
			'page_name_must_exist' => true,
			'set_criteria_found' => true
			'default' => null,
			'open_ref_conflict' => false,
			'page_name_list' => true,
			'page_name_must_exist' => true,
			'set_criteria_found' => true
			'default' => null,
			'open_ref_conflict' => true,
			'page_name_list' => true,
			'page_name_must_exist' => true,
			'set_criteria_found' => true
			'default' => null,
			'open_ref_conflict' => true,
			'page_name_list' => true,
			'page_name_must_exist' => true,
			'set_criteria_found' => true
			'default' => null,
			'open_ref_conflict' => true,
			'page_name_list' => true,
			'page_name_must_exist' => true,
			'set_criteria_found' => true
		'createdby' => [
			'default' => null,
			'set_criteria_found' => true,
			'open_ref_conflict' => true,
			'preserve_case' => true
		'notcreatedby' => [
			'default' => null,
			'set_criteria_found' => true,
			'open_ref_conflict' => true,
			'preserve_case' => true
		'modifiedby' => [
			'default' => null,
			'set_criteria_found' => true,
			'open_ref_conflict' => true,
			'preserve_case' => true
		'notmodifiedby' => [
			'default' => null,
			'set_criteria_found' => true,
			'open_ref_conflict' => true,
			'preserve_case' => true
			'default' => null,
			'set_criteria_found' => true,
			'open_ref_conflict' => true,
			'preserve_case' => true
		'notlastmodifiedby' => [
			'default' => null,
			'set_criteria_found' => true,
			'open_ref_conflict' => true,
			'preserve_case' => true
			'default' => 'unordered',
			'values' => [
			'default' => true,
			'boolean' => true
			'default' => true,
			'boolean' => true
			'default' => null,
			'default' => null,
			'default' => null,
			'default' => null,
			'default' => null,
			'default' => null,
			'default' => null,
			'db_format' => true,
			'set_criteria_found' => true
			'default' => null,
			'db_format' => true,
			'set_criteria_found' => true
			'default' => false,
			'boolean' => true
			'default' => null
			'default' => null
			'default' => 'Y-m-d H:i:s',
			'strip_html' => true
			'default' => null,
			'permission' => 'dpl_param_update_rules'
			'default' => null,
			'permission' => 'dpl_param_delete_rules'
			'default' => null
			'default' => null
			'default' => 'ascending',
			'values' => [ 'ascending', 'descending', 'asc', 'desc' ]
			'default' => [ 'none' ],
			'values' => [
			'default' => null,
			'values' => [ 'include', 'exclude' ],
			'open_ref_conflict' => true
			'default' => null,
			'timestamp' => true,
			'open_ref_conflict' => true
			'default' => null,
			'timestamp' => true,
			'open_ref_conflict' => true
			'default' => null,
			'timestamp' => true,
			'open_ref_conflict' => true
			'default' => null,
			'timestamp' => true,
			'open_ref_conflict' => true
			'default' => null,
			'integer' => true
			'default' => null,
			'integer' => true
			'default' => false,
			'boolean' => true
			'default' => null,
			'strip_html' => true,
			'preserve_case' => true
			'default' => null,
			'strip_html' => true,
			'preserve_case' => true
			'default' => null,
			'strip_html' => true,
			'preserve_case' => true
			'default' => null,
			'strip_html' => true,
			'preserve_case' => true
			'default' => false,
			'boolean' => true
			'default' => 'exclude',
			'values' => [ 'include', 'exclude', 'only' ]
			'default' => null,
			'values' => [ 'exclude', 'only' ]
			'default' => null,
			'values' => [ 'exclude', 'only' ]
			'default' => null,
			'strip_html' => true,
			'preserve_case' => true
			'default' => null,
			'strip_html' => true,
			'preserve_case' => true
			'values' => [
			'default' => 1,
			'integer' => true
			'default' => 0,
			'integer' => true
			'default' => null,
			'strip_html' => true
			'default' => 0,
			'integer' => true
			'default' => false,
			'boolean' => true,
			'open_ref_conflict' => true
			'default' => true,
			'boolean' => true
			'default' => null
			'default' => null
			'default' => []
			'default' => null,
			'integer' => true
			'default' => null,
			'values' => [ 'standard', 'natural' ]
			'default' => null,
			'integer' => true
		if ( DynamicPageListHooks::isLikeIntersection() ) {
				'default' => 'categoryadd',
				'values' => [

				'default' => 'descending',
				'values' => [

				'default' => 'unordered',
				'values' => [


	 * @param string $parameter
	 * @return bool
	 * @param string $parameter
	 * @return mixed
	 * @param int $level
	 * @return int
	 * @param string $function
	 * @return bool


	 * @param int|null $level
	 * @return array


	 * @param string $parameter
	 * @return mixed


	 * @param string $parameter
	 * @return mixed


	 * @param string $parameter
	 * @return bool


	 * @param string $parameter
	 * @return bool


	 * @param string $parameter
	 * @return bool


	 * @param string $parameter
	 * @return bool


	 * @param string $parameter
	 * @return bool


	 * @param string $parameter
	 * @return bool



use ActorMigration;
use ExtVariables;
use MediaWiki\MediaWikiServices;
use MWException;
use Parser;
use Title;
use WebRequest;
use Wikimedia\Rdbms\IDatabase;
	 * @var IDatabase
	 * Parameters Object
	 * @var Parameters
	 * Logger Object
	 * @var Logger
	 * @var string[]
	/**
	 * WebRequest object
	 *
	 * @var WebRequest
	 */
	private $request;

		$this->DB = wfGetDB( DB_REPLICA, 'dpl' );
		$this->parameters = new Parameters();
		$this->logger = new Logger();
		$this->tableNames = Query::getTableNames();
		$this->request = $wgRequest;
	 * @param string $input
	 * @param Parser $parser
	 * @param array &$reset
	 * @param array	&$eliminate
	 * @param bool $isParserTag
	 * @return string
	 *
	 * @suppress PhanUndeclaredProperty Use of Parser::mTemplatePath
	public function parse( $input, Parser $parser, &$reset, &$eliminate, $isParserTag = false ) {
		// Reset headings when being ran more than once in the same page load.
		// Check that we are not in an infinite transclusion loop
		if ( isset( $parser->mTemplatePath[$parser->getTitle()->getPrefixedText()] ) ) {
			$this->logger->addMessage( DynamicPageListHooks::WARN_TRANSCLUSIONLOOP, $parser->getTitle()->getPrefixedText() );

		// Check if DPL shall only be executed from protected pages.
		if ( Config::getSetting( 'runFromProtectedPagesOnly' ) === true && !$parser->getTitle()->isProtected( 'edit' ) ) {
			// Ideally we would like to allow using a DPL query if the query istelf is coded on a template page which is protected. Then there would be no need for the article to be protected. However, how can one find out from which wiki source an extension has been invoked???
			$this->logger->addMessage( DynamicPageListHooks::FATAL_NOTPROTECTED, $parser->getTitle()->getPrefixedText() );


		$this->getUrlArgs( $parser );
		$this->parameters->setParameter( 'offset', $this->request->getInt( 'DPL_offset', $this->parameters->getData( 'offset' )['default'] ) );
			// Short circuit for dumb things.
			$this->logger->addMessage( DynamicPageListHooks::FATAL_NOSELECTION );


				// Parameter functions return true or false. The full parameter data will be passed into the Query object later.
					// Do not build this into the output just yet. It will be collected at the end.
					$this->logger->addMessage( DynamicPageListHooks::WARN_WRONGPARAM, $parameter, $_option );
			// The keyword "geturlargs" is used to return the Url arguments and do nothing else.
				return '';

			// In all other cases we return the value of the argument which may contain parser function calls.
		// Construct internal keys for TableRow according to the structure of "include". This will be needed in the output phase.
			// WHAT HAS HAPPENED OH NOOOOOOOOOOOOO.
			$actorMigration = ActorMigration::newMigration();
			$commentStore = MediaWikiServices::getInstance()->getCommentStore();
			$query = new Query( $this->parameters, $actorMigration, $commentStore );
			$result = $query->buildAndSelect( $calcRows );
			$this->logger->addMessage( DynamicPageListHooks::FATAL_SQLBUILDERROR, $e->getMessage() );
		$articles = $this->processQueryResults( $result, $parser );
		if ( DynamicPageListHooks::getDebugLevel() >= 4 && $wgDebugDumpSql ) {
			$this->addOutput( $query->getSqlQuery() . "\n" );
		// Preset these to defaults.
		$this->setVariable( 'TOTALPAGES', '0' );
		$this->setVariable( 'PAGES', '0' );
		$this->setVariable( 'VERSION', DynamicPageListHooks::getVersion() );
			// Shortcut out since there is no processing to do.
			$foundRows = $query->getFoundRows();
		// Backward scrolling: If the user specified only titlelt with descending reverse the output order.
		// Special sort for card suits (Bridge)
		$lister = Lister::newFromStyle( $this->parameters->getParameter( 'mode' ), $this->parameters, $parser );
		// $this->addOutput($lister->format($articles));
			$foundRows = $lister->getRowCount(); // Get row count after calling format() otherwise the count will be inaccurate.
		$this->setVariable( 'TOTALPAGES', (string)$foundRows ); // Guaranteed to be an accurate count if SQL_CALC_FOUND_ROWS was used. Otherwise only accurate if results are less than the SQL LIMIT.
		$this->setVariable( 'PAGES', $lister->getRowCount() ); // This could be different than TOTALPAGES. PAGES represents the total results within the constraints of SQL LIMIT.
		$nowTimeStamp = date( 'Y/m/d H:i:s' );
		$firstNamespaceFound = '';
		$firstTitleFound = '';
		$lastNamespaceFound = '';
		$lastTitleFound = '';

		// Replace %LASTTITLE% / %LASTNAMESPACE% by the last title found in header and footer
		$n = count( $articles );
		if ( $n > 0 ) {
			$firstTitleFound = str_replace( ' ', '_', $articles[0]->mTitle->getText() );
			$lastNamespaceFound = str_replace( ' ', '_', $articles[$n - 1]->mTitle->getNamespace() );
			$lastTitleFound = str_replace( ' ', '_', $articles[$n - 1]->mTitle->getText() );

			'DPL_firstNamespace' => $firstNamespaceFound,
			'DPL_firstTitle' => $firstTitleFound,
			'DPL_lastNamespace' => $lastNamespaceFound,
			'DPL_lastTitle' => $lastTitleFound,
			'DPL_scrollDir' => $this->parameters->getParameter( 'scrolldir' ),
			'DPL_time' => $dplTime,
			'DPL_count' => $this->parameters->getParameter( 'count' ),
			'DPL_totalPages' => $foundRows,
			'DPL_pages' => $lister->getRowCount()

		$this->defineScrollVariables( $scrollVariables, $parser );
			$parser->getOutput()->updateCacheExpiry( $this->parameters->getParameter( 'cacheperiod' ) ?? 3600 );
			$parser->getOutput()->updateCacheExpiry( 0 );
		$this->triggerEndResets( $finalOutput, $reset, $eliminate, $isParserTag, $parser );
	 * @param $result
	 * @param Parser $parser
	 * @return array
	private function processQueryResults( $result, Parser $parser ) {
			// mt_srand() seeding was removed due to PHP 5.2.1 and above no longer generating the same sequence for the same seed.
			// This is 50% to 150% faster than the old while (true) version that could keep rechecking the same random key over and over again.
			// Generate pick numbers for results.
			// Shuffle the pick numbers.
			// Select pick numbers from the beginning to the maximum of $randomCount.
			// In random mode skip articles which were not chosen.
			if ( $randomCount > 0 && !in_array( $i, $pick ?? [] ) ) {
				$pageTitle = $row['cl_to'];
					$pageTitle = $row['il_to'];
					// Maybe non-existing title
					$pageTitle = $row['pl_title'];
				// Existing PAGE TITLE
				$pageTitle = $row['page_title'];
			$title = Title::makeTitle( $pageNamespace, $pageTitle );
			$thisTitle = $parser->getTitle();
			// Block recursion from happening by seeing if this result row is the page the DPL query was ran from.

	 * @param string $input
	 * @return array
		// We replace double angle brackets with single angle brackets to avoid premature tag expansion in the input.
		// The ¦ symbol is an alias for |.
		// The combination '²{' and '}²'will be translated to double curly braces; this allows postponed template execution which is crucial for DPL queries which call other DPL queries.
		// Standard new lines into the standard \n and clean up any hanging new lines.
		$parameters = [];
				// Softly ignore blank lines.
				$this->logger->addMessage( DynamicPageListHooks::WARN_PARAMNOOPTION, $parameterOption );

			[ $parameter, $option ] = explode( '=', $parameterOption, 2 );
			$option = trim( $option );
				// Having the actual less than and greater than symbols is nasty for programatic look up. The old parameter is still supported along with the new, but we just fix it here before calling it.
			$parameter = strtolower( $parameter ); // Force lower case for ease of use.
				$this->logger->addMessage( DynamicPageListHooks::WARN_UNKNOWNPARAM, $parameter, implode( ', ', $this->parameters->getParametersForRichness() ) );

			// Ignore parameter settings without argument (except namespace and category).


	 * @param string $output
	 * @return string
		// @TODO: 2015-08-28 Consider calling $this->replaceVariables() here. Might cause issues with text returned in the results.
	 * @param bool|int $totalResults
	 * @param bool $skipHeaderFooter
	 * @return string

			// Only override header and footers if specified.
			$_headerType = $this->getHeaderFooterType( 'header', (int)$totalResults );

			$_footerType = $this->getHeaderFooterType( 'footer', (int)$totalResults );
			$this->logger->addMessage( DynamicPageListHooks::WARN_NORESULTS );

	 * @param string $header
		if ( DynamicPageListHooks::getDebugLevel() == 5 ) {

	 * @return string
	 * @param string $footer
		if ( DynamicPageListHooks::getDebugLevel() == 5 ) {

	 * @return string
	 * @param string $position
	 * @param int $count
	 * @return mixed Type to use: 'results', 'oneresult', or 'noresults'. False if invalid or none should be used.


	 * @param string $variable
	 * @param string $replacement
	 * @param string $text
	 * @return string


	 * @param string $text
	 * @return string
	 * @return bool

		// Too many categories.
			$this->logger->addMessage( DynamicPageListHooks::FATAL_TOOMANYCATS, Config::getSetting( 'maxCategoryCount' ) );

		// Not enough categories.(Really?)
			$this->logger->addMessage( DynamicPageListHooks::FATAL_TOOFEWCATS, Config::getSetting( 'minCategoryCount' ) );

		// Selection criteria needs to be found.
			$this->logger->addMessage( DynamicPageListHooks::FATAL_NOSELECTION );

		// ordermethod=sortkey requires ordermethod=category
		// Delayed to the construction of the SQL query, see near line 2211, gs
		// if (in_array('sortkey',$aOrderMethods) && ! in_array('category',$aOrderMethods)) $aOrderMethods[] = 'category';
		// Throw an error in no categories were selected when using category sorting modes or requesting category information.
			$this->logger->addMessage( DynamicPageListHooks::FATAL_CATDATEBUTNOINCLUDEDCATS );

		// No more than one type of date at a time!
		// @TODO: Can this be fixed to allow all three later after fixing the article class?
			$this->logger->addMessage( DynamicPageListHooks::FATAL_MORETHAN1TYPEOFDATE );

			$this->logger->addMessage( DynamicPageListHooks::FATAL_DOMINANTSECTIONRANGE, count( $this->parameters->getParameter( 'seclabels' ) ) );

			$this->logger->addMessage( DynamicPageListHooks::FATAL_WRONGORDERMETHOD, 'mode=category', 'sortkey | title | titlewithoutnamespace' );

			$this->logger->addMessage( DynamicPageListHooks::FATAL_WRONGORDERMETHOD, 'addpagetoucheddate=true', 'pagetouched | title' );

		// firstedit (resp. lastedit) -> add date of first (resp. last) revision
			$this->logger->addMessage( DynamicPageListHooks::FATAL_WRONGORDERMETHOD, 'addeditdate=true', 'firstedit | lastedit' );

			$this->logger->addMessage( DynamicPageListHooks::FATAL_WRONGORDERMETHOD, 'adduser=true', 'firstedit | lastedit' );


			$this->logger->addMessage( DynamicPageListHooks::FATAL_WRONGORDERMETHOD, 'minoredits', 'firstedit | lastedit' );

		// add*** parameters have no effect with 'mode=category' (only namespace/title can be viewed in this mode)
			$this->logger->addMessage( DynamicPageListHooks::WARN_CATOUTPUTBUTWRONGPARAMS );
		// headingmode has effects with ordermethod on multiple components only
			$this->logger->addMessage( DynamicPageListHooks::WARN_HEADINGBUTSIMPLEORDERMETHOD, $this->parameters->getParameter( 'headingmode' ), 'none' );
		// The 'openreferences' parameter is incompatible with many other options.
			$this->logger->addMessage( DynamicPageListHooks::FATAL_OPENREFERENCES );


	 * @param array	$tableRow
	 * @param array	$sectionLabels
	 * @return array
		$_tableRow = (array)$tableRow;
		$tableRow = [];
		$groupNr = -1;
		$t = -1;


				$n = count( explode( ':', $cols[1] ) );



	 * @param string $input
	 * @param array $arguments
	 * @return string

			$dplArg = $this->request->getVal( $arg, '' );


	 * @param Parser $parser
	private function getUrlArgs( Parser $parser ) {
		$args = $this->request->getValues();



				ExtVariables::get( $parser )->setVarValue( $argName, $argValue );
	 * This function uses the Variables extension to provide navigation aids such as DPL_firstTitle, DPL_lastTitle, or DPL_findTitle. These variables can be accessed as {{#var:DPL_firstTitle}} if Extension:Variables is installed.
	 * @param array $scrollVariables
	 * @param Parser $parser
	private function defineScrollVariables( $scrollVariables, Parser $parser ) {

				ExtVariables::get( $parser )->setVarValue( $variable, $value );
	 * @param string $output
	 * @param array &$reset
	 * @param array &$eliminate
	 * @param bool $isParserTag
	 * @param Parser $parser
	private function triggerEndResets( $output, &$reset, &$eliminate, $isParserTag, Parser $parser ) {
		$localParser = MediaWikiServices::getInstance()->getParserFactory()->create();
		$parserOutput = $localParser->parse( $output, $parser->getTitle(), $parser->getOptions() );



			// In tag mode 'eliminate' is the same as 'reset' for templates, categories, and images.


				DynamicPageListHooks::$createdLinks['resetTemplates'] = true;

				DynamicPageListHooks::$createdLinks['resetCategories'] = true;

				DynamicPageListHooks::$createdLinks['resetImages'] = true;

				DynamicPageListHooks::$createdLinks['resetLinks'] = true;

			// Register a hook to reset links which were produced during parsing DPL output.
			// Register a hook to reset links which were produced during parsing DPL output
				// Trigger the mediawiki parser to find links, images, categories etc. which are contained in the DPL output. This allows us to remove these links from the link list later. If the article containing the DPL statement itself uses one of these links they will be thrown away!
				DynamicPageListHooks::$createdLinks[0] = [];

					DynamicPageListHooks::$createdLinks[0][$nsp] = $link;

				DynamicPageListHooks::$createdLinks[1] = [];

					DynamicPageListHooks::$createdLinks[1][$nsp] = $tpl;

				DynamicPageListHooks::$createdLinks[2] = $parserOutput->mCategories;

				DynamicPageListHooks::$createdLinks[3] = $parserOutput->mImages;
	 * @param array	$articles
	 * @return array

			$title = preg_replace( '/.*:/', '', $article->mTitle );
			$tokens = preg_split( '/ - */', $title );






		$sortedArticles = [];



use ActorMigration;
use CommentStore;
use DateInterval;
use DateTime;
use Exception;
use MWException;
use Wikimedia\Rdbms\IDatabase;
	 * @var Parameters
	 * @var IDatabase
	/**
	 * @var ActorMigration
	 */
	private $actorMigration;

	/** @var UserQueryBuilder */
	private $userQueryBuilder;
	/** @var RevisionJoinBuilder */
	private $revisionJoinBuilder;

	 * @var int|bool
	 * @var int|bool
	 * @var string|bool
	 * @param Parameters $parameters
	 * @param ActorMigration $actorMigration
	 * @param CommentStore $commentStore
	public function __construct(
		Parameters $parameters,
		ActorMigration $actorMigration,
		CommentStore $commentStore
	) {
		$this->actorMigration = $actorMigration;
		$this->userQueryBuilder = new UserQueryBuilder( $this->DB, $this->actorMigration );
		$this->revisionJoinBuilder = new RevisionJoinBuilder(
			$this->DB,
			$this->actorMigration,
			$commentStore
		);
	 * @param bool $calcRows
	 * @return mixed Mediawiki Result Object or False
			// Some parameters do not modifiy the query so we check if the function to modify the query exists first.

				throw new MWException( __METHOD__ . ": SQL Build Error returned from {$function} for " . serialize( $option ) . "." );

		$userQueryConds = $this->userQueryBuilder->getWhere();
		if ( $userQueryConds ) {
			$this->addWhere( $userQueryConds );
		}

		$revQueryInfo = $this->revisionJoinBuilder->getQueryInfo();
		$this->addSelect( $revQueryInfo['fields'] );

		foreach ( $revQueryInfo['tables'] as $alias => $table ) {
			if ( !isset( $this->tables[$alias] ) ) {
				$this->tables[$alias] = $table;
			}
		}

		foreach ( $revQueryInfo['joins'] as $joinTarget => $joinConds ) {
			$this->addJoin( $joinTarget, $joinConds );
		}

			// Add things that are always part of the query.

		// Always add nonincludeable namespaces.

		} elseif ( $this->offset !== false ) {
				// $sSqlSelectFrom = $sSqlCl_to.'ic.il_to, '.$sSqlSelPage."ic.il_to AS sortkey".' FROM '.$this->tableNames['imagelinks'].' AS ic';
				// $sSqlSelectFrom = "SELECT $sSqlCalcFoundRows $sSqlDistinct ".$sSqlCl_to.'pl_namespace, pl_title'.$sSqlSelPage.$sSqlSortkey.' FROM '.$this->tableNames['pagelinks'];




				$pageIds = [];


						'clgoal' => 'categorylinks'
						'clgoal.cl_from' => $pageIds
						'ORDER BY' => 'clgoal.cl_to ' . $this->direction

		if ( $queryError || $result === false ) {
			throw new MWException( __METHOD__ . ": " . wfMessage( 'dpl_query_error', DynamicPageListHooks::getVersion(), $this->DB->lastError() )->text() );
	 * @return int
	 * @return string
	 * @return array


	 * @param string $table
	 * @param string $alias
	 * @return bool
			throw new MWException( __METHOD__ . ': An empty table name was passed.' );

			throw new MWException( __METHOD__ . ': An empty or numeric table alias was passed.' );


	/**
	 * Add multiple tables to the output.
	 *
	 * @param array $tablesByAlias
	 */
	public function addTables( array $tablesByAlias ) {
		foreach ( $tablesByAlias as $alias => $table ) {
			$this->addTable( $table, $alias );
		}
	}

	 * Where clauses get imploded together with AND at the end. Any custom where clauses should be preformed before placed into here.
	 * @param array|string $where
	 * @return bool
			throw new MWException( __METHOD__ . ': An empty where clause was passed.' );

			throw new MWException( __METHOD__ . ': An invalid where clause was passed.' );

	 * @param array $where
	 * @return bool
			throw new MWException( __METHOD__ . ': An empty not where clause was passed.' );

			throw new MWException( __METHOD__ . ': An invalid not where clause was passed.' );

	 * @param array $fields
	 * @return bool
			throw new MWException( __METHOD__ . ': A non-array was passed.' );

				// In case of a code bug that is overwriting an existing field alias throw an exception.
				throw new MWException( __METHOD__ . ": Attempted to overwrite existing field alias `{$this->select[$alias]}` AS `{$alias}` with `{$field}` AS `{$alias}`." );

			// String alias and does not exist already.
			// Speed up by not using in_array() or array_key_exists(). Toss the field names into their own array as keys => true to exploit a speedy look up with isset().

	 * @param string $groupBy
	 * @return bool
			throw new MWException( __METHOD__ . ': An empty group by clause was passed.' );


	 * @param string $orderBy
	 * @return bool
			throw new MWException( __METHOD__ . ': An empty order by clause was passed.' );


	 * @param string $tableAlias
	 * @param array $joinConditions
	 * @return bool
			throw new MWException( __METHOD__ . ': An empty join clause was passed.' );

			throw new MWException( __METHOD__ . ': Attempted to overwrite existing join clause.' );


	public function addJoins( array $joins ) {
		foreach ( $joins as $alias => $conds ) {
			$this->addJoin( $alias, $conds );
		}
	}

	 * @param mixed $limit
	 * @return bool

	 * @param mixed $offset
	 * @return bool

	 * @param string $direction
	 * @return bool

	 * @param string $collation
	 * @return string|null
	 * @param string $categoryName
	 * @param int $depth
	 * @return array
			// Hard constrain depth because lots of recursion is bad.




	 * @param mixed $inputDate
	 * @return int|string
				$date = new DateTime();
				$date->sub( new DateInterval( 'P1H' ) );
				$date = new DateTime();
				$date->sub( new DateInterval( 'P1D' ) );
				$date = new DateTime();
				$date->sub( new DateInterval( 'P7D' ) );
				$date = new DateTime();
				$date->sub( new DateInterval( 'P1M' ) );
				$date = new DateTime();
				$date->sub( new DateInterval( 'P1Y' ) );

	 * @param mixed $option
		// Addauthor can not be used with addlasteditor.
			$this->revisionJoinBuilder->addFieldsFromFirst(
				[ 'rev_user_text' => 'rev_user_text' ]
	 * @param mixed $option


	 * @param mixed $option
		$actorQuery = $this->actorMigration->getJoin( 'rc_user' );
		$this->addTables( [ 'rc' => 'recentchanges' ] + $actorQuery['tables'] );
		$this->addSelect( [
			'contribution' => 'SUM(ABS(rc_new_len - rc_old_len))',
			'contributor' => $actorQuery['fields']['rc_user_text']
		] );
		$this->addGroupBy( 'rc_cur_id, ' . $actorQuery['fields']['rc_actor'] );
		$this->addJoins( [ 'rc' => [ 'JOIN', 'page_id = rc_cur_id' ] ] + $actorQuery['joins'] );
	 * @param mixed $option
		$this->addTable( 'revision', 'rev' );
		$this->addSelect( [ 'rev.rev_timestamp' ] );
				$this->tableNames['page'] . '.page_id = rev.rev_page',
	 * @param mixed $option
		// @TODO: This should be programmatically determining which categorylink table to use instead of assuming the first one.
	 * @param mixed $option
		// Addlasteditor can not be used with addauthor.
			$this->revisionJoinBuilder->addFieldsFromLast( [ 'rev_user_text' => 'rev_user_text' ] );
	 * @param mixed $option

	 * @param mixed $option
	 * @param mixed $option
	 * @param mixed $option
		$this->addTable( 'revision', 'rev' );
				'rev.rev_id',
				'rev.rev_timestamp'

		$this->addOrderBy( 'rev.rev_id' );
				$this->tableNames['page'] . '.page_id = rev.rev_page',
				'rev.rev_timestamp < ' . $this->convertTimestamp( $option )
	 * @param mixed $option
		$this->addTable( 'revision', 'rev' );
				'rev.rev_id',
				'rev.rev_timestamp'

		$this->addOrderBy( 'rev.rev_id' );
				$this->tableNames['page'] . '.page_id = rev.rev_page',
				'rev.rev_timestamp >= ' . $this->convertTimestamp( $option )
	 * @param mixed $option
	 * @param mixed $option

		if ( isset( $option[1] ) && is_numeric( $option[1] ) ) {
	 * Set SQL for 'category' parameter. This includes 'category', 'categorymatch', and 'categoryregexp'.
	 * @param mixed $option




	 * @param mixed $option

	 * @param mixed $option
		$this->userQueryBuilder->addCreatedByConstraint( $option );
	 * @param mixed $option
	 * @param mixed $option
		$this->addTable( 'revision', 'rev' );
				'rev.rev_id',
				'rev.rev_timestamp'

				$this->tableNames['page'] . '.page_id = rev.rev_page',
				'rev.rev_timestamp >= ' . $this->DB->addQuotes( $option )

				$this->tableNames['page'] . '.page_id = rev.rev_page',
				'rev.rev_timestamp = (SELECT MIN(rev_aux_snc.rev_timestamp) FROM ' . $this->tableNames['revision'] . ' AS rev_aux_snc WHERE rev_aux_snc.rev_page=rev.rev_page AND rev_aux_snc.rev_timestamp >= ' . $this->convertTimestamp( $option ) . ')'
	 * @param mixed $option
	 * @param mixed $option
		// @TODO: Unfinished functionality! Never implemented by original author.
	 * @param mixed $option
		$where = [];




	 * @param mixed $option
		$where = [];





	 * @param mixed $option
		$this->userQueryBuilder->addLastModifiedByConstraint( $option );
	 * @param mixed $option
		$this->addTable( 'revision', 'rev' );
		$this->addSelect( [ 'rev.rev_id', 'rev.rev_timestamp' ] );

				$this->tableNames['page'] . '.page_id = rev.rev_page',
				'rev.rev_timestamp < ' . $this->convertTimestamp( $option )

				$this->tableNames['page'] . '.page_id = rev.rev_page',
				'rev.rev_timestamp = (SELECT MAX(rev_aux_bef.rev_timestamp) FROM ' . $this->tableNames['revision'] . ' AS rev_aux_bef WHERE rev_aux_bef.rev_page=rev.rev_page AND rev_aux_bef.rev_timestamp < ' . $this->convertTimestamp( $option ) . ')'
	 * @param mixed $option
		$where = [];







	 * @param mixed $option











	 * @param mixed $option





	 * @param mixed $option






		$this->addWhere( $where ?? '' );
	 * @param mixed $option







	 * @param mixed $option
		$this->addWhere( "((SELECT count(rev_aux3.rev_page) FROM {$this->tableNames['revision']} AS rev_aux3 WHERE rev_aux3.rev_page = {$this->tableNames['page']}.page_id) <= {$option})" );
	 * @param mixed $option
			$this->addTable( 'revision', 'rev' );
			$this->addWhere( 'rev.rev_minor_edit = 0' );
	 * @param mixed $option
		$this->addWhere( "((SELECT count(rev_aux2.rev_page) FROM {$this->tableNames['revision']} AS rev_aux2 WHERE rev_aux2.rev_page = {$this->tableNames['page']}.page_id) >= {$option})" );
	 * @param mixed $option
		$this->userQueryBuilder->addModifiedByConstraint( $option );
	 * @param mixed $option
	 * @param mixed $option
		$this->userQueryBuilder->addNotCreatedByConstraint( $option );
	 * @param mixed $option
		$this->userQueryBuilder->addNotLastModifiedByConstraint( $option );
	 * @param mixed $option
		$this->userQueryBuilder->addNotModifiedByConstraint( $option );
	 * @param mixed $option
	 * @param mixed $option
	 * @param mixed $option
	 * @param mixed $option

	 * @param mixed $option
	 * @return bool

	 * @param mixed $option
			// No order methods for returning categories.
		$services = MediaWikiServices::getInstance();
		$namespaces = $services->getContentLanguage()->getNamespaces();

		// $aStrictNs = array_slice( (array)Config::getSetting( 'allowedNamespaces' ), 1, count( Config::getSetting( 'allowedNamespaces' ) ), true );




		$willOrderByLastEdit = in_array( 'lastedit', $option );
		$willOrderByFirstEdit = in_array( 'firstedit', $option );

					$this->addSelect( [ 'cl_head.cl_to' ] );




					// @TODO: See TODO in __addfirstcategorydate().
						// If the "addpagecounter" parameter was not used the table and join need to be added now.

					$this->revisionJoinBuilder->addFieldsFromFirst( [
						'first_rev_timestamp' => 'rev_timestamp'
					] );

					$this->addOrderBy( 'first_rev_timestamp' );
					if ( DynamicPageListHooks::isLikeIntersection() ) {
						$this->revisionJoinBuilder->addFieldsFromLast( [
							'latest_rev_timestamp' => 'rev_timestamp'
						] );

						$this->addOrderBy( 'latest_rev_timestamp' );

							// This runs on the assumption that at least one category parameter was used and that numbering starts at 1.

								'sortkey' => "REPLACE(CONCAT(IF(pl_namespace =0, '', CONCAT(" . $_namespaceIdToText . ", ':')), pl_title), '_', ' ') " . $this->getCollateSQL()
						// Generate sortkey like for category links. UTF-8 created problems with non-utf-8 MySQL databases.
					$actorQuery = $this->actorMigration->getJoin( 'rev_user' );
					$sortField = $actorQuery['fields']['rev_actor'] !== 'NULL' ? 'rev_actor' : 'rev_user_text';

					if ( $willOrderByFirstEdit ) {
						$this->revisionJoinBuilder->addFieldsFromFirst( [
							'rev_user_text' => 'rev_user_text',
							'first_rev_actor' => $sortField
						] );

						$this->addOrderBy( 'first_rev_actor' );
					}

					if ( $willOrderByLastEdit ) {
						$this->revisionJoinBuilder->addFieldsFromLast( [
							'rev_user_text' => 'rev_user_text',
							'last_rev_actor' => $sortField
						] );

						$this->addOrderBy( 'last_rev_actor' );
					}
	 * @param mixed $option
	 * @param mixed $option
			// Do not add this again if 'qualitypages' has already added it.

	 * @param mixed $option
			// Do not add this again if 'stablepages' has already added it.

	 * @param mixed $option



	 * @param mixed $option



	 * @param mixed $option

				$where .= 'pl_title >= ' . $this->DB->addQuotes( substr( $option, 2 ) );

	 * @param mixed $option


	 * @param mixed $option





	 * @param mixed $option




	 * @param mixed $option




		$this->addWhere( $where ?? '' );
<?php

namespace DPL;

use ActorMigration;
use CommentStore;
use Wikimedia\Rdbms\IDatabase;

class RevisionJoinBuilder {
	/** @var IDatabase */
	private $dbr;

	/** @var ActorMigration */
	private $actorMigration;

	/** @var CommentStore */
	private $commentStore;

	/**
	 * List of fields to select from the first revision of the article, keyed by alias.
	 * @var string[]
	 */
	private $firstRevisionFields = [];

	/**
	 * List of fields to select from the last revision of the article, keyed by alias.
	 * @var string[]
	 */
	private $lastRevisionFields = [];

	public function __construct(
		IDatabase $dbr,
		ActorMigration $actorMigration,
		CommentStore $commentStore
	) {
		$this->dbr = $dbr;
		$this->actorMigration = $actorMigration;
		$this->commentStore = $commentStore;
	}

	public function addFieldsFromFirst( array $fields ): void {
		$this->firstRevisionFields += $fields;
	}

	public function addFieldsFromLast( array $fields ): void {
		$this->lastRevisionFields += $fields;
	}

	public function getQueryInfo(): array {
		$queryInfo = [
			'fields' => [],
			'tables' => [],
			'joins' => [],
		];

		return array_merge_recursive(
			$queryInfo,
			$this->addRevisionQueryInfo(
				'latest_rev',
				$this->lastRevisionFields,
				[ 'rev_id=page_latest' ]
			),
			$this->addRevisionQueryInfo(
				'first_rev',
				$this->firstRevisionFields,
				[
					// @phan-suppress-next-line PhanPluginMixedKeyNoKey
					'rev_page=page_id',
					'rev_parent_id' => 0,
				]
			)
		);
	}

	private function addRevisionQueryInfo(
		string $tableAlias,
		array $fieldsByAlias,
		array $joinConds
	): array {
		if ( !$fieldsByAlias ) {
			return [];
		}

		$fieldsByAlias += [ 'rev_id', 'rev_page', 'rev_parent_id' ];

		$actorQuery = $this->actorMigration->getJoin( 'rev_user' );
		$commentQuery = $this->commentStore->getJoin( 'rev_comment' );

		// Ensure we correctly fetch aliased fields such as rev_user
		// from the revision_actor_temp table if it is active.
		$actorFields = array_keys( $actorQuery['fields'] );
		$revFields = array_diff( $fieldsByAlias, $actorFields );

		// Since multiple instances of the revision and associated actor tables may be used per
		// query, join on the derived result of an aliased subquery to avoid naming conflicts.
		$revQuery = $this->dbr->buildSelectSubquery(
			[ $tableAlias => 'revision' ] + $actorQuery['tables'] + $commentQuery['tables'],
			$actorQuery['fields'] + $commentQuery['fields'] + array_values( $revFields ),
			[],
			__METHOD__,
			[],
			$actorQuery['joins'] + $commentQuery['joins']
		);

		$fieldsWithPrefix = [];
		$quotedTableAlias = $this->dbr->addIdentifierQuotes( $tableAlias );

		foreach ( $fieldsByAlias as $alias => $revFieldName ) {
			$quotedRevField = $this->dbr->addIdentifierQuotes( $revFieldName );
			$fieldsWithPrefix[$alias] = "$quotedTableAlias.$quotedRevField";
		}

		return [
			'fields' => $fieldsWithPrefix,
			'tables' => [
				$tableAlias => $revQuery
			],
			'joins' => [
				$tableAlias => [ 'JOIN', $joinConds ]
			]
		];
	}
}
use Article;
use CommentStoreComment;
use MediaWiki\MediaWikiServices;
use MediaWiki\Revision\SlotRecord;
use ReadOnlyError;
use RequestContext;
use Title;

	 * (2) set template parameters to values specified in the query (exec=set)v
		$rulesText = str_replace( ";", '°', $rulesText );
		$rulesText = str_replace( '\°', ';', $rulesText );
		$rulesText = str_replace( "\\n", "\n", $rulesText );
		$rules = explode( '°', $rulesText );
		$exec = 'edit';
		$replaceThis = '';
		$replacement = '';
		$after = '';
		$insertionAfter = '';
		$before = '';
		$template = '';
		$parameter = [];
		$value = [];
		$afterparm = [];
		$format = [];
		$preview = [];
		$save = [];
		$tooltip = [];
		$optional = [];

		$lastCmd = '';
		$message = '';
		$summary = '';
		$editForm = false;
		$action = '';
		$hidden = [];
		$legendPage = '';
		$table = '';
		$fieldFormat = '';
				continue;
			$rule = preg_replace( '/^[\s]*/', '', $rule );
			$cmd = preg_split( "/ +/", $rule, 2 );


			// after ... insert ..., before ... insert ...
				$before = $arg;
				$after = $arg;




					$n = $nr - 1;
















				$summary .= "\n before $before\n insertionBefore";

				$summary .= "\n after $after\n insertionAfter";
		global $wgRequest;
		$user = RequestContext::getMain()->getUser();
		if ( $template != '' ) {
				$tpv = self::getTemplateParmValues( $text, $template );


					$parser = clone MediaWikiServices::getInstance()->getParser();


				$instructions = [];


					$parser = clone MediaWikiServices::getInstance()->getParser();





						$myType = '';










				$form .= "<input type='hidden' name='wpEditToken' value='{$user->getEditToken()}'/>";




						$myOptional = array_key_exists( $nr, $optional );


						$text = self::updateTemplateCall( $matchCount, $text, $template, $call, $parm, $myValue ?? '', $myAfterParm, $myOptional );

						break;
			return self::doUpdateArticle( $title, $text, $summary );

			$titleX = Title::newFromText( $title );
			$articleX = new Article( $titleX );

			$userOptionsLookup = MediaWikiServices::getInstance()->getUserOptionsLookup();

			$form = '<html>
		<input type="hidden" value="' . $articleX->getPage()->getTimestamp() . '" name="wpEdittime" />
		<textarea tabindex="1" accesskey="," name="wpTextbox1" id="wpTextbox1" rows="' . $userOptionsLookup->getIntOption( $user, 'rows' ) . '" cols="' . $userOptionsLookup->getIntOption( $user, 'cols' ) . '" >' . htmlspecialchars( $text ) . '</textarea>

	private static function doUpdateArticle( $title, $text, $summary ) {
		global $wgRequest, $wgOut;

		$user = RequestContext::getMain()->getUser();
		if ( !$user->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) ) ) {

		$titleX = Title::newFromText( $title );
		$permission_errors = MediaWikiServices::getInstance()->getPermissionManager()->getPermissionErrors( 'edit', $user, $titleX );

			$wikiPageFactory = MediaWikiServices::getInstance()->getWikiPageFactory();

			$page = $wikiPageFactory->newFromTitle( $titleX );
			$updater = $page->newPageUpdater( $user );
			$content = $page->getContentHandler()->makeContent( $text, $titleX );
			$updater->setContent( SlotRecord::MAIN, $content );
			$comment = CommentStoreComment::newUnsavedComment( $summary );

			$updater->saveRevision(
				$comment,
				EDIT_UPDATE | EDIT_DEFER_UPDATES | EDIT_AUTOSUMMARY
			);

			$wgOut->redirect( $titleX->getFullUrl( $page->isRedirect() ? 'redirect=no' : '' ) );







		$matches = [];


		$tval = [];
		$call = -1;
				$match = $matchB[0];
				$start = $matchB[1];
				$nr = 0;
				$parmValue = '';
				$parmName = '';
				$parm = '';
					break;

						$cbrackets++;



						$parmName = '';
						$parm = '';


						break;

		$matches = [];


		$beginSubst = -1;
		$endSubst = -1;
		$apNrLast = 1000;


					$beginSubst = 0;
					$endSubst = 0;
					$parm = '';
					$pos = $start + strlen( $match ) - 1;
					$textLen = strlen( $text );








									$endSubst = $i;
											$apNrLast = $apNr;


							$pos = $i;

		return substr( $text, 0, $beginSubst ) . ( $substitution ?? '' ) . substr( $text, $endSubst );
	public static function deleteArticleByRule( $title, $text, $rulesText ) {
		global $wgOut;
		$rules = explode( '°', $rulesText );
		$exec = false;
		$message = '';
		$reason = '';
			$rule = preg_replace( '/^[\s]*/', '', $rule );
			$cmd = preg_split( "/ +/", $rule, 2 );



		$titleX = Title::newFromText( $title );

			$user = RequestContext::getMain()->getUser();

			$permission_errors = MediaWikiServices::getInstance()->getPermissionManager()->getPermissionErrors( 'delete', $user, $titleX );
			$isReadOnly = MediaWikiServices::getInstance()->getReadOnlyMode()->isReadOnly();

			} elseif ( $isReadOnly ) {
				throw new ReadOnlyError;
				$articleX = new Article( $titleX );

		$message .= "<pre><nowiki>\n{$text}</nowiki></pre>"; // <pre><nowiki>\n";

<?php

namespace DPL;

use ActorMigration;
use MediaWiki\MediaWikiServices;
use MediaWiki\User\UserFactory;
use MediaWiki\User\UserIdentity;
use Wikimedia\Rdbms\IDatabase;

class UserQueryBuilder {
	/** @var IDatabase */
	private $dbr;

	/** @var ActorMigration */
	private $actorMigration;

	/** @var UserIdentity|array */
	private $modifiedByConstraints = [];

	/** @var UserIdentity|array */
	private $notModifiedByConstraints = [];

	/** @var UserIdentity|array */
	private $notCreatedByConstraints = [];

	/** @var UserIdentity|array */
	private $notLastModifiedByConstraints = [];

	/** @var UserIdentity|null */
	private $createdByConstraint;

	/** @var UserIdentity|null */
	private $lastModifiedByConstraint;

	public function __construct( IDatabase $dbr, ActorMigration $actorMigration ) {
		$this->dbr = $dbr;
		$this->actorMigration = $actorMigration;
	}

	public function addModifiedByConstraint( string $userName ): void {
		$this->modifiedByConstraints[] = $this->getUserForQuery( $userName );
	}

	public function addNotModifiedByConstraint( string $userName ): void {
		$this->notModifiedByConstraints[] = $this->getUserForQuery( $userName );
	}

	public function addCreatedByConstraint( string $userName ): void {
		$this->createdByConstraint = $this->getUserForQuery( $userName );
	}

	public function addNotCreatedByConstraint( string $userName ): void {
		$this->notCreatedByConstraints[] = $this->getUserForQuery( $userName );
	}

	public function addLastModifiedByConstraint( string $userName ): void {
		$this->lastModifiedByConstraint = $this->getUserForQuery( $userName );
	}

	public function addNotLastModifiedByConstraint( string $userName ): void {
		$this->notLastModifiedByConstraints[] = $this->getUserForQuery( $userName );
	}

	/**
	 * Combine the constraints into a single condition suitable for inclusion in a WHERE clause.
	 * @return string
	 */
	public function getWhere(): string {
		$conds = [];

		$modifiedByQuery = $this->getSubqueryForConstraint( $this->modifiedByConstraints );
		if ( $modifiedByQuery ) {
			$conds[] = "page_id IN $modifiedByQuery";
		}

		$notModifiedByQuery = $this->getSubqueryForConstraint( $this->notModifiedByConstraints );
		if ( $notModifiedByQuery ) {
			$conds[] = "NOT EXISTS $notModifiedByQuery";
		}

		$lastModifiedByQuery = $this->getSubqueryForConstraint(
			[ $this->lastModifiedByConstraint ],
			$this->notLastModifiedByConstraints,
			'rev_id'
		);
		if ( $lastModifiedByQuery ) {
			$conds[] = "page_latest IN $lastModifiedByQuery";
		}

		$createdByQuery = $this->getSubqueryForConstraint(
			[ $this->createdByConstraint ],
			$this->notCreatedByConstraints,
			'rev_page',
			[ 'rev_parent_id' => 0 ]
		);
		if ( $createdByQuery ) {
			$conds[] = "page_id IN $createdByQuery";
		}

		return $this->dbr->makeList( $conds, IDatabase::LIST_AND );
	}

	private function getUserForQuery( string $userName ): ?UserIdentity {
		$userFactory = MediaWikiServices::getInstance()->getUserFactory();

		return $userFactory->newFromName( $userName, UserFactory::RIGOR_NONE ) ?: null;
	}

	/**
	 * Construct a subquery for filtering revisions based on given user-specific criteria.
	 * @param UserIdentity[] $constraints -users to include in the result set
	 * @param UserIdentity[] $notConstraints - users to exclude from the result set
	 * @param string $selectField - field name to select from the revision table
	 * @param array $conds - additional query conditions
	 * @return string|null - the subquery, or null if no constraints were given
	 */
	private function getSubqueryForConstraint(
		array $constraints,
		array $notConstraints = [],
		string $selectField = 'rev_page',
		array $conds = []
	): ?string {
		$constraints = array_filter( $constraints );
		$notConstraints = array_filter( $notConstraints );
		if ( !$constraints && !$notConstraints ) {
			return null;
		}

		$constraintActorQuery = $this->actorMigration->getWhere(
			$this->dbr,
			'rev_user',
			$constraints
		);

		$notConstraintActorQuery = $this->actorMigration->getWhere(
			$this->dbr,
			'rev_user',
			$notConstraints
		);

		if ( $constraints ) {
			$conds[] = $constraintActorQuery['conds'];
		}

		if ( $notConstraints ) {
			$conds[] = "NOT ({$notConstraintActorQuery['conds']})";
		}

		$conds[] = 'rev_page=page_id';

		return (string)$this->dbr->buildSelectSubquery(
			[ 'revision' ] + $constraintActorQuery['tables'] + $notConstraintActorQuery['tables'],
			[ $selectField ],
			$conds,
			__METHOD__,
			[],
			(array)$constraintActorQuery['joins'] + (array)$notConstraintActorQuery['joins']
		);
	}
}












		$var = trim( $arg[2] );
		$value = $arg[3];





		if ( strpos( $delimiter, '/' ) !== 0 || ( strlen( $delimiter ) - 1 ) !== strrpos( $delimiter, '/' ) ) {




		$var = trim( $arg[2] );
		$n = 0;






		$values = self::$memoryArray[$var];


			// @phan-suppress-next-line PhanPluginMixedKeyNoKey
			'noparse' => false,
			'isHTML' => false
	 * @param int $headingStart
	 * @param int $headingCount
	 * @param string $headingLink
	 * @param array $articles
	 * @param Lister $lister
	 * @return string



use Sanitizer;
	 * @var int|null
	 * Use %s for attribute placement. Example: <div%s>
	 * Use %s for attribute placement. Example: <div%s>
	 * @var string
	 * @var string
	 * Parameters
	 * @var Parameters
	protected $parameters;
	 * @param Parameters $parameters
	 * @param string $style
	 * @param Parameters $parameters
	 * @return mixed
	public static function newFromStyle( $style, Parameters $parameters ) {

				$class = DefinitionHeading::class;
				$class = TieredHeading::class;
				$class = OrderedHeading::class;
				$class = UnorderedHeading::class;
	 * Get the Parameters object this object was constructed with.
	 * @return Parameters
	 * @param string $attributes
		$this->listAttributes = Sanitizer::fixTagAttributes( $attributes, 'ul' );
	 * @param string $attributes
		$this->itemAttributes = Sanitizer::fixTagAttributes( $attributes, 'li' );
	 * @param bool $show
	 * @return int
	 * @param array $articles
	 * @param Lister $lister
	 * @return string

				$hspace = 2;



				$rest = $count - ( floor( $nsize ) * floor( $iGroup ) );



					$nsize = $hspace + 1;

				$greml = $nsize;
				$g = 0;













			$count = count( $articles );


			$rest = $count - ( floor( $nsize ) * floor( $iGroup ) );



				$output .= $lister->formatList( $articles, $nstart, (int)$nsize );


				$nstart += $nsize;


			$nsize = $rowSize;
			$count = count( $articles );


				$output .= $lister->formatList( $articles, $nstart, (int)$nsize );
				$nstart += $nsize;

			// Even though the headingmode is not none there were no headings, but still results. Output them anyway.
	 * @param int $headingStart
	 * @param int $headingCount
	 * @param string $headingLink
	 * @param array $articles
	 * @param Lister $lister
	 * @return string


	 * @return string
	 * @return string
	 * @return string
	 * @param int $count
	 * @return string


	 * @param Parameters $parameters

	 * @param int $headingStart
	 * @param int $headingCount
	 * @param string $headingLink
	 * @param array $articles
	 * @param Lister $lister
	 * @return string


	 * @return string
	 * @return string
	 * @return string
use CategoryViewer;
	 * @var int
	 * @param array $articles
	 * @param int $start
	 * @param int $count
	 * @return string Formatted list.
		$articleLinks = [];
		$articleStartChars = [];



			$filteredCount++;
			return "__NOTOC____NOEDITSECTION__" . CategoryViewer::columnList( $articleLinks, $articleStartChars );
			return "__NOTOC____NOEDITSECTION__" . CategoryViewer::shortList( $articleLinks, $articleStartChars );

	 * @param Article $article
	 * @param string|null $pageText
	 * @return string
	 * @var int
	 * @var int
	public $itemEnd = '|';
	 * @param Article $article
	 * @param string|null $pageText
	 * @return string
			// Include parsed/processed wiki markup content after each item before the closing tag.
use DPL\Parameters;
use Parser;

	 * @var int
	 * @param Parameters $parameters
	 * @param Parser $parser
	public function __construct( Parameters $parameters, Parser $parser ) {

	 * @param array $items
	 * @return string
use DPL\Parameters;
use Parser;
use Sanitizer;
use Title;
	public const LIST_DEFINITION = 1;

	public const LIST_GALLERY = 2;

	public const LIST_HEADING = 3;

	public const LIST_INLINE = 4;

	public const LIST_ORDERED = 5;

	public const LIST_UNORDERED = 6;

	public const LIST_CATEGORY = 7;

	public const LIST_USERFORMAT = 8;
	 * @var int|null
	 * Use %s for attribute placement. Example: <div%s>
	 * Use %s for attribute placement. Example: <div%s>
	 * Use %s for attribute placement. Example: <div%s>
	 * Use %s for attribute placement. Example: <div%s>
	 * @var string
	 * @var string
	 * @var string
	 * @var string
	 * @var int|null
	/**
	 * @var string|null
	 */
	protected $tableSortMethod = null;

	 * @var int|null
	 * @var int|null
	protected $pageTextMatch;
	protected $pageTextMatchRegex;
	protected $pageTextMatchNotRegex;
	 * Parameters
	 * @var Parameters
	protected $parameters;
	 * @var Parser
	protected $parser;
	 * @param Parameters $parameters
	 * @param Parser $parser
	public function __construct( Parameters $parameters, Parser $parser ) {
		$this->setTableSortMethod( $parameters->getParameter( 'tablesortmethod' ) );
	 * @param string $style
	 * @param Parameters $parameters
	 * @param Parser $parser
	 * @return mixed
	public static function newFromStyle( $style, Parameters $parameters, Parser $parser ) {

				$class = CategoryList::class;
				$class = DefinitionList::class;
				$class = GalleryList::class;
				$class = InlineList::class;
				$class = OrderedList::class;
				$class = SubPageList::class;
				$class = UnorderedList::class;
				$class = UserFormatList::class;
	 * Get the Parameters object this object was constructed with.
	 * @return Parameters
	 * @param string $attributes
		$this->headListAttributes = Sanitizer::fixTagAttributes( $attributes, 'ul' );
	 * @param string $attributes
		$this->headItemAttributes = Sanitizer::fixTagAttributes( $attributes, 'li' );
	 * @param string $attributes
		$this->listAttributes = Sanitizer::fixTagAttributes( $attributes, 'ul' );
	 * @param string $attributes
		$this->itemAttributes = Sanitizer::fixTagAttributes( $attributes, 'li' );
	 * @param int $count
	 * @return int
	 * @return int
	 * @param string $suffix
	 * @return string
	 * @param bool $trim
	 * @return bool
	 * @param bool $escape
	 * @return bool
	 * @param int|null $index
	 * @return int|null
	 * @param string|null $method
	public function setTableSortMethod( $method = null ) {
	 * @return string
	 * @param int|null $length
	 * @return int|null
	 * @param ?array $separators
		$this->sectionSeparators = $separators ?? [];
	 * @param ?array $separators
		$this->multiSectionSeparators = $separators ?? [];
	 * @param bool $include
	 * @param int|null $length
	 * @param array	$pageTextMatch
		$this->pageTextMatch = $pageTextMatch;
	 * @param array	$pageTextMatchRegex
		$this->pageTextMatchRegex = $pageTextMatchRegex;
	 * @param array	$pageTextMatchNotRegex
		$this->pageTextMatchNotRegex = $pageTextMatchNotRegex;
	 * @param bool $parse
	 * @param array $articles
	 * @return string
	 * @param array $articles
	 * @param int $start
	 * @param int $count
	 * @return string


	 * @param Article $article
	 * @param string|null $pageText
	 * @return string


			// Include parsed/processed wiki markup content after each item before the closing tag.
	 * @return string
	 * @return string
	 * @return string
	 * @return string
	 * @return string
	 * @return string
	 * @param array $items
	 * @return string
	 * @param string $tag
	 * @param Article $article
	 * @return string
		$tag = str_replace( '%PAGEID%', (string)$article->mID, $tag );



		$tag = str_replace( '%COUNT%', (string)$article->mCounter, $tag );
		$tag = str_replace( '%COUNTFS%', (string)( floor( log( $article->mCounter ) * 0.7 ) ), $tag );
		$tag = str_replace( '%COUNTFS2%', (string)( floor( sqrt( log( $article->mCounter ) ) ) ), $tag );
		$tag = str_replace( '%SIZE%', (string)$article->mSize, $tag );
		$tag = str_replace( '%SIZEFS%', (string)( floor( sqrt( log( $article->mSize ) ) * 2.5 - 5 ) ), $tag );
		$tag = str_replace( '%REVISION%', (string)$article->mRevision, $tag );
		$tag = str_replace( '%CONTRIBUTION%', (string)$article->mContribution, $tag );

	 * @param string $tag
	 * @param Article $article
	 * @return string
	 * @param string $tag
	 * @param int $nr
	 * @return string
		return str_replace( '%NR%', (string)$nr, $tag );
	 * @param array &$pieces
	 * @param mixed $s Index of the table row position.
	 * @param Article $article




	 * Format one single template argument of one occurence of one item from the include parameter. This is called via a backlink from LST::includeTemplate().
	 * @param string $arg
	 * @param mixed	$s Index of the table row position.
	 * @param mixed $argNr Other part of the index of the table row position?
	 * @param bool $firstCall
	 * @param int $maxLength
	 * @param Article $article
	 * @return string




			// @TODO: This just blindly passes the argument through hoping it is an image.
			$result = str_replace( '%IMAGE%', $this->parseImageUrlWithPath( $arg ), $result );


	 * @param int $lim
	 * @param string $text
	 *
	 * @return string the truncated text; note that in some cases it may be slightly longer than the given limit
	 * if the text is alread shorter than the limit or if the limit is negative, the text
	 * will be returned without any checks for balance of tags

	 * @param Article|string $article
	 * @return string
		$repoGroup = MediaWikiServices::getInstance()->getRepoGroup();

		if ( $article instanceof Article ) {
				// $img = Image::newFromName( $article->mTitle->getText() );

				$img = $repoGroup->findFile( Title::makeTitle( NS_FILE, $article->mTitle->getText() ) );
					$fileTitle = Title::makeTitleSafe( NS_FILE, $article->mTitle->getDBKey() );
					$imageUrl = $repoGroup->getLocalRepo()->newFile( $fileTitle )->getPath();
			$title = Title::newfromText( 'File:' . $article );

				$fileTitle = Title::makeTitleSafe( 6, $title->getDBKey() );

				$imageUrl = $repoGroup->getLocalRepo()->newFile( $fileTitle )->getPath();
		// @TODO: Check this preg_replace. Probably only works for stock file repositories.
	 * @param Article $article
	 * @param int &$filteredCount
	 * @return string
		$septag = [];



			$text = $this->parser->fetchTemplateAndTitle( Title::newFromText( $title ) )[0];
			if ( ( count( $this->pageTextMatchRegex ) <= 0 || $this->pageTextMatchRegex[0] == '' || !( !preg_match( $this->pageTextMatchRegex[0], $text ) ) ) && ( count( $this->pageTextMatchNotRegex ) <= 0 || $this->pageTextMatchNotRegex[0] == '' || preg_match( $this->pageTextMatchNotRegex[0], $text ) == false ) ) {

				$filteredCount++;




			$secPiece = [];




					$limpos = strpos( $sSecLabel, '[' );
					$cutLink = 'default';

						$cutInfo = explode( ' ', $fmtSec[count( $fmtSec ) - 1], 2 );




						// without valid limit include whole section
						$maxLength = -1;

				$sectionHeading = [];


					$secPieces = LST::includeHeading( $this->parser, $article->mTitle->getPrefixedText(), substr( $sSecLabel, 1 ), '', $sectionHeading, false, $maxLength, $cutLink ?? 'default', $this->getTrimIncluded(), $skipPattern ?? [] );

						$offset = 0;




							$secPiece[$s] .= str_replace( '%SECTION%', $sectionHeading[$sp] ?? '', $this->replaceTagCount( $this->multiSectionSeparators[$s], $filteredCount ) );



						$matchFailed = true;


					// Why was defaultTemplateSuffix passed all over the place for just here?
					$secPieces = LST::includeTemplate( $this->parser, $this, $s, $article, $template1, $template2, $template2 . $this->getTemplateSuffix(), $mustMatch, $mustNotMatch, $this->includePageParsed, implode( ', ', $article->mCategoryLinks ) );


						$matchFailed = true;
					$secPieces = LST::includeSection( $this->parser, $article->mTitle->getPrefixedText(), $sSecLabel, '', false, $this->getTrimIncluded(), $skipPattern ?? [] );




			$filteredCount++;


	 * @param string $piece
	 * @param string $start
	 * @param string $end
	 * @return string
	 * @return int
	 * @var int
	 * @param array $articles
	 * @param int $start
	 * @param int $count
	 * @return string

	 * @return string
		// The offset that comes from the URL parameter is zero based, but has to be +1'ed for display.
			// @TODO: So this adds the total count of articles to the offset. I have not found a case where this does not mess up the displayed count. I am commenting this out for now.
			// $offset += $this->offsetCount;
	 * @var int
	 * @param array $articles
	 * @param int $start
	 * @param int $count
	 * @return string


	 * @param array &$parts
	 * @param array $items
	 * @param string $item
	 * @return array





	 * @param array $items
	 * @return string



	 * @var int
use DPL\Parameters;
use Parser;
	 * @var int
	 * @param Parameters $parameters
	 * @param Parser $parser
	public function __construct( Parameters $parameters, Parser $parser ) {





	 * @param array $articles
	 * @param int $start
	 * @param int $count
	 * @return string


		$sortColumn = $this->getTableSortColumn();









			$this->sort( $rowsKey, $sortColumn );


	 * @param array	&$rowsKey
	 * @param int $sortColumn
	protected function sort( &$rowsKey, $sortColumn ) {

		if ( $sortColumn < 0 ) {
			switch ( $sortMethod ) {
					uasort( $rowsKey, static function ( $first, $second ) {
						return strnatcmp( $second, $first );
					} );
					arsort( $rowsKey );
			switch ( $sortMethod ) {
					natsort( $rowsKey );
					break;
				case 'standard':
				default:
					asort( $rowsKey );
					break;
	 * @param Article $article
	 * @param string|null $pageText
	 * @return string
			// Include parsed/processed wiki markup content after each item before the closing tag.
	 * @return string
	 * @return string
	 * @param array $items
	 * @return string
use MediaWiki\MediaWikiServices;

			$wikiPageFactory = MediaWikiServices::getInstance()->getWikiPageFactory();

			$page = $wikiPageFactory->newFromTitle( $title );
			$updater = $page->newPageUpdater( User::newSystemUser( 'DynamicPageList3 extension' ) );
			$content = $page->getContentHandler()->makeContent( '<noinclude>This page was automatically created. It serves as an anchor page for all \'\'\'[[Special:WhatLinksHere/Template:Extension_DPL|invocations]]\'\'\' of [https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:DynamicPageList3 Extension:DynamicPageList3].</noinclude>', $title );

<?php

namespace DPL;

use DOMDocument;
use DOMXPath;
use ImportStreamSource;
use MediaWiki\Auth\AuthManager;
use MediaWiki\MediaWikiServices;
use MediaWiki\User\UserFactory;
use MediaWikiTestCase;
use ParserOptions;
use RequestContext;
use Title;
use User;
use WikiImporter;

abstract class DPLIntegrationTestCase extends MediaWikiTestCase {
	/**
	 * Guard condition to ensure we only import seed data once per test suite run.
	 * @var bool
	 */
	private static $wasSeedDataImported = false;

	public function addDBData() {
		if ( self::$wasSeedDataImported ) {
			return;
		}

		$seedDataPath = __DIR__ . '/../seed-data.xml';
		$this->seedTestUsers( $seedDataPath );
		$importer = $this->getWikiImporter( $seedDataPath );
		$importer->disableStatisticsUpdate();
		// Ensure we actually create local user accounts in the DB
		$importer->setUsernamePrefix( '', true );
		$importer->doImport();

		self::$wasSeedDataImported = true;
	}

	/**
	 * Import test accounts from seed data so that DPL queries can refer to them.
	 * @param string $seedDataPath - path to seed data to be loaded
	 */
	private function seedTestUsers( string $seedDataPath ): void {
		$doc = new DOMDocument();
		$doc->preserveWhiteSpace = false;
		$doc->load( $seedDataPath );

		$xpath = new DOMXPath( $doc );
		$xpath->registerNamespace( 'mw', 'http://www.mediawiki.org/xml/export-0.11/' );

		$userNodes = $xpath->query( '//mw:mediawiki/mw:page/mw:revision/mw:contributor/mw:username' );
		$usersByName = [];

		$authManager = $this->getAuthManager();

		foreach ( $userNodes as $node ) {
			$userName = $node->nodeValue;

			// Already created
			if ( isset( $usersByName[$userName] ) ) {
				continue;
			}

			$usersByName[$userName] = true;
			$user = $this->newUserFromName( $userName );

			if ( !$user || $user->idForName() !== 0 ) {
				return; // sanity
			}

			$status = $authManager->autoCreateUser(
				$user,
				$authManager::AUTOCREATE_SOURCE_MAINT,
				false
			);

			if ( !$status->isOK() ) {
				return;
			}
		}
	}

	private function getWikiImporter( string $seedDataPath ): WikiImporter {
		$seedDataFile = fopen( $seedDataPath, 'rt' );
		$source = new ImportStreamSource( $seedDataFile );
		$services = MediaWikiServices::getInstance();

		if ( $services->hasService( 'WikiImporterFactory' ) ) {
			return $services->getWikiImporterFactory()->getWikiImporter( $source );
		}

		// MW 1.36
		return new WikiImporter( $source, $services->getMainConfig() );
	}

	private function getAuthManager(): AuthManager {
		$services = MediaWikiServices::getInstance();

		return $services->getAuthManager();
	}

	private function newUserFromName( string $name ): ?User {
		$services = MediaWikiServices::getInstance();

		return $services->getUserFactory()->newFromName( $name, UserFactory::RIGOR_CREATABLE );
	}

	/**
	 * Convenience function to return the list of page titles matching a DPL query
	 * @param array $params - DPL invocation parameters
	 * @return string[]
	 */
	protected function getDPLQueryResults( array $params, string $format = '%PAGE%' ): array {
		$params += [
			// Use a custom format for executing the query to allow easily extracting results
			'format' => "<div id=\"dpl-test-query\">,$format,|,</div>"
		];

		$html = $this->runDPLQuery( $params );
		$doc = new DOMDocument();
		$doc->loadHTML( $html );
		$queryResults = $doc->getElementById( 'dpl-test-query' );
		if ( $queryResults ) {
			return explode( "|", rtrim( $queryResults->textContent, "|" ) );
		}

		return [];
	}

	/**
	 * Build and execute a DPL invocation using the given parameters and return the HTML output.
	 * @param array $params
	 * @return string
	 */
	protected function runDPLQuery( array $params ): string {
		$invocation = '<dpl>';

		foreach ( $params as $paramName => $values ) {
			$values = (array)$values; // multi-value parameters
			foreach ( $values as $value ) {
				$invocation .= "$paramName=$value\n";
			}
		}

		$invocation .= '</dpl>';

		$parser = MediaWikiServices::getInstance()->getParser();
		$title = Title::makeTitle( NS_MAIN, 'DPLQueryTest' );
		$parserOptions = ParserOptions::newCanonical(
			RequestContext::getMain()
		);
		$parserOutput = $parser->parse( $invocation, $title, $parserOptions );

		return $parserOutput->getText();
	}
}
<?php

namespace DPL;

/**
 * @group DynamicPageList3
 * @group Database
 */
class DPLQueryIntegrationTest extends DPLIntegrationTestCase {

	public function testFindPagesInCategory(): void {
		$this->assertArrayEquals(
			[ 'DPLTestArticle 1', 'DPLTestArticle 2', 'DPLTestArticle 3', 'DPLTestArticleMultipleCategories' ],
			$this->getDPLQueryResults( [ 'category' => 'DPLTestCategory' ] ),
			true
		);
	}

	public function testFindPagesInCategoryWithOrderAndLimit(): void {
		$this->assertArrayEquals(
			[ 'DPLTestArticleMultipleCategories', 'DPLTestArticle 3', ],
			$this->getDPLQueryResults( [
				'category' => 'DPLTestCategory',
				'ordermethod' => 'sortkey',
				'order' => 'descending',
				'count' => '2'
			] ),
			true
		);
	}

	public function testFindPagesNotInCategory(): void {
		$results = $this->getDPLQueryResults( [
			'namespace' => '', // NS_MAIN
			'notcategory' => 'DPLTestCategory'
		] );

		$this->assertContains( 'DPLTestArticleNoCategory', $results );
		foreach ( [ 'DPLTestArticle 1', 'DPLTestArticle 2', 'DPLTestArticle 3' ] as $pageInCat ) {
			$this->assertNotContains( $pageInCat, $results );
		}
	}

	public function testFindPagesNotInCategoryByPrefix(): void {
		$results = $this->getDPLQueryResults( [
			'namespace' => '', // NS_MAIN
			'titlematch' => 'DPLTest%',
			'notcategory' => 'DPLTestCategory'
		] );

		$this->assertArrayEquals(
			[ 'DPLTestArticleNoCategory', 'DPLTestArticleOtherCategoryWithInfobox' ],
			$results,
			true
		);
	}

	public function testFindPagesByPrefix(): void {
		$results = $this->getDPLQueryResults( [
			'namespace' => '', // NS_MAIN
			'titlematch' => 'DPLTest%',
		] );

		$this->assertNotEmpty( $results );

		foreach ( $results as $result ) {
			$this->assertStringStartsWith( 'DPLTest', $result );
		}
	}

	public function testFindPagesInCategoryIntersection(): void {
		$this->assertArrayEquals(
			[ 'DPLTestArticleMultipleCategories' ],
			$this->getDPLQueryResults( [
				'category' => [ 'DPLTestCategory', 'DPLTestOtherCategory' ]
			] ),
			true
		);
	}

	public function testFindPagesUsingTemplate(): void {
		$this->assertArrayEquals(
			[ 'DPLTestArticle 1', 'DPLTestArticleOtherCategoryWithInfobox' ],
			$this->getDPLQueryResults( [
				'uses' => 'Template:DPLInfobox'
			] ),
			true
		);
	}

	public function testFindPagesInCategoryUsingTemplate(): void {
		$this->assertArrayEquals(
			[ 'DPLTestArticleOtherCategoryWithInfobox' ],
			$this->getDPLQueryResults( [
				'category' => 'DPLTestOtherCategory',
				'uses' => 'Template:DPLInfobox'
			] ),
			true
		);
	}

	public function testFindPagesNotInCategoryUsingTemplate(): void {
		$this->assertArrayEquals(
			[ 'DPLTestArticle 1' ],
			$this->getDPLQueryResults( [
				'notcategory' => 'DPLTestOtherCategory',
				'uses' => 'Template:DPLInfobox'
			] ),
			true
		);
	}

	public function testFindTemplatesUsedByPage(): void {
		$this->assertArrayEquals(
			[ 'Template:DPLInfobox' ],
			$this->getDPLQueryResults( [
				'usedby' => 'DPLTestArticleOtherCategoryWithInfobox'
			] ),
			true
		);
	}

	public function testFindPagesByTitleRegexpInNamespace(): void {
		$this->assertArrayEquals(
			[ 'DPLTestArticle 1', 'DPLTestArticle 2' ],
			$this->getDPLQueryResults( [
				'namespace' => '', // NS_MAIN
				'titleregexp' => 'DPLTestArticle [12]'
			] )
		);
	}

	public function testFindPagesBeforeTitleInCategory(): void {
		$this->assertArrayEquals(
			[ 'DPLTestArticle 1', 'DPLTestArticle 2' ],
			$this->getDPLQueryResults( [
				'category' => 'DPLTestCategory',
				'titlelt' => 'DPLTestArticle 3',
				'count' => '2'
			] )
		);
	}

	public function testFindPagesInCategoryWithMaxRevisionLimit(): void {
		$this->assertArrayEquals(
			[ 'DPLTestArticle 2', 'DPLTestArticleMultipleCategories' ],
			$this->getDPLQueryResults( [
				'category' => 'DPLTestCategory',
				'maxrevisions' => '1',
			] ),
			true
		);
	}

	public function testFindPagesInCategoryWithMinRevisionLimit(): void {
		$this->assertArrayEquals(
			[ 'DPLTestArticle 1', 'DPLTestArticle 3' ],
			$this->getDPLQueryResults( [
				'category' => 'DPLTestCategory',
				'minrevisions' => '2',
			] ),
			true
		);
	}

	public function testFindPagesByCategoryMin(): void {
		$this->assertArrayEquals(
			[ 'DPLTestArticleMultipleCategories' ],
			$this->getDPLQueryResults( [
				'category' => 'DPLTestCategory',
				'categoriesminmax' => '2',
			] ),
			true
		);
	}

	public function testFindPagesByCategoryMinMax(): void {
		$this->assertArrayEquals(
			[ 'DPLTestArticle 1', 'DPLTestArticle 2', 'DPLTestArticle 3' ],
			$this->getDPLQueryResults( [
				'category' => 'DPLTestCategory',
				'categoriesminmax' => '1,1',
			] ),
			true
		);
	}

	public function testFindPagesNotModifiedByUserInCategory(): void {
		$this->assertArrayEquals(
			[ 'DPLTestArticle 2', 'DPLTestArticle 3', 'DPLTestArticleMultipleCategories' ],
			$this->getDPLQueryResults( [
				'category' => 'DPLTestCategory',
				'notmodifiedby' => 'DPLTestUser',
			] ),
			true
		);
	}

	public function testFindPagesCreatedByUserInCategory(): void {
		$this->assertArrayEquals(
			[ 'DPLTestArticleOtherCategoryWithInfobox' ],
			$this->getDPLQueryResults( [
				'category' => 'DPLTestOtherCategory',
				'createdby' => 'DPLTestSystemUser',
			] ),
			true
		);
	}

	public function testFindPagesLastModifiedByUserInCategory(): void {
		$this->assertArrayEquals(
			[ 'DPLTestArticle 1' ],
			$this->getDPLQueryResults( [
				'category' => 'DPLTestCategory',
				'lastmodifiedby' => 'DPLTestUser',
			] ),
			true
		);
	}

	public function testFindPagesNotLastModifiedByUserInCategory(): void {
		$this->assertArrayEquals(
			[ 'DPLTestArticle 2', 'DPLTestArticle 3', 'DPLTestArticleMultipleCategories' ],
			$this->getDPLQueryResults( [
				'category' => 'DPLTestCategory',
				'notlastmodifiedby' => 'DPLTestUser',
			] ),
			true
		);
	}

	public function testFindPagesEverModifiedByUserInCategory(): void {
		$this->assertArrayEquals(
			[ 'DPLTestArticle 1', 'DPLTestArticle 2', 'DPLTestArticle 3', 'DPLTestArticleMultipleCategories' ],
			$this->getDPLQueryResults( [
				'category' => 'DPLTestCategory',
				'modifiedby' => 'DPLTestAdmin',
			] ),
			true
		);
	}

	public function testFindPagesNotCreatedByUserInCategory(): void {
		$this->assertArrayEquals(
			[ 'DPLTestArticleMultipleCategories' ],
			$this->getDPLQueryResults( [
				'category' => 'DPLTestOtherCategory',
				'notcreatedby' => 'DPLTestSystemUser',
			] ),
			true
		);
	}

	public function testFindPagesViaUserFilterCombinations(): void {
		$this->assertArrayEquals(
			[ 'DPLUncategorizedPage' ],
			$this->getDPLQueryResults( [
				'modifiedby' => 'DPLTestUser',
				'notcreatedby' => 'DPLTestAdmin',
				'notlastmodifiedby' => 'DPLTestUser',
			] ),
			true
		);
	}

	public function testFindPagesInCategoryOrderedByLastEdit(): void {
		$results = $this->getDPLQueryResults( [
			'category' => 'DPLTestCategory',
			'ordermethod' => 'lastedit',
			'order' => 'descending',
		] );

		$this->assertArrayEquals(
			[
				'DPLTestArticle 3',
				'DPLTestArticle 2',
				'DPLTestArticleMultipleCategories',
				'DPLTestArticle 1',
			],
			$results,
			true
		);
	}

	public function testFindPagesInCategoryOrderedByFirstEdit(): void {
		$results = $this->getDPLQueryResults( [
			'category' => 'DPLTestCategory',
			'ordermethod' => 'firstedit',
			'order' => 'descending',
		] );

		$this->assertArrayEquals(
			[
				'DPLTestArticle 2',
				'DPLTestArticleMultipleCategories',
				'DPLTestArticle 1',
				'DPLTestArticle 3',
			],
			$results,
			true
		);
	}

	public function testOrderByLastEditAndUser(): void {
		$results = $this->getDPLQueryResults( [
			'category' => 'DPLTestCategory',
			'ordermethod' => 'lastedit,user',
			'order' => 'descending',
			'adduser' => 'true',
			'createdby' => 'DPLTestAdmin'
		], '%PAGE% %USER%' );

		$this->assertEquals( [
			'DPLTestArticle 3 DPLTestAdmin',
			'DPLTestArticle 2 DPLTestAdmin',
			'DPLTestArticleMultipleCategories DPLTestAdmin',
			'DPLTestArticle 1 DPLTestUser',
		], $results );
	}

	public function testGetPageAuthors(): void {
		$results = $this->getDPLQueryResults( [
			'category' => 'DPLTestCategory',
			'addauthor' => 'true',
			'order' => 'ascending',
			'ordermethod' => 'title'
		], '%PAGE% %USER%' );

		$this->assertEquals( [
			'DPLTestArticle 1 DPLTestAdmin',
			'DPLTestArticle 2 DPLTestAdmin',
			'DPLTestArticle 3 DPLTestAdmin',
			'DPLTestArticleMultipleCategories DPLTestAdmin',
		], $results );
	}

	public function testGetLastEditorsByPage(): void {
		$results = $this->getDPLQueryResults( [
			'category' => 'DPLTestCategory',
			'addlasteditor' => 'true'
		], '%PAGE% %USER%' );

		$this->assertEquals( [
			'DPLTestArticle 1 DPLTestUser',
			'DPLTestArticle 2 DPLTestAdmin',
			'DPLTestArticle 3 DPLTestAdmin',
			'DPLTestArticleMultipleCategories DPLTestAdmin',
		], $results );
	}
}
<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.11/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.11/ http://www.mediawiki.org/xml/export-0.11.xsd" version="0.11" xml:lang="en">
	<siteinfo>
		<sitename>MediaWiki</sitename>
		<dbname>mwdev</dbname>
		<base>http://localhost:8080/wiki/Main_Page</base>
		<generator>MediaWiki 1.37.0-alpha</generator>
		<case>first-letter</case>
		<namespaces>
			<namespace key="-2" case="first-letter">Media</namespace>
			<namespace key="-1" case="first-letter">Special</namespace>
			<namespace key="0" case="first-letter" />
			<namespace key="1" case="first-letter">Talk</namespace>
			<namespace key="2" case="first-letter">User</namespace>
			<namespace key="3" case="first-letter">User talk</namespace>
			<namespace key="4" case="first-letter">Project</namespace>
			<namespace key="5" case="first-letter">Project talk</namespace>
			<namespace key="6" case="first-letter">File</namespace>
			<namespace key="7" case="first-letter">File talk</namespace>
			<namespace key="8" case="first-letter">MediaWiki</namespace>
			<namespace key="9" case="first-letter">MediaWiki talk</namespace>
			<namespace key="10" case="first-letter">Template</namespace>
			<namespace key="11" case="first-letter">Template talk</namespace>
			<namespace key="12" case="first-letter">Help</namespace>
			<namespace key="13" case="first-letter">Help talk</namespace>
			<namespace key="14" case="first-letter">Category</namespace>
			<namespace key="15" case="first-letter">Category talk</namespace>
		</namespaces>
	</siteinfo>
	<page>
		<title>Template:DPLInfobox</title>
		<ns>10</ns>
		<id>13</id>
		<revision>
			<id>13</id>
			<timestamp>2017-09-07T10:45:24Z</timestamp>
			<contributor>
				<username>DPLTestSystemUser</username>
			</contributor>
			<comment>Test template</comment>
			<origin>13</origin>
			<model>wikitext</model>
			<format>text/x-wiki</format>
			<text xml:space="preserve" bytes="13">Test template</text>
			<sha1 />
		</revision>
	</page>
	<page>
		<title>Category:DPLTestCategory</title>
		<ns>14</ns>
		<id>14</id>
		<revision>
			<id>17</id>
			<timestamp>2021-09-02T14:42:11Z</timestamp>
			<contributor>
				<username>DPLTestAdmin</username>
				<id>1</id>
			</contributor>
			<comment>Created page with "DPL Test category"</comment>
			<origin>17</origin>
			<model>wikitext</model>
			<format>text/x-wiki</format>
			<text bytes="17" sha1="7fvwcsar4s6wpu5l22vedd9yaek5js6" xml:space="preserve">DPL Test category</text>
			<sha1>7fvwcsar4s6wpu5l22vedd9yaek5js6</sha1>
		</revision>
	</page>
	<page>
		<title>DPLTestArticle 1</title>
		<ns>0</ns>
		<id>15</id>
		<revision>
			<id>18</id>
			<timestamp>2021-09-02T14:43:05Z</timestamp>
			<contributor>
				<username>DPLTestAdmin</username>
				<id>1</id>
			</contributor>
			<comment>Initial page version</comment>
			<origin>18</origin>
			<model>wikitext</model>
			<format>text/x-wiki</format>
			<text xml:space="preserve">Donec non dolor ipsum.
[[Category:DPLTestCategory]]</text>
			<sha1 />
		</revision>
		<revision>
			<id>19</id>
			<parentid>18</parentid>
			<timestamp>2021-09-02T14:43:16Z</timestamp>
			<contributor>
				<username>DPLTestUser</username>
				<id>2</id>
			</contributor>
			<comment>Edited version</comment>
			<origin>19</origin>
			<model>wikitext</model>
			<format>text/x-wiki</format>
			<text xml:space="preserve">Sed mollis dignissim [[DPLTestArticle 2]] purus, auctor faucibus [[DPLTestArticleNoCategory]] purus tincidunt at. {{DPLInfobox}}
[[Category:DPLTestCategory]]</text>
			<sha1 />
		</revision>
	</page>
	<page>
		<title>DPLTestArticle 2</title>
		<ns>0</ns>
		<id>16</id>
		<revision>
			<id>20</id>
			<timestamp>2021-09-02T14:44:02Z</timestamp>
			<contributor>
				<username>DPLTestAdmin</username>
				<id>1</id>
			</contributor>
			<comment>Initial page version</comment>
			<origin>20</origin>
			<model>wikitext</model>
			<format>text/x-wiki</format>
			<text bytes="72" sha1="gykofop7mtvar8ajsyppok80uy6fiti" xml:space="preserve">Sed dapibus enim ac quam pharetra suscipit.
[[Category:DPLTestCategory]]</text>
			<sha1>gykofop7mtvar8ajsyppok80uy6fiti</sha1>
		</revision>
	</page>
	<page>
		<title>DPLTestArticle 3</title>
		<ns>0</ns>
		<id>17</id>
		<revision>
			<id>21</id>
			<timestamp>2019-08-12T00:11:23Z</timestamp>
			<contributor>
				<username>DPLTestAdmin</username>
				<id>1</id>
			</contributor>
			<comment>Initial page version</comment>
			<origin>21</origin>
			<model>wikitext</model>
			<format>text/x-wiki</format>
			<text bytes="95" sha1="og8hxtaxjfid8cinjh7nq5g2zxv0cdj" xml:space="preserve">Vestibulum a ante aliquet, vestibulum risus vitae, imperdiet sem.
[[Category:DPLTestCategory]]</text>
			<sha1>og8hxtaxjfid8cinjh7nq5g2zxv0cdj</sha1>
		</revision>
		<revision>
			<id>22</id>
			<parentid>21</parentid>
			<timestamp>2021-09-02T14:44:47Z</timestamp>
			<contributor>
				<username>DPLTestAdmin</username>
				<id>1</id>
			</contributor>
			<comment>Edited version</comment>
			<origin>22</origin>
			<model>wikitext</model>
			<format>text/x-wiki</format>
			<text bytes="73" sha1="9caafrpllg2n9zyk52h0ov4bajyxjpj" xml:space="preserve"> Duis vel dapibus tellus, eu vehicula metus.
[[Category:DPLTestCategory]]</text>
			<sha1>9caafrpllg2n9zyk52h0ov4bajyxjpj</sha1>
		</revision>
	</page>
	<page>
		<title>DPLTestArticleNoCategory</title>
		<ns>0</ns>
		<id>18</id>
		<revision>
			<id>23</id>
			<timestamp>2021-09-03T00:12:20Z</timestamp>
			<contributor>
				<username>DPLTestUser</username>
				<id>2</id>
			</contributor>
			<comment>Create test page without category</comment>
			<origin>23</origin>
			<model>wikitext</model>
			<format>text/x-wiki</format>
			<text bytes="40" xml:space="preserve">Urbem praeclaram statui, mea moenia vidi</text>
			<sha1 />
		</revision>
	</page>
	<page>
		<title>Category:DPLTestOtherCategory</title>
		<ns>14</ns>
		<id>24</id>
		<revision>
			<id>24</id>
			<timestamp>2021-09-02T14:42:11Z</timestamp>
			<contributor>
				<username>DPLTestAdmin</username>
				<id>1</id>
			</contributor>
			<comment>Created page with "DPL Test category"</comment>
			<origin>24</origin>
			<model>wikitext</model>
			<format>text/x-wiki</format>
			<text bytes="18" xml:space="preserve">DPL other category</text>
			<sha1 />
		</revision>
	</page>
	<page>
		<title>DPLTestArticleMultipleCategories</title>
		<ns>0</ns>
		<id>25</id>
		<revision>
			<id>25</id>
			<timestamp>2021-09-02T14:44:01Z</timestamp>
			<contributor>
				<username>DPLTestAdmin</username>
				<id>1</id>
			</contributor>
			<comment>Page with multiple categories</comment>
			<origin>25</origin>
			<model>wikitext</model>
			<format>text/x-wiki</format>
			<text bytes="117" xml:space="preserve">Quo usque tandem abutere, Catilina, patientia nostra?!
[[Category:DPLTestOtherCategory]]
[[Category:DPLTestCategory]]</text>
			<sha1 />
		</revision>
	</page>
	<page>
		<title>DPLTestArticleOtherCategoryWithInfobox</title>
		<ns>0</ns>
		<id>26</id>
		<revision>
			<id>26</id>
			<timestamp>2021-09-02T14:44:01Z</timestamp>
			<contributor>
				<username>DPLTestSystemUser</username>
			</contributor>
			<comment>Page with infobox</comment>
			<origin>25</origin>
			<model>wikitext</model>
			<format>text/x-wiki</format>
			<text xml:space="preserve">{{DPLInfobox}} some content
[[Category:DPLTestOtherCategory]]]</text>
			<sha1 />
		</revision>
	</page>
	<page>
		<title>DPLUncategorizedPage</title>
		<ns>0</ns>
		<id>27</id>
		<revision>
			<id>27</id>
			<timestamp>2021-09-04T03:01:00Z</timestamp>
			<contributor>
				<username>DPLTestSystemUser</username>
			</contributor>
			<comment>Create test uncategorized page</comment>
			<origin>27</origin>
			<model>wikitext</model>
			<format>text/x-wiki</format>
			<text xml:space="preserve">Uncategorized test page</text>
			<sha1 />
		</revision>
		<revision>
			<id>28</id>
			<timestamp>2021-09-04T03:01:00Z</timestamp>
			<contributor>
				<username>DPLTestUser</username>
			</contributor>
			<comment>Page edited</comment>
			<origin>27</origin>
			<model>wikitext</model>
			<format>text/x-wiki</format>
			<text xml:space="preserve">Uncategorized test page edit</text>
			<sha1 />
		</revision>
	</page>
</mediawiki>