]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/rng/class_RandomNumberGenerator.php
generateUniqueId() and more useless/deprecated methods removed, code speed-up, link...
[shipsimu.git] / inc / classes / main / rng / class_RandomNumberGenerator.php
index 15f43732da50e38514aa146548b3242eb23e144e..93ba3988ed0ae28fa27f7aca7beec7b64a592724 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -19,7 +19,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 class RandomNumberGenerator extends BaseFrameworkSystem {
        /**
@@ -57,12 +57,6 @@ class RandomNumberGenerator extends BaseFrameworkSystem {
                // Call parent constructor
                parent::__construct($className);
 
-               // Set part description
-               $this->setObjectDescription("Standard random number generator");
-
-               // Create unique ID number
-               $this->generateUniqueId();
-
                // Clean up a little
                $this->removeNumberFormaters();
                $this->removeSystemArray();
@@ -107,7 +101,7 @@ class RandomNumberGenerator extends BaseFrameworkSystem {
                $serverIp = "cluster";
 
                // Do we have a single server?
-               if ($this->getConfigInstance()->readConfig('is_single_server') == "Y") {
+               if ($this->getConfigInstance()->readConfig('is_single_server') === "Y") {
                        // Then use that IP for extra security
                        $serverIp = getenv('SERVER_ADDR');
                } // END - if
@@ -115,7 +109,7 @@ class RandomNumberGenerator extends BaseFrameworkSystem {
                // Yet-another fixed salt. This is not dependend on server software or date
                if ($extraInstance instanceof FrameworkInterface) {
                        // With extra instance information
-                       $this->fixedSalt = sha1($serverIp . ":" . $extraInstance->__toString() . ":" . serialize($this->getDatabaseInstance()->getConnectionData()) . ":" . $extraInstance->getObjectDescription());
+                       $this->fixedSalt = sha1($serverIp . ":" . $extraInstance->__toString() . ":" . serialize($this->getDatabaseInstance()->getConnectionData()));
                } else {
                        // Without extra information
                        $this->fixedSalt = sha1($serverIp . ":" . serialize($this->getDatabaseInstance()->getConnectionData()));