Repository: airavata-php-gateway Updated Branches: refs/heads/develop 27a47179d -> 3a3059ac6
showing links only to existent output files Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/3a3059ac Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/3a3059ac Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/3a3059ac Branch: refs/heads/develop Commit: 3a3059ac66cfc3145eda29620605594207a0b25b Parents: 27a4717 Author: scnakandala <[email protected]> Authored: Thu Jul 27 11:54:29 2017 -0400 Committer: scnakandala <[email protected]> Committed: Thu Jul 27 11:54:29 2017 -0400 ---------------------------------------------------------------------- app/libraries/ExperimentUtilities.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3a3059ac/app/libraries/ExperimentUtilities.php ---------------------------------------------------------------------- diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php index 6abb6d6..9424893 100755 --- a/app/libraries/ExperimentUtilities.php +++ b/app/libraries/ExperimentUtilities.php @@ -179,8 +179,10 @@ class ExperimentUtilities $dataRoot = Config::get("pga_config.airavata")["experiment-data-absolute-path"]; if(!ExperimentUtilities::endsWith($dataRoot, "/")) $dataRoot = $dataRoot . "/"; - $filePath = str_replace($dataRoot, "", parse_url($output->value, PHP_URL_PATH)); + + $filePath = parse_url($output->value, PHP_URL_PATH); if(file_exists($filePath)){ + $filePath = str_replace($dataRoot, "", parse_url($output->value, PHP_URL_PATH)); echo '<p>' . $output->name . ': <a target="_blank" href="' . URL::to("/") . '/download/?path=' . $filePath . '">' . basename($filePath) . ' <span class="glyphicon glyphicon-new-window"></span></a></p>'; }
