Commit c96b2f96 authored by Adrian Rossouw's avatar Adrian Rossouw Committed by adrian

Bring in line with Drush upstream. Aegir now requires Drush HEAD

parent c74e3a2c
......@@ -16,8 +16,8 @@ function _provision_drupal_find_themes($scope, $key = '') {
$files = array();
$engines = array();
foreach ($paths as $path) {
$files = array_merge($files, drush_scan_directory($path, ".info$", array('.', '..', 'CVS', '.svn'), 0, true, 'name'));
$engines = array_merge($engines, drush_scan_directory($path . "/engines", ".engine$", array('.', '..', 'CVS', '.svn'), 0, true, 'name'));
$files = array_merge($files, drush_scan_directory($path, "/\.info$/", array('.', '..', 'CVS', '.svn'), 0, true, 'name'));
$engines = array_merge($engines, drush_scan_directory($path . "/engines", "/\.engine$/", array('.', '..', 'CVS', '.svn'), 0, true, 'name'));
}
foreach ($files as $name => $file) {
$files[$name]->info = _provision_drupal_parse_info_file($file->filename);
......
......@@ -22,8 +22,8 @@ function _provision_drupal_find_themes($scope, $key = '') {
$themes = array();
$templates = array();
foreach ($paths as $path) {
$themes = array_merge($themes, drush_scan_directory($path, ".theme$", array('.', '..', 'CVS', '.svn'), 0, true, 'name'));
$templates = array_merge($templates, drush_scan_directory($path, "page.tpl.php$", array('.', '..', 'CVS', '.svn'), 0, true, 'filename'));
$themes = array_merge($themes, drush_scan_directory($path, "/\.theme$/", array('.', '..', 'CVS', '.svn'), 0, true, 'name'));
$templates = array_merge($templates, drush_scan_directory($path, "/page.tpl.php$/", array('.', '..', 'CVS', '.svn'), 0, true, 'filename'));
}
foreach ($themes as $name => $file) {
......@@ -38,7 +38,7 @@ function _provision_drupal_find_themes($scope, $key = '') {
}
foreach ($files as $name => $theme) {
// Now that we have the themes, let's get the sub styles.
foreach (drush_scan_directory(dirname($theme->filename), 'style.css$') as $style) {
foreach (drush_scan_directory(dirname($theme->filename), '/style.css$/') as $style) {
$style->style = TRUE;
$style->template = isset($theme->template) ? $theme->template : FALSE;
$style->name = basename(dirname($style->filename));
......
......@@ -17,8 +17,8 @@ function _provision_drupal_find_themes($scope, $key = '') {
$files = array();
$engines = array();
foreach ($paths as $path) {
$files = array_merge($files, drush_scan_directory($path, ".info$", array('.', '..', 'CVS', '.svn'), 0, true, 'name'));
$engines = array_merge($engines, drush_scan_directory($path . "/engines", ".engine$", array('.', '..', 'CVS', '.svn'), 0, true, 'name'));
$files = array_merge($files, drush_scan_directory($path, "/\.info$/", array('.', '..', 'CVS', '.svn'), 0, true, 'name'));
$engines = array_merge($engines, drush_scan_directory($path . "/engines", "/\.engine$/", array('.', '..', 'CVS', '.svn'), 0, true, 'name'));
}
foreach ($files as $name => $file) {
$files[$name]->info = _provision_drupal_parse_info_file($file->filename);
......
......@@ -300,8 +300,8 @@ function _provision_find_profiles() {
$languages['en'] = 1;
// Find languages available
$files = array_keys(drush_scan_directory('./profiles/' . $name . '/translations', '\.po$', array('.', '..', 'CVS'), 0, FALSE, 'filepath'));
$files = array_merge($files, array_keys(drush_scan_directory('./profiles/' . $name , '\.po$', array('.', '..', 'CVS'), 0, FALSE, 'filepath')));
$files = array_keys(drush_scan_directory('./profiles/' . $name . '/translations', '/\.po$/', array('.', '..', 'CVS'), 0, FALSE, 'filepath'));
$files = array_merge($files, array_keys(drush_scan_directory('./profiles/' . $name , '/\.po$/', array('.', '..', 'CVS'), 0, FALSE, 'filepath')));
if (is_array($files)) {
foreach ($files as $file) {
if (preg_match('!(/|\.)([^\./]+)\.po$!', $file, $langcode)) {
......@@ -535,7 +535,7 @@ function _provision_drupal_find_modules($scope, $key = '') {
$paths = _provision_drupal_search_paths($scope, $key, 'modules');
$files = array();
foreach ($paths as $path) {
$files = array_merge($files, drush_scan_directory($path, ".module$", array('.', '..', 'CVS', '.svn'), 0, true, 'name'));
$files = array_merge($files, drush_scan_directory($path, "/.module$/", array('.', '..', 'CVS', '.svn'), 0, true, 'name'));
}
foreach ($files as $name => $info) {
$install_file = sprintf("%s/%s.install", dirname($info->filename), $name);
......
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