Browse Source

Obsolete code because crc32() does exist in our minimum php requirements.

Thijs Kinkhorst 22 years ago
parent
commit
88a42368fc
1 changed files with 0 additions and 17 deletions
  1. 0 17
      functions/strings.php

+ 0 - 17
functions/strings.php

@@ -284,24 +284,7 @@ function sq_mt_seed($Val) {
     $Max = mt_getrandmax();
     $Max = mt_getrandmax();
     
     
     if (! is_int($Val)) {
     if (! is_int($Val)) {
-        if (function_exists('crc32')) {
             $Val = crc32($Val);
             $Val = crc32($Val);
-        } else {
-            $Str = $Val;
-            $Pos = 0;
-            $Val = 0;
-            $Mask = $Max / 2;
-            $HighBit = $Max ^ $Mask;
-            while ($Pos < strlen($Str)) {
-                if ($Val & $HighBit) {
-                    $Val = (($Val & $Mask) << 1) + 1;
-                } else {
-                    $Val = ($Val & $Mask) << 1;
-                }
-                $Val ^= $Str[$Pos];
-                $Pos ++;
-            }
-        }
     }
     }
     
     
     if ($Val < 0) {
     if ($Val < 0) {