Skip to content

Commit

Permalink
GP-15420: Remove fixes of dates in api. Issue does't reproduce any more.
Browse files Browse the repository at this point in the history
  • Loading branch information
awg-github committed Jul 1, 2021
1 parent ece19df commit 5976857
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
6 changes: 0 additions & 6 deletions api/v3/Sqltask/Create.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ function civicrm_api3_sqltask_create($params) {
'input_required','enabled', 'weight', 'run_permissions', 'abort_on_error', 'schedule_start_date'
];

// it fixes error when php cannot parse string
// replaces space to regular space
if (isset($params['schedule_start_date'])) {
$params['schedule_start_date'] = str_replace(chr(160),' ', $params['schedule_start_date']);
}

$booleanParams = ['input_required', 'enabled', 'abort_on_error'];
foreach ($booleanParams as $booleanParam) {
if (array_key_exists($booleanParam, $params) && !($params[$booleanParam] == '1' || $params[$booleanParam] == '0')) {
Expand Down
9 changes: 0 additions & 9 deletions api/v3/Sqltask/GetPlanningScheduleDates.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@
* @return array
*/
function civicrm_api3_sqltask_get_planning_schedule_dates($params) {
// it fixes error when php cannot parse string
// replaces space to regular space
if (isset($params['last_execution'])) {
$params['last_execution'] = str_replace(chr(160),' ', $params['last_execution']);
}
if (isset($params['schedule_start_date'])) {
$params['schedule_start_date'] = str_replace(chr(160),' ', $params['schedule_start_date']);
}

$taskSchedule = new CRM_Sqltasks_TaskSchedule(
$params['schedule_frequency'],
isset($params['schedule_month']) ? $params['schedule_month'] : null,
Expand Down

0 comments on commit 5976857

Please sign in to comment.