diff -ruN typo3_src_orig/typo3/sysext/cms/tslib/class.tslib_content.php typo3_src/typo3/sysext/cms/tslib/class.tslib_content.php --- typo3_src_orig/typo3/sysext/cms/tslib/class.tslib_content.php 2011-02-26 00:20:51.000000000 +0100 +++ typo3_src/typo3/sysext/cms/tslib/class.tslib_content.php 2011-03-24 16:56:16.000000000 +0100 @@ -293,6 +293,8 @@ 'prioriCalc.' => 'array', 'char' => 'integer', 'char.' => 'array', + 'randomNumber' => 'integer', + 'randomNumber.' => 'array', 'intval' => 'boolean', 'intval.' => 'array', 'numberFormat.' => 'array', @@ -2488,6 +2490,20 @@ } /** + * randomNumber + * Will return a random number. Number could be bordered with .min and .max + * + * @param string Input value undergoing processing in this function. + * @param array stdWrap properties for randomNumber. + * @return string The processed input value + */ + public function stdWrap_randomNumber($content = '', $conf = array()) { + srand(time()); + $content = mt_rand((int)($conf['randomNumber.']['min'] ? $conf['randomNumber.']['min'] : 0), (int)($conf['randomNumber.']['max'] ? $conf['randomNumber.']['max'] : mt_getrandmax())); + return $content; + } + + /** * intval * Will return an integer value of the current content *