From ace0a2791633cb956402f8a4d4891b8c4dba6435 Mon Sep 17 00:00:00 2001 From: Tyler Sanborn Date: Thu, 16 Oct 2014 15:17:10 -0500 Subject: [PATCH] Fix getShifts() The get shift method will not return anything without parameters (even though the documentation says only token is required). See this post for confirmation from shiftplanning: http://www.shiftplanning.com/forums/viewtopic.php?id=45369. Allowed parameters to be passed through getShifts --- src/shiftplanning.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/shiftplanning.php b/src/shiftplanning.php index 46e6a87..818bdb3 100644 --- a/src/shiftplanning.php +++ b/src/shiftplanning.php @@ -1003,12 +1003,15 @@ public function deleteSchedule( $id ) ); } - public function getShifts( ) + public function getShifts( $shift_filters = array( ) ) {// get shifts return $this->setRequest( - array( - 'module' => 'schedule.shifts', - 'method' => 'GET' + array_merge( + array( + 'module' => 'schedule.shifts', + 'method' => 'GET' + ), + $shift_filters ) ); } @@ -1294,4 +1297,4 @@ public function getAPIMethods( ) ); } } -?> \ No newline at end of file +?>