Passed
Push — dev ( b945fa...349874 )
by Salim
12:11
created
src/scripts/delete_form.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 			$actionDetails['reason']=$reason;
48 48
 			Tracker::logActivity($_SESSION['username'], $_SESSION['role'], $_SESSION['study'], $reviewObject->id_visit, "Delete Form", $actionDetails);
49 49
 			$answer=true;
50
-		}catch (Throwable $t) {
50
+		} catch (Throwable $t) {
51 51
 			error_log($t->getMessage());
52 52
 			$answer=false;
53 53
 		}
@@ -57,12 +57,12 @@  discard block
 block discarded – undo
57 57
 		$email->addEmail($email->getUserEmails($reviewObject->username));
58 58
 		$email->sendDeletedFormMessage($visitObject->study, $visitObject->patientCode, $visitObject->visitType);
59 59
 
60
-	}else {
60
+	} else {
61 61
 		$answer=false;
62 62
 	}
63 63
 	
64 64
 	echo(json_encode($answer));
65 65
 	
66
-}else {
66
+} else {
67 67
 	echo(json_encode(false));
68 68
 }
Please login to merge, or discard this patch.
src/scripts/export_users.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 		}
42 42
         
43 43
         
44
-	}else {
44
+	} else {
45 45
 		//Select users from the called study
46 46
 		$studyObject=new Study($study, $linkpdo);
47 47
 		$usersObjectArray=$studyObject->getUsersWithRoleInStudy();
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	fclose($output);
72 72
 
73 73
     
74
-}else {
74
+} else {
75 75
 	header('HTTP/1.0 403 Forbidden');
76 76
 	die('You are not allowed to access this file.'); 
77 77
 }
78 78
\ No newline at end of file
Please login to merge, or discard this patch.
src/scripts/get_review_attached_file.php 1 patch
Braces   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,8 +30,11 @@  discard block
 block discarded – undo
30 30
 
31 31
 if ($accessCheck && in_array($_SESSION['role'], array(User::INVESTIGATOR, User::REVIEWER))) {
32 32
     
33
-	if ($_SESSION['role'] == User::INVESTIGATOR) $reviewObject=$visitObject->getReviewsObject(true);
34
-	else $reviewObject=$visitObject->queryExistingReviewForReviewer($_SESSION['username']);
33
+	if ($_SESSION['role'] == User::INVESTIGATOR) {
34
+		$reviewObject=$visitObject->getReviewsObject(true);
35
+	} else {
36
+		$reviewObject=$visitObject->queryExistingReviewForReviewer($_SESSION['username']);
37
+	}
35 38
 
36 39
 	$filePath=$reviewObject->getAssociatedFilePath($fileKey);
37 40
     
@@ -48,11 +51,11 @@  discard block
 block discarded – undo
48 51
 			flush();
49 52
 		}
50 53
 		fclose($file);
51
-	}else {
54
+	} else {
52 55
 		throw new Exception("Can't Find Attached File");
53 56
 	}
54 57
 
55
-}else {
58
+} else {
56 59
 	header('HTTP/1.0 403 Forbidden');
57 60
 	die('You are not allowed to access this file.');
58 61
 }
59 62
\ No newline at end of file
Please login to merge, or discard this patch.
src/scripts/get_job_progress.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     
33 33
 	echo(json_encode($jobInfos));
34 34
     
35
-}else {
35
+} else {
36 36
 	header('HTTP/1.0 403 Forbidden');
37 37
 	die('You are not allowed to access this file.');
38 38
 }
Please login to merge, or discard this patch.
src/scripts/get_patient_status.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,6 +40,6 @@
 block discarded – undo
40 40
     
41 41
 	echo(json_encode($patientStatus));
42 42
     
43
-}else {
43
+} else {
44 44
 	echo(json_encode("No Access"));
45 45
 }
46 46
\ No newline at end of file
Please login to merge, or discard this patch.
src/scripts/get_series_json.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,6 +74,6 @@
 block discarded – undo
74 74
     
75 75
 	echo(json_encode($json));
76 76
     
77
-}else {
77
+} else {
78 78
 	echo(json_encode("No Access"));
79 79
 }
80 80
\ No newline at end of file
Please login to merge, or discard this patch.
src/scripts/visit.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 if ($_SERVER['REQUEST_METHOD'] === 'GET') {
32 32
 
33
-}else if ($_SERVER['REQUEST_METHOD'] === 'POST') {
33
+} else if ($_SERVER['REQUEST_METHOD'] === 'POST') {
34 34
 
35 35
 	$patientCode=$_POST['patient_num'];
36 36
 	$userObject=new User($username, $linkpdo);
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 				$actionDetails['modality_visit']=$visitObject->visitGroupObject->groupModality;
59 59
 				Tracker::logActivity($username, $_SESSION['role'], $study, $visitObject->id_visit, "Create Visit", $actionDetails);
60 60
 				$answer="Success";
61
-			}else {
61
+			} else {
62 62
 				$answer="Missing Data";
63 63
 			}
64 64
             
@@ -73,6 +73,6 @@  discard block
 block discarded – undo
73 73
 			echo(json_encode($answer));
74 74
 	}   
75 75
 
76
-}else if ($_SERVER['REQUEST_METHOD'] === 'PUT') {
76
+} else if ($_SERVER['REQUEST_METHOD'] === 'PUT') {
77 77
 
78 78
 }
79 79
\ No newline at end of file
Please login to merge, or discard this patch.
src/scripts/unlock_form.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,12 +52,12 @@
 block discarded – undo
52 52
 			$actionDetails['reason']=$reason;
53 53
 			Tracker::logActivity($username, $_SESSION['role'], $study, $visitObject->id_visit, "Unlock Form", $actionDetails);
54 54
 			$answer=true;
55
-		}catch (Exception $e) {
55
+		} catch (Exception $e) {
56 56
 			$answer=false;
57 57
 			error_log($e);			
58 58
 		}
59 59
 		echo(json_encode($answer));
60 60
 
61
-}else {
61
+} else {
62 62
 	echo(json_encode(false));
63 63
 }
Please login to merge, or discard this patch.
src/scripts/reactivate_study.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,13 +41,13 @@
 block discarded – undo
41 41
 		$actionDetails['reason']=$_POST['reason'];
42 42
 		Tracker::logActivity($_SESSION['username'], $_SESSION['role'], $_SESSION['study'], $studyOrthancID->idVisit, "Change Serie", $actionDetails);
43 43
 		$answer=true;
44
-	}catch (Exception $e) {
44
+	} catch (Exception $e) {
45 45
 		$answer=false;
46 46
 		error_log($e);
47 47
 	}
48 48
 
49 49
 	echo(json_encode($answer));
50 50
 
51
-}else {
51
+} else {
52 52
 	echo(json_encode(false));
53 53
 }
Please login to merge, or discard this patch.