Project

General

Profile

Feature #18851 ยป M8514.diff

Administrator Admin, 2011-03-24 17:02

View differences:

typo3_src/typo3/sysext/cms/tslib/class.tslib_content.php 2011-03-24 16:56:16.000000000 +0100
'prioriCalc.' => 'array',
'char' => 'integer',
'char.' => 'array',
'randomNumber' => 'integer',
'randomNumber.' => 'array',
'intval' => 'boolean',
'intval.' => 'array',
'numberFormat.' => 'array',
......
}
/**
* 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
*
    (1-1/1)