for the Wikimedia Commons. If $wgUseSharedUploads is set, MediaWiki will try
to locate an image file in the shared upload directory if it is not found
locally. Thumbnails for shared images will also be generated in the
shared directory.
Note: I changed
$text = $this->replaceInternalLinks ( $text );
$text = $this->replaceExternalLinks( $text );
to
$text = $this->replaceExternalLinks( $text );
$text = $this->replaceInternalLinks ( $text );
in Parser.php. Otherwise [[Media:Bla.jpg]] to an absolute URL would be
incorrectly parsed as external links. The header of
replaceExternalLinks says:
Note: we have to do external links before the internal ones
So the old order was not consistent with the documentation. I did some
tests and nothing seems to be broken, but I have some problems executing
parserTests.php so I couldn't test it systematically.
it needs to happen before unstripNoWiki() and before tidy.
This also makes the parser more self-contained, so there is
no need to create an OutputPage object for the parser
tester.
Call unstripNoWiki() before creating a Title object
for an internal link; this fixes <nowiki> inside of
a link target. Need to make sure this does not degrade
performance.
allow them in free external links again, at least until there
is a consistent way of handling them. Convert some spaces to
tabs from zhengzhu's last commit.
sometimes confuses the table code, because '|' is also used
to delimit cell attributes. This change prevents doTableStuff()
from treating any text containing '[[' as attributes.
a broken check for '{{{' in braceSubstitution(). For the latter,
I undid part of JeLuF's fix to bug 523 and changed
braceSubstitution() to add a newline '{|', '#', '*', ';', or ':'
come at the beginning of a template and a newline isn't already
present. Also, minor cleanups to the template section code.
replaceExternalLinks(). Use placeholders for interwiki links, as with
other internal links, to avoid parsing them as external. Disallow
links to pages containing a URL protocol followed by a colon.
Unrelated: output a warning comment when a template loop is detected.
1) Don't suspend the LinkCache when including templates;
because we don't call replaceInternalLinks() anymore,
it doesn't do anything.
2) Don't call strip(), removeHTMLcomments(), or replaceVariables()
on template parameters in argSubstitution(). The first two
should already be done on the article including the template,
and the third is unnecessary because it isn't possible to
pass templates as parameters to templates.
These seem to work, but if anybody notices any problems,
please let me know.
parameters, so restore it. Instead, remove magic variable substitution
from braceSubstitution(), and modify variableSubstitution to handle magic
variables prefixed by SUBST in the pre-save transform.