Changeset 1724

Show
Ignore:
Timestamp:
08/30/08 22:52:30 (3 months ago)
Author:
vollmerk
Message:

fix search when no results are found, actually show the correct "error"

Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/class/browse.class.php

    r1698 r1724  
    937937                }  
    938938                else {  
    939                         $object_ids = $object_ids ? $object_ids : self::get_saved(); 
     939                        $object_ids = is_array($object_ids) ? $object_ids : self::get_saved(); 
    940940                        self::save_objects($object_ids);  
    941941                }  
  • trunk/lib/search.php

    r1666 r1724  
    8686        } // end switch  
    8787 
    88         return false; 
     88        return array(); 
    8989 
    9090} // run_search 
     
    220220 
    221221        $db_results = Dba::query($sql); 
     222 
     223        $results = array();  
    222224         
    223225        while ($row = Dba::fetch_assoc($db_results)) {  
  • trunk/search.php

    r1675 r1724  
    4646                Browse::set_type('song');  
    4747                Browse::reset();  
    48                 Browse::set_static_content(1); 
    4948                Browse::show_objects($results);  
    5049        break;