summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/random.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2011-04-25 23:26:43 -0700
committerBharat Mediratta <bharat@menalto.com>2011-04-25 23:26:43 -0700
commitcbd04e1ae02491ab4c213fe03d62d12ca1546251 (patch)
tree764445de9000c7fbd33f647dd24bd021e71c88e0 /modules/gallery/helpers/random.php
parent8814d7742d6689ce03bc3393e9ff436f31f2b58b (diff)
Move random::string() to be test::random_string() and have it return a
random string of any length. Also introduce test::lorem_ipsum() and use that in places where we want strings of words. Fixes #1713.
Diffstat (limited to 'modules/gallery/helpers/random.php')
-rw-r--r--modules/gallery/helpers/random.php10
1 files changed, 1 insertions, 9 deletions
diff --git a/modules/gallery/helpers/random.php b/modules/gallery/helpers/random.php
index 6016df7b..06542e8c 100644
--- a/modules/gallery/helpers/random.php
+++ b/modules/gallery/helpers/random.php
@@ -19,7 +19,7 @@
*/
class random_Core {
/**
- * Return a random 32 bit hash value.
+ * Return a random 32 byte hash value.
* @param string extra entropy data
*/
static function hash($entropy="") {
@@ -27,14 +27,6 @@ class random_Core {
}
/**
- * Return a random hexadecimal string of the given length.
- * @param int the desired length of the string
- */
- static function string($length) {
- return substr(random::hash(), 0, $length);
- }
-
- /**
* Return a random floating point number between 0 and 1
*/
static function percent() {