function theme_scanner_results in Search and Replace Scanner 6
Same name and namespace in other branches
- 5.2 scanner.module \theme_scanner_results()
- 7 scanner.theme.inc \theme_scanner_results()
The the search results.
Parameters
map $results:
Return value
html str.
1 theme call to theme_scanner_results()
- scanner_execute in ./
scanner.module - Handles the actual search and replace.
File
- ./
scanner.module, line 1171 - Search and Replace Scanner - works on all nodes text content.
Code
function theme_scanner_results($results) {
if (is_array($results)) {
$total = count($results);
drupal_set_message('Found matches in ' . $total . ' fields. <a href="#results">See below</a> for details.');
$output = '<p>Found matches in ' . $total . ' fields:</p>';
$output .= '<ol class="scanner-results scanner-search-results">';
foreach ($results as $item) {
$output .= theme('scanner_item', $item);
}
$output .= '</ol>';
//TO DO: use pager to split up results
}
else {
drupal_set_message('Sorry, we found no matches.');
}
return $output;
}