summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdocs/CHANGELOG1
-rw-r--r--templates/show_random.inc.php11
2 files changed, 10 insertions, 2 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index 9b19e68f..e05da71f 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,7 @@
--------------------------------------------------------------------------
v.3.6-Alpha2
+ - Fixed item count retention for Advanced Random (reported by USAF_Pride)
- Made catalog verify respect memory_cache
- Some catalog operations are now done in chunks, which works better on
large catalogs
diff --git a/templates/show_random.inc.php b/templates/show_random.inc.php
index 31be51a6..fce36cb3 100644
--- a/templates/show_random.inc.php
+++ b/templates/show_random.inc.php
@@ -41,7 +41,14 @@
<tr>
<td><?php echo _('Item count'); ?></td>
<td>
- <?php $name = 'random_' . scrub_in($_POST['random']); ${$name} = ' selected="selected"'; ?>
+ <?php $name = 'random_';
+ if ($_POST['random'] == -1) {
+ $name .= 'all';
+ }
+ else {
+ $name .= scrub_in($_POST['random']);
+ }
+ ${$name} = ' selected="selected"'; ?>
<select name="random">
<option value="1"<?php echo $random_1; ?>>1</option>
<option value="5"<?php echo $random_5; ?>>5</option>
@@ -52,7 +59,7 @@
<option value="100"<?php echo $random_100; ?>>100</option>
<option value="500"<?php echo $random_500; ?>>500</option>
<option value="1000"<?php echo $random_1000; ?>>1000</option>
- <option value="-1" ><?php echo _('All'); ?></option>
+ <option value="-1" <?php echo $random_all; ?> ><?php echo _('All'); ?></option>
</select>
</td>
</tr>