Commit 585c86b466569392f6c4f450654847dea4cbbb92
1 parent
57f8eda0
Exists in
master
and in
110 other branches
Minor fixes in upload script
Showing
1 changed file
with
4 additions
and
3 deletions
Show diff stats
php/uploadFile.php
... | ... | @@ -81,6 +81,7 @@ |
81 | 81 | } |
82 | 82 | |
83 | 83 | define('USERDATADIR', USERPATH."/".$_POST['sessionID']."/DATA/"); |
84 | + define('USERTTDIR', USERPATH."/".$_POST['sessionID']."/TT/"); | |
84 | 85 | define('USERTEMPDIR', USERPATH."/".$_POST['sessionID']."/TEMP/"); |
85 | 86 | define('USERWSDIR', USERPATH."/".$_POST['sessionID']."/WS/"); |
86 | 87 | define('USERWORKINGDIR', USERPATH."/".$_POST['sessionID']."/RES/"); |
... | ... | @@ -96,8 +97,8 @@ |
96 | 97 | if (!is_dir(USERTEMPDIR)) mkdir(USERTEMPDIR.'/', 0755, true); |
97 | 98 | if (!is_dir(ATTACHMENTDIR)) mkdir(ATTACHMENTDIR.'/', 0755, true); |
98 | 99 | |
99 | - if (!$_FILES['attachment'] && !$_FILES['localFileName'] && !$_FILES['localTTName'] && !$_FILES['localCatName'] && | |
100 | - !$_POST['remoteFile'] && !$_POST['remoteTT'] && !$_POST['remoteCat']) | |
100 | + if (!isset($_FILES['attachment']) && !isset($_FILES['localFileName']) && !isset($_FILES['localTTName']) && !isset($_FILES['localCatName']) && | |
101 | + !isset($_POST['remoteFile']) && !isset($_POST['remoteTT']) && !isset($_POST['remoteCat'])) | |
101 | 102 | { |
102 | 103 | $response = array( 'success' => false, 'error' => 'UNDEFINED ACTION'); |
103 | 104 | die(json_encode($response)); |
... | ... | @@ -108,7 +109,7 @@ |
108 | 109 | $timeSmplg = $_POST['timesmpl'] ? $_POST['timesmpl'] : null; |
109 | 110 | $nonStd = $_POST['nonstd'] ? $_POST['nonstd'] : null; |
110 | 111 | $timeLength = $_POST['timelength'] ? $_POST['timelength'] : null; |
111 | - $doy = $_POST['doy'] ? $_POST['doy'] : null; | |
112 | + $doy = isset($_POST['doy']) ? $_POST['doy'] : null; | |
112 | 113 | |
113 | 114 | $allFormats = array('fileFormat' => $fileFrmt, 'timeFormat' => $timeFrmt, 'doy' => $doy, |
114 | 115 | 'timeSampling' => $timeSmplg, 'nonStandard' => $nonStd, 'timeLength' => $timeLength); | ... | ... |