#16180Add random on listNum
Description
A little patch to offer random value on listNum with the keyword ‘rand’ :
File class.tslib_content.php – Line 3347 and next
function listNum($content,$listNum,$char) {
$char = $char ? $char : ‘,’;
if (t3lib_div::testInt($char)) {
$char = chr($char);
}
$temp = explode($char,$content);
$last = ‘’.(count($temp)-1);
+ if ($listNum = ‘rand’) $listNum = rand(count($temp));
$index=$this->calc(eregi_replace(‘last’,$last,$listNum));
return $temp[$index];
}
(issue imported from #M3557)