mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ImageMap
synced 2024-11-15 18:29:27 +00:00
(bug 16471) Use random ID to avoid conflicts when cached HTML fragments are used.
This commit is contained in:
parent
2dc8f68cb7
commit
773484526e
|
@ -257,7 +257,9 @@ class ImageMap {
|
|||
|
||||
if ( $realmap ) {
|
||||
# Construct the map
|
||||
$mapName = "ImageMap_" . ++self::$id;
|
||||
# Add random number to avoid breaking cached HTML fragments that are
|
||||
# later joined together on the one page (bug 16471)
|
||||
$mapName = "ImageMap_" . ++self::$id . '_' . mt_rand( 0, 0x7fffffff );
|
||||
$mapHTML = "<map name=\"$mapName\">\n$mapHTML</map>\n";
|
||||
|
||||
# Alter the image tag
|
||||
|
|
Loading…
Reference in a new issue