Changeset 760 for trunk/Modules/Search/Search.php
- Timestamp:
- Jan 22, 2014, 6:12:46 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Search/Search.php
r636 r760 43 43 else if(array_key_exists('text', $_POST)) $Search = $_POST['text']; 44 44 else $Search = ''; 45 $SearchHTML = htmlentities($Search);45 $SearchHTML = urlencode($Search); 46 46 47 47 $Output = '<table class="BaseTable"><tr><th>'.T('Section').'</th><th>'.T('Found count').'</th></tr>'; … … 52 52 { 53 53 $ColumnQuery[] = '(`'.$Column.'` LIKE "%'.$Search.'%")'; 54 } 54 } 55 55 $ColumnQuery = implode(' OR ', $ColumnQuery); 56 56 if($SearchItem['Query'] != '') 57 { 57 { 58 58 $DbResult = $this->Database->query('SELECT COUNT(*) FROM '.$SearchItem['Query'].' WHERE '.$ColumnQuery); 59 59 $Line = $DbResult->fetch_row(); 60 60 $Line = $Line[0]; 61 61 } else $Line = ''; 62 $Output .= '<tr><td><a href="'.$SearchItem['Link'].$SearchHTML.'">'.$SearchItem['Name'].'</a></td><td>'.$Line.'</td></tr>'; 62 if ($Line <> 0) 63 $Output .= '<tr><td><a href="'.$SearchItem['Link'].$SearchHTML.'">'.$SearchItem['Name'].'</a></td><td>'.$Line.'</td></tr>'; 63 64 } 64 65
Note:
See TracChangeset
for help on using the changeset viewer.