PluginProbe
ShiftController Employee Shift Scheduling / 4.9.66
ShiftController Employee Shift Scheduling v4.9.66
4.9.97 4.9.96 4.9.95 4.9.74 4.9.75 4.9.76 4.9.77 4.9.78 4.9.84 4.9.85 4.9.87 4.9.91 4.9.92 trunk 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 3.2.4 All 38 releases
← All changes | sh4/shifts/query.php +2 -41 4.9.954.9.66 View file →
@@ -54,18 +54,8 @@
54 54 $this->end = $dateTime;
55 55 return $this;
56 56 }
57 57
58 - public function getStart()
59 - {
60 - return $this->start;
61 - }
62 -
63 - public function getEnd()
64 - {
65 - return $this->end;
66 - }
67 -
68 58 public function keep( SH4_Shifts_Model $model )
69 59 {
70 60 $id = $model->getId();
71 61 if( $id ){
@@ -183,22 +173,15 @@
183 173 // if( $this->employees ){
184 174 // $args[] = array( 'employee_id', 'IN', array_keys($this->employees) );
185 175 // }
186 176
187 -/*
188 -2025-04-29: commented out as it produced a bug, resort later
189 177 $args[] = array('sort', 'starts_at', 'asc');
190 178 $args[] = array('sort', 'ends_at', 'asc');
191 179 $args[] = array('sort', 'calendar_id', 'asc');
192 -*/
193 -
194 -
195 -// $args = array();
180 +// _print_r( $args );
181 +// exit;
196 182 $results = $this->crud->read( $args );
197 -// _print_r($results);
198 -// exit;
199 183
200 -
201 184 $this->_storage = array();
202 185 foreach( $results as $array ){
203 186 $shift = $this->arrayToModel( $array );
204 187 if( ! $shift ){
@@ -210,30 +193,8 @@
210 193 }
211 194
212 195 $this->_loadedEnd = $this->end ? $this->end : 230001010000;
213 196 $this->_loadedStart = $this->start ? $this->start : 197001010000;
214 -
215 -/*
216 -2025-04-29: resort
217 - $args[] = array('sort', 'starts_at', 'asc');
218 - $args[] = array('sort', 'ends_at', 'asc');
219 - $args[] = array('sort', 'calendar_id', 'asc');
220 -*/
221 -
222 - // uasort($this->_storage, function($a, $b) {
223 - // if ($a->getStart() > $b->getStart()) {
224 - // return 1;
225 - // } elseif ($a->getStart() < $b->getStart()) {
226 - // return -1;
227 - // }
228 -
229 - // if ($a->getEnd() > $b->getEnd()) {
230 - // return 1;
231 - // } elseif ($a->getEnd() < $b->getEnd()) {
232 - // return -1;
233 - // }
234 - // });
235 -
236 197 }
237 198
238 199 public function findAllByEmployee( SH4_Employees_Model $employee )
239 200 {