Completed
Pull Request — master (#140)
by Christopher
07:52
created
public/old/locations.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
         }
55 55
 
56 56
         // After we have inserted the data, we want to head back to the main users page
57
-     header('Location: locations.php'); // Move to the home page of the admin section
58
-      exit;
57
+        header('Location: locations.php'); // Move to the home page of the admin section
58
+        exit;
59 59
     }
60 60
 }
61 61
 
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
 	</form>
122 122
 </div><!-- /.box -->
123 123
   <?php
124
-  if (isAdmin()) {
125
-      ?>
124
+    if (isAdmin()) {
125
+        ?>
126 126
   <div id="right">
127 127
   		<div class="item"><a href="settings.php">Back to settings</a></div>
128 128
 <?php
129
-  } ?>
129
+    } ?>
130 130
 <?php include 'includes/footer.php'; ?>
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     exit;
15 15
 }
16 16
 if (!isAdmin()) {
17
-    header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME']));
17
+    header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME']));
18 18
     exit;
19 19
 }
20 20
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             $sql = "UPDATE locations SET name = '$name' WHERE id = '$editid'";
40 40
         }
41 41
         if (!mysqli_query(db(), $sql)) {
42
-            die('Error: '.mysqli_error(db()));
42
+            die('Error: ' . mysqli_error(db()));
43 43
         }
44 44
     } else {
45 45
         $newlocation = $_POST['newlocation'];
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
         $sql = ("INSERT INTO locations (name) VALUES ('$newlocation')");
52 52
         if (!mysqli_query(db(), $sql)) {
53
-            die('Error: '.mysqli_error(db()));
53
+            die('Error: ' . mysqli_error(db()));
54 54
         }
55 55
 
56 56
         // After we have inserted the data, we want to head back to the main users page
@@ -95,8 +95,8 @@  discard block
 block discarded – undo
95 95
 
96 96
     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
97 97
         $locationID = $row['id'];
98
-        echo "<span id='".$locationID."' class='edit'>".$row['name'].'</span> ';
99
-        echo " <a href='locations.php?locationremove=true&locationID=".$locationID."'><i class='fa fa-close'></i></a><br />";
98
+        echo "<span id='" . $locationID . "' class='edit'>" . $row['name'] . '</span> ';
99
+        echo " <a href='locations.php?locationremove=true&locationID=" . $locationID . "'><i class='fa fa-close'></i></a><br />";
100 100
     } ?>
101 101
  </div><!-- /.box-body -->
102 102
 </div><!-- /.box -->
Please login to merge, or discard this patch.
public/old/plugins/datatables/extensions/Scroller/examples/data/ssp.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@
 block discarded – undo
29 29
 // parameter represents the DataTables column identifier. In this case simple
30 30
 // indexes
31 31
 $columns = [
32
-    ['db' => 'id',         'dt' => 0],
33
-    ['db' => 'firstname',  'dt' => 1],
34
-    ['db' => 'surname',    'dt' => 2],
35
-    ['db' => 'zip',        'dt' => 3],
36
-    ['db' => 'country',    'dt' => 4],
32
+    ['db' => 'id', 'dt' => 0],
33
+    ['db' => 'firstname', 'dt' => 1],
34
+    ['db' => 'surname', 'dt' => 2],
35
+    ['db' => 'zip', 'dt' => 3],
36
+    ['db' => 'country', 'dt' => 4],
37 37
 ];
38 38
 
39 39
 // SQL server connection information
Please login to merge, or discard this patch.
public/old/notification.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 } else {
34 34
     $notificationId = getQueryStringForKey('id');
35 35
     $referer = getQueryStringForKey('click');
36
-    $_SESSION['redirectUrl'] = siteSettings()->getSiteUrl().'/notification.php?id='.$notificationId.'&click='.$referer;
36
+    $_SESSION['redirectUrl'] = siteSettings()->getSiteUrl() . '/notification.php?id=' . $notificationId . '&click=' . $referer;
37 37
     header('Location: login.php');
38 38
     exit;
39 39
 }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     // redir if notification has URL
61 61
     $redir = notificationLink($notificationId);
62 62
     if (!empty($redir)) {
63
-        header('Location: '.$redir);
63
+        header('Location: ' . $redir);
64 64
     }
65 65
 
66 66
     // find notification
Please login to merge, or discard this patch.
src/classes/Controller/UserController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
     public function getUserEditForm(ServerRequestInterface $request, ResponseInterface $response, $args)
99 99
     {
100
-        $this->logger->info("Fetch user GET '/user/".$args['id']."/edit'");
100
+        $this->logger->info("Fetch user GET '/user/" . $args['id'] . "/edit'");
101 101
         $u = UserQuery::create()->findPK($args['id']);
102 102
 
103 103
         if (is_null($u)) {
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
     public function getUser(ServerRequestInterface $request, ResponseInterface $response, $args)
114 114
     {
115
-        $this->logger->info("Fetch user GET '/user/".$args['id']."'");
115
+        $this->logger->info("Fetch user GET '/user/" . $args['id'] . "'");
116 116
         $u = UserQuery::create()->findPK($args['id']);
117 117
 
118 118
         if (is_null($u)) {
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
     public function getUserWidgetOnly(ServerRequestInterface $request, ResponseInterface $response, $args)
129 129
     {
130
-        $this->logger->info("Fetch user GET '/user/".$args['id']."'");
130
+        $this->logger->info("Fetch user GET '/user/" . $args['id'] . "'");
131 131
         $u = UserQuery::create()->findPK($args['id']);
132 132
 
133 133
         if (is_null($u)) {
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
     public function getUserPasswordForm(ServerRequestInterface $request, ResponseInterface $response, $args)
144 144
     {
145
-        $this->logger->info("Fetch user GET '/user/".$args['id']."/password'");
145
+        $this->logger->info("Fetch user GET '/user/" . $args['id'] . "/password'");
146 146
         $u = UserQuery::create()->findPK($args['id']);
147 147
 
148 148
         if (is_null($u)) {
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
     public function postUserPasswordChange(ServerRequestInterface $request, ResponseInterface $response, $args)
159 159
     {
160
-        $this->logger->info("Create user POST '/user/".$args['id']."/password'");
160
+        $this->logger->info("Create user POST '/user/" . $args['id'] . "/password'");
161 161
 
162 162
         $data = $request->getParsedBody();
163 163
 
Please login to merge, or discard this patch.
src/classes/AuthProvider/Callback/FacebookAuth.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
         $path = $this->router->pathFor('login-callback', ['provider' => $this->getAuthProviderSlug()]);
45 45
 
46
-        $url = $this->baseUrl.$path;
46
+        $url = $this->baseUrl . $path;
47 47
 
48 48
         return $helper->getLoginUrl($url, $this->permissions);
49 49
     }
@@ -56,12 +56,12 @@  discard block
 block discarded – undo
56 56
             $accessToken = $helper->getAccessToken();
57 57
         } catch (FacebookResponseException $e) {
58 58
             // When Graph returns an error
59
-            echo 'Graph returned an error: '.$e->getMessage();
59
+            echo 'Graph returned an error: ' . $e->getMessage();
60 60
 
61 61
             return false;
62 62
         } catch (FacebookSDKException $e) {
63 63
             // When validation fails or other local issues
64
-            echo 'Facebook SDK returned an error: '.$e->getMessage();
64
+            echo 'Facebook SDK returned an error: ' . $e->getMessage();
65 65
 
66 66
             return false;
67 67
         }
@@ -69,10 +69,10 @@  discard block
 block discarded – undo
69 69
         if (!isset($accessToken)) {
70 70
             if ($helper->getError()) {
71 71
                 header('HTTP/1.0 401 Unauthorized');
72
-                echo 'Error: '.$helper->getError()."\n";
73
-                echo 'Error Code: '.$helper->getErrorCode()."\n";
74
-                echo 'Error Reason: '.$helper->getErrorReason()."\n";
75
-                echo 'Error Description: '.$helper->getErrorDescription()."\n";
72
+                echo 'Error: ' . $helper->getError() . "\n";
73
+                echo 'Error Code: ' . $helper->getErrorCode() . "\n";
74
+                echo 'Error Reason: ' . $helper->getErrorReason() . "\n";
75
+                echo 'Error Description: ' . $helper->getErrorDescription() . "\n";
76 76
             } else {
77 77
                 header('HTTP/1.0 400 Bad Request');
78 78
                 echo 'Bad request';
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             try {
99 99
                 $accessToken = $oAuth2Client->getLongLivedAccessToken($accessToken);
100 100
             } catch (FacebookSDKException $e) {
101
-                echo '<p>Error getting long-lived access token: '.$helper->getMessage()."</p>\n\n";
101
+                echo '<p>Error getting long-lived access token: ' . $helper->getMessage() . "</p>\n\n";
102 102
 
103 103
                 return false;
104 104
             }
@@ -122,10 +122,10 @@  discard block
 block discarded – undo
122 122
             // Returns a `Facebook\FacebookResponse` object
123 123
             $response = $this->facebook->get('/me?fields=id,name,email', $accessToken);
124 124
         } catch (Facebook\Exceptions\FacebookResponseException $e) {
125
-            echo 'Graph returned an error: '.$e->getMessage();
125
+            echo 'Graph returned an error: ' . $e->getMessage();
126 126
             exit;
127 127
         } catch (Facebook\Exceptions\FacebookSDKException $e) {
128
-            echo 'Facebook SDK returned an error: '.$e->getMessage();
128
+            echo 'Facebook SDK returned an error: ' . $e->getMessage();
129 129
             exit;
130 130
         }
131 131
 
Please login to merge, or discard this patch.
public/old/error.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 <br>
47 47
 The following error has occurred
48 48
 <?php
49
-echo " on page '".$page."':<br><br>";
49
+echo " on page '" . $page . "':<br><br>";
50 50
     echo '<strong>';
51 51
 
52 52
     switch ($no) {
Please login to merge, or discard this patch.
src/classes/Controller/AuthController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
     public function getLoginAuth(ServerRequestInterface $request, ResponseInterface $response, $args)
80 80
     {
81
-        $this->logger->info("Login auth GET '/login/".$args['provider']."'");
81
+        $this->logger->info("Login auth GET '/login/" . $args['provider'] . "'");
82 82
 
83 83
         // login
84 84
         $authUrl = $this->auth->getCallbackUrl();
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
     public function getLoginCallback(ServerRequestInterface $request, ResponseInterface $response, $args)
90 90
     {
91
-        $this->logger->info("Login auth GET '/login/".$args['provider']."/callback'");
91
+        $this->logger->info("Login auth GET '/login/" . $args['provider'] . "/callback'");
92 92
 
93 93
         // login
94 94
         try {
Please login to merge, or discard this patch.
src/classes/Controller/ResourceController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
     public function getResourceEditForm(ServerRequestInterface $request, ResponseInterface $response, $args)
63 63
     {
64
-        $this->logger->info("Fetch resource GET '/resource/".$args['id']."/edit'");
64
+        $this->logger->info("Fetch resource GET '/resource/" . $args['id'] . "/edit'");
65 65
         $d = DocumentQuery::create()->findPK($args['id']);
66 66
 
67 67
         if (!is_null($d)) {
@@ -73,15 +73,15 @@  discard block
 block discarded – undo
73 73
 
74 74
     public function getResourceFile(ServerRequestInterface $request, ResponseInterface $response, $args)
75 75
     {
76
-        $this->logger->info("Fetch resource GET '/resource/".$args['id']."'");
76
+        $this->logger->info("Fetch resource GET '/resource/" . $args['id'] . "'");
77 77
         $resource = DocumentQuery::create()->findPk($args['id']);
78
-        $directory = __DIR__.'/../../../documents/';
78
+        $directory = __DIR__ . '/../../../documents/';
79 79
 
80 80
         if (!is_null($resource)) {
81
-            if (file_exists($directory.$resource->getUrl())) {
82
-                $file = $directory.$resource->getUrl();
83
-            } elseif (file_exists($directory.$resource->getId())) {
84
-                $file = $directory.$resource->getId();
81
+            if (file_exists($directory . $resource->getUrl())) {
82
+                $file = $directory . $resource->getUrl();
83
+            } elseif (file_exists($directory . $resource->getId())) {
84
+                $file = $directory . $resource->getId();
85 85
             } else {
86 86
                 return $this->view->render($response, 'error.twig');
87 87
             }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                             ->withHeader('Content-Type', 'application/download')
96 96
                             ->withHeader('Content-Description', 'File Transfer')
97 97
                             ->withHeader('Content-Transfer-Encoding', 'binary')
98
-                            ->withHeader('Content-Disposition', 'attachment; filename="'.$resource->getUrl().'"')
98
+                            ->withHeader('Content-Disposition', 'attachment; filename="' . $resource->getUrl() . '"')
99 99
                             ->withHeader('Expires', '0')
100 100
                             ->withHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0')
101 101
                             ->withHeader('Pragma', 'public')
Please login to merge, or discard this patch.
src/classes/Controller/GroupController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 {
14 14
     public function getGroup(ServerRequestInterface $request, ResponseInterface $response, $args)
15 15
     {
16
-        $this->logger->info("Fetch group GET '/group/".$args['id']."'");
16
+        $this->logger->info("Fetch group GET '/group/" . $args['id'] . "'");
17 17
         $events = EventQuery::create()
18 18
             ->useEventPersonQuery()
19 19
                 ->useUserRoleQuery()
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
     public function getGroupRoles(ServerRequestInterface $request, ResponseInterface $response, $args)
38 38
     {
39
-        $this->logger->info("Fetch group roles GET '/group/".$args['id']."/roles'");
39
+        $this->logger->info("Fetch group roles GET '/group/" . $args['id'] . "/roles'");
40 40
         $events = EventQuery::create()
41 41
             ->useEventPersonQuery()
42 42
                 ->useUserRoleQuery()
@@ -58,14 +58,14 @@  discard block
 block discarded – undo
58 58
                 ->findPk($args['id']);
59 59
 
60 60
         // temporary redirect
61
-        return $response->withStatus(302)->withHeader('Location', $this->router->pathFor('home').'old/roles.php');
61
+        return $response->withStatus(302)->withHeader('Location', $this->router->pathFor('home') . 'old/roles.php');
62 62
 
63 63
         return $this->view->render($response, 'group-roles.twig', ['events' => $events, 'group' => $group]);
64 64
     }
65 65
 
66 66
     public function postGroup(ServerRequestInterface $request, ResponseInterface $response, $args)
67 67
     {
68
-        $this->logger->info("Create/edit group POST '/group/".$args['id']."'");
68
+        $this->logger->info("Create/edit group POST '/group/" . $args['id'] . "'");
69 69
 
70 70
         $group = new Group();
71 71
 
Please login to merge, or discard this patch.