Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Commit

Permalink
HRINFO-557: Remove lang prefix from file links
Browse files Browse the repository at this point in the history
  • Loading branch information
attiks committed Nov 22, 2016
1 parent 74f8e15 commit 4734807
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions sites/all/modules/hr/hr_tools/hr_tools.module
Original file line number Diff line number Diff line change
Expand Up @@ -1092,3 +1092,16 @@ function hr_tools_tokens($type, $tokens, array $data = array(), array $options =
}
return $replacements;
}

/**
* Implements hook_url_outbound_alter().
*/
function hr_tools_url_outbound_alter(&$path, &$options, $original_path) {
$parts = explode('/', $path);
if (is_array($parts) && isset($parts[0]) && isset($parts[1]) && $parts[0] === 'system' && $parts[1] === 'files') {
$language = new stdClass();
$language->language = LANGUAGE_NONE;
$language->prefix = '';
$options['language'] = $language;
}
}

0 comments on commit 4734807

Please # to comment.