function auditfiles_help in Audit Files 7.4
Same name and namespace in other branches
- 8.3 auditfiles.module \auditfiles_help()
- 8.2 auditfiles.module \auditfiles_help()
- 5 auditfiles.module \auditfiles_help()
- 6.3 auditfiles.module \auditfiles_help()
- 6.2 auditfiles.module \auditfiles_help()
- 7.3 auditfiles.module \auditfiles_help()
- 4.x auditfiles.module \auditfiles_help()
Implements hook_help().
File
- ./
auditfiles.module, line 14 - Implements various Drupal hooks.
Code
function auditfiles_help($path, $arg) {
$output = '';
// If on a confirmation form, then suppress the help message.
if (array_key_exists('files', $_POST) && array_key_exists('op', $_POST) && (substr($_POST['op'], 0, 4) == 'Add ' || substr($_POST['op'], 0, 7) == 'Delete ')) {
return $output;
}
switch ($path) {
// Main module help for this module.
case 'admin/help#auditfiles':
$files_link = l(t('files'), 'admin/config/media/file-system');
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>';
$output .= t('The Audit Files module allows for comparing and correcting files and file references in the "!files_link" directory, in the database, and in content.', array(
'!files_link' => $files_link,
));
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$reports_link = l(t("Audit Files' reports page"), 'admin/reports/auditfiles');
$output .= '<dt>' . t('Comparing and correcting file references') . '</dt>';
$output .= '<dd>' . t('To compare and correct the various file references and usages, visit the !reports_link.', array(
'!reports_link' => $reports_link,
)) . '</dd>';
$reports_link = l(t("Audit Files' Merge file references report page"), 'admin/reports/auditfiles/merge-file-references');
$output .= '<dt>' . t('Merging duplicate file references') . '</dt>';
$output .= '<dd>' . t('To merge duplicate file references, visit the !reports_link.', array(
'!reports_link' => $reports_link,
)) . '</dd>';
$output .= '</dl>';
// Include the INSTALL.txt file.
$filepath = dirname(__FILE__) . '/INSTALL.txt';
if (file_exists($filepath)) {
$readme = file_get_contents($filepath);
}
if (isset($readme)) {
$output .= '<h3>' . t('The contents of the INSTALL.txt file') . '</h3>';
$output .= '<p><pre>' . $readme . '</pre></p>';
}
// Include the README.txt file.
$filepath = dirname(__FILE__) . '/README.txt';
if (file_exists($filepath)) {
$readme = file_get_contents($filepath);
}
if (isset($readme)) {
$output .= '<h3>' . t('The contents of the README.txt file') . '</h3>';
$output .= '<p><pre>' . $readme . '</pre></p>';
}
break;
case 'admin/config/system/auditfiles':
$output .= '<p>';
$output .= t('Configure the administrative settings for this module.');
$output .= '</p>';
break;
case 'admin/reports/auditfiles':
$output .= '<p>';
$output .= t('The various reports provided for by this module.');
$output .= '</p>';
break;
case 'admin/reports/auditfiles/notindatabase':
$files_link = l(t('files'), 'admin/config/media/file-system');
$output .= '<p>';
$output .= t('This report lists the files that are in the "!files_link" directory, but are not in the file_managed database table.', array(
'!files_link' => $files_link,
));
$output .= '</p>';
break;
case 'admin/reports/auditfiles/notonserver':
$files_link = l(t('files'), 'admin/config/media/file-system');
$output .= '<p>';
$output .= t('This report lists the files that are in the file_managed database table, but are not in the "!files_link" directory.', array(
'!files_link' => $files_link,
));
$output .= '</p>';
break;
case 'admin/reports/auditfiles/managednotused':
$output .= '<p>';
$output .= t('This report lists the files that are in the file_managed database table, but are not in the file_usage table.');
$output .= '</p>';
break;
case 'admin/reports/auditfiles/usednotmanaged':
$output .= '<p>';
$output .= t('This report lists the files that are in the file_usage database table, but are not in the file_managed table.');
$output .= '</p>';
break;
case 'admin/reports/auditfiles/usednotreferenced':
$output .= '<p>';
$output .= t('This report lists the files that are in the file_usage database table, but are not in any content.');
$output .= '</p>';
break;
case 'admin/reports/auditfiles/referencednotused':
$output .= '<p>';
$output .= t('This report lists the files that are referenced in content, but are not in the file_usage database table.');
$output .= '</p>';
break;
}
return $output;
}