Commit 56228bb6388f95861e1268cbe2ca5f786790d96c
1 parent
ac1a3b86
Exists in
master
and in
42 other branches
Create Tt.xml and WsParams.xml files in user workspace if not exists during a WebService call
Showing
1 changed file
with
9 additions
and
2 deletions
Show diff stats
php/WebServices/WebServer.php
... | ... | @@ -130,8 +130,11 @@ class WebServer |
130 | 130 | $tagName = $object == "timetables" ? "timeTableList" : "catalogList"; |
131 | 131 | } |
132 | 132 | else { |
133 | - if (!@$dom->load(USERWSDIR.'Tt.xml')) | |
134 | - $this->throwError("workspaceError", "Workspace Error : Cannot load TimeTable list for ".$this->userID); | |
133 | + if (!file_exists(USERWSDIR.'Tt.xml')) { | |
134 | + $ttMgr = new TimeTableMgr(); | |
135 | + } | |
136 | + if (!@$dom->load(USERWSDIR.'Tt.xml')) | |
137 | + $this->throwError("workspaceError", "Workspace Error : Cannot load TimeTable list for ".$this->userID); | |
135 | 138 | $tagName = $object == "timetables" ? "timetabList" : "catalogList"; |
136 | 139 | } |
137 | 140 | |
... | ... | @@ -382,6 +385,10 @@ class WebServer |
382 | 385 | // $this->throwError('workspaceError', 'No Amda Local DataBase Parameters description file for '.$this->userID); |
383 | 386 | |
384 | 387 | $this->excludePrivateNodes($locParamSrc,$locParamDst); |
388 | + | |
389 | + if (!file_exists($wsParamSrc)) { | |
390 | + $paramMgr = new DerivedParamMgr('derivedParam'); | |
391 | + } | |
385 | 392 | |
386 | 393 | if (($this->userID == WSConfigClass::getAnonymousUserName()) || !copy($wsParamSrc, WSConfigClass::getWsResultDir().$wsParamDst)) |
387 | 394 | return array('success' => true,'ParameterList' => |
... | ... |