Repository: airavata-php-gateway Updated Branches: refs/heads/develop 7a8b56ce7 -> 27a47179d
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/27a47179 Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/27a47179 Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/27a47179 Branch: refs/heads/develop Commit: 27a47179d6a3046d25d121e2ef2484a70c9677d3 Parents: 7a8b56c Author: scnakandala <[email protected]> Authored: Thu Jul 27 11:51:16 2017 -0400 Committer: scnakandala <[email protected]> Committed: Thu Jul 27 11:51:16 2017 -0400 ---------------------------------------------------------------------- app/libraries/ExperimentUtilities.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/27a47179/app/libraries/ExperimentUtilities.php ---------------------------------------------------------------------- diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php index be32e74..6abb6d6 100755 --- a/app/libraries/ExperimentUtilities.php +++ b/app/libraries/ExperimentUtilities.php @@ -180,8 +180,10 @@ class ExperimentUtilities if(!ExperimentUtilities::endsWith($dataRoot, "/")) $dataRoot = $dataRoot . "/"; $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>'; + if(file_exists($filePath)){ + echo '<p>' . $output->name . ': <a target="_blank" href="' . URL::to("/") + . '/download/?path=' . $filePath . '">' . basename($filePath) . ' <span class="glyphicon glyphicon-new-window"></span></a></p>'; + } } elseif ($output->type == DataType::STRING) { echo '<p>' . $output->value . '</p>';
