Adding MWNamespace::getNamespaceContentModel which returns the namespace
content model from the global, if set
Change-Id: Ie012fd0ff846d50cae8081fc32b76900dbcad209
MediaWiki is licensed under GPL so we should really add the header to
our PHP code unless reusing code licensed differently.
Tested using:
ack-grep --php -L 'This program is free software' \
includes/ maintenance/ mw-config/ resources/ skins/
Output the following files:
includes/ExternalEdit.php (public domain)
Various other licenses:
includes/json/Services_JSON.php
includes/libs/CSSMin.php
includes/libs/IEContentAnalyzer.php
includes/libs/JavaScriptMinifier.php
includes/libs/jsminplus.php
includes/normal/Utf8Case.php
includes/objectcache/MemcachedClient.php
File autogenerated from a GPL file and Unicode data:
includes/ZhConversion.php
A few lines coming from stack overflow:
maintenance/mwdoc-filter.php
Message files do not have any license :-/
Change-Id: I214a988edfa9e2dfcc762612a0f7d47eee8bcb74
This is needed to fix bug 41706 and similar, watch for follow-ups.
Automatic, implicit conversion may be handy in several cases, especially
for converting between different text based content models. E.g. it should
be possible to create a diff between a JavaScript and a wikitext page. This
change lais the foundations for this ability.
Change-Id: Ie7d87b67b24ac9897cb5696220a7785b228d3c79
This removes a misguided check and thereby allows diffs to be
created between different kinds of (text based) content.
Change-Id: I6b385fcdead22983edc089e1314151f9babdf7c9
This change moves the PageContentLanguage hook from Title::getPageLanguage
to Content::getPageLanguage, so the hook is no longer bypassed by
Content::getPageViewLanguage and consequently Title::getPageViewLanguage.
Change-Id: I51dabe9aee9d544483e7416a8fdf7721638d21bf
Instantiating a TextContent instance around a null or false value
instead of a string may indicate an error and should thus trigger
a warning and thereby make tests fail.
Change-Id: I0864bbf31040d0c5db96a90ff427dc9dd3ccbd67
getAutoDeletereason did not gracefully deal with revisions that would
return null as their content (e.g. for deleted revisions).
Change-Id: I4976f2d09b8666ca1bccebea346af37ee77b09f7
https://gerrit.wikimedia.org/r/#/c/29597/
use cases that pass non-strings to TextContent need to be handled differently
and handle the exceptions
Change-Id: Id3f88b0fb867fff0d16abcf570178cbbe86e89a1
Instead of throwing exception in these cases (which there are use cases for),
create an empty TextContent object.
Change-Id: Ice30ea78428d95805aa56cd3a35405aa67ad10ab
* @licence -> @license
* Protects inline HTML by using double quotes, our inline comments uses
elements such as <h1> or <firstnameLastname@gmail.com>
* Commands in lowercase (@TODO -> @todo, @NOTE -> @note)
* removes @abstract and @static since doxygen detects them from PHP
code.
* various undocumented function parameters
* typos in parameters declarations
Change-Id: I62ad6fc124c355bf31acc780b9614a59cf79a421
ContentHandler removed wikitext parsing for CSS and JS pages.
However, people seem to rely on links and categories embedded
in script comments.
Change-Id: I0736f15878fbd3292e75854bf16f04df656ce363
Made TextContent and TextContentHandler usable directly.
CONTENT_MODEL_TEXT is unused in core, but may be used by extensions.
Change-Id: I8963c968800b98e286cd917a1038a9905b3a0fef
The introduction of the ContentHandler caused quite a few functions and hooks to
become deprecated. Usage of these has been removed in core, but is still present
in extensions. Extensions should be fixed after ContentHandler has settled in a
bit, but for now we need a way to silence the warnings.
Change-Id: Ia223243222675f778e8f8c32923f956790db0b4f
Creation of pages in the MediaWiki namespace failed with a "no such section"
error if the corresponding system message did not exist. Fixed now.
Change-Id: Ia6e879c66a6330ea2a63246b3aed51c9c6e1d49d
ContentHandler::runLegacyHooks() now includes the list of handlers registered
for a legacy hook in the warning it produces.
Change-Id: I48032b62d4be791f1dc71889051dd6211541ac50
Hooks::isRegistered() doesn't consider hooks in $wgHooks.
Until that is fixed (see I39bd5de2), we need to check that explicitely.
Change-Id: I211c0c8bd0cd618151e56a11171ec8feef328d16
Caching could be enabled for other content types, but for the moment,
JS and CSS pages rely on the fact that the ShowRawCssJs hooks is called
for every view - which is bypassed when the parser cache is used.
Change-Id: Icf603b9f2a685d9e705db3459fcd12dae1fdba57
Redirects should not be constructed as wikitext, since other content models
may use other mechanisms to represent redirects.
Change-Id: Id85c3b3ada1924628e4e51757573d233e998f920