Merge branch '1.9.x' into 1.10.x

1.10.x
Julio Montoya 10 years ago
commit 017a2c159e
  1. 29
      main/cron/import_csv.php

@ -1010,7 +1010,6 @@ class ImportCsv
// 2014-06-30
$dateStart = explode('/', $session['DateStart']);
$dateEnd = explode('/', $session['DateEnd']);
//$visibility = $session['visibility'];
$visibility = $this->defaultSessionVisibility;
$coachId = null;
@ -1028,8 +1027,8 @@ class ImportCsv
$dateEnd[0],
$dateEnd[1],
$dateEnd[2],
null, //$session['nb_days_access_before_beginning'],
null, //$session['nb_days_access_after_end'],
$this->daysCoachAccessBeforeBeginning,
$this->daysCoachAccessAfterBeginning,
null,
$coachUserName,
$categoryId,
@ -1045,6 +1044,26 @@ class ImportCsv
);
}
} else {
$sessionInfo = api_get_session_info($sessionId);
$accessBefore = null;
$accessAfter = null;
if (empty($sessionInfo['nb_days_access_before_beginning']) ||
(!empty($sessionInfo['nb_days_access_before_beginning']) &&
$sessionInfo['nb_days_access_before_beginning'] < $this->daysCoachAccessBeforeBeginning)
) {
$accessBefore = intval($this->daysCoachAccessBeforeBeginning);
}
$accessAfter = null;
if (empty($sessionInfo['nb_days_access_after_end']) ||
(!empty($sessionInfo['nb_days_access_after_end']) &&
$sessionInfo['nb_days_access_after_end'] < $this->daysCoachAccessAfterBeginning)
) {
$accessAfter = intval($this->daysCoachAccessAfterBeginning);
}
$result = SessionManager::edit_session(
$sessionId,
$session['SessionName'],
@ -1054,8 +1073,8 @@ class ImportCsv
$dateEnd[0],
$dateEnd[1],
$dateEnd[2],
null,//$session['nb_days_access_before_beginning'],
null,//$session['nb_days_access_after_end'],
$accessBefore,
$accessAfter,
null,
$coachId,
$categoryId,

Loading…
Cancel
Save