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 2017/04/04 20:07:46 UTC
[1/2] airavata-php-gateway git commit: showing download file link
only when file exists
Repository: airavata-php-gateway
Updated Branches:
refs/heads/master dc556d73d -> 863534ba2
showing download file link only when file exists
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/026bb9d0
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/026bb9d0
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/026bb9d0
Branch: refs/heads/master
Commit: 026bb9d09ac2b941b8dc1f0e45056a3195136c26
Parents: dc556d7
Author: scnakandala <su...@gmail.com>
Authored: Tue Apr 4 16:01:29 2017 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Tue Apr 4 16:01:29 2017 -0400
----------------------------------------------------------------------
app/libraries/ExperimentUtilities.php | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/026bb9d0/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index 8248851..81f44f8 100755
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -921,14 +921,19 @@ class ExperimentUtilities
break;
}
}
- $fileName = basename($currentOutputPath);
- }else{
+ $path = parse_url($currentOutputPath);
+ if(file_exists($path)){
+ $fileName = basename($currentOutputPath);
+ echo '<p>' . $output->name . ': <a target="_blank" href="' . URL::to("/")
+ . '/download/?id=' . urlencode($output->value) . '">' . $fileName
+ . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
+ }
+ }else {
$fileName = basename($output->value);
+ echo '<p>' . $output->name . ': <a target="_blank" href="' . URL::to("/")
+ . '/download/?id=' . urlencode($output->value) . '">' . $fileName
+ . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
}
- echo '<p>' . $output->name . ': <a target="_blank" href="' . URL::to("/")
- . '/download/?id=' . urlencode($output->value) . '">' . $fileName
- . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
-
}
} elseif ($output->type == DataType::STRING) {
echo '<p>' . $output->value . '</p>';
[2/2] airavata-php-gateway git commit: fixing minor bug
Posted by sc...@apache.org.
fixing minor bug
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/863534ba
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/863534ba
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/863534ba
Branch: refs/heads/master
Commit: 863534ba2d64b5b5cd21957ad577b108b6a1a45b
Parents: 026bb9d
Author: scnakandala <su...@gmail.com>
Authored: Tue Apr 4 16:04:05 2017 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Tue Apr 4 16:04:05 2017 -0400
----------------------------------------------------------------------
app/libraries/ExperimentUtilities.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/863534ba/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index 81f44f8..2202218 100755
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -921,7 +921,7 @@ class ExperimentUtilities
break;
}
}
- $path = parse_url($currentOutputPath);
+ $path = parse_url($currentOutputPath)['path'];
if(file_exists($path)){
$fileName = basename($currentOutputPath);
echo '<p>' . $output->name . ': <a target="_blank" href="' . URL::to("/")