<?php
global $fm, $str;

if (browserIsChrome() || browserIsFirefox() || browserIsIE8OrLower()) {
	$url = $config['url']['root'].'/?module=fileman_myfiles&section=ajax&page=download&open_in_browser=1';
	$url .= "&paths[]=".$str->forURL($str->forHTML($data['relativePath']));
} else {
	$url = $config['url']['root'].'/?module=custom_actions&action=pdfjs';
	$url .= "&path=".$str->forURL($str->forHTML($data['relativePath']));
}
siteRedirect($url);