function search_files_attachments_dashboard in Search Files 6.2
Same name and namespace in other branches
- 7.2 search_files_attachments.module \search_files_attachments_dashboard()
generate the search_files_directories dashboard page
1 string reference to 'search_files_attachments_dashboard'
- search_files_attachments_menu in ./
search_files_attachments.module - Implementation of hook_menu().
File
- ./
search_files_attachments.module, line 303 - Used to index files in attachments
Code
function search_files_attachments_dashboard() {
$output = '';
$lastindex = variable_get('search_files_attachments_last_index', 0);
if ($lastindex == 0) {
$output .= sprintf("%s = <i>%s</i><br/>\n", t('Last Index'), t('never'));
}
else {
$output .= sprintf("%s = %s<br/>\n", t('Last Index'), format_date($lastindex, $type = 'custom', $format = 'Y-m-d H:i:s', $timezone = NULL, $langcode = NULL));
}
$sql = "SELECT count(*) FROM {search_dataset} WHERE type = 'search_files_att'";
$result = db_query($sql);
$result = db_result($result);
$output .= sprintf("Files indexed = %s<br/>\n", $result);
$sql = "SELECT count(*) FROM {search_dataset} WHERE (type = 'search_files_att' AND reindex > 0)";
$result = db_query($sql);
$result = db_result($result);
$output .= sprintf("Files indexed and scheduled for reindexing = %s<br/>\n", $result);
$output .= l(t('Update index'), 'admin/settings/search_files/attachments/update_index');
$output .= "<br/>\n";
return $output;
}