airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [41/50] [abbrv] airavata-php-gateway git commit: fixing output path generation issue
Date Thu, 14 Jan 2016 15:43:37 GMT
fixing output path generation issue


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/9b6f7f1e
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/9b6f7f1e
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/9b6f7f1e

Branch: refs/heads/develop
Commit: 9b6f7f1ed670a2fca37eb194815c795f8e3f05a4
Parents: 9949d78
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Mon Jan 11 13:52:32 2016 -0500
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Mon Jan 11 13:52:32 2016 -0500

----------------------------------------------------------------------
 app/config/pga_config.php.template    | 5 -----
 app/libraries/ExperimentUtilities.php | 8 ++------
 2 files changed, 2 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/9b6f7f1e/app/config/pga_config.php.template
----------------------------------------------------------------------
diff --git a/app/config/pga_config.php.template b/app/config/pga_config.php.template
index 2a11842..07520a4 100644
--- a/app/config/pga_config.php.template
+++ b/app/config/pga_config.php.template
@@ -109,11 +109,6 @@ return array(
         'server-allowed-file-size' => 64,
 
         /**
-         * directory in the web server where experiment data is staged. (relative to the
PGA documents root)
-         */
-        'experiment-data-dir' => '/../experimentData',
-
-        /**
          * absolute path of the data dir
          */
         'experiment-data-absolute-path' => '/var/www/experimentData',

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/9b6f7f1e/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index dfa7e6d..74e4946 100644
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -657,15 +657,11 @@ class ExperimentUtilities
         //print_r( $outputs); exit;
         foreach ((array)$outputs as $output) {
             if ($output->type == DataType::URI || $output->type == DataType::STDOUT
|| $output->type == DataType::STDERR) {
-                $explode = explode('/', $output->value);
-                //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);
-                //print_r( $output->value); 
                 if(file_exists(str_replace('//','/',$output->value))){
-                    $outputPathArray = explode("/", $outputPath);
+                    $outputPathArray = explode("/", $output->value);
 
                     echo '<p>' . $output->name . ' : ' . '<a target="_blank"
-                            href="' . URL::to("/") . '/download/' . $outputPathArray[ count($outputPathArray)-2]
. '/' . 
+                            href="' . URL::to("/") . '/download/' . $outputPathArray[ count($outputPathArray)-3]
. "/" . $outputPathArray[ count($outputPathArray)-2] . '/' .
             $outputPathArray[ count($outputPathArray)-1] . '">' .
                         $outputPathArray[sizeof($outputPathArray) - 1] . ' <span class="glyphicon
glyphicon-new-window"></span></a></p>';
                 }


Mime
View raw message