Commit f8a71629b221d90ef08eb560cee81a8d6d6c5805
1 parent
162f5e88
Exists in
master
and in
9 other branches
cut long ViId
Showing
2 changed files
with
9 additions
and
4 deletions
Show diff stats
src/CALLEXT/getData.php
... | ... | @@ -59,7 +59,12 @@ |
59 | 59 | $ncFiles = $center->getData($id, $start, $stop); |
60 | 60 | |
61 | 61 | // Add nc to Vi |
62 | + $nc_prefix = strlen($id) > RemoteDataCenterClass::$MAX_VI_NAME_LENGTH ? | |
63 | + substr($id, 0, RemoteDataCenterClass::$MAX_VI_NAME_LENGTH - 1): $id; | |
64 | + | |
62 | 65 | $baseMgr = new DDBaseMgr(); |
66 | + $baseMgr->setViId($id); | |
67 | + $baseMgr->setViInfo(strtolower($nc_prefix)); | |
63 | 68 | $baseMgr->setViDir($ViDir); |
64 | 69 | $baseMgr->addRemoteData($id, $ncFiles, $startIso, $stopIso); |
65 | 70 | |
... | ... |
src/DATA/MANAGER/DDBaseMgr.php
... | ... | @@ -238,12 +238,12 @@ class DDBaseMgr |
238 | 238 | foreach ($ncFiles as $ncFile) |
239 | 239 | { |
240 | 240 | //TODO errors |
241 | - //if (!file_exists($ncFile)) | |
242 | - rename($WORKING_DIR."/".$ncFile,$this->ViDir."/".$ncFile); | |
243 | - system("TimesUpdate -u ".strtolower($id)."_times.nc ".$ncFile); | |
241 | + //if (!file_exists($ncFile)) | |
242 | + rename($WORKING_DIR."/".$ncFile,$this->ViDir."/".$ncFile); | |
243 | + system("TimesUpdate -u ".$this->times." ".$ncFile); | |
244 | 244 | } |
245 | 245 | |
246 | - system("TimesUpdateNoData ".strtolower($id)."_times.nc ".$start." ".$stop); | |
246 | + system("TimesUpdateNoData ".$this->times." ".$start." ".$stop); | |
247 | 247 | |
248 | 248 | chdir($WORKING_DIR); |
249 | 249 | } |
... | ... |