function theme_scanner_replace_results in Search and Replace Scanner 7
Same name and namespace in other branches
- 5.2 scanner.module \theme_scanner_replace_results()
- 6 scanner.module \theme_scanner_replace_results()
Theme the replace results.
1 theme call to theme_scanner_replace_results()
- scanner_execute in ./
scanner.module - Handles the actual search and replace.
File
- ./
scanner.theme.inc, line 52 - Theme callbacks for the scanner module.
Code
function theme_scanner_replace_results($variables) {
$results = $variables['results'];
$output = '';
if (is_array($results)) {
drupal_set_message(filter_xss('Replaced items in ' . count($results) . ' fields. <a href="#results">See below</a> for details.', $allowed_tags = array(
'a',
)));
$output = '<p>Replaced items in ' . count($results) . ' fields:</p>';
$output .= '<ol class="scanner-results scanner-replace-results">';
foreach ($results as $item) {
$output .= theme('scanner_replace_item', array(
'item' => $item,
));
}
$output .= '</ol>';
// @todo use pager to split up results.
}
else {
drupal_set_message(t('No matches found. Check the !url for fields that can be searched.', array(
'!url' => l(t('settings'), 'admin/config/content/scanner'),
)), 'warning');
}
return $output;
}