- if (empty($aMoreParams['q']) and empty($aMoreParams['street']) and empty($aMoreParams['city']) and empty($aMoreParams['county']) and empty($aMoreParams['state']) and empty($aMoreParams['country']) and empty($aMoreParams['postalcode'])) {
- echo '<div class="radio-inline"><input type="radio" name="query-selector" id="simple" value="simple" checked="checked">';
- echo '<label for="simple">simple</label></div>';
- echo '<div class="radio-inline"><input type="radio" name="query-selector" id="structured" value="structured">';
- echo '<label for="structured">structured</label></div>';
- }
- elseif (!empty($aMoreParams['q'])) {
- echo '<div class="radio-inline"><input type="radio" name="query-selector" id="simple" value="simple" checked="checked">';
- echo '<label for="simple">simple</label></div>';
- echo '<div class="radio-inline"><input type="radio" name="query-selector" id="structured" value="structured">';
- echo '<label for="structured">structured</label></div>';
- }
- else {
- echo '<div class="radio-inline"><input type="radio" name="query-selector" id="simple" value="simple">';
- echo '<label for="simple">simple</label></div>';
- echo '<div class="radio-inline"><input type="radio" name="query-selector" id="structured" value="structured" checked="checked">';
- echo '<label for="structured">structured</label></div>';
- }
+ $bSimpleQuery = !empty($aMoreParams['q']);
+ $bStructuredQuery = !$bSimpleQuery
+ && !(empty($aMoreParams['street'])
+ && empty($aMoreParams['city'])
+ && empty($aMoreParams['county'])
+ && empty($aMoreParams['state'])
+ && empty($aMoreParams['country'])
+ && empty($aMoreParams['postalcode']));