+ Reply to Thread
Results 1 to 4 of 4

Thread: Fix for Checkbox Distinct Values OR Logic

  1. #1
    Join Date
    May 2008
    Posts
    4

    Default Fix for Checkbox Distinct Values OR Logic

    I was having a problem with the or logic search not working for the checkboxes distinct values in version 2.5.6. I edited the search.inc.php to add _or to the checkbox name. I have tested this with version 2.5.6 and with CMS Realty. Here is the revised code for case 'checkbox_or':

    PHP Code:
    case 'checkbox_or':
        
    $display .= '<tr><td class="searchpage_field_caption">'.$browse_caption.'</td>';
        
    $display .= '<td align="left">';
        while (!
    $recordSet->EOF) {
            
    $field_output $misc->make_db_unsafe ($recordSet->fields['listingsdbelements_field_value']);
            
    $num_type '';
            if (
    $config['configured_show_count'] == 1) {
                
    $num_type $recordSet->fields['num_type'];
                
    $num_type "($num_type)";
            }
            if(
    $dateFormat==TRUE){
                
    $display .= '<input type="checkbox" name="'.$browse_field_name.'_or[]" value="'.$field_output.'" />'.date($format,$field_output).' '.$num_type.'';
                
    $display .= $config['search_list_separator'];
            }else{
            if (
    $field_type == 'number')
                {
                
    $field_display $misc->international_num_format($field_output$config['number_decimals_number_fields']);
                
    $display .= '<input type="checkbox" name="'.$browse_field_name.'_or[]" value="'.$field_output.'" />'.$field_display.' '.$num_type.'';
                
    $display .= $config['search_list_separator'];
                } else {
                
    $display .= '<input type="checkbox" name="'.$browse_field_name.'_or[]" value="'.$field_output.'" />'.$field_output.' '.$num_type.'';
                
    $display .= $config['search_list_separator'];
                }

            }
            
    $recordSet->MoveNext();
        } 
    // end while
        
    $display .= '</td></tr>';
        break; 

  2. #2
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,360

    Default Re: Fix for Checkbox Distinct Values OR Logic

    Hi jennifer,

    In fact it is a bug and you could also open a Bug Report - but not needed anymore.
    I have just fixed it at SVN (rev.2395). With the next O-R release (after v.2.5.6) it will be implemented by default. I gave the credits to you.

    Thanks,
    Eduardo
    Last edited by ebmarques; 06-29-2009 at 03:25 PM. Reason: after v.2.5.6 not v.2.4.6
    Open-Realty® v.3.x DOCs

    Man aspires to be immortal and to this end he defends ephemeral principles.
    One day he will inexorably find that to be immortal he must defend Absolute Principles.
    On that day he will die to the flesh, ephemeral, and will live to the Spirit, Eternal. He will be Immortal.
    Author: Celso Charuri


    http://www.eduardomarques.com

  3. #3
    Join Date
    Sep 2008
    Location
    Lizella, GA
    Posts
    17

    Default Re: Fix for Checkbox Distinct Values OR Logic

    Jennifer ... thanks for posting this fix. I just changed to the checkbox search and didn't even realize I had the issue until I read your post. The fix is working for me!

  4. #4
    Join Date
    May 2008
    Posts
    4

    Default Re: Fix for Checkbox Distinct Values OR Logic

    Great! I am glad I contribute a tiny bit to this great project.

+ Reply to Thread

Similar Threads

  1. Replies: 1
    Last Post: 03-15-2008, 04:31 PM
  2. Replies: 8
    Last Post: 11-16-2007, 12:31 PM
  3. Distinct list in Quicksearch?
    By bos1970 in forum Addon help, ideas and discussion
    Replies: 1
    Last Post: 03-14-2007, 04:58 AM
  4. Search with Multiple checkbox values
    By apsona in forum General Help
    Replies: 26
    Last Post: 11-10-2006, 10:40 AM
  5. Searching - Display of checkbox list of individual values
    By Anonymous in forum HELP (CLOSED)
    Replies: 0
    Last Post: 09-04-2003, 08:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts