diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2012-03-31 19:26:10 -0400 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2012-03-31 19:26:10 -0400 |
commit | 65ad781927b3fa8a0ee6931900db8ee352698706 (patch) | |
tree | 512364fa73b4cf505e6ac8589001d191948c30c8 /templates/show_rules.inc.php | |
parent | ccb9edbf2d1eb0e60d9a976e034567e3c91a33ff (diff) | |
download | ampache-65ad781927b3fa8a0ee6931900db8ee352698706.tar.gz ampache-65ad781927b3fa8a0ee6931900db8ee352698706.tar.bz2 ampache-65ad781927b3fa8a0ee6931900db8ee352698706.zip |
Fix display of logic operator in search
It could be in either $_REQUEST or a playlist object, so we need to
check the correct one.
Diffstat (limited to 'templates/show_rules.inc.php')
-rw-r--r-- | templates/show_rules.inc.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/templates/show_rules.inc.php b/templates/show_rules.inc.php index 063c721b..e588f23a 100644 --- a/templates/show_rules.inc.php +++ b/templates/show_rules.inc.php @@ -20,7 +20,15 @@ */ ?> - +<?php +if ($playlist) { + $logic_operator = $playlist->logic_operator; +} +else { + $logic_operator = $_REQUEST['operator']; +} +$logic_operator = strtolower($logic_operator); +?> <script type="text/javascript" src="<?php echo Config::get('web_path'); ?>/lib/javascript/search.js"></script> <script type="text/javascript" src="<?php echo Config::get('web_path'); ?>/lib/javascript/search-data.php?type=<?php echo $_REQUEST['type'] ? scrub_out($_REQUEST['type']) : 'song'; ?>"></script> @@ -31,8 +39,8 @@ <td><?php echo _('Match'); ?></td> <td> <select name="operator"> - <option value="and" <?php if($_REQUEST['operator']=="and") echo "selected=\"selected\""?>><?php echo _('all rules'); ?></option> - <option value="or" <?php if($_REQUEST['operator']=="or") echo "selected=\"selected\""?>><?php echo _('any rule'); ?></option> + <option value="and" <?php if($logic_operator == 'and') echo 'selected="selected"'?>><?php echo _('all rules'); ?></option> + <option value="or" <?php if($logic_operator == 'or') echo 'selected="selected"'?>><?php echo _('any rule'); ?></option> </select> </td> </tr> |