Bug #20567 ยป 0011266.patch

Administrator Admin, 2009-06-04 11:48

View differences:

typo3/index.php (Arbeitskopie)
503 503
				$files = t3lib_div::getFilesInDir($dir,'png,jpg,gif');
504 504

  
505 505
					// Pick random file:
506
				srand((float) microtime() * 10000000);
507 506
				$randImg = array_rand($files, 1);
508 507

  
509 508
					// Get size of random file:
typo3/mod/tools/em/class.em_index.php (Arbeitskopie)
1612 1612
			if(!is_array($mirrors)) return false;
1613 1613
		}
1614 1614
		if($this->MOD_SETTINGS['selectedMirror']=='') {
1615
			srand((float) microtime() * 10000000); // not needed after PHP 4.2.0...
1616 1615
			$rand = array_rand($mirrors);
1617 1616
			$url = 'http://'.$mirrors[$rand]['host'].$mirrors[$rand]['path'];
1618 1617
		}
typo3/sysext/cms/tslib/class.tslib_fe.php (Arbeitskopie)
1100 1100
				$pageArray = $this->sys_page->getMenu($idArray[0]?$idArray[0]:$thisUid,'*','sorting','AND pages.doktype<199 AND pages.doktype!=6');
1101 1101
				$pO = 0;
1102 1102
				if ($mode==2 && count($pageArray))	{	// random
1103
					$this->make_seed();
1104 1103
					$randval = intval(rand(0,count($pageArray)-1));
1105 1104
					$pO = $randval;
1106 1105
				}
......
4358 4357
	 * Seeds the random number engine.
4359 4358
	 *
4360 4359
	 * @return	void
4360
	 * @deprecated	since TYPO3 4.3 - the random number generator is seeded automatically since PHP 4.2.0
4361 4361
	 */
4362 4362
	function make_seed() {
4363
		t3lib_div::logDeprecatedFunction();
4364

  
4363 4365
		list($usec, $sec) = explode(' ', microtime());
4364 4366
		$seedV = (float)$sec + ((float)$usec * 100000);
4365 4367
		srand($seedV);
    (1-1/1)