Changeset 2092 in ExiteCMS for trunk/search.php
- Timestamp:
- 12/05/08 20:23:35 (3 years ago)
- File:
-
- 1 edited
-
trunk/search.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/search.php
r2090 r2092 36 36 $content_filters = array(); 37 37 38 if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0; 39 $variables['rowstart'] = $rowstart; 38 $variables['items_per_page'] = $settings['numofthreads']; 40 39 41 40 if (!isset($action)) $action = ""; … … 72 71 $searches = array(); 73 72 $searchindex = array(); 74 $result = dbquery("SELECT s.*, m.mod_folder FROM ".$db_prefix."search s LEFT JOIN ".$db_prefix."modules m ON s.search_mod_id = m.mod_id WHERE s.search_active = 1".($search_id?" AND s.search_id = '$search_id'":"")); 73 74 // array to store variables we use in the search templates 75 $reportvars = array(); 76 $reportvars['output'] = array(); 77 78 // variable initialisation 79 if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 1; 80 $variables['rowstart'] = $rowstart; 81 82 $variables['rows'] = 0; 83 $lines = 0; 84 $result = dbquery("SELECT s.*, m.mod_folder FROM ".$db_prefix."search s LEFT JOIN ".$db_prefix."modules m ON s.search_mod_id = m.mod_id WHERE s.search_active = 1".(($search_id > 0 && $search_id < 99999)?" AND s.search_id = '$search_id'":"")); 75 85 while ($data = dbarray($result)) { 76 86 if (checkgroup($data['search_visibility'])) { … … 93 103 // do any preprocessing 94 104 @include PATH_INCLUDES."search/search.".strtolower($data['search_name']).".php"; 105 $lines = count($reportvars['output']); 95 106 } else { 96 107 $data['mod_folder'] = "-"; … … 130 141 $variables['default_filter'] = ""; 131 142 foreach($variables['searches'] as $key => $search) { 132 if ( $search['search_order'] < $variables['default_location']) {143 if (isset($search['search_filters']) && $search['search_order'] < $variables['default_location']) { 133 144 $variables['default_location'] = $search['search_order']; 134 145 $variables['default_filter'] = $search['search_filters']; 135 if (!isset($search['search_filters'])) _debug($search, true);136 146 } 137 147 } … … 149 159 } 150 160 161 // update the search title in case of a global search 162 if ($search_id == 99999) { 163 $variables['searches'][0]['search_title'] = $locale['src524']; 164 } 165 151 166 // define the search body panel variables 152 167 $template_panels[] = array('type' => 'body', 'name' => 'search', 'title' => $title, 'template' => 'main.search.tpl', 'locale' => $locales);
Note: See TracChangeset
for help on using the changeset viewer.
