Use Randomid.
authorJan Schneider <jan@horde.org>
Mon, 8 Nov 2010 21:47:50 +0000 (22:47 +0100)
committerJan Schneider <jan@horde.org>
Mon, 8 Nov 2010 21:57:06 +0000 (22:57 +0100)
turba/lib/Form/CreateAddressBook.php
turba/lib/Turba.php

index d3c4039..2cfb4d2 100644 (file)
@@ -42,7 +42,7 @@ class Turba_Form_CreateAddressBook extends Horde_Form
             'name' => $this->_vars->get('name'),
             'desc' => $this->_vars->get('description'),
         );
-        return $driver->createShare(md5(mt_rand()), $params);
+        return $driver->createShare(strval(new Horde_Support_RandomId()), $params);
     }
 
 }
index 2c97541..b134c20 100644 (file)
@@ -450,7 +450,7 @@ class Turba {
                     continue;
                 }
 
-                $sourceKey = md5(mt_rand());
+                $sourceKey = strval(new Horde_Support_RandomId());
                 try {
                     $share = $driver->createShare(
                         $sourceKey,