function patch_manager_page_scan in Patch manager 6
Same name and namespace in other branches
- 7 patch_manager.module \patch_manager_page_scan()
Discover patches.
This is more for debugging than anything useful.
1 string reference to 'patch_manager_page_scan'
- patch_manager_menu in ./
patch_manager.module - Implementation of hook_menu().
File
- ./
patch_manager.module, line 231 - patch_manager.module Patch manager provides developers with tools for managing patches.
Code
function patch_manager_page_scan() {
// Scan for patches.
$headers = array(
t('Patch'),
t('Path'),
);
$dir = dirname($_SERVER['SCRIPT_FILENAME']);
$mask = '.patch$|.diff$';
$patches = file_scan_directory($dir, $mask);
$rows = array();
foreach ($patches as $patch) {
$filename = str_replace("{$dir}/", '', $patch->filename);
$rows[] = array(
$patch->basename,
l($filename, $filename),
);
}
$output = theme('table', $headers, $rows);
// Registered patches.
$headers = array(
t('Title'),
t('Patch'),
t('Module'),
t('Issue'),
t('Description'),
t('Patchdir'),
);
$rows = patch_manager_list_patches();
$output .= theme('table', $headers, $rows);
return $output;
}