Bug #20567 ยป 0011266.patch
typo3/index.php (Arbeitskopie) | ||
---|---|---|
$files = t3lib_div::getFilesInDir($dir,'png,jpg,gif');
|
||
// Pick random file:
|
||
srand((float) microtime() * 10000000);
|
||
$randImg = array_rand($files, 1);
|
||
// Get size of random file:
|
typo3/mod/tools/em/class.em_index.php (Arbeitskopie) | ||
---|---|---|
if(!is_array($mirrors)) return false;
|
||
}
|
||
if($this->MOD_SETTINGS['selectedMirror']=='') {
|
||
srand((float) microtime() * 10000000); // not needed after PHP 4.2.0...
|
||
$rand = array_rand($mirrors);
|
||
$url = 'http://'.$mirrors[$rand]['host'].$mirrors[$rand]['path'];
|
||
}
|
typo3/sysext/cms/tslib/class.tslib_fe.php (Arbeitskopie) | ||
---|---|---|
$pageArray = $this->sys_page->getMenu($idArray[0]?$idArray[0]:$thisUid,'*','sorting','AND pages.doktype<199 AND pages.doktype!=6');
|
||
$pO = 0;
|
||
if ($mode==2 && count($pageArray)) { // random
|
||
$this->make_seed();
|
||
$randval = intval(rand(0,count($pageArray)-1));
|
||
$pO = $randval;
|
||
}
|
||
... | ... | |
* Seeds the random number engine.
|
||
*
|
||
* @return void
|
||
* @deprecated since TYPO3 4.3 - the random number generator is seeded automatically since PHP 4.2.0
|
||
*/
|
||
function make_seed() {
|
||
t3lib_div::logDeprecatedFunction();
|
||
list($usec, $sec) = explode(' ', microtime());
|
||
$seedV = (float)$sec + ((float)$usec * 100000);
|
||
srand($seedV);
|