@@ -131,13 +131,13 @@ discard block |
||
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 |
||
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); |
@@ -108,7 +108,7 @@ discard block |
||
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 |
||
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 |
||
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); |
@@ -34,7 +34,7 @@ |
||
34 | 34 | if (!password_verify($v, $this->password)) { |
35 | 35 | $bcrypt_options = [ |
36 | 36 | 'cost' => 12, |
37 | - ]; |
|
37 | + ]; |
|
38 | 38 | $this->password = password_hash($v, PASSWORD_BCRYPT, $bcrypt_options); |
39 | 39 | |
40 | 40 | $this->modifiedColumns[UserTableMap::COL_PASSWORD] = true; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | */ |
79 | 79 | public function getName() |
80 | 80 | { |
81 | - return $this->firstname.' '.$this->lastname; |
|
81 | + return $this->firstname . ' ' . $this->lastname; |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
@@ -97,37 +97,37 @@ discard block |
||
97 | 97 | if ($socialAuth->getPlatform() == 'facebook') { |
98 | 98 | switch ($size) { |
99 | 99 | case 'small': // 50px x 50px |
100 | - return '//graph.facebook.com/'.$socialAuth->getSocialId().'/picture?type=square'; |
|
100 | + return '//graph.facebook.com/' . $socialAuth->getSocialId() . '/picture?type=square'; |
|
101 | 101 | break; |
102 | 102 | case 'medium': // 200px x 200px |
103 | - return '//graph.facebook.com/'.$socialAuth->getSocialId().'/picture?type=large'; |
|
103 | + return '//graph.facebook.com/' . $socialAuth->getSocialId() . '/picture?type=large'; |
|
104 | 104 | break; |
105 | 105 | case 'large': // 200px x 200px |
106 | - return '//graph.facebook.com/'.$socialAuth->getSocialId().'/picture?type=large'; |
|
106 | + return '//graph.facebook.com/' . $socialAuth->getSocialId() . '/picture?type=large'; |
|
107 | 107 | break; |
108 | 108 | default: |
109 | - return '//graph.facebook.com/'.$socialAuth->getSocialId().'/picture'; |
|
109 | + return '//graph.facebook.com/' . $socialAuth->getSocialId() . '/picture'; |
|
110 | 110 | break; |
111 | 111 | } |
112 | 112 | } elseif ($socialAuth->getPlatform() == 'onebody') { |
113 | 113 | $baseUrl = getConfig()['auth']['onebody']['url']; |
114 | 114 | $photoFingerprint = $socialAuth->getMeta()['photo-fingerprint']; |
115 | 115 | $extension = pathinfo($socialAuth->getMeta()['photo-file-name'], PATHINFO_EXTENSION); |
116 | - if(empty($photoFingerprint)) { |
|
116 | + if (empty($photoFingerprint)) { |
|
117 | 117 | continue; |
118 | 118 | } |
119 | 119 | switch ($size) { |
120 | 120 | case 'small': // 50px x 50px |
121 | - return $baseUrl.'/system/production/people/photos/'.$socialAuth->getSocialId().'/tn/'.$photoFingerprint.'.'.$extension; |
|
121 | + return $baseUrl . '/system/production/people/photos/' . $socialAuth->getSocialId() . '/tn/' . $photoFingerprint . '.' . $extension; |
|
122 | 122 | break; |
123 | 123 | case 'medium': // 150px x 150px |
124 | - return $baseUrl.'/system/production/people/photos/'.$socialAuth->getSocialId().'/small/'.$photoFingerprint.'.'.$extension; |
|
124 | + return $baseUrl . '/system/production/people/photos/' . $socialAuth->getSocialId() . '/small/' . $photoFingerprint . '.' . $extension; |
|
125 | 125 | break; |
126 | 126 | case 'large': // 500px x 500px |
127 | - return $baseUrl.'/system/production/people/photos/'.$socialAuth->getSocialId().'/medium/'.$photoFingerprint.'.'.$extension; |
|
127 | + return $baseUrl . '/system/production/people/photos/' . $socialAuth->getSocialId() . '/medium/' . $photoFingerprint . '.' . $extension; |
|
128 | 128 | break; |
129 | 129 | default: |
130 | - return $baseUrl.'/system/production/people/photos/'.$socialAuth->getSocialId().'/tn/'.$photoFingerprint.'.'.$extension; |
|
130 | + return $baseUrl . '/system/production/people/photos/' . $socialAuth->getSocialId() . '/tn/' . $photoFingerprint . '.' . $extension; |
|
131 | 131 | break; |
132 | 132 | } |
133 | 133 | } |
@@ -136,16 +136,16 @@ discard block |
||
136 | 136 | |
137 | 137 | switch ($size) { |
138 | 138 | case 'small': // 50px x 50px |
139 | - return '//www.gravatar.com/avatar/'.md5(strtolower(trim($this->email))).'?s=50&d=mm'; |
|
139 | + return '//www.gravatar.com/avatar/' . md5(strtolower(trim($this->email))) . '?s=50&d=mm'; |
|
140 | 140 | break; |
141 | 141 | case 'medium': // 200px x 200px |
142 | - return '//www.gravatar.com/avatar/'.md5(strtolower(trim($this->email))).'?s=200&d=mm'; |
|
142 | + return '//www.gravatar.com/avatar/' . md5(strtolower(trim($this->email))) . '?s=200&d=mm'; |
|
143 | 143 | break; |
144 | 144 | case 'large': // 500px x 500px |
145 | - return '//www.gravatar.com/avatar/'.md5(strtolower(trim($this->email))).'?s=500&d=mm'; |
|
145 | + return '//www.gravatar.com/avatar/' . md5(strtolower(trim($this->email))) . '?s=500&d=mm'; |
|
146 | 146 | break; |
147 | 147 | default: |
148 | - return '//www.gravatar.com/avatar/'.md5(strtolower(trim($this->email))).'?s=50&d=mm'; |
|
148 | + return '//www.gravatar.com/avatar/' . md5(strtolower(trim($this->email))) . '?s=50&d=mm'; |
|
149 | 149 | break; |
150 | 150 | } |
151 | 151 | } |
@@ -24,12 +24,12 @@ |
||
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); |
@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | } else { |
49 | 49 | $urlFilters = ''; |
50 | 50 | if (isset($_SESSION['lastEventsFilter'])) { |
51 | - $urlFilters = '&filter='.$_SESSION['lastEventsFilter']; |
|
51 | + $urlFilters = '&filter=' . $_SESSION['lastEventsFilter']; |
|
52 | 52 | } |
53 | - header('Location: events.php?view=all'.$urlFilters); |
|
53 | + header('Location: events.php?view=all' . $urlFilters); |
|
54 | 54 | exit; |
55 | 55 | } |
56 | 56 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | session_destroy(); |
71 | 71 | header('Location: login.php'); |
72 | 72 | } else { |
73 | - header('Location: events.php?view='.$sessionUserID); |
|
73 | + header('Location: events.php?view=' . $sessionUserID); |
|
74 | 74 | exit; |
75 | 75 | } |
76 | 76 | } |
@@ -108,11 +108,11 @@ discard block |
||
108 | 108 | if ($editskillID != '') { |
109 | 109 | $sql = ("INSERT INTO cr_eventPeople (eventId, userRoleId) VALUES ('$editeventID', '$editskillID')"); |
110 | 110 | if (!mysqli_query(db(), $sql)) { |
111 | - die('Error: '.mysqli_error(db())); |
|
111 | + die('Error: ' . mysqli_error(db())); |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | // After we have inserted the data, we want to head back to the main page |
115 | - header('Location: index.php#section'.$editeventID); |
|
115 | + header('Location: index.php#section' . $editeventID); |
|
116 | 116 | exit; |
117 | 117 | } |
118 | 118 | |
@@ -125,12 +125,12 @@ discard block |
||
125 | 125 | |
126 | 126 | $sql = ("INSERT INTO cr_eventPeople (eventId, userRoleId) VALUES ('$editeventID', '$editskillID')"); |
127 | 127 | if (!mysqli_query(db(), $sql)) { |
128 | - die('Error: '.mysqli_error(db())); |
|
128 | + die('Error: ' . mysqli_error(db())); |
|
129 | 129 | } |
130 | 130 | } |
131 | 131 | |
132 | 132 | // After we have inserted the data, we want to head back to the main page |
133 | - header('Location: index.php#section'.$editeventID); |
|
133 | + header('Location: index.php#section' . $editeventID); |
|
134 | 134 | exit; |
135 | 135 | } |
136 | 136 | } |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | $result = mysqli_query(db(), $mysqli_query) or die(mysqli_error(db())); |
177 | 177 | $row = mysqli_fetch_object($result); |
178 | 178 | |
179 | - echo $row->name.'s'; |
|
179 | + echo $row->name . 's'; |
|
180 | 180 | } elseif ($_SESSION['onlyShowUserEvents'] == '1') { |
181 | 181 | echo 'My Events'; |
182 | 182 | } else { |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | |
203 | 203 | <?php if (!empty($pendingSwaps) && $pendingSwaps > 0): |
204 | 204 | if ($pendingSwaps > 1) { |
205 | - $swapsMessage = $pendingSwaps.' swaps are pending approval. Emails have been sent to the people covering to approve the swaps.'; |
|
205 | + $swapsMessage = $pendingSwaps . ' swaps are pending approval. Emails have been sent to the people covering to approve the swaps.'; |
|
206 | 206 | } else { |
207 | 207 | $swapsMessage = 'A swap is pending approval. An email has been sent to the person covering to approve the swap.'; |
208 | 208 | } ?> |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | WHERE e.type = '$filter' |
271 | 271 | AND e.date >= DATE(NOW()) |
272 | 272 | AND e.removed = 0 |
273 | - ORDER BY ".$dateOrderBy; |
|
273 | + ORDER BY " . $dateOrderBy; |
|
274 | 274 | } else { |
275 | 275 | $sql = "SELECT |
276 | 276 | DISTINCT e.id AS id, |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | WHERE e.date >= DATE(NOW()) |
299 | 299 | AND ur.userId = '$view' |
300 | 300 | AND e.removed = 0 |
301 | - ORDER BY ".$dateOrderBy; |
|
301 | + ORDER BY " . $dateOrderBy; |
|
302 | 302 | } |
303 | 303 | $result = mysqli_query(db(), $sql) or die(mysqli_error(db())); |
304 | 304 | |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | $newMonth = strftime('%B %Y', strtotime($row->sundayDate)); |
317 | 317 | if ($month != $newMonth) { |
318 | 318 | $month = $newMonth; |
319 | - echo '<li class="time-label"><span class="bg-green">'.$month.'</span></li>'; |
|
319 | + echo '<li class="time-label"><span class="bg-green">' . $month . '</span></li>'; |
|
320 | 320 | } |
321 | 321 | |
322 | 322 | // Event details?> |
@@ -330,9 +330,9 @@ discard block |
||
330 | 330 | <h4><?php |
331 | 331 | echo date('jS: ', strtotime($row->sundayDate)); |
332 | 332 | if ($eventName != '') { |
333 | - echo '<strong>'.$eventName.'</strong><br />'.$subType.' - <em>'.$type.'</em>'; |
|
333 | + echo '<strong>' . $eventName . '</strong><br />' . $subType . ' - <em>' . $type . '</em>'; |
|
334 | 334 | } else { |
335 | - echo $subType.' - <em>'.$type.'</em>'; |
|
335 | + echo $subType . ' - <em>' . $type . '</em>'; |
|
336 | 336 | } ?> |
337 | 337 | </h4> |
338 | 338 | </a> |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | <?php //<p><strong>Rehearsal:</strong> <?php |
345 | 345 | //echo ($row->rehearsalDateFormatted = "0000-00-00 00:00:00") ? "none" : strftime(siteSettings()->time_format_normal,strtotime($row->rehearsalDateFormatted));</p>?> |
346 | 346 | |
347 | - <p><strong><?php echo $row->eventGroup ? $row->eventGroup.': ' : '' ?></strong><?php echo $row->sermonTitle ?> <?php echo $row->bibleVerse ? '('.$row->bibleVerse.')' : '' ?></p> |
|
347 | + <p><strong><?php echo $row->eventGroup ? $row->eventGroup . ': ' : '' ?></strong><?php echo $row->sermonTitle ?> <?php echo $row->bibleVerse ? '(' . $row->bibleVerse . ')' : '' ?></p> |
|
348 | 348 | |
349 | 349 | <p><strong>Location:</strong> <?php echo $row->eventLocation; ?></p> |
350 | 350 | |
@@ -416,16 +416,16 @@ discard block |
||
416 | 416 | } else { |
417 | 417 | echo '</ul>'; |
418 | 418 | } |
419 | - echo '<p><strong>'.$groupName.'</strong></p>'; |
|
419 | + echo '<p><strong>' . $groupName . '</strong></p>'; |
|
420 | 420 | echo '<ul>'; |
421 | 421 | } |
422 | 422 | |
423 | 423 | echo '<li>'; |
424 | - echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=".$viewPeople->swap."'>" : ''; |
|
424 | + echo (isset($viewPeople->swap)) ? "<s><a class='text-danger' href='swap.php?swap=" . $viewPeople->swap . "'>" : ''; |
|
425 | 425 | echo $viewPeople->name; |
426 | 426 | |
427 | 427 | if ($viewPeople->rolename != '') { |
428 | - echo ' - <em>'.$viewPeople->rolename.'</em>'; |
|
428 | + echo ' - <em>' . $viewPeople->rolename . '</em>'; |
|
429 | 429 | } else { |
430 | 430 | // If there is no skill, we don't need to mention this. |
431 | 431 | } |
@@ -451,9 +451,9 @@ discard block |
||
451 | 451 | |
452 | 452 | <?php |
453 | 453 | if (isAdmin() || $userisBandAdmin || $userisEventEditor) { |
454 | - echo " <a class ='btn btn-primary' href='createEvent.php?action=edit&id=".$eventID."'><i class='fa fa-pencil'></i><span> Edit</span></a> "; /* Edit event */ |
|
455 | - echo " <a class ='btn btn-primary' href='createEvent.php?action=copy&id=".$eventID."'><i class='fa fa-pencil'></i><span> Copy</span></a> "; /* Edit event */ |
|
456 | - echo " <a class ='btn btn-primary' href='emailEvent.php?event=".$eventID."'><i class='fa fa-envelope-o'></i><span> Send email</span></a> "; /* Send email */ |
|
454 | + echo " <a class ='btn btn-primary' href='createEvent.php?action=edit&id=" . $eventID . "'><i class='fa fa-pencil'></i><span> Edit</span></a> "; /* Edit event */ |
|
455 | + echo " <a class ='btn btn-primary' href='createEvent.php?action=copy&id=" . $eventID . "'><i class='fa fa-pencil'></i><span> Copy</span></a> "; /* Edit event */ |
|
456 | + echo " <a class ='btn btn-primary' href='emailEvent.php?event=" . $eventID . "'><i class='fa fa-envelope-o'></i><span> Send email</span></a> "; /* Send email */ |
|
457 | 457 | } |
458 | 458 | if (isAdmin()) { |
459 | 459 | //echo "<a class='btn btn-primary' href='index.php?notifyEveryone=true&eventID=$eventID'><i class='fa fa-envelope-o'></i><span> Send email</span></a> "; /* Send email */ |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | |
463 | 463 | echo "<ul class='dropdown-menu'>"; |
464 | 464 | |
465 | - echo "<li><button type='button' class='btn btn-danger btn-block' data-toggle='modal' data-target='#deleteModal".$eventID."'>Delete</button></li>"; /* Delete Event */ |
|
465 | + echo "<li><button type='button' class='btn btn-danger btn-block' data-toggle='modal' data-target='#deleteModal" . $eventID . "'>Delete</button></li>"; /* Delete Event */ |
|
466 | 466 | |
467 | 467 | echo '</ul>'; |
468 | 468 | } ?> |
@@ -97,7 +97,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | public function getAllEventsWithType(ServerRequestInterface $request, ResponseInterface $response, $args) |
31 | 31 | { |
32 | - $this->logger->info("Fetch event GET '/events/type/".$args['id']."'"); |
|
32 | + $this->logger->info("Fetch event GET '/events/type/" . $args['id'] . "'"); |
|
33 | 33 | |
34 | 34 | $eventType = EventTypeQuery::create()->findPk($args['id']); |
35 | 35 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | public function getAllEventsWithSubType(ServerRequestInterface $request, ResponseInterface $response, $args) |
42 | 42 | { |
43 | - $this->logger->info("Fetch event GET '/events/type/".$args['id']."'"); |
|
43 | + $this->logger->info("Fetch event GET '/events/type/" . $args['id'] . "'"); |
|
44 | 44 | |
45 | 45 | $eventType = EventSubTypeQuery::create()->findPk($args['id']); |
46 | 46 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $e = EventQuery::create()->findPk($args['id']); |
70 | 70 | } |
71 | 71 | $e->setName($data['name']); |
72 | - $e->setDate(DateTime::createFromFormat('d/m/Y H:i', $data['date'].' '.$data['time'])); |
|
72 | + $e->setDate(DateTime::createFromFormat('d/m/Y H:i', $data['date'] . ' ' . $data['time'])); |
|
73 | 73 | $e->setEventTypeId($data['type']); |
74 | 74 | $e->setEventSubTypeId($data['subtype']); |
75 | 75 | $e->setLocationId($data['location']); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | public function getEvent(ServerRequestInterface $request, ResponseInterface $response, $args) |
98 | 98 | { |
99 | - $this->logger->info("Fetch event GET '/event/".$args['id']."'"); |
|
99 | + $this->logger->info("Fetch event GET '/event/" . $args['id'] . "'"); |
|
100 | 100 | $e = EventQuery::create()->findPK($args['id']); |
101 | 101 | |
102 | 102 | if (!$e->authoriser()->readableBy($this->auth->currentUser())) { |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | |
113 | 113 | public function getEventEditForm(ServerRequestInterface $request, ResponseInterface $response, $args) |
114 | 114 | { |
115 | - $this->logger->info("Fetch event GET '/event/".$args['id']."/edit'"); |
|
115 | + $this->logger->info("Fetch event GET '/event/" . $args['id'] . "/edit'"); |
|
116 | 116 | $e = EventQuery::create()->findPK($args['id']); |
117 | 117 | $l = LocationQuery::create()->orderByName()->find(); |
118 | 118 | $et = EventTypeQuery::create()->orderByName()->find(); |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | |
128 | 128 | public function getEventCopyForm(ServerRequestInterface $request, ResponseInterface $response, $args) |
129 | 129 | { |
130 | - $this->logger->info("Fetch event GET '/event/".$args['id']."/copy'"); |
|
130 | + $this->logger->info("Fetch event GET '/event/" . $args['id'] . "/copy'"); |
|
131 | 131 | $e = EventQuery::create()->findPK($args['id']); |
132 | 132 | $l = LocationQuery::create()->orderByName()->find(); |
133 | 133 | $et = EventTypeQuery::create()->orderByName()->find(); |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | |
143 | 143 | public function getEventAssignForm(ServerRequestInterface $request, ResponseInterface $response, $args) |
144 | 144 | { |
145 | - $this->logger->info("Fetch event GET '/event/".$args['id']."/assign'"); |
|
145 | + $this->logger->info("Fetch event GET '/event/" . $args['id'] . "/assign'"); |
|
146 | 146 | $e = EventQuery::create()->findPK($args['id']); |
147 | 147 | $ur = UserRoleQuery::create()->find(); |
148 | 148 | |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | |
156 | 156 | public function postEventAssign(ServerRequestInterface $request, ResponseInterface $response, $args) |
157 | 157 | { |
158 | - $this->logger->info("Create event people POST '/event".$args['id']."/assign'"); |
|
158 | + $this->logger->info("Create event people POST '/event" . $args['id'] . "/assign'"); |
|
159 | 159 | |
160 | 160 | $eventId = filter_var($args['id'], FILTER_SANITIZE_NUMBER_INT); |
161 | 161 | $existingUserRoles = UserRoleQuery::create()->useEventPersonQuery()->filterByEventId($eventId)->endUse()->find(); |