projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1312c30
)
Slightly shorter random ID.
author
Michael M Slusarz
<slusarz@curecanti.org>
Thu, 8 Jan 2009 05:07:57 +0000
(22:07 -0700)
committer
Michael M Slusarz
<slusarz@curecanti.org>
Thu, 8 Jan 2009 05:07:57 +0000
(22:07 -0700)
framework/Mime/lib/Horde/Mime.php
patch
|
blob
|
history
diff --git
a/framework/Mime/lib/Horde/Mime.php
b/framework/Mime/lib/Horde/Mime.php
index
eef26db
..
a0dcfa0
100644
(file)
--- a/
framework/Mime/lib/Horde/Mime.php
+++ b/
framework/Mime/lib/Horde/Mime.php
@@
-477,9
+477,9
@@
class Horde_Mime
*
* @return string A random string.
*/
- static public function generateRandomId()
+ static public function generateRandomId(
$length = 24
)
{
- return
base_convert(dechex(strtr(microtime(), array('0.' => '', ' ' => ''))) . uniqid(mt_rand(), true), 16, 36
);
+ return
substr(base_convert(dechex(strtr(microtime(), array('0.' => '', ' ' => ''))) . uniqid(mt_rand(), true), 16, 36), $length
);
}
/**