function drush_sitealias_simplify_names

8.0.x drush_sitealias_simplify_names($site_list)
6.x drush_sitealias_simplify_names($site_list)
7.x drush_sitealias_simplify_names($site_list)
4.x drush_sitealias_simplify_names($site_list)
5.x drush_sitealias_simplify_names($site_list)
master drush_sitealias_simplify_names($site_list)

Given a list of alias records, shorten the name used if possible

1 call to drush_sitealias_simplify_names()
drush_invoke_process in includes/
Invoke a command in a new process, targeting the site specified by the provided site alias record.


includes/, line 111
The site alias API.


function drush_sitealias_simplify_names($site_list) {
  $result = array();
  foreach ($site_list as $original_name => $alias_record) {
    $adjusted_name = $alias_record['#name'];
    $hashpos = strpos($original_name, '#');
    if ($hashpos !== FALSE) {
      $adjusted_name = substr($original_name, $hashpos);
      if (array_key_exists('remote-host', $alias_record)) {
        $adjusted_name = $alias_record['remote-host'] . $adjusted_name;
    $result[$adjusted_name] = $alias_record;
  return $result;