summaryrefslogtreecommitdiffstats
path: root/phpfspot_img.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpfspot_img.php')
-rw-r--r--phpfspot_img.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/phpfspot_img.php b/phpfspot_img.php
index 194b534..a96d5e6 100644
--- a/phpfspot_img.php
+++ b/phpfspot_img.php
@@ -56,6 +56,9 @@ class PHPFSPOT_IMG {
*/
public function show($idx, $width = 0)
{
+ if($idx == 'rand')
+ $idx = $this->parent->get_random_photo();
+
$details = $this->parent->get_photo_details($idx);
if(!$details) {
@@ -112,7 +115,7 @@ class PHPFSPOT_IMG {
}
-if(isset($_GET['idx']) && is_numeric($_GET['idx'])) {
+if(isset($_GET['idx']) && (is_numeric($_GET['idx']) || $_GET['idx'] == 'rand')) {
$img = new PHPFSPOT_IMG;