function search_files_helper_list in Search Files 7.2
Same name and namespace in other branches
- 5 search_files.module \search_files_helper_list()
- 6.2 search_files.module \search_files_helper_list()
Returns an HTML table of the current helper apps set up in the system.
1 string reference to 'search_files_helper_list'
- search_files_menu in ./
search_files.module - Implements hook_menu().
File
- ./
search_files.module, line 285 - Organizes and provides helper functions for extracting text from files.
Code
function search_files_helper_list() {
$output = '';
$header = array(
t('Helper name'),
t('Extension'),
array(
'data' => t('Operations'),
'colspan' => '2',
),
);
$result = db_query("SELECT * FROM {search_files_helpers} ORDER BY extension")
->fetchAll();
$helpers = array();
foreach ($result as $helper) {
$helpers[] = array(
check_plain($helper->name),
check_plain($helper->extension),
l(t('edit'), 'admin/config/search/search_files/helpers/edit/' . $helper->id),
l(t('delete'), 'admin/config/search/search_files/helpers/delete/' . $helper->id),
);
}
$output .= theme('table', array(
'header' => $header,
'rows' => $helpers,
'empty' => t('No helpers are configured yet. Use the Add or Autodect tab to configure helper functions.'),
));
// safe_mode will inhibit shell_exec()
if (search_files_issafemode()) {
$output .= '<p>' . t('<b>WARNING!</b> This server has safe_mode enabled, which inhibits use of helper applications') . '</p>';
}
else {
$output .= '<p>' . t("Good. This server has safe_mode disabled, which allows use of helper applications.") . '</p>';
}
return $output;
}