Completed
Pull Request — master (#64)
by Christopher
08:34
created
public/old/includes/functions.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -6,16 +6,16 @@  discard block
 block discarded – undo
6 6
 use Monolog\Handler\StreamHandler;
7 7
 use Monolog\Logger;
8 8
 
9
-include __DIR__.'/errors.php';
9
+include __DIR__ . '/errors.php';
10 10
 
11 11
 // setup the autoloading
12
-require_once __DIR__.'/../../../vendor/autoload.php';
12
+require_once __DIR__ . '/../../../vendor/autoload.php';
13 13
 
14 14
 // setup Propel
15
-require_once __DIR__.'/../../../generated-conf/config.php';
15
+require_once __DIR__ . '/../../../generated-conf/config.php';
16 16
 
17 17
 $defaultLogger = new Logger('defaultLogger');
18
-$defaultLogger->pushHandler(new StreamHandler(__DIR__.'/../../../logs/propel.log', Logger::WARNING));
18
+$defaultLogger->pushHandler(new StreamHandler(__DIR__ . '/../../../logs/propel.log', Logger::WARNING));
19 19
 
20 20
 $serviceContainer->setLogger('defaultLogger', $defaultLogger);
21 21
 
@@ -64,18 +64,18 @@  discard block
 block discarded – undo
64 64
     return SettingsQuery::create()->findOne();
65 65
 }
66 66
 
67
-include __DIR__.'/functions.auth.php';
68
-include __DIR__.'/functions.notifications.php';
69
-include __DIR__.'/functions.mail.php';
70
-include __DIR__.'/functions.remove.php';
71
-include __DIR__.'/functions.discussion.php';
72
-include __DIR__.'/functions.event.php';
73
-include __DIR__.'/functions.password.php';
74
-include __DIR__.'/functions.users.php';
75
-include __DIR__.'/functions.roles.php';
76
-include __DIR__.'/functions.database.php';
77
-include __DIR__.'/functions.calendars.php';
78
-include __DIR__.'/functions.facebook.php';
67
+include __DIR__ . '/functions.auth.php';
68
+include __DIR__ . '/functions.notifications.php';
69
+include __DIR__ . '/functions.mail.php';
70
+include __DIR__ . '/functions.remove.php';
71
+include __DIR__ . '/functions.discussion.php';
72
+include __DIR__ . '/functions.event.php';
73
+include __DIR__ . '/functions.password.php';
74
+include __DIR__ . '/functions.users.php';
75
+include __DIR__ . '/functions.roles.php';
76
+include __DIR__ . '/functions.database.php';
77
+include __DIR__ . '/functions.calendars.php';
78
+include __DIR__ . '/functions.facebook.php';
79 79
 
80 80
 date_default_timezone_set(siteSettings()->getTimeZone());
81 81
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         $stat_id = $_SESSION['login_statistic_id'];
176 176
         if (($stat_id != '') && ($stat_id != '0')) {
177 177
             $stat = StatisticQuery::create()->findPk($stat_id);
178
-            $stat->setDetail1($stat->getDetail1().'/'.$detail1);
178
+            $stat->setDetail1($stat->getDetail1() . '/' . $detail1);
179 179
             $stat->setDetail2($stat->getDate()->diff(new DateTime()));
180 180
             $stat->save();
181 181
 
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
         return 'never';
209 209
     }
210 210
 
211
-    return timeInWords($time).' ago';
211
+    return timeInWords($time) . ' ago';
212 212
 }
213 213
 
214 214
 function timeInWordsWithTense($time)
@@ -222,9 +222,9 @@  discard block
 block discarded – undo
222 222
     }
223 223
 
224 224
     if ($time->getTimestamp() > (new DateTime())->getTimestamp()) {
225
-        return 'in '.timeInWords($time);
225
+        return 'in ' . timeInWords($time);
226 226
     } else {
227
-        return timeInWords($time).' ago';
227
+        return timeInWords($time) . ' ago';
228 228
     }
229 229
 }
230 230
 
Please login to merge, or discard this patch.
src/routes.php 1 patch
Spacing   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -21,35 +21,35 @@  discard block
 block discarded – undo
21 21
 // USER
22 22
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23 23
 
24
-$app->group('/user', function () {
25
-    $this->get('s', UserController::class.':getAllUsers')->setName('users');
24
+$app->group('/user', function() {
25
+    $this->get('s', UserController::class . ':getAllUsers')->setName('users');
26 26
 
27
-    $this->get('/{id}/widget-only', UserController::class.':getUserWidgetOnly')->setName('user-widget-only');
27
+    $this->get('/{id}/widget-only', UserController::class . ':getUserWidgetOnly')->setName('user-widget-only');
28 28
 
29
-    $this->get('/new', UserController::class.':getNewUserForm')->setName('user-new');
30
-    $this->get('/{id}/edit', UserController::class.':getUserEditForm')->setName('user-edit');
31
-    $this->get('/{id}/password', UserController::class.':getUserPasswordForm')->setName('user-password');
29
+    $this->get('/new', UserController::class . ':getNewUserForm')->setName('user-new');
30
+    $this->get('/{id}/edit', UserController::class . ':getUserEditForm')->setName('user-edit');
31
+    $this->get('/{id}/password', UserController::class . ':getUserPasswordForm')->setName('user-password');
32 32
 
33
-    $this->get('/me', UserController::class.':getCurrentUser')->setName('user-me');
34
-    $this->get('/{id}', UserController::class.':getUser')->setName('user');
33
+    $this->get('/me', UserController::class . ':getCurrentUser')->setName('user-me');
34
+    $this->get('/{id}', UserController::class . ':getUser')->setName('user');
35 35
 
36
-    $this->post('[/{id}]', UserController::class.':postUser')->setName('user-post');
37
-    $this->post('/{id}/password', UserController::class.':postUserPasswordChange')->setName('user-password-post');
36
+    $this->post('[/{id}]', UserController::class . ':postUser')->setName('user-post');
37
+    $this->post('/{id}/password', UserController::class . ':postUserPasswordChange')->setName('user-password-post');
38 38
 
39 39
     // roles
40
-    $this->get('/{id}/roles', RoleController::class.':getAssignRolesForm')->setName('user-roles');
41
-    $this->post('/{id}/roles', RoleController::class.':postUserAssignRoles')->setName('user-assign-post');
40
+    $this->get('/{id}/roles', RoleController::class . ':getAssignRolesForm')->setName('user-roles');
41
+    $this->post('/{id}/roles', RoleController::class . ':postUserAssignRoles')->setName('user-assign-post');
42 42
 
43 43
     // availability
44
-    $this->get('/{id}/availability', AvailabilityController::class.':getAvailabilityForm')->setName('user-availability');
45
-    $this->post('/{id}/availability', AvailabilityController::class.':postAvailability')->setName('user-availability-post');
44
+    $this->get('/{id}/availability', AvailabilityController::class . ':getAvailabilityForm')->setName('user-availability');
45
+    $this->post('/{id}/availability', AvailabilityController::class . ':postAvailability')->setName('user-availability-post');
46 46
 
47 47
     // calendar
48
-    $this->group('/me/calendar', function () {
49
-        $this->get('s', CalendarController::class.':getCalendarTokens')->setName('user-calendars');
50
-        $this->get('/new', CalendarController::class.':getNewCalendarForm')->setName('user-calendars');
51
-        $this->get('/{id}/revoke', CalendarController::class.':getRevokeCalendar')->setName('user-calendar-revoke');
52
-        $this->post('/new', CalendarController::class.':postNewCalendar')->setName('user-calendar-new-post');
48
+    $this->group('/me/calendar', function() {
49
+        $this->get('s', CalendarController::class . ':getCalendarTokens')->setName('user-calendars');
50
+        $this->get('/new', CalendarController::class . ':getNewCalendarForm')->setName('user-calendars');
51
+        $this->get('/{id}/revoke', CalendarController::class . ':getRevokeCalendar')->setName('user-calendar-revoke');
52
+        $this->post('/new', CalendarController::class . ':postNewCalendar')->setName('user-calendar-new-post');
53 53
     });
54 54
 });
55 55
 
@@ -57,103 +57,103 @@  discard block
 block discarded – undo
57 57
 // EVENT
58 58
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
59 59
 
60
-$app->group('/event', function () {
61
-    $this->get('s', EventController::class.':getAllEvents')->setName('events');
62
-    $this->get('s/type/{id}', EventController::class.':getAllEventsWithType')->setName('events-eventtype');
63
-    $this->get('s/subtype/{id}', EventController::class.':getAllEventsWithSubType')->setName('events-eventsubtype');
60
+$app->group('/event', function() {
61
+    $this->get('s', EventController::class . ':getAllEvents')->setName('events');
62
+    $this->get('s/type/{id}', EventController::class . ':getAllEventsWithType')->setName('events-eventtype');
63
+    $this->get('s/subtype/{id}', EventController::class . ':getAllEventsWithSubType')->setName('events-eventsubtype');
64 64
 
65
-    $this->get('s/print/info', EventController::class.':getAllEventInfoToPrint')->setName('events-print-info');
65
+    $this->get('s/print/info', EventController::class . ':getAllEventInfoToPrint')->setName('events-print-info');
66 66
 
67
-    $this->get('/new', EventController::class.':getNewEventForm')->setName('event-new');
68
-    $this->get('/{id}/edit', EventController::class.':getEventEditForm')->setName('event-edit');
69
-    $this->get('/{id}/copy', EventController::class.':getEventCopyForm')->setName('event-copy');
70
-    $this->get('/{id}/assign', EventController::class.':getEventAssignForm')->setName('event-assign');
67
+    $this->get('/new', EventController::class . ':getNewEventForm')->setName('event-new');
68
+    $this->get('/{id}/edit', EventController::class . ':getEventEditForm')->setName('event-edit');
69
+    $this->get('/{id}/copy', EventController::class . ':getEventCopyForm')->setName('event-copy');
70
+    $this->get('/{id}/assign', EventController::class . ':getEventAssignForm')->setName('event-assign');
71 71
 
72
-    $this->get('/{id}', EventController::class.':getEvent')->setName('event');
72
+    $this->get('/{id}', EventController::class . ':getEvent')->setName('event');
73 73
 
74
-    $this->post('[/{id}]', EventController::class.':postEvent')->setName('event-post');
75
-    $this->post('/{id}/assign', EventController::class.':postEventAssign')->setName('event-assign-post');
76
-    $this->post('/{id}/comment', EventController::class.':postEventComment')->setName('event-comment-post');
74
+    $this->post('[/{id}]', EventController::class . ':postEvent')->setName('event-post');
75
+    $this->post('/{id}/assign', EventController::class . ':postEventAssign')->setName('event-assign-post');
76
+    $this->post('/{id}/comment', EventController::class . ':postEventComment')->setName('event-comment-post');
77 77
 });
78 78
 
79 79
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 80
 // RESOURCE
81 81
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
82 82
 
83
-$app->group('/resource', function () {
84
-    $this->get('s', ResourceController::class.':getAllResources')->setName('resources');
83
+$app->group('/resource', function() {
84
+    $this->get('s', ResourceController::class . ':getAllResources')->setName('resources');
85 85
 
86
-    $this->get('[/new]', ResourceController::class.':getNewResourceForm')->setName('resource-new');
87
-    $this->get('/{id}/edit', ResourceController::class.':getResourceEditForm')->setName('resource-edit');
86
+    $this->get('[/new]', ResourceController::class . ':getNewResourceForm')->setName('resource-new');
87
+    $this->get('/{id}/edit', ResourceController::class . ':getResourceEditForm')->setName('resource-edit');
88 88
 
89
-    $this->get('/{id}', ResourceController::class.':getResourceFile')->setName('resource');
89
+    $this->get('/{id}', ResourceController::class . ':getResourceFile')->setName('resource');
90 90
 
91
-    $this->post('[/{id}]', ResourceController::class.':postResource')->setName('resource-post');
91
+    $this->post('[/{id}]', ResourceController::class . ':postResource')->setName('resource-post');
92 92
 });
93 93
 
94 94
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
95 95
 // ROLES & GROUPS
96 96
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97 97
 
98
-$app->group('/group', function () {
99
-    $this->get('/{id}', GroupController::class.':getGroup')->setName('group');
100
-    $this->get('/{id}/roles', GroupController::class.':getGroupRoles')->setName('group-roles');
98
+$app->group('/group', function() {
99
+    $this->get('/{id}', GroupController::class . ':getGroup')->setName('group');
100
+    $this->get('/{id}/roles', GroupController::class . ':getGroupRoles')->setName('group-roles');
101 101
 
102
-    $this->get('/{id}/events', EventController::class.':getAllEventsToPrintForGroup')->setName('group-events-print');
102
+    $this->get('/{id}/events', EventController::class . ':getAllEventsToPrintForGroup')->setName('group-events-print');
103 103
 
104
-    $this->post('[/{id}]', GroupController::class.':postGroup')->setName('group-post');
104
+    $this->post('[/{id}]', GroupController::class . ':postGroup')->setName('group-post');
105 105
 });
106 106
 
107 107
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
108 108
 // AUTH
109 109
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
110 110
 
111
-$app->get('/login', AuthController::class.':getLoginForm')->setName('login');
111
+$app->get('/login', AuthController::class . ':getLoginForm')->setName('login');
112 112
 
113
-$app->get('/login/{provider}', AuthController::class.':getLoginAuth')->setName('login-auth');
114
-$app->get('/login/{provider}/callback', AuthController::class.':getLoginCallback')->setName('login-callback');
115
-$app->get('/signup', PendingUserController::class.':getSignUpForm')->setName('sign-up');
116
-$app->get('/signup/cancel', PendingUserController::class.':getSignUpCancel')->setName('sign-up-cancel');
113
+$app->get('/login/{provider}', AuthController::class . ':getLoginAuth')->setName('login-auth');
114
+$app->get('/login/{provider}/callback', AuthController::class . ':getLoginCallback')->setName('login-callback');
115
+$app->get('/signup', PendingUserController::class . ':getSignUpForm')->setName('sign-up');
116
+$app->get('/signup/cancel', PendingUserController::class . ':getSignUpCancel')->setName('sign-up-cancel');
117 117
 
118
-$app->get('/logout', AuthController::class.':getLogout')->setName('logout');
118
+$app->get('/logout', AuthController::class . ':getLogout')->setName('logout');
119 119
 
120
-$app->post('/login', AuthController::class.':postLogin')->setName('login-post');
121
-$app->post('/signup', PendingUserController::class.':postSignUp')->setName('sign-up-post');
120
+$app->post('/login', AuthController::class . ':postLogin')->setName('login-post');
121
+$app->post('/signup', PendingUserController::class . ':postSignUp')->setName('sign-up-post');
122 122
 
123 123
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
124 124
 // NOTIFICATIONS
125 125
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
126 126
 
127
-$app->get('/notification/{id}[/{referrer}]', NotificationController::class.':getNotificationClick')->setName('notification');
127
+$app->get('/notification/{id}[/{referrer}]', NotificationController::class . ':getNotificationClick')->setName('notification');
128 128
 
129 129
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
130 130
 // CALENDAR
131 131
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
132 132
 
133
-$app->get('/calendar/{token}.{format}', CalendarController::class.':getRenderedCalendar')->setName('user-calendar');
133
+$app->get('/calendar/{token}.{format}', CalendarController::class . ':getRenderedCalendar')->setName('user-calendar');
134 134
 
135 135
 // legacy
136
-$app->get('/calendar.php', CalendarController::class.':getLegacyRenderedCalendar')->setName('user-calendar');
136
+$app->get('/calendar.php', CalendarController::class . ':getLegacyRenderedCalendar')->setName('user-calendar');
137 137
 
138 138
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
139 139
 // OTHER
140 140
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
141 141
 
142
-$app->get('/settings', function ($request, $response, $args) {
142
+$app->get('/settings', function($request, $response, $args) {
143 143
     // Sample log message
144 144
     $this->logger->info("Fetch settings GET '/settings'");
145 145
 
146
-    $url = $this->router->pathFor('home').'old/settings.php';
146
+    $url = $this->router->pathFor('home') . 'old/settings.php';
147 147
 
148 148
     return $response->withStatus(303)->withHeader('Location', $url);
149 149
     //return $this->view->render($response, 'settings.twig', []);
150 150
 })->setName('settings');
151 151
 
152
-$app->get('/token', function ($request, $response, $args) {
152
+$app->get('/token', function($request, $response, $args) {
153 153
     return $response->getBody()->write(Crypt::generateToken(30));
154 154
 })->setName('token');
155 155
 
156
-$app->get('/', function ($request, $response, $args) {
156
+$app->get('/', function($request, $response, $args) {
157 157
     // Sample log message
158 158
     $this->logger->info("Fetch home GET '/'");
159 159
 
@@ -173,6 +173,6 @@  discard block
 block discarded – undo
173 173
 // JOBS
174 174
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
175 175
 
176
-$app->group('/job', function () {
177
-    $this->get('/daily/{token}', JobController::class.':getDaily')->setName('job-daily');
176
+$app->group('/job', function() {
177
+    $this->get('/daily/{token}', JobController::class . ':getDaily')->setName('job-daily');
178 178
 });
Please login to merge, or discard this patch.
src/classes/Controller/JobController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         }
20 20
 
21 21
         $client = new Client();
22
-        $url = $site->getUrl()['base'].$this->router->pathFor('home').'old/cr_daily.php';
22
+        $url = $site->getUrl()['base'] . $this->router->pathFor('home') . 'old/cr_daily.php';
23 23
         $guzzleResponse = $client->get($url, [
24 24
             'query' => [
25 25
                 'token' => $args['token'],
Please login to merge, or discard this patch.
src/classes/Controller/NotificationController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 {
12 12
     public function getNotificationClick(ServerRequestInterface $request, ResponseInterface $response, $args)
13 13
     {
14
-        $this->logger->info("Fetch settings GET '/notification/".$args['id']."'");
14
+        $this->logger->info("Fetch settings GET '/notification/" . $args['id'] . "'");
15 15
 
16 16
         $n = NotificationQuery::create()->findPk($args['id']);
17 17
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
                 return $response->withStatus(302)->withHeader('Location', $this->router->pathFor($link['route'], $link['attributes']));
37 37
             } else {
38
-                return $response->withStatus(302)->withHeader('Location', $this->router->pathFor('home').$n->getLink());
38
+                return $response->withStatus(302)->withHeader('Location', $this->router->pathFor('home') . $n->getLink());
39 39
             }
40 40
         }
41 41
 
Please login to merge, or discard this patch.
public/old/statistics.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -139,12 +139,12 @@
 block discarded – undo
139 139
     		<tbody>
140 140
     		<?php
141 141
                 $sql = "SELECT s.date,s.detail1,s.detail2,s.detail3,s.type,trim(concat(u.firstName,' ',u.lastName)) AS name FROM statistics s INNER JOIN users u ON u.id = s.userid";
142
-          if (!isAdmin()) {
143
-              $sql .= 'WHERE u.ID=s.userID';
144
-              if (!$debug) {
145
-                  $sql .= " AND s.type = 'system'";
146
-              }
147
-          }
142
+            if (!isAdmin()) {
143
+                $sql .= 'WHERE u.ID=s.userID';
144
+                if (!$debug) {
145
+                    $sql .= " AND s.type = 'system'";
146
+                }
147
+            }
148 148
                 $sql .= ' ORDER BY date desc '.$limit;
149 149
                 $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
150 150
                 while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 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
 
@@ -26,28 +26,28 @@  discard block
 block discarded – undo
26 26
     if ($method == 'truncate') {
27 27
         $sql = "CREATE TABLE tmp_system_statistics as SELECT * from statistics WHERE type='system'";
28 28
         if (!mysqli_query(db(), $sql)) {
29
-            die('Error: '.mysqli_error(db()));
29
+            die('Error: ' . mysqli_error(db()));
30 30
         }
31 31
 
32 32
         $sql = ('TRUNCATE TABLE statistics');
33 33
         if (!mysqli_query(db(), $sql)) {
34
-            die('Error: '.mysqli_error(db()));
34
+            die('Error: ' . mysqli_error(db()));
35 35
         }
36 36
 
37 37
         $sql = ('ALTER TABLE statistics  AUTO_INCREMENT = 50');
38 38
         if (!mysqli_query(db(), $sql)) {
39
-            die('Error: '.mysqli_error(db()));
39
+            die('Error: ' . mysqli_error(db()));
40 40
         }
41 41
 
42 42
         $sql = 'INSERT INTO statistics (userid,date,type,detail1,detail2,detail3,script) ';
43
-        $sql = $sql.'SELECT userid,date,type,detail1,detail2,detail3,script from tmp_system_statistics order by date';
43
+        $sql = $sql . 'SELECT userid,date,type,detail1,detail2,detail3,script from tmp_system_statistics order by date';
44 44
         if (!mysqli_query(db(), $sql)) {
45
-            die('Error: '.mysqli_error(db()));
45
+            die('Error: ' . mysqli_error(db()));
46 46
         }
47 47
 
48 48
         $sql = 'DROP TABLE tmp_system_statistics';
49 49
         if (!mysqli_query(db(), $sql)) {
50
-            die('Error: '.mysqli_error(db()));
50
+            die('Error: ' . mysqli_error(db()));
51 51
         }
52 52
 
53 53
         insertStatistics('system', __FILE__, 'statistics deleted');
@@ -103,22 +103,22 @@  discard block
 block discarded – undo
103 103
               <?php
104 104
 
105 105
                         $sql = 'SELECT VERSION( ) AS mysqli_version';
106
-            $result = mysqli_query(db(), $sql) or die('MySQL-Error: '.mysqli_error(db()));
106
+            $result = mysqli_query(db(), $sql) or die('MySQL-Error: ' . mysqli_error(db()));
107 107
             $dbv = mysqli_fetch_array($result, MYSQLI_ASSOC);
108 108
             $mysqli_version = $dbv['mysqli_version'];
109 109
 
110 110
             if (substr($mysqli_version, 0, 1) == 5) {
111
-                $sql = "SELECT getBrowserInfo(detail3) as browser,count(*) as count from statistics where detail1 like 'login%' and detail3!='' group by getBrowserInfo(detail3) order by count desc ".$browserLimit;
111
+                $sql = "SELECT getBrowserInfo(detail3) as browser,count(*) as count from statistics where detail1 like 'login%' and detail3!='' group by getBrowserInfo(detail3) order by count desc " . $browserLimit;
112 112
             } else {
113
-                $sql = "SELECT detail3 as browser,count(*) as count from statistics where detail1 like 'login%' and detail3!='' group by detail3 order by count desc ".$browserLimit;
113
+                $sql = "SELECT detail3 as browser,count(*) as count from statistics where detail1 like 'login%' and detail3!='' group by detail3 order by count desc " . $browserLimit;
114 114
             }
115 115
 
116 116
             $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
117 117
             while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
118 118
                 extract($row);
119 119
                 echo '<tr>';
120
-                echo '<td>'.$browser.'</td>';
121
-                echo '<td>'.$count.'</td>';
120
+                echo '<td>' . $browser . '</td>';
121
+                echo '<td>' . $count . '</td>';
122 122
                 echo '</tr>';
123 123
             } ?>
124 124
 
@@ -145,16 +145,16 @@  discard block
 block discarded – undo
145 145
                   $sql .= " AND s.type = 'system'";
146 146
               }
147 147
           }
148
-                $sql .= ' ORDER BY date desc '.$limit;
148
+                $sql .= ' ORDER BY date desc ' . $limit;
149 149
                 $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
150 150
                 while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
151 151
                     extract($row);
152 152
                     echo '<tr>';
153
-                    echo '<td>'.$date.'</td>';
154
-                    echo '<td>'.$name.'</td>';
155
-                    echo '<td>'.$type.'</td>';
156
-                    echo '<td>'.$detail1.'</td>';
157
-                    echo '<td>'.$detail2.'</td>';
153
+                    echo '<td>' . $date . '</td>';
154
+                    echo '<td>' . $name . '</td>';
155
+                    echo '<td>' . $type . '</td>';
156
+                    echo '<td>' . $detail1 . '</td>';
157
+                    echo '<td>' . $detail2 . '</td>';
158 158
                     //echo "<td>".$detail3."</td>";
159 159
                     echo '</tr>';
160 160
                 }
Please login to merge, or discard this patch.
public/old/tableView.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 									 FROM eventTypes et
112 112
 									 WHERE id IN (SELECT e.type
113 113
 										 						FROM events e
114
-																WHERE '.$whereTwoMonth.'
114
+																WHERE '.$whereTwoMonth . '
115 115
 																AND e.removed = 0)
116 116
 									 ORDER BY name';
117 117
         $result = mysqli_query(db(), $filter_sql) or die(mysqli_error(db()));
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 <tr>
133 133
 	<td ><strong>Event</strong></td>
134 134
 	<?php
135
-    $sql = 'SELECT * FROM groups g ORDER BY '.$group_sorting_name;
135
+    $sql = 'SELECT * FROM groups g ORDER BY ' . $group_sorting_name;
136 136
     $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
137 137
 
138 138
     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 
163 163
     if ($filter == '') {
164 164
         $sql .= '
165
-							AND '.$whereTwoMonth.'
165
+							AND '.$whereTwoMonth . '
166 166
 						ORDER BY
167 167
 							e.date';
168 168
     } elseif ($filter == 'all') {
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
     } elseif ($filter != '') {
173 173
         $sql .= "
174 174
 							AND e.type = '$filter'
175
-							AND ".$whereTwoMonth.'
175
+							AND " . $whereTwoMonth . '
176 176
 						ORDER BY
177 177
 							e.date';
178 178
     }
@@ -186,31 +186,31 @@  discard block
 block discarded – undo
186 186
         echo '<tr>';
187 187
         echo '<td >';
188 188
         setlocale(LC_TIME, $lang_locale); //de_DE
189
-        echo '<a href="event.php?id='.$row['id'].'">';
189
+        echo '<a href="event.php?id=' . $row['id'] . '">';
190 190
         echo strftime($time_format_short, strtotime($row['sundayDate'])); // %a, <strong>%e. %b</strong>, KW%V
191 191
         echo '</a>';
192 192
 
193 193
         //$row['sundayDate']
194 194
         if (!empty($row['eventType'])) {
195
-            echo '<br /><em>&nbsp;&nbsp;&nbsp;'.$row['eventType'].'</em>';
195
+            echo '<br /><em>&nbsp;&nbsp;&nbsp;' . $row['eventType'] . '</em>';
196 196
         }
197 197
         if (!empty($row['eventSubType'])) {
198
-            echo ' - <em>'.$row['eventSubType'].'</em>';
198
+            echo ' - <em>' . $row['eventSubType'] . '</em>';
199 199
         }
200 200
         if (!empty($row['eventLocation'])) {
201
-            echo '<br /><em>&nbsp;&nbsp;&nbsp;'.$row['eventLocation'].'</em>';
201
+            echo '<br /><em>&nbsp;&nbsp;&nbsp;' . $row['eventLocation'] . '</em>';
202 202
         }
203 203
         if (!empty($row['name'])) {
204
-            echo '<br /><em>&nbsp;&nbsp;&nbsp;'.$row['name'].'</em>';
204
+            echo '<br /><em>&nbsp;&nbsp;&nbsp;' . $row['name'] . '</em>';
205 205
         }
206 206
         if (!empty($row['eventGroup'])) {
207
-            echo '<br /><strong>&nbsp;&nbsp;&nbsp;'.$row['eventGroup'].'</strong>';
207
+            echo '<br /><strong>&nbsp;&nbsp;&nbsp;' . $row['eventGroup'] . '</strong>';
208 208
         }
209 209
         if (!empty($row['sermonTitle'])) {
210
-            echo ': '.$row['sermonTitle'];
210
+            echo ': ' . $row['sermonTitle'];
211 211
         }
212 212
         if (!empty($row['bibleVerse'])) {
213
-            echo ' <em>('.$row['bibleVerse'].')</em>';
213
+            echo ' <em>(' . $row['bibleVerse'] . ')</em>';
214 214
         }
215 215
         echo '</td>';
216 216
 
@@ -242,16 +242,16 @@  discard block
 block discarded – undo
242 242
                     if ($previousName == '') {
243 243
                         // new name
244 244
                         echo ($viewPeople['userId'] == $sessionUserId) ? '<strong class="me">' : '';
245
-                        echo $name.' <em>('.$viewPeople['role'];
245
+                        echo $name . ' <em>(' . $viewPeople['role'];
246 246
                     } elseif ($previousName != $name) {
247 247
                         echo ')</em>';
248 248
                         echo ($viewPeople['userId'] != $sessionUserId) ? '</strong>' : '';
249 249
                         echo '<br />'; // line break from previous name
250 250
                         // new name
251 251
                         echo ($viewPeople['userId'] == $sessionUserId) ? '<strong class="me">' : '';
252
-                        echo $name.' <em>('.$viewPeople['role'];
252
+                        echo $name . ' <em>(' . $viewPeople['role'];
253 253
                     } else {
254
-                        echo ', '.$viewPeople['role'];
254
+                        echo ', ' . $viewPeople['role'];
255 255
                     }
256 256
 
257 257
                     $peopleInEvent = true;
Please login to merge, or discard this patch.
public/old/roles.php 1 patch
Spacing   +7 added lines, -7 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
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 if ($role && $assignTo) {
35 35
     $sql = "UPDATE roles r SET r.groupId = '$assignTo' WHERE r.id = '$role'";
36 36
     if (!mysqli_query(db(), $sql)) {
37
-        die('Error: '.mysqli_error(db()));
37
+        die('Error: ' . mysqli_error(db()));
38 38
     }
39 39
     header('Location: roles.php');
40 40
     exit;
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $sql = "INSERT INTO roles (name, description, rehersalId, groupId)
71 71
             VALUES ('$newrole', '$newrole', $rehersal, $groupId)";
72 72
         if (!mysqli_query(db(), $sql)) {
73
-            die('Error: '.mysqli_error(db()));
73
+            die('Error: ' . mysqli_error(db()));
74 74
         }
75 75
     } else {
76 76
         // Handle renaming of the roles
@@ -103,11 +103,11 @@  discard block
 block discarded – undo
103 103
     $i = 1;
104 104
     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
105 105
         if ($type == 'option') {
106
-            $list = $list."<option value='".$row['id']."'>".$row['name'].'</option>';
106
+            $list = $list . "<option value='" . $row['id'] . "'>" . $row['name'] . '</option>';
107 107
         } elseif ($type == 'li') {
108
-            $list = $list.'<li>'.$row['name'].'</li>';
108
+            $list = $list . '<li>' . $row['name'] . '</li>';
109 109
         } elseif ($type == 'li-a') {
110
-            $list = $list."<li><a href='roles.php?role=".$roleId.'&assignto='.$row['id']."'>".$row['name'].'</a></li>';
110
+            $list = $list . "<li><a href='roles.php?role=" . $roleId . '&assignto=' . $row['id'] . "'>" . $row['name'] . '</a></li>';
111 111
         }
112 112
         $i++;
113 113
     }
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
             $group = $row['groupId'];
174 174
             $down = $group + 1;
175 175
             $up = $group - 1;
176
-            echo '<div><strong>'.$groupname.'</strong><br />';
176
+            echo '<div><strong>' . $groupname . '</strong><br />';
177 177
         }
178 178
         // Print text input box if a role exists for the group.
179 179
         // Allows user to update role names and move roles between groups
Please login to merge, or discard this patch.
public/old/update.settings.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     exit;
34 34
 }
35 35
 if (!isAdmin()) {
36
-    header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME']));
36
+    header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME']));
37 37
     exit;
38 38
 }
39 39
 
@@ -57,20 +57,20 @@  discard block
 block discarded – undo
57 57
 if ($action == 'update') {
58 58
     //if ($language='de-de')
59 59
     if ($rowSettings['lang_locale'] == 'en_GB') {
60
-        executeDbSql("update settings set lang_locale = 'de_DE'");                     // de_DE
60
+        executeDbSql("update settings set lang_locale = 'de_DE'"); // de_DE
61 61
             executeDbSql("update settings set time_format_long = '%A, %e. %B %Y, %R Uhr, KW%V'"); // de_DE: %A, %e. %B %Y, %R Uhr, KW%V
62 62
             executeDbSql("update settings set time_format_normal = '%d.%m.%Y %H:%M '"); // de_DE: %d.%m.%Y %H:%M
63
-            executeDbSql("update settings set time_format_short = '%a, <strong>%e. %b</strong>, %R'");              // de_DE: %a, <strong>%e. %b</strong>, KW%V
63
+            executeDbSql("update settings set time_format_short = '%a, <strong>%e. %b</strong>, %R'"); // de_DE: %a, <strong>%e. %b</strong>, KW%V
64 64
             executeDbSql("update settings set time_zone = 'Europe/Berlin'"); //de_DE: Europe/Berlin
65 65
             executeDbSql("update settings set google_group_calendar = ''");
66 66
         executeDbSql("update settings set overviewemail = '{{Gottesdienst-Planung [MONTH] [YEAR]}}\r\nHallo zusammen,\r\n\r\nanbei die Gottesdienst-Planung fuer [MONTH] [YEAR]\r\n\r\n[OVERVIEW]\r\n\r\nBitte fruehzeitig Bescheid geben, wenn etwas NICHT passt, ansonsten gehe ich davon aus, dass ihr wie geplant koennt.\r\n\r\nAlles Gute und Gottes Segen f�r Euch und Euren Dienst.\r\nEuer Gottesdienst Orga-Team'");
67 67
     }
68 68
     //else
69 69
     if ($rowSettings['lang_locale'] == 'de_DE') {
70
-        executeDbSql("update settings set lang_locale = 'en_GB'");                     // de_DE
70
+        executeDbSql("update settings set lang_locale = 'en_GB'"); // de_DE
71 71
             executeDbSql("update settings set time_format_long = '%A, %B %e @ %I:%M %p'"); // de_DE: %A, %e. %B %Y, %R Uhr, KW%V
72 72
             executeDbSql("update settings set time_format_normal = '%m/%d/%y %I:%M %p'"); // de_DE: %d.%m.%Y %H:%M
73
-            executeDbSql("update settings set time_format_short = '%a, <strong>%b %e</strong>, %I:%M %p'");              // de_DE: %a, <strong>%e. %b</strong>, KW%V
73
+            executeDbSql("update settings set time_format_short = '%a, <strong>%b %e</strong>, %I:%M %p'"); // de_DE: %a, <strong>%e. %b</strong>, KW%V
74 74
             executeDbSql("update settings set time_zone = 'Europe/London'"); //de_DE: Europe/Berlin
75 75
             executeDbSql("update settings set google_group_calendar = ''");
76 76
         executeDbSql("update settings set overviewemail = 'Hello,\r\n\r\nIn this email you find the Rota for [MONTH] [YEAR].\r\n\r\n[OVERVIEW]\r\n\r\nPlease inform us as soon as possible, if you are not able to serve as scheduled.\r\n\r\nBe blessed.\r\nChurch Support Stuff'");
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     $resultSettings = mysqli_query(db(), $sqlSettings) or die(mysqli_error(db()));
83 83
     $rowSettings = mysqli_fetch_array($resultSettings, MYSQLI_ASSOC);
84 84
 
85
-    $updateNotification = 'Settings updated successfully to: '.$rowSettings['lang_locale'].' <br>&nbsp;<br>';
85
+    $updateNotification = 'Settings updated successfully to: ' . $rowSettings['lang_locale'] . ' <br>&nbsp;<br>';
86 86
 }
87 87
 
88 88
 $formatting = 'true';
@@ -94,8 +94,8 @@  discard block
 block discarded – undo
94 94
 	<hr>
95 95
 	This page has only beta status. <br>Please do only use it in testing environments!
96 96
 	<hr>
97
-	<?php echo 'Your web browser identifies your language as: '.$language; ?><br>
98
-	<?php echo 'Church Rota is set to use: '.$rowSettings['lang_locale']; ?><br>&nbsp;<br>
97
+	<?php echo 'Your web browser identifies your language as: ' . $language; ?><br>
98
+	<?php echo 'Church Rota is set to use: ' . $rowSettings['lang_locale']; ?><br>&nbsp;<br>
99 99
 	
100 100
 <?php
101 101
 if ($updateNotification == '') {
Please login to merge, or discard this patch.
public/old/emails.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     exit;
36 36
 }
37 37
 if (!isAdmin()) {
38
-    header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME']));
38
+    header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME']));
39 39
     exit;
40 40
 }
41 41
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     if ($editskillID != '') {
72 72
         $sql = ("INSERT INTO eventPeople (eventID, skillID) VALUES ('$editeventID', '$editskillID')");
73 73
         if (!mysqli_query(db(), $sql)) {
74
-            die('Error: '.mysqli_error(db()));
74
+            die('Error: ' . mysqli_error(db()));
75 75
         }
76 76
 
77 77
         // After we have inserted the data, we want to head back to the main page
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
             $sql = ("INSERT INTO eventPeople (eventID, skillID) VALUES ('$editeventID', '$editskillID')");
90 90
             if (!mysqli_query(db(), $sql)) {
91
-                die('Error: '.mysqli_error(db()));
91
+                die('Error: ' . mysqli_error(db()));
92 92
             }
93 93
         }
94 94
 
Please login to merge, or discard this patch.