You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2015/07/14 19:07:30 UTC
airavata-php-gateway git commit: fixing AIRAVATA-1770
Repository: airavata-php-gateway
Updated Branches:
refs/heads/master 54ec98065 -> 52d0c2df8
fixing AIRAVATA-1770
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/52d0c2df
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/52d0c2df
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/52d0c2df
Branch: refs/heads/master
Commit: 52d0c2df8e54100604be983c1006498cf7282bce
Parents: 54ec980
Author: Supun Nakandala <sc...@apache.org>
Authored: Tue Jul 14 22:37:04 2015 +0530
Committer: Supun Nakandala <sc...@apache.org>
Committed: Tue Jul 14 22:37:04 2015 +0530
----------------------------------------------------------------------
app/libraries/ExperimentUtilities.php | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/52d0c2df/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index 033fae8..2a42b31 100644
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -583,12 +583,14 @@ class ExperimentUtilities
//echo '<p>' . $output->key . ': <a href="' . $output->value . '">' . $output->value . '</a></p>';
$outputPath = str_replace(Config::get('pga_config.airavata')['experiment-data-absolute-path'],
Config::get('pga_config.airavata')['experiment-data-dir'], $output->value);
- $outputPathArray = explode("/", $outputPath);
+ if(file_exists($outputPath)){
+ $outputPathArray = explode("/", $outputPath);
- echo '<p>' . $output->name . ' : ' . '<a target="_blank"
- href="' . URL::to("/") . "/.." . str_replace(Config::get('pga_config.airavata')['experiment-data-absolute-path'],
- Config::get('pga_config.airavata')['experiment-data-dir'], $output->value) . '">' .
- $outputPathArray[sizeof($outputPathArray) - 1] . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
+ echo '<p>' . $output->name . ' : ' . '<a target="_blank"
+ href="' . URL::to("/") . "/.." . str_replace(Config::get('pga_config.airavata')['experiment-data-absolute-path'],
+ Config::get('pga_config.airavata')['experiment-data-dir'], $output->value) . '">' .
+ $outputPathArray[sizeof($outputPathArray) - 1] . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
+ }
} elseif ($output->type == DataType::STRING) {
echo '<p>' . $output->value . '</p>';
}