Changeset 1714 in ExiteCMS for branches/PLi-Fusion/search.php


Ignore:
Timestamp:
08/28/08 18:20:38 (4 years ago)
Author:
hverton
Message:

Merged trunk revisions 1706:1713 into the PLi-Fusion branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PLi-Fusion/search.php

    r1666 r1714  
    103103} 
    104104 
    105 // do we have a search location? if not, get the first search item 
    106 if (!$search_id && count($variables['searches'])) { 
    107 //  $search_id = $variables['searches'][0]['search_id']; 
     105// find the id of the default selection 
     106if ($action == "") { 
     107    $variables['default_location'] = 9999999999; 
     108    $variables['default_filter'] = ""; 
     109    foreach($variables['searches'] as $key => $search) { 
     110        if ($search['search_order'] < $variables['default_location']) { 
     111            $variables['default_location'] = $search['search_order']; 
     112            $variables['default_filter'] = $search['search_filters']; 
     113            if (!isset($search['search_filters'])) _debug($search, true); 
     114        } 
     115    } 
    108116} 
     117 
    109118// store the selected search location 
    110119$variables['search_id'] = $search_id; 
Note: See TracChangeset for help on using the changeset viewer.