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 2016/07/06 19:05:16 UTC
airavata-php-gateway git commit: fixing bug in optional input files
when cloaning and editing
Repository: airavata-php-gateway
Updated Branches:
refs/heads/develop 683eeec40 -> 1dbadf9b6
fixing bug in optional input files when cloaning and editing
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/1dbadf9b
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/1dbadf9b
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/1dbadf9b
Branch: refs/heads/develop
Commit: 1dbadf9b65a6cbafb606b06fbc841b7f73581cca
Parents: 683eeec
Author: scnakandala <su...@gmail.com>
Authored: Wed Jul 6 15:05:13 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Wed Jul 6 15:05:13 2016 -0400
----------------------------------------------------------------------
app/libraries/ExperimentUtilities.php | 31 +++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/1dbadf9b/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index da1a0d3..3c708d8 100644
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -328,15 +328,14 @@ class ExperimentUtilities
$experimentAssemblySuccessful = true;
$newExperimentInputs = array();
- ExperimentUtilities::create_experiment_folder_path($projectId, $experimentName);
-// if (sizeof($_FILES) > 0) {
-// if (ExperimentUtilities::file_upload_successful()) {
-// // construct unique path
-// ExperimentUtilities::create_experiment_folder_path($projectId, $experimentName);
-// } else {
-// $experimentAssemblySuccessful = false;
-// }
-// }
+ if (sizeof($_FILES) > 0) {
+ if (ExperimentUtilities::file_upload_successful()) {
+ // construct unique path
+ ExperimentUtilities::create_experiment_folder_path($projectId, $experimentName);
+ } else {
+ $experimentAssemblySuccessful = false;
+ }
+ }
//sending application inputs in the order defined by the admins.
$order = array();
@@ -477,12 +476,14 @@ class ExperimentUtilities
}
}
- $uriList = substr($uriList,0, strlen($uriList) - 1);
- $optInput = new InputDataObjectType();
- $optInput->name = "Optional-File-Input-List";
- $optInput->type = DataType::URI_COLLECTION;
- $optInput->value = $uriList;
- $newExperimentInputs[] = $optInput;
+ if(strlen($uriList) > 0){
+ $uriList = substr($uriList,0, strlen($uriList) - 1);
+ $optInput = new InputDataObjectType();
+ $optInput->name = "Optional-File-Input-List";
+ $optInput->type = DataType::URI_COLLECTION;
+ $optInput->value = $uriList;
+ $newExperimentInputs[] = $optInput;
+ }
}
if ($experimentAssemblySuccessful) {