function _drush_sitelist_find_in_list

8.0.x sitealias.inc _drush_sitelist_find_in_list($one_source, &$target)
6.x sitealias.inc _drush_sitelist_find_in_list($one_source, &$target)
7.x sitealias.inc _drush_sitelist_find_in_list($one_source, &$target)
3.x sitealias.inc _drush_sitelist_find_in_list($one_source, &$target)
4.x sitealias.inc _drush_sitelist_find_in_list($one_source, &$target)
5.x sitealias.inc _drush_sitelist_find_in_list($one_source, &$target)
master sitealias.inc _drush_sitelist_find_in_list($one_source, &$target)
1 call to _drush_sitelist_find_in_list()
drush_sitelist_align_lists in includes/sitealias.inc
If the source and target lists contain alias records to the same sets of sites, but in different orders, this routine will re-order the lists so that they are in alignment.

File

includes/sitealias.inc, line 758
The site alias API.

Code

function _drush_sitelist_find_in_list($one_source, &$target) {
  $result = FALSE;

  foreach ($target as $key => $one_target) {
    if (_drush_sitelist_check_site_records($one_source, $one_target)) {
      $result = $one_target;
      unset($target[$key]);
    }
  }

  return $result;
}