Use uuid extension if available.
authorJan Schneider <jan@horde.org>
Thu, 12 Aug 2010 08:26:43 +0000 (10:26 +0200)
committerJan Schneider <jan@horde.org>
Thu, 12 Aug 2010 15:34:50 +0000 (17:34 +0200)
framework/Support/lib/Horde/Support/Uuid.php

index 9fb0415..161b14c 100644 (file)
@@ -35,7 +35,11 @@ class Horde_Support_Uuid
      */
     public function __construct()
     {
-        $this->generate();
+        if (extension_loaded('uuid')) {
+            $this->_uuid = uuid_create();
+        } else {
+            $this->generate();
+        }
     }
 
     /**