* Currently, for images:
[[File:Foobar.jpg|hi|alt=100|ho]]
caption: ho
but for galleries:
<gallery>
File:Foobar.jpg|hi|alt=100|ho
</gallery>
caption: hi|ho
* This patch brings some consistency to them.
Change-Id: I3b73189b27cc35fade4809477cf18779b953aa3b
* ParserOutput::hasCustomDataUpdates() was removed (deprecated since 1.25).
* ParserOutput::addSecondaryDataUpdate() was removed (deprecated since 1.25).
* ParserOutput::getSecondaryDataUpdates() was removed (deprecated since 1.25).
* ParserOutput::hasCustomDataUpdates() was removed (deprecated since 1.25).
* ParserOutput::addSecondaryDataUpdate() was removed (deprecated since 1.25).
* ParserOutput::getSecondaryDataUpdates() was removed (deprecated since 1.25).
+* Gallery images with multiple caption pipes no longer concatenate them all
+ together but instead pick the final one, similar to image syntax.
if ( $handler->validateParam( $paramName, $match ) ) {
$handlerOptions[$paramName] = $match;
} else {
if ( $handler->validateParam( $paramName, $match ) ) {
$handlerOptions[$paramName] = $match;
} else {
- // Guess not. Append it to the caption.
+ // Guess not, consider it as caption.
wfDebug( "$parameterMatch failed parameter validation\n" );
wfDebug( "$parameterMatch failed parameter validation\n" );
- $label .= '|' . $parameterMatch;
+ $label = '|' . $parameterMatch;
- // concatenate all other pipes
- $label .= '|' . $parameterMatch;
+ // Last pipe wins.
+ $label = '|' . $parameterMatch;
- // remove the first pipe
$label = substr( $label, 1 );
}
$label = substr( $label, 1 );
}
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
<div class="thumb" style="height: 150px;">Image2.gif</div>
<div class="gallerytext">
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
<div class="thumb" style="height: 150px;">Image2.gif</div>
<div class="gallerytext">
</div>
</div></li>
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
</div>
</div></li>
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
<div class="thumb" style="height: 150px;">Image4</div>
<div class="gallerytext">
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
<div class="thumb" style="height: 150px;">Image4</div>
<div class="gallerytext">
</div>
</div></li>
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
</div>
</div></li>
<li class="gallerybox" style="width: 155px"><div style="width: 155px">
<li class="gallerybox" style="width: 105px"><div style="width: 105px">
<div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a foo-bar." src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
<div class="gallerytext">
<li class="gallerybox" style="width: 105px"><div style="width: 105px">
<div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a foo-bar." src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
<div class="gallerytext">