@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | |
142 | 142 | if (empty($createdVisitOrder)) { |
143 | 143 | $lastCreatedVisitOrder=-1; |
144 | - }else { |
|
144 | + } else { |
|
145 | 145 | $lastCreatedVisitOrder=max($createdVisitOrder); |
146 | 146 | } |
147 | 147 | |
@@ -154,12 +154,12 @@ discard block |
||
154 | 154 | |
155 | 155 | if ($possibleVisit->visitOrder < $lastCreatedVisitOrder) { |
156 | 156 | $availableVisitName[]=$possibleVisit->name; |
157 | - }else if ($possibleVisit->visitOrder > $lastCreatedVisitOrder) { |
|
157 | + } else if ($possibleVisit->visitOrder > $lastCreatedVisitOrder) { |
|
158 | 158 | if ($possibleVisit->optionalVisit) { |
159 | 159 | //If optional add optional visit and look for the next order |
160 | 160 | $availableVisitName[]=$possibleVisit->name; |
161 | 161 | $lastCreatedVisitOrder++; |
162 | - }else if ($possibleVisit->visitOrder > $lastCreatedVisitOrder) { |
|
162 | + } else if ($possibleVisit->visitOrder > $lastCreatedVisitOrder) { |
|
163 | 163 | $availableVisitName[]=$possibleVisit->name; |
164 | 164 | break; |
165 | 165 | } |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | if (!empty($this->getAvailableVisitsToCreate())) { |
187 | 187 | return true; |
188 | 188 | } |
189 | - }catch (Exception $e) { |
|
189 | + } catch (Exception $e) { |
|
190 | 190 | //if exception happens no visits are missing |
191 | 191 | return false; |
192 | 192 | } |
@@ -231,20 +231,20 @@ discard block |
||
231 | 231 | |
232 | 232 | if ($testedDate >= $dateDownLimit && $testedDate <= $dateDownLimit) { |
233 | 233 | $visitAnswer['compliancy']=Patient_Visit_Manager::COMPLIANCY_YES; |
234 | - }else { |
|
234 | + } else { |
|
235 | 235 | $visitAnswer['compliancy']=Patient_Visit_Manager::COMPLIANCY_NO; |
236 | 236 | } |
237 | - }catch (Exception $e) { |
|
237 | + } catch (Exception $e) { |
|
238 | 238 | //Visit Not Created |
239 | 239 | //If optional visit no status determination |
240 | 240 | if ($visitType->optionalVisit) { |
241 | 241 | $visitAnswer['status']=Patient_Visit_Manager::OPTIONAL_VISIT; |
242 | - }else { |
|
242 | + } else { |
|
243 | 243 | //Compare actual time with theorical date to determine status |
244 | 244 | $testedDate=new DateTime(date("Y-m-d")); |
245 | 245 | if ($testedDate <= $dateUpLimit) { |
246 | 246 | $visitAnswer['status']=Patient_Visit_Manager::PENDING; |
247 | - }else { |
|
247 | + } else { |
|
248 | 248 | $visitAnswer['status']=Patient_Visit_Manager::SHOULD_BE_DONE; |
249 | 249 | } |
250 | 250 | } |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | if ($this->patientObject->patientWithdraw && $visitAnswer['acquisition_date'] == null) { |
255 | 255 | if ($this->patientObject->patientWithdrawDate < $dateDownLimit) { |
256 | 256 | $visitAnswer['status']=Patient_Visit_Manager::VISIT_WITHDRAWN; |
257 | - }else if ($this->patientObject->patientWithdrawDate > $dateDownLimit) { |
|
257 | + } else if ($this->patientObject->patientWithdrawDate > $dateDownLimit) { |
|
258 | 258 | $visitAnswer['status']=Patient_Visit_Manager::VISIT_POSSIBLY_WITHDRAWN; |
259 | 259 | } |
260 | 260 | } |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | |
296 | 296 | if (empty($visitId)) { |
297 | 297 | throw new Exception("Visit Non Existing"); |
298 | - }else { |
|
298 | + } else { |
|
299 | 299 | return new Visit($visitId, $this->linkpdo); |
300 | 300 | } |
301 | 301 | |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | |
311 | 311 | if (empty($visitId)) { |
312 | 312 | throw new Exception("Visit Non Existing"); |
313 | - }else { |
|
313 | + } else { |
|
314 | 314 | return new Visit($visitId, $this->linkpdo); |
315 | 315 | } |
316 | 316 |
@@ -45,20 +45,20 @@ discard block |
||
45 | 45 | //Add upload status / user form in class |
46 | 46 | if ($visitObject->statusDone == Visit::DONE && $visitObject->uploadStatus == Visit::NOT_DONE && $visitObject->stateInvestigatorForm != Visit::DONE) { |
47 | 47 | $class="NotBoth"; |
48 | - }else if ($visitObject->statusDone == Visit::DONE && $visitObject->stateInvestigatorForm != Visit::DONE) { |
|
48 | + } else if ($visitObject->statusDone == Visit::DONE && $visitObject->stateInvestigatorForm != Visit::DONE) { |
|
49 | 49 | $class="NotForm"; |
50 | - }else if ($visitObject->statusDone == Visit::DONE && $visitObject->uploadStatus == Visit::NOT_DONE) { |
|
50 | + } else if ($visitObject->statusDone == Visit::DONE && $visitObject->uploadStatus == Visit::NOT_DONE) { |
|
51 | 51 | $class="NotUpload"; |
52 | - }else { |
|
52 | + } else { |
|
53 | 53 | $class="OK"; |
54 | 54 | } |
55 | - }else if ($this->role == User::CONTROLLER) { |
|
55 | + } else if ($this->role == User::CONTROLLER) { |
|
56 | 56 | if ($visitObject->stateQualityControl == Visit::QC_ACCEPTED || $visitObject->stateQualityControl == Visit::QC_REFUSED) { |
57 | 57 | $class="OK"; |
58 | - }else if ($visitObject->stateQualityControl == Visit::QC_NOT_DONE || $visitObject->stateQualityControl == Visit::QC_WAIT_DEFINITVE_CONCLUSION) { |
|
58 | + } else if ($visitObject->stateQualityControl == Visit::QC_NOT_DONE || $visitObject->stateQualityControl == Visit::QC_WAIT_DEFINITVE_CONCLUSION) { |
|
59 | 59 | $class="NotBoth"; |
60 | 60 | } |
61 | - }else if ($this->role == User::REVIEWER) { |
|
61 | + } else if ($this->role == User::REVIEWER) { |
|
62 | 62 | //Add status of review process (need to remove space from status string) |
63 | 63 | $class=str_replace(" ", "", $visitObject->reviewStatus); ; |
64 | 64 | } |
@@ -145,9 +145,13 @@ discard block |
||
145 | 145 | $resultTree=[]; |
146 | 146 | foreach ($patientsArray as $patientObject) { |
147 | 147 | //If investigator display all created visits |
148 | - if ($this->role == User::INVESTIGATOR) $visitsArray=$patientObject->getAllCreatedPatientsVisits(); |
|
148 | + if ($this->role == User::INVESTIGATOR) { |
|
149 | + $visitsArray=$patientObject->getAllCreatedPatientsVisits(); |
|
150 | + } |
|
149 | 151 | //if Reviewer display all QC accepted visits |
150 | - if ($this->role == User::REVIEWER) $visitsArray=$patientObject->getAllQcDonePatientsVisits(); |
|
152 | + if ($this->role == User::REVIEWER) { |
|
153 | + $visitsArray=$patientObject->getAllQcDonePatientsVisits(); |
|
154 | + } |
|
151 | 155 | $stortedVisits=$this->processVisitsArray($visitsArray); |
152 | 156 | $resultTree[$patientObject->patientCode]['patientObject']=$patientObject; |
153 | 157 | $resultTree[$patientObject->patientCode]['modalities']=$stortedVisits; |
@@ -206,7 +210,7 @@ discard block |
||
206 | 210 | $patientObjectArray=$this->studyObject->getPatientsLinkedToUserCenters($this->username); |
207 | 211 | |
208 | 212 | $treeStructure=$this->makeTreeFromPatients($patientObjectArray); |
209 | - }else if ($this->role == User::CONTROLLER) { |
|
213 | + } else if ($this->role == User::CONTROLLER) { |
|
210 | 214 | |
211 | 215 | $controllerVisitsArray=[]; |
212 | 216 | |
@@ -217,7 +221,7 @@ discard block |
||
217 | 221 | } |
218 | 222 | |
219 | 223 | $treeStructure=$this->makeTreeFromVisits($controllerVisitsArray); |
220 | - }else if ($this->role == User::MONITOR) { |
|
224 | + } else if ($this->role == User::MONITOR) { |
|
221 | 225 | |
222 | 226 | $monitorVisitsArray=[]; |
223 | 227 | |
@@ -228,7 +232,7 @@ discard block |
||
228 | 232 | } |
229 | 233 | |
230 | 234 | $treeStructure=$this->makeTreeFromVisits($monitorVisitsArray); |
231 | - }else if ($this->role == User::REVIEWER) { |
|
235 | + } else if ($this->role == User::REVIEWER) { |
|
232 | 236 | //SK attention une review pending fait reafficher toutes les reviews du patient |
233 | 237 | //que soit la modalite |
234 | 238 | //peut etre jouer avec le job des users pour filtrer le group de visite |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | try { |
39 | 39 | $modalityCreatedVisit=$this->studyObject->getStudySpecificGroupManager($visitGroup->groupModality)->getCreatedVisits(); |
40 | 40 | array_push($this->allcreatedVisits, ...$modalityCreatedVisit); |
41 | - }catch (Exception $e) { } |
|
41 | + } catch (Exception $e) { } |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 | |
@@ -214,12 +214,12 @@ discard block |
||
214 | 214 | $localReviews=[]; |
215 | 215 | try { |
216 | 216 | $localReviews[]=$visitObject->getReviewsObject(true); |
217 | - }catch (Exception $e) { } |
|
217 | + } catch (Exception $e) { } |
|
218 | 218 | |
219 | 219 | $expertReviews=[]; |
220 | 220 | try { |
221 | 221 | $expertReviews=$visitObject->getReviewsObject(false); |
222 | - }catch (Exception $e) { } |
|
222 | + } catch (Exception $e) { } |
|
223 | 223 | |
224 | 224 | //Merge all reviews in an array |
225 | 225 | $reviewObjects=array_merge($localReviews, $expertReviews); |
@@ -314,29 +314,29 @@ discard block |
||
314 | 314 | |
315 | 315 | if ($visitObject->statusDone == Visit::NOT_DONE) { |
316 | 316 | return 0; |
317 | - }else if ($visitObject->uploadStatus == Visit::NOT_DONE || $visitObject->stateInvestigatorForm == Visit::NOT_DONE) { |
|
317 | + } else if ($visitObject->uploadStatus == Visit::NOT_DONE || $visitObject->stateInvestigatorForm == Visit::NOT_DONE) { |
|
318 | 318 | if ($visitObject->uploadStatus == Visit::NOT_DONE && $visitObject->stateInvestigatorForm == Visit::NOT_DONE) { |
319 | 319 | return 1; |
320 | - }else if ($visitObject->stateInvestigatorForm == Visit::NOT_DONE) { |
|
320 | + } else if ($visitObject->stateInvestigatorForm == Visit::NOT_DONE) { |
|
321 | 321 | return 3; |
322 | - }else if ($visitObject->uploadStatus == Visit::NOT_DONE) { |
|
322 | + } else if ($visitObject->uploadStatus == Visit::NOT_DONE) { |
|
323 | 323 | return 2; |
324 | 324 | } |
325 | - }else if ($visitObject->qcStatus == Visit::QC_NOT_DONE) { |
|
325 | + } else if ($visitObject->qcStatus == Visit::QC_NOT_DONE) { |
|
326 | 326 | return 4; |
327 | - }else if ($visitObject->qcStatus == Visit::QC_CORRECTIVE_ACTION_ASKED) { |
|
327 | + } else if ($visitObject->qcStatus == Visit::QC_CORRECTIVE_ACTION_ASKED) { |
|
328 | 328 | return 5; |
329 | - }else if ($visitObject->qcStatus == Visit::QC_REFUSED) { |
|
329 | + } else if ($visitObject->qcStatus == Visit::QC_REFUSED) { |
|
330 | 330 | return 6; |
331 | - }else if ($visitObject->reviewStatus == Visit::NOT_DONE) { |
|
331 | + } else if ($visitObject->reviewStatus == Visit::NOT_DONE) { |
|
332 | 332 | return 7; |
333 | - }else if ($visitObject->reviewStatus == Visit::REVIEW_ONGOING) { |
|
333 | + } else if ($visitObject->reviewStatus == Visit::REVIEW_ONGOING) { |
|
334 | 334 | return 8; |
335 | - }else if ($visitObject->reviewStatus == Visit::REVIEW_WAIT_ADJUDICATION) { |
|
335 | + } else if ($visitObject->reviewStatus == Visit::REVIEW_WAIT_ADJUDICATION) { |
|
336 | 336 | return 9; |
337 | - }else if ($visitObject->reviewStatus == Visit::REVIEW_DONE) { |
|
337 | + } else if ($visitObject->reviewStatus == Visit::REVIEW_DONE) { |
|
338 | 338 | return 10; |
339 | - }else { |
|
339 | + } else { |
|
340 | 340 | //If none of these case return -1, should not happen |
341 | 341 | return -1; |
342 | 342 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | foreach ($reviewsObjects as $reviewObject) { |
84 | 84 | |
85 | 85 | foreach ($reviewObject->associatedFiles as $associatedFileKey => $associatedFilePath) { |
86 | - $associatedFileLocation = $reviewObject->getAssociatedFilePath($associatedFileKey); |
|
86 | + $associatedFileLocation=$reviewObject->getAssociatedFilePath($associatedFileKey); |
|
87 | 87 | $zip->addFile($associatedFileLocation); |
88 | 88 | |
89 | 89 | }; |
@@ -256,9 +256,9 @@ discard block |
||
256 | 256 | $reviewDatas=$this->getGenericData($review); |
257 | 257 | $specificData=$review->getSpecificData(); |
258 | 258 | unset($specificData["id_review"]); |
259 | - $specificDataArray = []; |
|
260 | - if( !empty($specificData) ){ |
|
261 | - $specificDataArray = array_values($specificData); |
|
259 | + $specificDataArray=[]; |
|
260 | + if (!empty($specificData)) { |
|
261 | + $specificDataArray=array_values($specificData); |
|
262 | 262 | } |
263 | 263 | $reviewLine=[...$reviewDatas, ...$specificDataArray]; |
264 | 264 |
@@ -47,10 +47,10 @@ discard block |
||
47 | 47 | session_unset(); // unset $_SESSION variable for the run-time |
48 | 48 | session_destroy(); // destroy session data in storage |
49 | 49 | self::redirectAndEndScript(); |
50 | - }else if (empty($_SESSION)) { |
|
50 | + } else if (empty($_SESSION)) { |
|
51 | 51 | //if session already empty |
52 | 52 | self::redirectAndEndScript(); |
53 | - }else { |
|
53 | + } else { |
|
54 | 54 | $_SESSION['LAST_ACTIVITY']=time(); // update last activity time stamp |
55 | 55 | } |
56 | 56 | |
@@ -84,14 +84,16 @@ discard block |
||
84 | 84 | //Instanciate PDO connexion with SSL or not |
85 | 85 | if (DATABASE_SSL) { |
86 | 86 | $linkpdo=new PDO('mysql:host='.DATABASE_HOST.';dbname='.DATABASE_NAME.';charset=UTF8', ''.DATABASE_USERNAME.'', ''.DATABASE_PASSWORD.'', self::getSSLPDOArrayOptions()); |
87 | - }else { |
|
87 | + } else { |
|
88 | 88 | $linkpdo=new PDO('mysql:host='.DATABASE_HOST.';dbname='.DATABASE_NAME.';charset=UTF8', ''.DATABASE_USERNAME.'', ''.DATABASE_PASSWORD.''); |
89 | 89 | } |
90 | 90 | |
91 | 91 | $linkpdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
92 | 92 | |
93 | 93 | //Load preferences from the database |
94 | - if (!defined('GAELO_PATIENT_CODE_LENGHT')) Session::loadPreferencesInConstants($linkpdo); |
|
94 | + if (!defined('GAELO_PATIENT_CODE_LENGHT')) { |
|
95 | + Session::loadPreferencesInConstants($linkpdo); |
|
96 | + } |
|
95 | 97 | |
96 | 98 | return $linkpdo; |
97 | 99 | } |
@@ -121,7 +123,7 @@ discard block |
||
121 | 123 | $log->pushHandler(new RotatingFileHandler($_SERVER["DOCUMENT_ROOT"].'/data/logs/gaelO.log', Logger::INFO)); |
122 | 124 | $log->pushProcessor(new WebProcessor()); |
123 | 125 | $log->info($stringInfo); |
124 | - }else { |
|
126 | + } else { |
|
125 | 127 | error_log("Can't write logs folder"); |
126 | 128 | } |
127 | 129 | } |
@@ -37,8 +37,11 @@ discard block |
||
37 | 37 | public function hasPrevious() |
38 | 38 | { |
39 | 39 | $this->previous(); |
40 | - if ($this->valid()) return $this->current(); |
|
41 | - else return false; |
|
40 | + if ($this->valid()) { |
|
41 | + return $this->current(); |
|
42 | + } else { |
|
43 | + return false; |
|
44 | + } |
|
42 | 45 | } |
43 | 46 | |
44 | 47 | public function next() |
@@ -49,8 +52,11 @@ discard block |
||
49 | 52 | public function hasNext() |
50 | 53 | { |
51 | 54 | $this->next(); |
52 | - if ($this->valid()) return $this->current(); |
|
53 | - else return false; |
|
55 | + if ($this->valid()) { |
|
56 | + return $this->current(); |
|
57 | + } else { |
|
58 | + return false; |
|
59 | + } |
|
54 | 60 | } |
55 | 61 | |
56 | 62 | public function rewind() |
@@ -34,7 +34,7 @@ |
||
34 | 34 | 'role' => $role |
35 | 35 | )); |
36 | 36 | |
37 | - }else { |
|
37 | + } else { |
|
38 | 38 | $queryTracker=$linkpdo->prepare('SELECT * FROM tracker WHERE study = :study AND role=:role'); |
39 | 39 | $queryTracker->execute(array('study' => $study, |
40 | 40 | 'role' => $role, |
@@ -33,8 +33,11 @@ discard block |
||
33 | 33 | $this->userRole=$userRole; |
34 | 34 | $this->linkpdo=$linkpdo; |
35 | 35 | |
36 | - if ($this->endsWith($requestedURI, "/series")) $this->isStudyMetadataRequested=true; |
|
37 | - else $this->isSerieRequested=true; |
|
36 | + if ($this->endsWith($requestedURI, "/series")) { |
|
37 | + $this->isStudyMetadataRequested=true; |
|
38 | + } else { |
|
39 | + $this->isSerieRequested=true; |
|
40 | + } |
|
38 | 41 | |
39 | 42 | } |
40 | 43 | |
@@ -55,8 +58,11 @@ discard block |
||
55 | 58 | * @return string |
56 | 59 | */ |
57 | 60 | private function getUID() { |
58 | - if ($this->isSerieRequested) $level="series"; |
|
59 | - else if ($this->isStudyMetadataRequested) $level="studies"; |
|
61 | + if ($this->isSerieRequested) { |
|
62 | + $level="series"; |
|
63 | + } else if ($this->isStudyMetadataRequested) { |
|
64 | + $level="studies"; |
|
65 | + } |
|
60 | 66 | $studySubString=strstr($this->requestedURI, "/".$level."/"); |
61 | 67 | $studySubString=str_replace("/".$level."/", "", $studySubString); |
62 | 68 | $endStudyUIDPosition=strpos($studySubString, "/"); |
@@ -73,12 +79,16 @@ discard block |
||
73 | 79 | |
74 | 80 | if ($this->isSerieRequested) { |
75 | 81 | $seriesObject=Series_Details::getSerieObjectByUID($uid, $this->linkpdo); |
76 | - if ($this->userRole != User::SUPERVISOR && $seriesObject->deleted) throw new Exception('Deleted Series'); |
|
82 | + if ($this->userRole != User::SUPERVISOR && $seriesObject->deleted) { |
|
83 | + throw new Exception('Deleted Series'); |
|
84 | + } |
|
77 | 85 | $studyObject=$seriesObject->studyDetailsObject; |
78 | 86 | |
79 | - }else if ($this->isStudyMetadataRequested) { |
|
87 | + } else if ($this->isStudyMetadataRequested) { |
|
80 | 88 | $studyObject=Study_Details::getStudyObjectByUID($uid, $this->linkpdo); |
81 | - if ($this->userRole != User::SUPERVISOR && $studyObject->deleted) throw new Exception('Deleted Study'); |
|
89 | + if ($this->userRole != User::SUPERVISOR && $studyObject->deleted) { |
|
90 | + throw new Exception('Deleted Study'); |
|
91 | + } |
|
82 | 92 | } |
83 | 93 | |
84 | 94 | return $studyObject->idVisit; |
@@ -98,14 +108,14 @@ discard block |
||
98 | 108 | if ($this->userRole == User::REVIEWER || ($this->userRole == User::INVESTIGATOR && $visitObject->uploadStatus == Visit::DONE)) { |
99 | 109 | //Check that visit is in patient that is still awaiting for some reviews |
100 | 110 | $visitCheck=$this->userObject->isVisitAllowed($id_visit, $this->userRole); |
101 | - }else if ($this->userRole == User::CONTROLLER) { |
|
111 | + } else if ($this->userRole == User::CONTROLLER) { |
|
102 | 112 | //Check that QC status still require an action from Controller |
103 | 113 | if (in_array($visitObject->stateQualityControl, array(Visit::QC_WAIT_DEFINITVE_CONCLUSION, Visit::QC_NOT_DONE))) { |
104 | 114 | $visitCheck=$this->userObject->isVisitAllowed($id_visit, $this->userRole); |
105 | 115 | } |
106 | - }else if ($this->userRole == User::SUPERVISOR) { |
|
116 | + } else if ($this->userRole == User::SUPERVISOR) { |
|
107 | 117 | $visitCheck=$this->userObject->isVisitAllowed($id_visit, $this->userRole); |
108 | - }else { |
|
118 | + } else { |
|
109 | 119 | //Other roles can't have access to images |
110 | 120 | $visitCheck=false; |
111 | 121 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | 'http' => array( |
43 | 43 | 'header' => "Authorization: Basic ".base64_encode(GAELO_ORTHANC_EXPOSED_INTERNAL_LOGIN.':'.GAELO_ORTHANC_EXPOSED_INTERNAL_PASSWORD) |
44 | 44 | )); |
45 | - }else { |
|
45 | + } else { |
|
46 | 46 | $this->url=GAELO_ORTHANC_PACS_ADDRESS.':'.GAELO_ORTHANC_PACS_PORT; |
47 | 47 | $this->context=array( |
48 | 48 | 'http' => array( |
@@ -297,7 +297,11 @@ discard block |
||
297 | 297 | return $answer; |
298 | 298 | } |
299 | 299 | |
300 | - if (!$gzip) $data['Compression']="none"; else $data['Compression']="gzip"; |
|
300 | + if (!$gzip) { |
|
301 | + $data['Compression']="none"; |
|
302 | + } else { |
|
303 | + $data['Compression']="gzip"; |
|
304 | + } |
|
301 | 305 | |
302 | 306 | $data['Peer']=$peer; |
303 | 307 | |
@@ -342,7 +346,7 @@ discard block |
||
342 | 346 | $context=stream_context_create($opts); |
343 | 347 | $result=file_get_contents($this->url.'/instances', false, $context); |
344 | 348 | |
345 | - }catch (Exception $e1) { |
|
349 | + } catch (Exception $e1) { |
|
346 | 350 | error_log("Error during import Dcm ".$e1->getMessage()); |
347 | 351 | } |
348 | 352 | return $result; |
@@ -407,7 +411,7 @@ discard block |
||
407 | 411 | $tagsObjects[]=new TagAnon("0008,103E", TagAnon::KEEP); //series Description |
408 | 412 | |
409 | 413 | |
410 | - }else if ($profile == "Full") { |
|
414 | + } else if ($profile == "Full") { |
|
411 | 415 | $date=TagAnon::CLEAR; |
412 | 416 | $body=TagAnon::CLEAR; |
413 | 417 | |
@@ -471,7 +475,7 @@ discard block |
||
471 | 475 | |
472 | 476 | if ($tag->choice == TagAnon::REPLACE) { |
473 | 477 | $jsonArrayAnon['Replace'][$tag->tag]=$tag->newValue; |
474 | - }else if ($tag->choice == TagAnon::KEEP) { |
|
478 | + } else if ($tag->choice == TagAnon::KEEP) { |
|
475 | 479 | $jsonArrayAnon['Keep'][]=$tag->tag; |
476 | 480 | } |
477 | 481 |
@@ -130,8 +130,8 @@ |
||
130 | 130 | |
131 | 131 | $context=stream_context_create($opts); |
132 | 132 | |
133 | - $tempFile = tmpfile(); |
|
134 | - stream_copy_to_stream ( fopen($this->url.'/tools/create-archive', 'rb', false, $context) , $tempFile); |
|
133 | + $tempFile=tmpfile(); |
|
134 | + stream_copy_to_stream(fopen($this->url.'/tools/create-archive', 'rb', false, $context), $tempFile); |
|
135 | 135 | |
136 | 136 | return $tempFile; |
137 | 137 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | public static function getCountryCode(PDO $linkpdo, string $countryName) { |
48 | 48 | if (GAELO_COUNTRY_LANGUAGE == "FR") { |
49 | 49 | $request="SELECT country_code FROM country WHERE country_fr = :countryName"; |
50 | - }else if (GAELO_COUNTRY_LANGUAGE == "US") { |
|
50 | + } else if (GAELO_COUNTRY_LANGUAGE == "US") { |
|
51 | 51 | $request="SELECT country_code FROM country WHERE country_us = :countryName"; |
52 | 52 | } |
53 | 53 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | if ($onlyActivated) { |
71 | 71 | $connecter=$linkpdo->prepare('SELECT name FROM studies WHERE active=1 ORDER BY name'); |
72 | - }else { |
|
72 | + } else { |
|
73 | 73 | $connecter=$linkpdo->prepare('SELECT name FROM studies ORDER BY name'); |
74 | 74 | } |
75 | 75 | $connecter->execute(); |
@@ -240,12 +240,12 @@ discard block |
||
240 | 240 | try { |
241 | 241 | if (DATABASE_SSL) { |
242 | 242 | $dump=new IMysqldump\Mysqldump('mysql:host='.DATABASE_HOST.';dbname='.DATABASE_NAME.'', ''.DATABASE_USERNAME.'', ''.DATABASE_PASSWORD.'', array(), Session::getSSLPDOArrayOptions()); |
243 | - }else { |
|
243 | + } else { |
|
244 | 244 | $dump=new IMysqldump\Mysqldump('mysql:host='.DATABASE_HOST.';dbname='.DATABASE_NAME.'', ''.DATABASE_USERNAME.'', ''.DATABASE_PASSWORD.''); |
245 | 245 | } |
246 | 246 | |
247 | 247 | $dump->start($fileSql); |
248 | - }catch (Exception $e) { |
|
248 | + } catch (Exception $e) { |
|
249 | 249 | echo 'mysqldump-php error: '.$e->getMessage(); |
250 | 250 | } |
251 | 251 |