diff options
| author | Nathan Kinkade <nkinkade@nkinka.de> | 2010-12-06 16:14:26 +0000 |
|---|---|---|
| committer | Nathan Kinkade <nkinkade@nkinka.de> | 2010-12-06 16:14:26 +0000 |
| commit | cf1965957c48b1c88a3913f8167688d03d191cec (patch) | |
| tree | 9da9e719c68f4428771c9b70389b93f7a1bafd26 /modules/gallery/helpers/item.php | |
| parent | 1659e487a26ef0460926376b7b8b40aaba0c0577 (diff) | |
| parent | c3ef8921260db8e39b6d2a7b4708e3d19f35f8b5 (diff) | |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/gallery/helpers/item.php')
| -rw-r--r-- | modules/gallery/helpers/item.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/gallery/helpers/item.php b/modules/gallery/helpers/item.php index 092904a5..052b1c8e 100644 --- a/modules/gallery/helpers/item.php +++ b/modules/gallery/helpers/item.php @@ -218,7 +218,13 @@ class item_Core { } /** - * Return a query to get a random Item_Model, with optional filters + * Return a query to get a random Item_Model, with optional filters. + * Usage: item::random_query()->execute(); + * + * Note: You can add your own ->where() clauses but if your Gallery is + * small or your where clauses are over-constrained you may wind up with + * no item. You should try running this a few times in a loop if you + * don't get an item back. */ static function random_query() { // Pick a random number and find the item that's got nearest smaller number. |
