Changeset 880 for trunk/Modules/Search/Search.php
- Timestamp:
- Apr 7, 2020, 10:15:48 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Search/Search.php
r861 r880 48 48 '</table></div>'. 49 49 '</form>'; 50 return ($Output);50 return $Output; 51 51 } 52 52 } … … 57 57 { 58 58 $this->Title = T('Search'); 59 if (array_key_exists('text', $_GET)) $Search = $_GET['text'];60 else if (array_key_exists('text', $_POST)) $Search = $_POST['text'];59 if (array_key_exists('text', $_GET)) $Search = $_GET['text']; 60 else if (array_key_exists('text', $_POST)) $Search = $_POST['text']; 61 61 else $Search = ''; 62 62 $SearchHTML = urlencode($Search); 63 63 64 64 $Output = '<table class="BaseTable"><tr><th>'.T('Section').'</th><th>'.T('Found count').'</th></tr>'; 65 foreach ($this->System->ModuleManager->Modules['Search']->SearchItems as $SearchItem)65 foreach ($this->System->ModuleManager->Modules['Search']->SearchItems as $SearchItem) 66 66 { 67 67 $ColumnQuery = array(); 68 foreach ($SearchItem['Columns'] as $Column)68 foreach ($SearchItem['Columns'] as $Column) 69 69 { 70 70 $ColumnQuery[] = '(`'.$Column.'` LIKE "%'.$Search.'%")'; 71 71 } 72 72 $ColumnQuery = implode(' OR ', $ColumnQuery); 73 if ($SearchItem['Query'] != '')73 if ($SearchItem['Query'] != '') 74 74 { 75 75 $DbResult = $this->Database->query('SELECT COUNT(*) FROM '.$SearchItem['Query'].' WHERE '.$ColumnQuery); … … 82 82 83 83 $Output .= '</table>'; 84 return ($Output);84 return $Output; 85 85 } 86 86 }
Note:
See TracChangeset
for help on using the changeset viewer.