Issue Bug Rejected

#26739TMENU_LAYERS produces identical layer IDs

Markus Rathmayr 05/10/11, 22:48 updated 04/01/13, 11:59

Description

When creating a nested TMENU_LAYERS menu the function extProc_init in tmenu_layers.php produces identical IDs for sub-layers. I guess this is the case if the configuration of e.g. level 2 and 3 are identical.

This fixes the problem:

instead of:

$this->WMid = trim($this->mconf[‘layer_menu_id’]) ? trim($this->mconf[‘layer_menu_id’]) . ‘x’ : substr(md5(‘gl’ . serialize($this->mconf)), 0, 6);

use:

$random = rand(1,100);
$this->WMid = trim($this->mconf[‘layer_menu_id’]) ? trim($this->mconf[‘layer_menu_id’]) . ‘x’ : substr(md5(‘gl’ . $zufall.random($this->mconf)), 0, 6);

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.