Commit c23b9c7d authored by pifagor's avatar pifagor Committed by pifagor

Issue #2026551 by dww, pifagor, ciss, Chris Matthews, alex_optim, Dave Reid:...

Issue #2026551 by dww, pifagor, ciss, Chris Matthews, alex_optim, Dave Reid: Add an API and drush command to scan a directory for managing custom links for static files
parent df1f5180
......@@ -30,6 +30,6 @@ function xmlsitemap_custom_drush_command() {
function drush_xmlsitemap_custom_scan($directory, $mask) {
module_load_include('scan.inc', 'xmlsitemap_custom');
drush_print(dt('About to scan @directory with @mask.', array('@directory' => $directory, '@mask' => $mask)));
$results = xml_custom_scan_directories(array($directory => $mask));
$results = xmlsitemap_custom_scan_directories(array($directory => $mask));
drush_print(dt('Scanned @directory: added @add_count and removed @delete_count.', array('@directory' => $directory, '@add_count' => count($results[$directory]['add']), '@delete_count' => count($results[$directory]['delete']))));
}
......@@ -24,7 +24,7 @@
*
* @see file_scan_directory()
*/
function xml_custom_scan_directories(array $directories) {
function xmlsitemap_custom_scan_directories(array $directories) {
$results = array();
foreach ($directories as $directory => $mask) {
$files = file_scan_directory($directory, $mask);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment