*

morfik

  • ****
  • 169 posts
Bug in Items Location config option
« on: March 04, 2023, 11:19:27 AM »
One of the option (Items Location) in the configure section doesn't seem to function right. When I select Same country & region it chooses Same country & region & city instead.

Looking through the code ( plugins/openstreetmaps/admin/configure.php) I found this:

Code: [Select]
        <div class="mb-row">
          <label for="rel_loc" class=""><span><?php _e('Items Location''openstreetmaps'); ?></span></label>
          <select name="rel_loc">
            <option value="1" <?php if($rel_loc == 1) { ?>selected="selected"<?php ?>><?php _e('Same country''openstreetmaps'); ?></option>
            <option value="2" <?php if($rel_loc == 2) { ?>selected="selected"<?php ?>><?php _e('Same country & region''openstreetmaps'); ?></option>
            <option value="2" <?php if($rel_loc == 2) { ?>selected="selected"<?php ?>><?php _e('Same country & region & city''openstreetmaps'); ?></option>
          </select>

          <div class="mb-explain"><?php _e('Select how location will be used to filter out related items.''openstreetmaps'); ?></div>
        </div>

Should there be 2x <option value="2" <?php if($rel_loc == 2) or the last one should have 3 instead 2? :D

*

MB Themes

Re: Bug in Items Location config option
« Reply #1 on: March 07, 2023, 01:13:16 PM »
Nice catch.
Last one should be 3
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots