(bug 16471) Use random ID to avoid conflicts when cached HTML fragments are used.

This commit is contained in:
Tim Starling 2008-12-19 07:03:27 +00:00
parent 2dc8f68cb7
commit 773484526e

View file

@ -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