All pastes #461222 Raw Edit

Stuff

public text v1 · immutable
#461222 ·published 2007-04-27 16:02 UTC
rendered paste body
Index: lib/album.lib.php
===================================================================
--- lib/album.lib.php   (revision 916)
+++ lib/album.lib.php   (working copy)
@@ -82,7 +82,8 @@
 
         for ($i=0; $i <= $count; $i++) {
                 $record = rand(0,$total);
-                $results[] = $albums[$record];
+               if (isset($results[$record])) { $i--; } 
+                $results[$record] = $albums[$record];
         }
 
         return $results;