Completed
Pull Request — master (#6)
by Christopher
07:12
created
public/old/fb-callback.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@
 block discarded – undo
15 15
 session_start();
16 16
 
17 17
 $fb = new Facebook\Facebook([
18
-  'app_id'                => $config['auth']['facebook']['appId'],
19
-  'app_secret'            => $config['auth']['facebook']['appSecret'],
20
-  'default_graph_version' => 'v2.2',
21
-  ]);
18
+    'app_id'                => $config['auth']['facebook']['appId'],
19
+    'app_secret'            => $config['auth']['facebook']['appSecret'],
20
+    'default_graph_version' => 'v2.2',
21
+    ]);
22 22
 
23 23
 $helper = $fb->getRedirectLoginHelper();
24 24
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -26,21 +26,21 @@  discard block
 block discarded – undo
26 26
     $accessToken = $helper->getAccessToken();
27 27
 } catch (Facebook\Exceptions\FacebookResponseException $e) {
28 28
     // When Graph returns an error
29
-    echo 'Graph returned an error: '.$e->getMessage();
29
+    echo 'Graph returned an error: ' . $e->getMessage();
30 30
     exit;
31 31
 } catch (Facebook\Exceptions\FacebookSDKException $e) {
32 32
     // When validation fails or other local issues
33
-    echo 'Facebook SDK returned an error: '.$e->getMessage();
33
+    echo 'Facebook SDK returned an error: ' . $e->getMessage();
34 34
     exit;
35 35
 }
36 36
 
37 37
 if (!isset($accessToken)) {
38 38
     if ($helper->getError()) {
39 39
         header('HTTP/1.0 401 Unauthorized');
40
-        echo 'Error: '.$helper->getError()."\n";
41
-        echo 'Error Code: '.$helper->getErrorCode()."\n";
42
-        echo 'Error Reason: '.$helper->getErrorReason()."\n";
43
-        echo 'Error Description: '.$helper->getErrorDescription()."\n";
40
+        echo 'Error: ' . $helper->getError() . "\n";
41
+        echo 'Error Code: ' . $helper->getErrorCode() . "\n";
42
+        echo 'Error Reason: ' . $helper->getErrorReason() . "\n";
43
+        echo 'Error Description: ' . $helper->getErrorDescription() . "\n";
44 44
     } else {
45 45
         header('HTTP/1.0 400 Bad Request');
46 46
         echo 'Bad request';
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     try {
66 66
         $accessToken = $oAuth2Client->getLongLivedAccessToken($accessToken);
67 67
     } catch (Facebook\Exceptions\FacebookSDKException $e) {
68
-        echo '<p>Error getting long-lived access token: '.$helper->getMessage()."</p>\n\n";
68
+        echo '<p>Error getting long-lived access token: ' . $helper->getMessage() . "</p>\n\n";
69 69
         exit;
70 70
     }
71 71
 }
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 } else {
79 79
     $redirUrl = 'fb-signup.php';
80 80
 }
81
-header('Location: '.$redirUrl);
81
+header('Location: ' . $redirUrl);
82 82
 
83 83
 // User is logged in with a long-lived access token.
84 84
 // You can redirect them to a members-only page.
Please login to merge, or discard this patch.
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 cr_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 cr_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.
api-classes/User.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,13 +28,13 @@
 block discarded – undo
28 28
         $currentTimestamp = $date = strftime('%F %T', time());
29 29
 
30 30
         $data = [
31
-      ['field' => 'name', 'type' => 'string', 'value' => $this->name],
32
-      ['field' => 'date', 'type' => 'string', 'value' => $this->datetime],
33
-      ['field' => 'eventGroup', 'type' => 'int', 'value' => $this->series->getId()],
34
-      ['field' => 'type', 'type' => 'int', 'value' => $this->type->getId()],
35
-      ['field' => 'subType', 'type' => 'int', 'value' => $this->sub_type->getId()],
36
-      ['field' => 'location', 'type' => 'int', 'value' => $this->location->getId()],
37
-      ['field' => 'created', 'type' => 'datetime', 'value' => $currentTimestamp],
31
+        ['field' => 'name', 'type' => 'string', 'value' => $this->name],
32
+        ['field' => 'date', 'type' => 'string', 'value' => $this->datetime],
33
+        ['field' => 'eventGroup', 'type' => 'int', 'value' => $this->series->getId()],
34
+        ['field' => 'type', 'type' => 'int', 'value' => $this->type->getId()],
35
+        ['field' => 'subType', 'type' => 'int', 'value' => $this->sub_type->getId()],
36
+        ['field' => 'location', 'type' => 'int', 'value' => $this->location->getId()],
37
+        ['field' => 'created', 'type' => 'datetime', 'value' => $currentTimestamp],
38 38
     ];
39 39
 
40 40
         if (isset($this->notes)) {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,12 +24,12 @@
 block discarded – undo
24 24
     public function createInDb(Database $db)
25 25
     {
26 26
         if (empty($this->name) || empty($this->datetime) || empty($this->series) || empty($this->type) || empty($this->sub_type) || empty($this->location)) {
27
-            $message = 'Series name ('.$this->name.')';
28
-            $message .= ' or date ('.$this->datetime.')';
29
-            $message .= ' or series ('.$this->series.')';
30
-            $message .= ' or type ('.$this->type.')';
31
-            $message .= ' or sub_type ('.$this->sub_type.')';
32
-            $message .= ' or location ('.$this->location.')';
27
+            $message = 'Series name (' . $this->name . ')';
28
+            $message .= ' or date (' . $this->datetime . ')';
29
+            $message .= ' or series (' . $this->series . ')';
30
+            $message .= ' or type (' . $this->type . ')';
31
+            $message .= ' or sub_type (' . $this->sub_type . ')';
32
+            $message .= ' or location (' . $this->location . ')';
33 33
             $message .= ' cannot be empty.';
34 34
 
35 35
             throw new Exception($message);
Please login to merge, or discard this patch.
api-classes/Event.php 2 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -131,13 +131,13 @@  discard block
 block discarded – undo
131 131
         $currentTimestamp = $date = strftime('%F %T', time());
132 132
 
133 133
         $data = [
134
-      ['field' => 'name', 'type' => 'string', 'value' => $this->name],
135
-      ['field' => 'date', 'type' => 'string', 'value' => $this->datetime],
136
-      ['field' => 'eventGroup', 'type' => 'int', 'value' => $this->series->getId()],
137
-      ['field' => 'type', 'type' => 'int', 'value' => $this->type->getId()],
138
-      ['field' => 'subType', 'type' => 'int', 'value' => $this->subType->getId()],
139
-      ['field' => 'location', 'type' => 'int', 'value' => $this->location->getId()],
140
-      ['field' => 'created', 'type' => 'datetime', 'value' => $currentTimestamp],
134
+        ['field' => 'name', 'type' => 'string', 'value' => $this->name],
135
+        ['field' => 'date', 'type' => 'string', 'value' => $this->datetime],
136
+        ['field' => 'eventGroup', 'type' => 'int', 'value' => $this->series->getId()],
137
+        ['field' => 'type', 'type' => 'int', 'value' => $this->type->getId()],
138
+        ['field' => 'subType', 'type' => 'int', 'value' => $this->subType->getId()],
139
+        ['field' => 'location', 'type' => 'int', 'value' => $this->location->getId()],
140
+        ['field' => 'created', 'type' => 'datetime', 'value' => $currentTimestamp],
141 141
     ];
142 142
 
143 143
         if (isset($this->notes)) {
@@ -164,23 +164,23 @@  discard block
 block discarded – undo
164 164
         }
165 165
 
166 166
         $columns = [
167
-      'id',
168
-      'name',
169
-      'date',
170
-      'eventGroup',
171
-      'type',
172
-      'subType',
173
-      'location',
174
-      'comment',
175
-      'sermonTitle',
176
-      'bibleVerse',
177
-      'deleted',
178
-      'created',
179
-      'updated',
167
+        'id',
168
+        'name',
169
+        'date',
170
+        'eventGroup',
171
+        'type',
172
+        'subType',
173
+        'location',
174
+        'comment',
175
+        'sermonTitle',
176
+        'bibleVerse',
177
+        'deleted',
178
+        'created',
179
+        'updated',
180 180
     ];
181 181
 
182 182
         $where = [
183
-      'id = '.$id,
183
+        'id = '.$id,
184 184
     ];
185 185
 
186 186
         $result = $db->selectSingle('Event', $this->db_table, $columns, $where);
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     {
109 109
         foreach ($rehersals as $rehersal) {
110 110
             if (!is_a($rehersal, 'Rehersal')) {
111
-                throw new Exception('Rehersal is not a Rehersal object: '.$rehersal, 1);
111
+                throw new Exception('Rehersal is not a Rehersal object: ' . $rehersal, 1);
112 112
             }
113 113
         }
114 114
         $this->rehersals = $rehersals;
@@ -117,12 +117,12 @@  discard block
 block discarded – undo
117 117
     public function createInDb(Database $db)
118 118
     {
119 119
         if (empty($this->name) || empty($this->datetime) || empty($this->series) || empty($this->type) || empty($this->subType) || empty($this->location)) {
120
-            $message = 'Series name ('.$this->name.')';
121
-            $message .= ' or date ('.$this->datetime.')';
122
-            $message .= ' or series ('.$this->series.')';
123
-            $message .= ' or type ('.$this->type.')';
124
-            $message .= ' or sub_type ('.$this->subType.')';
125
-            $message .= ' or location ('.$this->location.')';
120
+            $message = 'Series name (' . $this->name . ')';
121
+            $message .= ' or date (' . $this->datetime . ')';
122
+            $message .= ' or series (' . $this->series . ')';
123
+            $message .= ' or type (' . $this->type . ')';
124
+            $message .= ' or sub_type (' . $this->subType . ')';
125
+            $message .= ' or location (' . $this->location . ')';
126 126
             $message .= ' cannot be empty.';
127 127
 
128 128
             throw new Exception($message);
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     ];
181 181
 
182 182
         $where = [
183
-      'id = '.$id,
183
+      'id = ' . $id,
184 184
     ];
185 185
 
186 186
         $result = $db->selectSingle('Event', $this->db_table, $columns, $where);
Please login to merge, or discard this patch.